> For the complete documentation index, see [llms.txt](https://docs.r0app.com/api/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.r0app.com/api/account-resources/relationships.md).

# Relationships

{% hint style="warning" %}
**This endpoint is a BETA endpoint and not currently available in the mobile or web application.**
{% endhint %}

This endpoint provides a list of relationships in R0. Relationships track more granular data about how you and your contacts are related. R0 then provides additional tools to view and manage these relationships. For example, you can track your partner(s) and anniversary dates as well as set reminders for these dates.

Since relationships are two sided the inverse of a relationship may be included within the `relationship_id` field. For example, a parent and child will reference each other. When a user relationship is created, if there's a record in the `relationship_id` field another record will automatically be created for the other individual in the relationship.

#### Example:

The relationships table includes a parent and child among several other records:

```json
...{
        "id": "3c200a99-be4c-4c98-abaf-cd1a4e1267fc",
        "name": "Child",
        "relationship_id": "c4f653ed-1506-4c19-881c-e746f4272966"
},
{
        "id": "c4f653ed-1506-4c19-881c-e746f4272966",
        "name": "Parent",
        "relationship_id": "3c200a99-be4c-4c98-abaf-cd1a4e1267fc"
},...
```

The user's table includes a record for Bart (id = `492788b9-be39-4923-b6a8-0850feee232a`and Marge Simpson (id = `6a909023-a55d-419b-bb39-8b3fb9ebe1ac`). So creating a relationship with Bart/Marge only requires making one request to manage both sides of a relationship:

```
curl https://web.r0app.com/api/v1/orgs/:org_id/contacts/6a909023-a55d-419b-bb39-8b3fb9ebe1ac/contact_relationships
    -X POST \
    -d 'contact_relationship[second_contact_id]=492788b9-be39-4923-b6a8-0850feee232a' \
    -d 'contact_relationship[relationship_id]=3c200a99-be4c-4c98-abaf-cd1a4e1267fc' \
    -H 'Authorization: Bearer <token>'
```

### Resources

## Fetch a list of available relationships

<mark style="color:blue;">`GET`</mark> `https://web.r0app.com/api/v1/relationships`

Returns a list of types of relationships available in R0.

#### Example request

{% tabs %}
{% tab title="curl" %}

```sh
curl https://web.r0app.com/api/v1/relationships \
    -X GET \
    -H 'Authorization: Bearer <token>'
```

{% endtab %}
{% endtabs %}

### User & contact relationships

These endpoints help you manage your relationships with your contacts (user\_relationships) and the relationships your contacts have with each other (contact\_relationships).

#### Links:

* [Your (user) relationships](/api/prm-resources/your-relationships.md)
* [Contact relationships](/api/prm-resources/contact-metadata.md#contact-relationships)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.r0app.com/api/account-resources/relationships.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
