---
title: "Upload File"
method: POST
path: "/api/document/v2/attachments"
tags: ["Attachments"]
---

# Upload File

`POST /api/document/v2/attachments`

Use this API to upload a file up to 64MB to the OneTrust Platform. The response will include the `Id` and `FileName` parameters, which can be used to attach the file to a product within the platform.

> 🗒 Things to Know
> 
> - The extension of the uploaded file must be in one of the supported file formats. For more information, see [Using the Document Repository](https://my.onetrust.com/s/article/UUID-24981513-4770-b8a1-b365-cc8b7fdb1712).
> - The `attachment` parameter below includes the following information: 
>   - `Parameters & Descriptions` contains details on the list of parameters and expected parameter values. This should be used for reference only.
>   - `Attachment JSON Object` contains the required format in which the parameters and parameter values must be sent in the request.

## Response `201`

OK

- AttachmentResponse
  - `Id` string, uuid — The unique identifier of the uploaded file.
  - `Name` string — The display name of the file.
  - `FileName` string — The name of the file, including its extension.
  - `Comments` string — The notes about the file.
  - `FileSize` integer — The size of the file in bytes.
  - `FileType` 'pdf' | 'doc' | 'docx' | 'txt' | 'png' | 'jpg' | 'jpeg' | 'csv' — The type of file, based on its extension.
  - `CreatedById` string, uuid — The unique identifier of the user who uploaded the file.
  - `CreatedBy` string — The name of the user who uploaded the file.
  - `CreatedDT` string, date-time — The date and time when the file was uploaded.
  - `Type` integer — The number associated with the content type of the file, as listed within Show Details.
  - `RefId` string, uuid — The unique identifier of the record associated with the attached file.
  - `IsInternal` boolean — This flag indicates whether the file is marked for internal use.

## 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.net/onetrust/apis/platform-access-management.md) · [All operations](https://skmtc.net/onetrust/apis/platform-access-management/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/onetrust/platform-access-management/versions/21de3aa0b170/schema)
