---
title: "Remove All Consent Attachments"
method: DELETE
path: "/rest/api/preferences/v1/datasubjects/{identifier}/attachment-references"
tags: ["Consent Attachments"]
---

# Remove All Consent Attachments

`DELETE /rest/api/preferences/v1/datasubjects/{identifier}/attachment-references`

## Request

- Base URL: `https://hostname`
- URL: `https://hostname/rest/api/preferences/v1/datasubjects/{identifier}/attachment-references`
- Auth: OAuth 2
  - Client credentials
  - Token URL: `https://{hostname}/api/access/v1/oauth/token` scopes: `CONSENT`

Use this API to remove all file references attached to a given data subject.

## Path parameters

- `identifier` string, required

## Response `202`

All attachment references 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)
