> 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/prm-resources/contacts.md).

# Contacts

A contact represent a single individual, typically human.

### View contacts

## Fetch a list of contacts

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

Returns a paginated list of an organization's contacts.

#### Query Parameters

| Name       | Type    | Description                                                                                                                                                        |
| ---------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| include\[] | String  | If set to `deleted` all active and [deleted records](/api/introduction/deleting-resources.md) will be returned in the response.                                    |
| page       | Integer | For more info, see the [pagination section ](/api/introduction/getting-started.md#pagination)in the [Getting started](/api/introduction/getting-started.md) guide. |
| limit      | Integer | For more info, see the [pagination section ](/api/introduction/getting-started.md#pagination)in the [Getting started](/api/introduction/getting-started.md) guide. |
| search     | String  | Optional: can be used to search for contact details. (Don't forget to URL encode query parameters)                                                                 |

#### Example request

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

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

{% endtab %}
{% endtabs %}

### View a contact

## Fetch a single contact

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

Returns a single contact. If you need to gather user metadata as well you may reduce the number of requests by using the ?include\[] parameter.

#### Path Parameters

| Name                                           | Type   | Description |
| ---------------------------------------------- | ------ | ----------- |
| :contact\_id<mark style="color:red;">\*</mark> | String |             |

#### Query Parameters

| Name       | Type   | Description                                                                                                        |
| ---------- | ------ | ------------------------------------------------------------------------------------------------------------------ |
| include\[] | String | You can include `tags`, `pets`, `phone_numbers`, `email_addresses`, `locations`, and/or `expertise_tags` metadata. |

#### Example request

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

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

{% endtab %}
{% endtabs %}

### Create a contact

{% hint style="warning" %}
You may have duplicate contacts within a platform or across various platforms like LinkedIn or Facebook. **If you have a connection with an individual on one of these platforms it's recommended you create that user via a** [**import**](/api/prm-resources/imports.md) **or through one of the integrations.** These workflows will allow you to stage new users, we attempt to find duplicate contacts and allow you to resolve duplicate warnings before importing contacts.
{% endhint %}

## Create a contact

<mark style="color:green;">`POST`</mark> `https://web.r0app.com/api/v1/orgs/:org_id/contacts`

#### Request Body

| Name                                                           | Type    | Description                                                                                                                                      |
| -------------------------------------------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| contact\[first\_name]<mark style="color:red;">\*</mark>        | String  |                                                                                                                                                  |
| contact\[middle\_name]                                         | String  |                                                                                                                                                  |
| contact\[last\_name]                                           | String  |                                                                                                                                                  |
| contact\[relationship\_type]<mark style="color:red;">\*</mark> | Integer | <p>Required: 0 - 5<br><br><a href="broken://spaces/OEk8Tq8cgyoSRQQKybSm/pages/O3YKp5ymE9h1qg3rHfco">Learn more about relationship types</a>.</p> |
| contact\[nickname]                                             | String  |                                                                                                                                                  |
| contact\[employer]                                             | String  |                                                                                                                                                  |
| contact\[job\_title]                                           | String  |                                                                                                                                                  |
| contact\[linkedin\_url]                                        | String  |                                                                                                                                                  |
| contact\[how\_you\_met]                                        | String  |                                                                                                                                                  |
| contact\[birthday]                                             | String  | ISO8601 format, [learn more](/api/introduction/getting-started.md#dates-and-times).                                                              |
| contact\[gender]                                               | String  | Options: `male`, `female`, `transgender`, `non-binary`, `other`                                                                                  |

#### Example request

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

```sh
curl https://web.r0app.com/api/v1/orgs/:org_id/contacts \
    -X POST \
    -H 'Authorization: Bearer <token>' \
    -d 'contact[relationship_type]=1' \
    -d 'contact[first_name]=Bart'
```

{% endtab %}
{% endtabs %}

### Update a contact

## Update a contact

<mark style="color:purple;">`PATCH`</mark> `https://web.r0app.com/api/v1/orgs/:org_id/contacts/:contact_id`

#### Request Body

| Name                         | Type    | Description                                                                                                                                      |
| ---------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| contact\[first\_name]        | String  |                                                                                                                                                  |
| contact\[middle\_name]       | String  |                                                                                                                                                  |
| contact\[last\_name]         | String  |                                                                                                                                                  |
| contact\[relationship\_type] | Integer | <p>Required: 0 - 5<br><br><a href="broken://spaces/OEk8Tq8cgyoSRQQKybSm/pages/O3YKp5ymE9h1qg3rHfco">Learn more about relationship types</a>.</p> |
| contact\[nickname]           | String  |                                                                                                                                                  |
| contact\[employer]           | String  |                                                                                                                                                  |
| contact\[job\_title]         | String  |                                                                                                                                                  |
| contact\[linkedin\_url]      | String  |                                                                                                                                                  |
| contact\[how\_you\_met]      | String  |                                                                                                                                                  |
| contact\[birthday]           | String  | ISO8601 format, [learn more](/api/introduction/getting-started.md#dates-and-times).                                                              |
| contact\[gender]             | String  | Options: `male`, `female`, `transgender`, `non-binary`, `other`                                                                                  |

#### Example request

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

```sh
curl https://web.r0app.com/api/v1/orgs/:org_id/contacts/:contact_id \
    -X PATCH \
    -H 'Authorization: Bearer <token>' \
    -d 'contact[nickname]=Bartman'
```

{% endtab %}
{% endtabs %}

### Delete a contact

## Delete a contact

<mark style="color:red;">`DELETE`</mark> `https://web.r0app.com/api/v1/orgs/:org_id/contacts/:contact_id`

#### Path Parameters

| Name                                           | Type   | Description |
| ---------------------------------------------- | ------ | ----------- |
| :contact\_id<mark style="color:red;">\*</mark> | String |             |

#### Request Body

| Name         | Type   | Description                                                                   |
| ------------ | ------ | ----------------------------------------------------------------------------- |
| soft\_delete | String | [Learn more about deleting records](/api/introduction/deleting-resources.md). |

#### Example request

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

```sh
curl https://web.r0app.com/api/v1/orgs/:org_id/contacts/:contact_id \
    -X DELETE \
    -H 'Authorization: Bearer <token>'
```

{% endtab %}
{% endtabs %}


---

# 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, and the optional `goal` query parameter:

```
GET https://docs.r0app.com/api/prm-resources/contacts.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
