Create Document
post
/v1/documentsUploads a file as multipart/form-data (the file field) with an optional JSON document part describing it. Side effect: stores the file in object storage, creates the document row, and, when auto-extract is on, enqueues extraction. The JSON part is sent as the document field of the multipart body.
Requires a bearer token: Authorization: Bearer <token>.
Request
cURL
curl -X POST https://api.wellapp.ai/v1/documents \
-H "Authorization: Bearer $WELL_API_TOKEN"Responses
201 — The created document.
{
"data": {
"type": "document",
"document_id": "4e5f6071-8293-4a4b-95c6-d7e8f9a0b1c2",
"id": "4e5f6071-8293-4a4b-95c6-d7e8f9a0b1c2",
"attributes": {
"filename": "anthropic-invoice-2026-05.pdf",
"local_file_name": "doc_4e5f6071.pdf",
"type": "application/pdf",
"size": 84213,
"workspace_id": "8f6b2c10-4a1e-4d2b-9c3a-1f0e7a5b6c21",
"uploaded_at": "2026-05-04T18:20:00.000Z",
"document_type": "380"
},
"links": {
"download": "https://storage.wellapp.ai/signed/doc_4e5f6071?sig=abc123"
},
"relationships": {
"collect": {
"data": {
"type": "collect",
"id": "00000000-0000-4000-8000-000000000001"
}
},
"invoices": {
"data": [
{
"type": "invoice",
"id": "00000000-0000-4000-8000-000000000001"
}
]
},
"transaction_documents": {
"data": [
{
"type": "transaction_document",
"id": "00000000-0000-4000-8000-000000000001"
}
]
}
}
}
}400 — Bad Request
{
"code": "BAD_REQUEST",
"status": 400,
"title": "Bad Request",
"message": "See title.",
"meta": {
"trace_id": "a1b2c3",
"log_id": "a1b2c3"
}
}401 — Unauthorized
{
"code": "UNAUTHORIZED",
"status": 401,
"title": "Unauthorized",
"message": "See title.",
"meta": {
"trace_id": "a1b2c3",
"log_id": "a1b2c3"
}
}403 — Forbidden
{
"code": "FORBIDDEN",
"status": 403,
"title": "Forbidden",
"message": "See title.",
"meta": {
"trace_id": "a1b2c3",
"log_id": "a1b2c3"
}
}