Company logoTrust Center Documentation

Create document metadata

Create document metadata. This call carries no file: `title`, `category` and `access_level` are required, and `category` is the UUID of an existing category…

POST
/api/v1/documents

Create document metadata. This call carries no file: title, category and access_level are required, and category is the UUID of an existing category rather than its name.

Uploading a document therefore takes two calls. Create the metadata here, then send the file to PUT /api/v1/documents/{id}/file with the documentId this call returns, which is also given back as uploadUrl.

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

curl -X POST "https://example.com/api/v1/documents" \  -H "Content-Type: application/json" \  -d '{    "title": "Privacy Policy",    "description": "Company privacy policy document",    "category": "550e8400-e29b-41d4-a716-446655440000",    "access_level": "public"  }'
{  "success": true,  "data": {    "documentId": "4704590c-004e-410d-adf7-acb7ca0a7052",    "uploadUrl": "string"  }}

How is this guide?