Skip to main content
POST
Create a document

Headers

Authorization
string
required

Bearer token for authentication

Body

multipart/form-data
file
file
required

The document file to upload (PDF, image, Word document, etc.)

data.type
string

Resource type identifier

Allowed value: "document"
data.attributes.file_name
string

Name of the document file

Required string length: 1 - 255
data.attributes.workspace_id
string<uuid>

Workspace UUID

data.attributes.external_workspace_id
string<uuid>

External Workspace UUID

data.attributes.collect_id
string<uuid>

Collection UUID (optional)

data.attributes.metadata.source_number
string

Source phone number for the document

data.attributes.metadata.target_number
string

Target phone number for the document

data.attributes.metadata.document_type
enum<string>

Type of document classification. See all document types for complete list.

Available options:
invoice,
receipt,
purchase_order,
...
data.relationships.workspace.data.type
string

Type for workspace relationship

Allowed value: "workspace"
data.relationships.workspace.data.id
string<uuid>

UUID of the workspace to associate with this document

data.relationships.company.data.type
string

Type for company relationship

Allowed value: "company"
data.relationships.company.data.id
string<uuid>

UUID of the company to associate with this document

data.relationships.people.data.type
string

Type for people relationship

Allowed value: "people"
data.relationships.people.data.id
string<uuid>

UUID of the person to associate with this document

data.relationships.people.data.meta.phone_number
string

Phone number to identify the person (alternative to ID)

Response

Document created successfully

id
string
type
enum<string>
Available options:
document
attributes
object
relationships
object