---
title: "Create content library document"
method: POST
path: "/trust_exchange/content_library/document"
tags: ["trust_exchange"]
---

# Create content library document

`POST /trust_exchange/content_library/document`

## Request

- Base URL: `https://cyber-risk.upguard.com/api/public`
- URL: `https://cyber-risk.upguard.com/api/public/trust_exchange/content_library/document`
- Auth: API key in header `Authorization`
- TypeScript: <https://skmtc.dev/upguard/apis/upguard-cyberrisk-api/docs/trust_exchange/content_library/document/post.ts> (a function with typed inputs; its response is checked against the schema)

Creates a new document in the organization's content library via multipart file upload.

Required API key permissions: `TrustExchange` and `ReadWrite` (select when creating API key in Account Settings)

## Query parameters

- `document_name` string, required
- `document_type` string, required
- `document_description` string
- `public_trust_page_access` string

## Request body `multipart/form-data`

- object
  - `file` string, binary, required: The file to upload.

## Response `200`

A single content library document.

- ContentLibraryDocument
  - `archived` boolean: Whether the document is archived.
  - `created_at` string, date-time: When the document was created.
  - `created_by_email` string: The email of the user who created this document.
  - `created_by_name` string: The name of the user who created this document.
  - `description` string: The description of the document.
  - `document_type` string: The document type.
  - `expires_at` string, date-time: The expiration date of the document, if set.
  - `internal_notes` string: Internal notes only visible to your organization.
  - `name` string: The name of the document.
  - `published_trust_center_uuids` string[]: UUIDs of published Trust Centers where this document is included.
  - `unpublished_trust_center_uuids` string[]: UUIDs of unpublished Trust Centers where this document is included.
  - `updated_at` string, date-time: When the document was last updated.
  - `updated_by_email` string: The email of the user who last updated this document.
  - `updated_by_name` string: The name of the user who last updated this document.
  - `usage_count` integer: The number of times this document has been used. For example, added to a Trust Center, or used in a questionnaire.
  - `uuid` string: The unique identifier for the document.
  - `versions` ContentLibraryDocumentVersion[]: Versions of the document.
    - `created_at` string, date-time: When this version was created.
    - `filename` string: The filename of this version.
    - `version` integer: The version number.
    - `virus_safe` boolean: Whether this version has been scanned and verified virus safe. After uploading a document version, it may take a few minutes for it to be initially scanned. Document versions cannot be retrieved until this is true.

## Other responses

- `403`: Account does not have access to requested entities
- `422`: An invalid parameter was supplied or a mandatory parameter was missing
- `429`: Too many requests have been made to this endpoint.
- `500`: An internal system error occurred

## Changes

- **2026-11-07** `d044bf6dc61e`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/upguard/apis/upguard-cyberrisk-api/changes/trust_exchange/content_library/document/post.md)

---

[API](https://skmtc.dev/upguard/apis/upguard-cyberrisk-api.md) - [All operations](https://skmtc.dev/upguard/apis/upguard-cyberrisk-api/llms.txt) - [OpenAPI document](https://skmtc.dev/upguard/apis/upguard-cyberrisk-api/revisions/d044bf6dc61e?raw)
