---
title: "Unpin attachment from its owner contact through its note/call/deal"
description: "PATCH /attachments/{attachment_id}/unpin — Unpins an attachment, so it no longer surfaces on its contact's profile and appears only against the note, call, meeting or deal it was uploaded to. The file itself is not deleted."
canonical_url: https://developer.onepagecrm.com/api/reference/attachments/patch-attachments-attachment_id-unpin/
source: Markdown mirror of https://developer.onepagecrm.com/api/reference/attachments/patch-attachments-attachment_id-unpin/
---

`PATCH /attachments/{attachment_id}/unpin`

Unpins an attachment, so it no longer surfaces on its contact's profile and appears only against the note, call, meeting or deal it was uploaded to. The file itself is not deleted.

Resource: [Attachments](https://developer.onepagecrm.com/api/reference/attachments/) · [API Reference](https://developer.onepagecrm.com/api/reference/)

## Request

```bash
curl -X PATCH "https://app.onepagecrm.com/api/v3/attachments/{attachment_id}/unpin" \
  -u $user_id:$api_key
```

Authentication is HTTP Basic — `user_id` as username, `api_key` as password.
See https://developer.onepagecrm.com/api/authentication/.

## Path parameters

| Name | Type | Description |
| --- | --- | --- |
| `attachment_id` | string | Attachment ID |

## Responses

### 200

OK

```json
{
  "status": 0,
  "message": "OK",
  "timestamp": 1528373119,
  "data": {
    "id": "5afc1ea9d556730b780096db",
    "filename": "mario.jpg",
    "custom_filename": "another_mario.jpg",
    "pinned": true,
    "pinned_at": "2022-01-24T10:42:39Z",
    "size": 3841,
    "storage_provider": "amazon",
    "url": "https://{foo.bar}/mario.jpg",
    "url_expires_at": "2018-05-16T13:06:53Z",
    "thumbnail": {
      "url": "https://{foo.bar}/mario-thumbnail.jpg"
    }
  }
}
```

Standard error responses: 400, 401, 403, 404, 409, 500 — shared across the API. See https://developer.onepagecrm.com/api/errors/.

## Related guides

- [Authentication](https://developer.onepagecrm.com/api/authentication/)
- [Errors](https://developer.onepagecrm.com/api/errors/)
- [Rate limits](https://developer.onepagecrm.com/api/rate-limits/)
