---
title: "Remove Consent Attachment"
method: DELETE
path: "/rest/api/preferences/v1/attachments-reference/{attachmentId}"
tags: ["Consent Attachments"]
---

# Remove Consent Attachment

`DELETE /rest/api/preferences/v1/attachments-reference/{attachmentId}`

## Request

- Base URL: `https://hostname`
- URL: `https://hostname/rest/api/preferences/v1/attachments-reference/{attachmentId}`
- Auth: OAuth 2
  - Client credentials
  - Token URL: `https://{hostname}/api/access/v1/oauth/token` scopes: `CONSENT`

Use this API to remove a specific file reference attached to a given data subject.

> 🗒 Things to Know
> 
> - The `attachmentId` parameter value corresponds to the `RefId` parameter value returned after uploading a file using the [Upload Attachments](https://developer.onetrust.com/onetrust/reference/uploadconsentattachments) API.

## Path parameters

- `attachmentId` string, uuid, required

## Headers

- `identifier` string, required

## Response `202`

Attachment reference deletion request accepted for processing.

- DSPreferneceCacheConsentAttachmentReferencesResponse
  - `identifier` string: Identifier of the data subject
  - `statusMessage` string: Status message describing the result of the operation

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `403`: Forbidden
- `429`: Too Many Requests. For more information, see [API Rate Limits](https://developer.onetrust.com/onetrust/reference/rate-limits-overview).
- `500`: Internal Server Error

---

[API](https://skmtc.dev/onetrust/apis/consent-preferences-universal-consent-preference-management.md) - [All operations](https://skmtc.dev/onetrust/apis/consent-preferences-universal-consent-preference-management/llms.txt) - [OpenAPI document](https://skmtc.dev/onetrust/apis/consent-preferences-universal-consent-preference-management/revisions/fe4a0697ec9d?raw)
