Company logoTrust Center Documentation

Create document metadata

Create document metadata without file upload. File must be uploaded separately using the file upload endpoint.

POST
/api/v1/documents
AuthorizationBearer <token>

In: header

titlestring

Document title

Length1 <= length
description?string

Document description

description_markdown?string

Markdown-formatted description

categorystring

Category ID (must be UUID)

Formatuuid
access_levelstring

Document access level

Value in"public" | "restricted" | "requires_nda" | "internal"
issue_date?string

Issue date in YYYY-MM-DD format

Match^\d{4}-\d{2}-\d{2}$
Formatdate
expiry_date?string

Expiry date in YYYY-MM-DD format

Match^\d{4}-\d{2}-\d{2}$
Formatdate
validity_months?integer

Validity period in months

Range1 <= value
state?string

Initial document state

Default"valid"
Value in"valid" | "pending" | "expired" | "inactive"
featured?boolean

Whether document should be featured

Defaultfalse
show_validity_period_on_card?boolean

Show validity period on card display

Defaulttrue
template?string

Template ID to use for document creation

Formatuuid

Response Body

const body = JSON.stringify({
  "title": "Privacy Policy",
  "category": "86d23d13-9dbb-46f3-82d0-25253c7750c3",
  "access_level": "public"
})

fetch("https://app.orbiqhq.com/api/v1/documents", {
  body
})
{
  "success": true,
  "data": {
    "documentId": "4704590c-004e-410d-adf7-acb7ca0a7052",
    "uploadUrl": "/api/v1/documents/doc-123/file"
  }
}
{
  "error": "Invalid input: category: category_must_be_uuid"
}
Empty
Empty

How is this guide?