Your relationships

This endpoint is a BETA endpoint and not currently available in the mobile or web application.

You can add relationships with your contacts to keep track of relationship data like anniversary date and your relation to the individual. This relationship data can then be used to trigger notifications and other actions at a later date.

View your relationships

Please note this endpoint returns a list of relationships you create with your contact(s). This does not return your entire contact list. To view those endpoints, click here.

Fetch a list of a user's relationships

GET https://web.r0app.com/api/v1/orgs/:org_id/user_relationships

Returns a list of relationships created for a given user. The user is determined via the owner of the token provided in the header.

Query Parameters

Name
Type
Description

include[]

String

page

Integer

limit

Integer

Example request

curl https://web.r0app.com/api/v1/orgs/:org_id/user_relationships \
    -X GET \
    -H 'Authorization: Bearer <token>'

View an individual relationship

Fetch an individual user relationship record

GET https://web.r0app.com/api/v1/orgs/:org_id/user_relationships/:user_relationship_id

Example request

curl https://web.r0app.com/api/v1/orgs/:org_id/user_relationships/:user_relationship_id \
    -X GET \
    -H 'Authorization: Bearer <token>'

Create a relationship

Create a user relationship record

POST https://web.r0app.com/api/v1/orgs/:org_id/user_relationships

Creates a relationship record with the token bearer and a given contact.

Request Body

Name
Type
Description

user_relationship[contact_id]*

String

user_relationship[anniversary_date]

user_relationship[relationship_id]*

String

Example request

curl https://web.r0app.com/api/v1/orgs/:org_id/user_relationships \
    -X POST \
    -H 'Authorization: Bearer <token>' \
    -d 'user_relationship[contact_id]=17659d00-8866-44b7-bde3-ec9816652da9' \
    -d 'user_relationship[anniversary_date]=2020-07-22' \
    -d 'user_relationship[relationship_id]=85fb935d-1601-4695-9e88-3e63ff019f68'

Update a relationship

Update a relationship record

PATCH https://web.r0app.com/api/v1/orgs/:org_id/user_relationships/:user_relationship_id

Path Parameters

Name
Type
Description

:user_relationship_id*

String

When editing the UUID should be included as a path parameter

Request Body

Name
Type
Description

user_relationship[anniversary_date]*

Example request

curl https://web.r0app.com/api/v1/orgs/:org_id/user_relationships/:user_relationship_id \
    -X PATCH \
    -H 'Authorization: Bearer <token>' \
    -d 'user_relationship[anniversary_date]=2019-07-22' \

Delete a relationship connection

Delete a relationship record

DELETE https://web.r0app.com/api/v1/orgs/:org_id/user_relationships/:user_relationship_id

Path Parameters

Name
Type
Description

:user_relationship_id*

String

UUID of the relationship to be deleted.

Example request

curl https://web.r0app.com/api/v1/orgs/:org_id/user_relationships/:user_relationship_id \
    -X DELETE \
    -H 'Authorization: Bearer <token>'

Last updated