> 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/attachments.md).

# Attachments

### View a contact's attachments

## Fetch a list of a contact's attachments

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

Returns a paginated list of a contact's attachments.

#### Query Parameters

| Name  | Type    | Description                                                                                                                                                        |
| ----- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| 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. |

#### Example request

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

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

{% endtab %}
{% endtabs %}

### View a contact's attachment

## Fetch a contact's single attachment

<mark style="color:blue;">`GET`</mark> `https://web.r0app.com/api/v1/orgs/:org_id/contacts/:contact_id/attachments/:attachment_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 |             |
| :attachment\_id<mark style="color:red;">\*</mark> | String |             |

#### Example request

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

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

{% endtab %}
{% endtabs %}

### Upload an attachment

## Upload an attachment

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

#### Request Body

| Name   | Type | Description |
| ------ | ---- | ----------- |
| upload | File |             |

#### Example request

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

```sh
curl https://web.r0app.com/api/v1/orgs/:org_id/contacts/:contact_id/attachments \
    -X POST \
    -H 'Authorization: Bearer <token>' \
    -F 'upload=@example.png'
```

{% endtab %}
{% endtabs %}

### Delete an attachment

{% hint style="danger" %}
**NOTE: your attachment will be deleted from our servers immediately. There is no recourse for this action, proceed with caution.**
{% endhint %}

## Delete an attachment

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

#### Path Parameters

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

#### Example request

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

```sh
curl https://web.r0app.com/api/v1/orgs/:org_id/contacts/:contact_id/attachments/:attachment_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/attachments.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.
