JAI CRM
Home Documentation API Documents endpoints

Documents endpoints

52 endpoints: Links, Overview, Shared with me, Recent and more.

Every endpoint in Documents: 52 operations across 11 resources. Each one takes the same API key and returns the same error shapes as the rest of the API; see Authentication and Errors and limits.

Every path below is relative to https://app.jaicrm.ai. A key only reaches what it was granted when it was created, an endpoint you cannot use answers 403 rather than hiding.

Files

GET/api/documents/files

List the files for a file

curl -X GET https://app.jaicrm.ai/api/documents/files 
  -H 'Authorization: Bearer YOUR_API_KEY'

GET/api/documents/files/{id}

List the files for a file

ParameterTypeRequiredNotes
idstringRequiredThe record’s id.
curl -X GET https://app.jaicrm.ai/api/documents/files/RECORD_ID 
  -H 'Authorization: Bearer YOUR_API_KEY'

GET/api/documents/files/{id}/dependencies

List what would break if a file were deleted

ParameterTypeRequiredNotes
idstringRequiredThe record’s id.
curl -X GET https://app.jaicrm.ai/api/documents/files/RECORD_ID/dependencies 
  -H 'Authorization: Bearer YOUR_API_KEY'

GET/api/documents/files/{id}/details

List the details for a file

ParameterTypeRequiredNotes
idstringRequiredThe record’s id.
curl -X GET https://app.jaicrm.ai/api/documents/files/RECORD_ID/details 
  -H 'Authorization: Bearer YOUR_API_KEY'

GET/api/documents/files/{id}/download

List the download for a file

ParameterTypeRequiredNotes
idstringRequiredThe record’s id.
curl -X GET https://app.jaicrm.ai/api/documents/files/RECORD_ID/download 
  -H 'Authorization: Bearer YOUR_API_KEY'

GET/api/documents/files/{id}/public-link

List the public link for a file

ParameterTypeRequiredNotes
idstringRequiredThe record’s id.
curl -X GET https://app.jaicrm.ai/api/documents/files/RECORD_ID/public-link 
  -H 'Authorization: Bearer YOUR_API_KEY'

GET/api/documents/files/{id}/shares

List the shares for a file

ParameterTypeRequiredNotes
idstringRequiredThe record’s id.
curl -X GET https://app.jaicrm.ai/api/documents/files/RECORD_ID/shares 
  -H 'Authorization: Bearer YOUR_API_KEY'

GET/api/documents/files/{id}/versions

List the versions of a file

ParameterTypeRequiredNotes
idstringRequiredThe record’s id.
curl -X GET https://app.jaicrm.ai/api/documents/files/RECORD_ID/versions 
  -H 'Authorization: Bearer YOUR_API_KEY'

POST/api/documents/files/{id}/move

Add to the move of a file

ParameterTypeRequiredNotes
idstringRequiredThe record’s id.
curl -X POST https://app.jaicrm.ai/api/documents/files/RECORD_ID/move 
  -H 'Authorization: Bearer YOUR_API_KEY'

POST/api/documents/files/{id}/public-link

Add to the public link of a file

ParameterTypeRequiredNotes
idstringRequiredThe record’s id.
curl -X POST https://app.jaicrm.ai/api/documents/files/RECORD_ID/public-link 
  -H 'Authorization: Bearer YOUR_API_KEY'

POST/api/documents/files/{id}/restore

Restore a file from the trash

ParameterTypeRequiredNotes
idstringRequiredThe record’s id.
curl -X POST https://app.jaicrm.ai/api/documents/files/RECORD_ID/restore 
  -H 'Authorization: Bearer YOUR_API_KEY'

POST/api/documents/files/{id}/shares

Add to the shares of a file

ParameterTypeRequiredNotes
idstringRequiredThe record’s id.
curl -X POST https://app.jaicrm.ai/api/documents/files/RECORD_ID/shares 
  -H 'Authorization: Bearer YOUR_API_KEY'

POST/api/documents/files/{id}/star

Add to the star of a file

ParameterTypeRequiredNotes
idstringRequiredThe record’s id.
curl -X POST https://app.jaicrm.ai/api/documents/files/RECORD_ID/star 
  -H 'Authorization: Bearer YOUR_API_KEY'

POST/api/documents/files/{id}/tags

Add to the tags of a file

ParameterTypeRequiredNotes
idstringRequiredThe record’s id.
curl -X POST https://app.jaicrm.ai/api/documents/files/RECORD_ID/tags 
  -H 'Authorization: Bearer YOUR_API_KEY'

POST/api/documents/files/{id}/versions

List the versions of a file

ParameterTypeRequiredNotes
idstringRequiredThe record’s id.
curl -X POST https://app.jaicrm.ai/api/documents/files/RECORD_ID/versions 
  -H 'Authorization: Bearer YOUR_API_KEY'

POST/api/documents/files/{id}/versions/{version}/restore

Restore a file from the trash

ParameterTypeRequiredNotes
idstringRequiredThe record’s id.
versionstringRequiredThe record’s id.
curl -X POST https://app.jaicrm.ai/api/documents/files/RECORD_ID/versions/RECORD_ID/restore 
  -H 'Authorization: Bearer YOUR_API_KEY'

POST/api/documents/files/bulk/move

Add to the move of a file

curl -X POST https://app.jaicrm.ai/api/documents/files/bulk/move 
  -H 'Authorization: Bearer YOUR_API_KEY'

POST/api/documents/files/bulk/tag

Add to the tag of a file

curl -X POST https://app.jaicrm.ai/api/documents/files/bulk/tag 
  -H 'Authorization: Bearer YOUR_API_KEY'

POST/api/documents/files/upload

Add to the upload of a file

curl -X POST https://app.jaicrm.ai/api/documents/files/upload 
  -H 'Authorization: Bearer YOUR_API_KEY'

PATCH/api/documents/files/{id}

Change the files of a file

ParameterTypeRequiredNotes
idstringRequiredThe record’s id.
curl -X PATCH https://app.jaicrm.ai/api/documents/files/RECORD_ID 
  -H 'Authorization: Bearer YOUR_API_KEY'

DELETE/api/documents/files/{id}

Remove from the files of a file

ParameterTypeRequiredNotes
idstringRequiredThe record’s id.
curl -X DELETE https://app.jaicrm.ai/api/documents/files/RECORD_ID 
  -H 'Authorization: Bearer YOUR_API_KEY'

Folders

GET/api/documents/folders

List the folders for a file

curl -X GET https://app.jaicrm.ai/api/documents/folders 
  -H 'Authorization: Bearer YOUR_API_KEY'

GET/api/documents/folders/{id}/dependencies

List what would break if a file were deleted

ParameterTypeRequiredNotes
idstringRequiredThe record’s id.
curl -X GET https://app.jaicrm.ai/api/documents/folders/RECORD_ID/dependencies 
  -H 'Authorization: Bearer YOUR_API_KEY'

GET/api/documents/folders/{id}/download

List the download for a file

ParameterTypeRequiredNotes
idstringRequiredThe record’s id.
curl -X GET https://app.jaicrm.ai/api/documents/folders/RECORD_ID/download 
  -H 'Authorization: Bearer YOUR_API_KEY'

GET/api/documents/folders/{id}/shares

List the shares for a file

ParameterTypeRequiredNotes
idstringRequiredThe record’s id.
curl -X GET https://app.jaicrm.ai/api/documents/folders/RECORD_ID/shares 
  -H 'Authorization: Bearer YOUR_API_KEY'

GET/api/documents/folders/tree

List the tree for a file

curl -X GET https://app.jaicrm.ai/api/documents/folders/tree 
  -H 'Authorization: Bearer YOUR_API_KEY'

POST/api/documents/folders

Add to the folders of a file

curl -X POST https://app.jaicrm.ai/api/documents/folders 
  -H 'Authorization: Bearer YOUR_API_KEY'

POST/api/documents/folders/{id}/move

Add to the move of a file

ParameterTypeRequiredNotes
idstringRequiredThe record’s id.
curl -X POST https://app.jaicrm.ai/api/documents/folders/RECORD_ID/move 
  -H 'Authorization: Bearer YOUR_API_KEY'

POST/api/documents/folders/{id}/restore

Restore a file from the trash

ParameterTypeRequiredNotes
idstringRequiredThe record’s id.
curl -X POST https://app.jaicrm.ai/api/documents/folders/RECORD_ID/restore 
  -H 'Authorization: Bearer YOUR_API_KEY'

POST/api/documents/folders/{id}/shares

Add to the shares of a file

ParameterTypeRequiredNotes
idstringRequiredThe record’s id.
curl -X POST https://app.jaicrm.ai/api/documents/folders/RECORD_ID/shares 
  -H 'Authorization: Bearer YOUR_API_KEY'

PATCH/api/documents/folders/{id}

Change the folders of a file

ParameterTypeRequiredNotes
idstringRequiredThe record’s id.
curl -X PATCH https://app.jaicrm.ai/api/documents/folders/RECORD_ID 
  -H 'Authorization: Bearer YOUR_API_KEY'

DELETE/api/documents/folders/{id}

Remove from the folders of a file

ParameterTypeRequiredNotes
idstringRequiredThe record’s id.
curl -X DELETE https://app.jaicrm.ai/api/documents/folders/RECORD_ID 
  -H 'Authorization: Bearer YOUR_API_KEY'

Links

GET/api/documents/links/{provider}/browse

List the browse for a file

ParameterTypeRequiredNotes
providerstringRequiredThe record’s id.
curl -X GET https://app.jaicrm.ai/api/documents/links/RECORD_ID/browse 
  -H 'Authorization: Bearer YOUR_API_KEY'

GET/api/documents/links/{provider}/callback

List the callback for a file

ParameterTypeRequiredNotes
providerstringRequiredThe record’s id.
curl -X GET https://app.jaicrm.ai/api/documents/links/RECORD_ID/callback 
  -H 'Authorization: Bearer YOUR_API_KEY'

GET/api/documents/links/{provider}/connect

List the connect for a file

ParameterTypeRequiredNotes
providerstringRequiredThe record’s id.
curl -X GET https://app.jaicrm.ai/api/documents/links/RECORD_ID/connect 
  -H 'Authorization: Bearer YOUR_API_KEY'

GET/api/documents/links/{provider}/picker

List the picker for a file

ParameterTypeRequiredNotes
providerstringRequiredThe record’s id.
curl -X GET https://app.jaicrm.ai/api/documents/links/RECORD_ID/picker 
  -H 'Authorization: Bearer YOUR_API_KEY'

GET/api/documents/links/providers

List the providers for a file

curl -X GET https://app.jaicrm.ai/api/documents/links/providers 
  -H 'Authorization: Bearer YOUR_API_KEY'

POST/api/documents/links/{provider}/image

Add to the image of a file

ParameterTypeRequiredNotes
providerstringRequiredThe record’s id.
curl -X POST https://app.jaicrm.ai/api/documents/links/RECORD_ID/image 
  -H 'Authorization: Bearer YOUR_API_KEY'

POST/api/documents/links/{provider}/import

Import files from a CSV file

ParameterTypeRequiredNotes
providerstringRequiredThe record’s id.
curl -X POST https://app.jaicrm.ai/api/documents/links/RECORD_ID/import 
  -H 'Authorization: Bearer YOUR_API_KEY'

DELETE/api/documents/links/connections/{id}

Remove from the connections of a file

ParameterTypeRequiredNotes
idstringRequiredThe record’s id.
curl -X DELETE https://app.jaicrm.ai/api/documents/links/connections/RECORD_ID 
  -H 'Authorization: Bearer YOUR_API_KEY'

Public

GET/api/documents/public/{token}

List the public for a file

ParameterTypeRequiredNotes
tokenstringRequiredThe record’s id.
curl -X GET https://app.jaicrm.ai/api/documents/public/RECORD_ID 
  -H 'Authorization: Bearer YOUR_API_KEY'

GET/api/documents/public/{token}/content

List the content for a file

ParameterTypeRequiredNotes
tokenstringRequiredThe record’s id.
curl -X GET https://app.jaicrm.ai/api/documents/public/RECORD_ID/content 
  -H 'Authorization: Bearer YOUR_API_KEY'

GET/api/documents/public/{token}/download

List the download for a file

ParameterTypeRequiredNotes
tokenstringRequiredThe record’s id.
curl -X GET https://app.jaicrm.ai/api/documents/public/RECORD_ID/download 
  -H 'Authorization: Bearer YOUR_API_KEY'

Public links

GET/api/documents/public-links

List the public links for a file

curl -X GET https://app.jaicrm.ai/api/documents/public-links 
  -H 'Authorization: Bearer YOUR_API_KEY'

DELETE/api/documents/public-links/{id}

Remove from the public links of a file

ParameterTypeRequiredNotes
idstringRequiredThe record’s id.
curl -X DELETE https://app.jaicrm.ai/api/documents/public-links/RECORD_ID 
  -H 'Authorization: Bearer YOUR_API_KEY'

Trash

GET/api/documents/trash

List the trash for a file

curl -X GET https://app.jaicrm.ai/api/documents/trash 
  -H 'Authorization: Bearer YOUR_API_KEY'

POST/api/documents/trash/empty

Add to the empty of a file

curl -X POST https://app.jaicrm.ai/api/documents/trash/empty 
  -H 'Authorization: Bearer YOUR_API_KEY'

Overview

GET/api/documents/overview

List the overview for a file

curl -X GET https://app.jaicrm.ai/api/documents/overview 
  -H 'Authorization: Bearer YOUR_API_KEY'

Shared with me

GET/api/documents/shared-with-me

List the shared with me for a file

curl -X GET https://app.jaicrm.ai/api/documents/shared-with-me 
  -H 'Authorization: Bearer YOUR_API_KEY'

Recent

GET/api/documents/recent

List the recent for a file

curl -X GET https://app.jaicrm.ai/api/documents/recent 
  -H 'Authorization: Bearer YOUR_API_KEY'

Share targets

GET/api/documents/share-targets

List the share targets for a file

curl -X GET https://app.jaicrm.ai/api/documents/share-targets 
  -H 'Authorization: Bearer YOUR_API_KEY'

Shares

DELETE/api/documents/shares/{id}

Remove from the shares of a file

ParameterTypeRequiredNotes
idstringRequiredThe record’s id.
curl -X DELETE https://app.jaicrm.ai/api/documents/shares/RECORD_ID 
  -H 'Authorization: Bearer YOUR_API_KEY'

Something missing or wrong here? Tell us. A question that needed asking usually means a page that needed writing.