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

# Download Consent Attachment

`GET /rest/api/preferences/v1/attachments/{attachmentId}`

## Request

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

Use this API to download a specific file reference attached to a given data subject. The file will be downloaded in .zip format.

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

## Path parameters

- `attachmentId` string, uuid, required

## Headers

- `identifier` string, required

## Response `200`

ZIP file containing the requested attachment.

## 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)
