TripleBooks
Documents

Files

GET
/api/documents

DOCUMENTS.VIEW. Authorization: Bearer ak_.... Required scope: read:documents. Pass entityId query (must match the key’s entity). Session cookie auth with x-entity-id is also supported.

Authorization

bearerAuth
AuthorizationBearer <token>

Create keys under Settings → API keys. Prefix ak_. Send as Authorization: Bearer ak_....

In: header

Query Parameters

entityId*string

Entity UUID; must match the API key’s entity when using Bearer auth.

Formatuuid
linkableType?string

With linkableId, filter to documents linked to this record type

linkableId?string

With linkableType, filter to documents linked to this record id

Formatuuid

Response Body

application/json

application/json

application/json

curl -X GET "https://example.com/api/documents?entityId=497f6eca-6276-4993-bfeb-53cbbbba6f08"
[  {    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "entityId": "156e622c-6cdf-4c27-9bc9-2f2db69919f5",    "filename": "string",    "mimeType": "string",    "sizeBytes": 0,    "blobUrl": "string",    "description": "string",    "folderId": "5b6379a4-2a6c-4085-b184-45838a3b8e7e",    "tags": null,    "status": "string",    "uploadedBy": "1e2815fd-75c7-4289-86d5-2503daeb59b8",    "createdAt": "2019-08-24T14:15:22Z",    "updatedAt": "2019-08-24T14:15:22Z"  }]
{  "error": "string"}
{  "error": "string"}
POST
/api/documents

DOCUMENTS.EDIT. Multipart upload or JSON action: link|unlink. Authorization: Bearer ak_.... Required scope: write:documents. Pass entityId query or JSON body (must match the key’s entity). Session cookie auth with x-entity-id is also supported.

Authorization

bearerAuth
AuthorizationBearer <token>

Create keys under Settings → API keys. Prefix ak_. Send as Authorization: Bearer ak_....

In: header

Query Parameters

entityId*string

Entity UUID; must match the API key’s entity when using Bearer auth.

Formatuuid

Request Body

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/api/documents?entityId=497f6eca-6276-4993-bfeb-53cbbbba6f08" \  -H "Content-Type: application/json" \  -d '{    "action": "link",    "documentId": "4704590c-004e-410d-adf7-acb7ca0a7052",    "linkableType": "string",    "linkableId": "7cca18e0-f038-48b8-a601-8542a34fb1d9"  }'
null
{  "error": "string"}
{  "error": "string"}
{  "error": "string"}
{  "error": "string"}
DELETE
/api/documents

DOCUMENTS.EDIT. Body: { documentId } — removes storage object then DB row. Authorization: Bearer ak_.... Required scope: write:documents. Pass entityId query or JSON body (must match the key’s entity). Session cookie auth with x-entity-id is also supported.

Authorization

bearerAuth
AuthorizationBearer <token>

Create keys under Settings → API keys. Prefix ak_. Send as Authorization: Bearer ak_....

In: header

Query Parameters

entityId*string

Entity UUID; must match the API key’s entity when using Bearer auth.

Formatuuid

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X DELETE "https://example.com/api/documents?entityId=497f6eca-6276-4993-bfeb-53cbbbba6f08" \  -H "Content-Type: application/json" \  -d '{    "documentId": "4704590c-004e-410d-adf7-acb7ca0a7052"  }'
{  "ok": true}
{  "error": "string"}
{  "error": "string"}
{  "error": "string"}
{  "error": "string"}
GET
/api/documents/{documentId}

DOCUMENTS.VIEW. Authorization: Bearer ak_.... Required scope: read:documents. Pass entityId query (must match the key’s entity). Session cookie auth with x-entity-id is also supported.

Authorization

bearerAuth
AuthorizationBearer <token>

Create keys under Settings → API keys. Prefix ak_. Send as Authorization: Bearer ak_....

In: header

Path Parameters

documentId*string
Formatuuid

Query Parameters

entityId*string

Entity UUID; must match the API key’s entity when using Bearer auth.

Formatuuid

Response Body

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/api/documents/497f6eca-6276-4993-bfeb-53cbbbba6f08?entityId=497f6eca-6276-4993-bfeb-53cbbbba6f08"
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "entityId": "156e622c-6cdf-4c27-9bc9-2f2db69919f5",  "filename": "string",  "mimeType": "string",  "sizeBytes": 0,  "blobUrl": "string",  "description": "string",  "folderId": "5b6379a4-2a6c-4085-b184-45838a3b8e7e",  "tags": null,  "status": "string",  "uploadedBy": "1e2815fd-75c7-4289-86d5-2503daeb59b8",  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z",  "links": [    {}  ]}
{  "error": "string"}
{  "error": "string"}
{  "error": "string"}
PATCH
/api/documents/{documentId}

DOCUMENTS.EDIT. Authorization: Bearer ak_.... Required scope: write:documents. Pass entityId query or JSON body (must match the key’s entity). Session cookie auth with x-entity-id is also supported.

Authorization

bearerAuth
AuthorizationBearer <token>

Create keys under Settings → API keys. Prefix ak_. Send as Authorization: Bearer ak_....

In: header

Path Parameters

documentId*string
Formatuuid

Query Parameters

entityId*string

Entity UUID; must match the API key’s entity when using Bearer auth.

Formatuuid

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X PATCH "https://example.com/api/documents/497f6eca-6276-4993-bfeb-53cbbbba6f08?entityId=497f6eca-6276-4993-bfeb-53cbbbba6f08" \  -H "Content-Type: application/json" \  -d '{}'
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "entityId": "156e622c-6cdf-4c27-9bc9-2f2db69919f5",  "filename": "string",  "mimeType": "string",  "sizeBytes": 0,  "blobUrl": "string",  "description": "string",  "folderId": "5b6379a4-2a6c-4085-b184-45838a3b8e7e",  "tags": null,  "status": "string",  "uploadedBy": "1e2815fd-75c7-4289-86d5-2503daeb59b8",  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z"}
{  "error": "string"}
{  "error": "string"}
{  "error": "string"}
DELETE
/api/documents/{documentId}

DOCUMENTS.EDIT. Sets status to deleted. Authorization: Bearer ak_.... Required scope: write:documents. Pass entityId query or JSON body (must match the key’s entity). Session cookie auth with x-entity-id is also supported.

Authorization

bearerAuth
AuthorizationBearer <token>

Create keys under Settings → API keys. Prefix ak_. Send as Authorization: Bearer ak_....

In: header

Path Parameters

documentId*string
Formatuuid

Query Parameters

entityId*string

Entity UUID; must match the API key’s entity when using Bearer auth.

Formatuuid

Response Body

application/json

application/json

application/json

application/json

curl -X DELETE "https://example.com/api/documents/497f6eca-6276-4993-bfeb-53cbbbba6f08?entityId=497f6eca-6276-4993-bfeb-53cbbbba6f08"
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "entityId": "156e622c-6cdf-4c27-9bc9-2f2db69919f5",  "filename": "string",  "mimeType": "string",  "sizeBytes": 0,  "blobUrl": "string",  "description": "string",  "folderId": "5b6379a4-2a6c-4085-b184-45838a3b8e7e",  "tags": null,  "status": "string",  "uploadedBy": "1e2815fd-75c7-4289-86d5-2503daeb59b8",  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z"}
{  "error": "string"}
{  "error": "string"}
{  "error": "string"}
GET
/api/documents/{documentId}/file

DOCUMENTS.VIEW. Proxies blob storage. Authorization: Bearer ak_.... Required scope: read:documents. Pass entityId query (must match the key’s entity). Session cookie auth with x-entity-id is also supported.

Authorization

bearerAuth
AuthorizationBearer <token>

Create keys under Settings → API keys. Prefix ak_. Send as Authorization: Bearer ak_....

In: header

Path Parameters

documentId*string
Formatuuid

Query Parameters

entityId*string

Entity UUID; must match the API key’s entity when using Bearer auth.

Formatuuid

Response Body

application/octet-stream

application/json

application/json

application/json

curl -X GET "https://example.com/api/documents/497f6eca-6276-4993-bfeb-53cbbbba6f08/file?entityId=497f6eca-6276-4993-bfeb-53cbbbba6f08"
"string"
{  "error": "string"}
{  "error": "string"}
{  "error": "string"}
POST
/api/documents/upload

DOCUMENTS.EDIT. Same as multipart POST /api/documents — stores in Vercel Blob. Authorization: Bearer ak_.... Required scope: write:documents. Pass entityId query or JSON body (must match the key’s entity). Session cookie auth with x-entity-id is also supported.

Authorization

bearerAuth
AuthorizationBearer <token>

Create keys under Settings → API keys. Prefix ak_. Send as Authorization: Bearer ak_....

In: header

Query Parameters

entityId*string

Entity UUID; must match the API key’s entity when using Bearer auth.

Formatuuid

Request Body

multipart/form-data

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/api/documents/upload?entityId=497f6eca-6276-4993-bfeb-53cbbbba6f08" \  -F file="string"
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "entityId": "156e622c-6cdf-4c27-9bc9-2f2db69919f5",  "filename": "string",  "mimeType": "string",  "sizeBytes": 0,  "blobUrl": "string",  "description": "string",  "folderId": "5b6379a4-2a6c-4085-b184-45838a3b8e7e",  "tags": null,  "status": "string",  "uploadedBy": "1e2815fd-75c7-4289-86d5-2503daeb59b8",  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z"}
{  "error": "string"}
{  "error": "string"}
{  "error": "string"}
GET
/api/documents/dashboard

DOCUMENTS.VIEW. Authorization: Bearer ak_.... Required scope: read:documents. Pass entityId query (must match the key’s entity). Session cookie auth with x-entity-id is also supported.

Authorization

bearerAuth
AuthorizationBearer <token>

Create keys under Settings → API keys. Prefix ak_. Send as Authorization: Bearer ak_....

In: header

Query Parameters

entityId*string

Entity UUID; must match the API key’s entity when using Bearer auth.

Formatuuid

Response Body

application/json

application/json

application/json

curl -X GET "https://example.com/api/documents/dashboard?entityId=497f6eca-6276-4993-bfeb-53cbbbba6f08"
{  "totalDocuments": 0,  "folders": 0,  "pendingSignatures": 0,  "completedSignatures": 0,  "recentDocuments": [    {      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "entityId": "156e622c-6cdf-4c27-9bc9-2f2db69919f5",      "filename": "string",      "mimeType": "string",      "sizeBytes": 0,      "blobUrl": "string",      "description": "string",      "folderId": "5b6379a4-2a6c-4085-b184-45838a3b8e7e",      "tags": null,      "status": "string",      "uploadedBy": "1e2815fd-75c7-4289-86d5-2503daeb59b8",      "createdAt": "2019-08-24T14:15:22Z",      "updatedAt": "2019-08-24T14:15:22Z"    }  ]}
{  "error": "string"}
{  "error": "string"}
GET
/api/documents/{documentId}/text

Extracted text or OCR for one file. Authorization: Bearer ak_.... Required scope includes read:documents. Requests are scoped to one entity. Pass entityId as a query parameter, JSON field, or x-entity-id header. API keys are already pinned to an entity.

Authorization

bearerAuth
AuthorizationBearer <token>

Create keys under Settings → API keys. Prefix ak_. Send as Authorization: Bearer ak_....

In: header

Path Parameters

documentId*string
Formatuuid

Query Parameters

entityId*string

Entity UUID; must match the API key’s entity when using Bearer auth.

Formatuuid

Response Body

application/json

application/json

application/json

curl -X GET "https://example.com/api/documents/497f6eca-6276-4993-bfeb-53cbbbba6f08/text?entityId=497f6eca-6276-4993-bfeb-53cbbbba6f08"
Empty
{  "error": "string"}
{  "error": "string"}
{  "error": "string"}
GET
/api/documents/{documentId}/revisions

Revision history for an editable document. Authorization: Bearer ak_.... Required scope includes read:documents. Requests are scoped to one entity. Pass entityId as a query parameter, JSON field, or x-entity-id header. API keys are already pinned to an entity.

Authorization

bearerAuth
AuthorizationBearer <token>

Create keys under Settings → API keys. Prefix ak_. Send as Authorization: Bearer ak_....

In: header

Path Parameters

documentId*string
Formatuuid

Query Parameters

entityId*string

Entity UUID; must match the API key’s entity when using Bearer auth.

Formatuuid

Response Body

application/json

application/json

application/json

curl -X GET "https://example.com/api/documents/497f6eca-6276-4993-bfeb-53cbbbba6f08/revisions?entityId=497f6eca-6276-4993-bfeb-53cbbbba6f08"
Empty
{  "error": "string"}
{  "error": "string"}
{  "error": "string"}
GET
/api/documents/{documentId}/revisions/{revisionId}

One revision and its text. Authorization: Bearer ak_.... Required scope includes read:documents. Requests are scoped to one entity. Pass entityId as a query parameter, JSON field, or x-entity-id header. API keys are already pinned to an entity.

Authorization

bearerAuth
AuthorizationBearer <token>

Create keys under Settings → API keys. Prefix ak_. Send as Authorization: Bearer ak_....

In: header

Path Parameters

documentId*string
Formatuuid
revisionId*string
Formatuuid

Query Parameters

entityId*string

Entity UUID; must match the API key’s entity when using Bearer auth.

Formatuuid

Response Body

application/json

application/json

application/json

curl -X GET "https://example.com/api/documents/497f6eca-6276-4993-bfeb-53cbbbba6f08/revisions/497f6eca-6276-4993-bfeb-53cbbbba6f08?entityId=497f6eca-6276-4993-bfeb-53cbbbba6f08"
Empty
{  "error": "string"}
{  "error": "string"}
{  "error": "string"}
PATCH
/api/documents/{documentId}/revisions/{revisionId}

Rename a revision label. Authorization: Bearer ak_.... Required scope includes write:documents. Requests are scoped to one entity. Pass entityId as a query parameter, JSON field, or x-entity-id header. API keys are already pinned to an entity.

Authorization

bearerAuth
AuthorizationBearer <token>

Create keys under Settings → API keys. Prefix ak_. Send as Authorization: Bearer ak_....

In: header

Path Parameters

documentId*string
Formatuuid
revisionId*string
Formatuuid

Query Parameters

entityId*string

Entity UUID; must match the API key’s entity when using Bearer auth.

Formatuuid

Response Body

application/json

application/json

application/json

application/json

curl -X PATCH "https://example.com/api/documents/497f6eca-6276-4993-bfeb-53cbbbba6f08/revisions/497f6eca-6276-4993-bfeb-53cbbbba6f08?entityId=497f6eca-6276-4993-bfeb-53cbbbba6f08"
Empty
{  "error": "string"}
{  "error": "string"}
{  "error": "string"}
{  "error": "string"}
POST
/api/documents/{documentId}/revisions/{revisionId}/restore

Restore a prior revision as the live document. Authorization: Bearer ak_.... Required scope includes write:documents. Requests are scoped to one entity. Pass entityId as a query parameter, JSON field, or x-entity-id header. API keys are already pinned to an entity.

Authorization

bearerAuth
AuthorizationBearer <token>

Create keys under Settings → API keys. Prefix ak_. Send as Authorization: Bearer ak_....

In: header

Path Parameters

documentId*string
Formatuuid
revisionId*string
Formatuuid

Query Parameters

entityId*string

Entity UUID; must match the API key’s entity when using Bearer auth.

Formatuuid

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/api/documents/497f6eca-6276-4993-bfeb-53cbbbba6f08/revisions/497f6eca-6276-4993-bfeb-53cbbbba6f08/restore?entityId=497f6eca-6276-4993-bfeb-53cbbbba6f08"
Empty
{  "error": "string"}
{  "error": "string"}
{  "error": "string"}
{  "error": "string"}
POST
/api/documents/{documentId}/revisions/checkpoint

Save a named version checkpoint. Authorization: Bearer ak_.... Required scope includes write:documents. Requests are scoped to one entity. Pass entityId as a query parameter, JSON field, or x-entity-id header. API keys are already pinned to an entity.

Authorization

bearerAuth
AuthorizationBearer <token>

Create keys under Settings → API keys. Prefix ak_. Send as Authorization: Bearer ak_....

In: header

Path Parameters

documentId*string
Formatuuid

Query Parameters

entityId*string

Entity UUID; must match the API key’s entity when using Bearer auth.

Formatuuid

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/api/documents/497f6eca-6276-4993-bfeb-53cbbbba6f08/revisions/checkpoint?entityId=497f6eca-6276-4993-bfeb-53cbbbba6f08" \  -H "Content-Type: application/json" \  -d '{}'
Empty
{  "error": "string"}
{  "error": "string"}
{  "error": "string"}
{  "error": "string"}
GET
/api/documents/{documentId}/derivation

Source document and revision lineage for a PDF. Authorization: Bearer ak_.... Required scope includes read:documents. Requests are scoped to one entity. Pass entityId as a query parameter, JSON field, or x-entity-id header. API keys are already pinned to an entity.

Authorization

bearerAuth
AuthorizationBearer <token>

Create keys under Settings → API keys. Prefix ak_. Send as Authorization: Bearer ak_....

In: header

Path Parameters

documentId*string
Formatuuid

Query Parameters

entityId*string

Entity UUID; must match the API key’s entity when using Bearer auth.

Formatuuid

Response Body

application/json

application/json

application/json

curl -X GET "https://example.com/api/documents/497f6eca-6276-4993-bfeb-53cbbbba6f08/derivation?entityId=497f6eca-6276-4993-bfeb-53cbbbba6f08"
Empty
{  "error": "string"}
{  "error": "string"}
{  "error": "string"}
POST
/api/documents/{documentId}/export-pdf

Render the document to PDF. Authorization: Bearer ak_.... Required scope includes write:documents. Requests are scoped to one entity. Pass entityId as a query parameter, JSON field, or x-entity-id header. API keys are already pinned to an entity.

Authorization

bearerAuth
AuthorizationBearer <token>

Create keys under Settings → API keys. Prefix ak_. Send as Authorization: Bearer ak_....

In: header

Path Parameters

documentId*string
Formatuuid

Query Parameters

entityId*string

Entity UUID; must match the API key’s entity when using Bearer auth.

Formatuuid

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/api/documents/497f6eca-6276-4993-bfeb-53cbbbba6f08/export-pdf?entityId=497f6eca-6276-4993-bfeb-53cbbbba6f08"
Empty
{  "error": "string"}
{  "error": "string"}
{  "error": "string"}
{  "error": "string"}
POST
/api/documents/retrieve-context

Search indexed document chunks. Authorization: Bearer ak_.... Required scope includes write:documents. Requests are scoped to one entity. Pass entityId as a query parameter, JSON field, or x-entity-id header. API keys are already pinned to an entity.

Authorization

bearerAuth
AuthorizationBearer <token>

Create keys under Settings → API keys. Prefix ak_. Send as Authorization: Bearer ak_....

In: header

Query Parameters

entityId*string

Entity UUID; must match the API key’s entity when using Bearer auth.

Formatuuid

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/documents/retrieve-context?entityId=497f6eca-6276-4993-bfeb-53cbbbba6f08" \  -H "Content-Type: application/json" \  -d '{}'
Empty
{  "error": "string"}
{  "error": "string"}
{  "error": "string"}
GET
/api/documents/templates

Document templates. Authorization: Bearer ak_.... Required scope includes read:documents. Requests are scoped to one entity. Pass entityId as a query parameter, JSON field, or x-entity-id header. API keys are already pinned to an entity.

Authorization

bearerAuth
AuthorizationBearer <token>

Create keys under Settings → API keys. Prefix ak_. Send as Authorization: Bearer ak_....

In: header

Query Parameters

entityId*string

Entity UUID; must match the API key’s entity when using Bearer auth.

Formatuuid

Response Body

application/json

application/json

curl -X GET "https://example.com/api/documents/templates?entityId=497f6eca-6276-4993-bfeb-53cbbbba6f08"
Empty
{  "error": "string"}
{  "error": "string"}
POST
/api/documents/templates

Create a document template. Authorization: Bearer ak_.... Required scope includes write:documents. Requests are scoped to one entity. Pass entityId as a query parameter, JSON field, or x-entity-id header. API keys are already pinned to an entity.

Authorization

bearerAuth
AuthorizationBearer <token>

Create keys under Settings → API keys. Prefix ak_. Send as Authorization: Bearer ak_....

In: header

Query Parameters

entityId*string

Entity UUID; must match the API key’s entity when using Bearer auth.

Formatuuid

Response Body

application/json

application/json

application/json

curl -X POST "https://example.com/api/documents/templates?entityId=497f6eca-6276-4993-bfeb-53cbbbba6f08"
Empty
{  "error": "string"}
{  "error": "string"}
{  "error": "string"}
GET
/api/documents/templates/{templateId}

One template. Authorization: Bearer ak_.... Required scope includes read:documents. Requests are scoped to one entity. Pass entityId as a query parameter, JSON field, or x-entity-id header. API keys are already pinned to an entity.

Authorization

bearerAuth
AuthorizationBearer <token>

Create keys under Settings → API keys. Prefix ak_. Send as Authorization: Bearer ak_....

In: header

Path Parameters

templateId*string
Formatuuid

Query Parameters

entityId*string

Entity UUID; must match the API key’s entity when using Bearer auth.

Formatuuid

Response Body

application/json

application/json

application/json

curl -X GET "https://example.com/api/documents/templates/497f6eca-6276-4993-bfeb-53cbbbba6f08?entityId=497f6eca-6276-4993-bfeb-53cbbbba6f08"
Empty
{  "error": "string"}
{  "error": "string"}
{  "error": "string"}
PATCH
/api/documents/templates/{templateId}

Patch a template. Authorization: Bearer ak_.... Required scope includes write:documents. Requests are scoped to one entity. Pass entityId as a query parameter, JSON field, or x-entity-id header. API keys are already pinned to an entity.

Authorization

bearerAuth
AuthorizationBearer <token>

Create keys under Settings → API keys. Prefix ak_. Send as Authorization: Bearer ak_....

In: header

Path Parameters

templateId*string
Formatuuid

Query Parameters

entityId*string

Entity UUID; must match the API key’s entity when using Bearer auth.

Formatuuid

Response Body

application/json

application/json

application/json

application/json

curl -X PATCH "https://example.com/api/documents/templates/497f6eca-6276-4993-bfeb-53cbbbba6f08?entityId=497f6eca-6276-4993-bfeb-53cbbbba6f08"
Empty
{  "error": "string"}
{  "error": "string"}
{  "error": "string"}
{  "error": "string"}
DELETE
/api/documents/templates/{templateId}

Delete a template. Authorization: Bearer ak_.... Required scope includes write:documents. Requests are scoped to one entity. Pass entityId as a query parameter, JSON field, or x-entity-id header. API keys are already pinned to an entity.

Authorization

bearerAuth
AuthorizationBearer <token>

Create keys under Settings → API keys. Prefix ak_. Send as Authorization: Bearer ak_....

In: header

Path Parameters

templateId*string
Formatuuid

Query Parameters

entityId*string

Entity UUID; must match the API key’s entity when using Bearer auth.

Formatuuid

Response Body

application/json

application/json

application/json

application/json

curl -X DELETE "https://example.com/api/documents/templates/497f6eca-6276-4993-bfeb-53cbbbba6f08?entityId=497f6eca-6276-4993-bfeb-53cbbbba6f08"
Empty
{  "error": "string"}
{  "error": "string"}
{  "error": "string"}
{  "error": "string"}
POST
/api/documents/templates/{templateId}/use

Create a document from a template. Authorization: Bearer ak_.... Required scope includes write:documents. Requests are scoped to one entity. Pass entityId as a query parameter, JSON field, or x-entity-id header. API keys are already pinned to an entity.

Authorization

bearerAuth
AuthorizationBearer <token>

Create keys under Settings → API keys. Prefix ak_. Send as Authorization: Bearer ak_....

In: header

Path Parameters

templateId*string
Formatuuid

Query Parameters

entityId*string

Entity UUID; must match the API key’s entity when using Bearer auth.

Formatuuid

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/api/documents/templates/497f6eca-6276-4993-bfeb-53cbbbba6f08/use?entityId=497f6eca-6276-4993-bfeb-53cbbbba6f08"
Empty
{  "error": "string"}
{  "error": "string"}
{  "error": "string"}
{  "error": "string"}

On this page