Upload Document
POST/api/documents
Uploads a file and links it to a business record. Send as multipart/form-data.
purchase-orders:writeGrant this scope to your token under Settings → Developer → Personal Access Tokens.
Accepted file types: pdf, jpg, jpeg, png, gif, webp, heic, doc, docx, xls, xlsx, csv, txt, html, htm, eml, msg, zip. Maximum size: 20 MB.
The file type is decided by the filename extension, not by sniffing the file's contents — so a text or CSV export whose contents happen to look like another format is still accepted. Files whose contents are an executable or script (PE/ELF/Mach-O binaries, shell/PHP/Perl/Python scripts, JARs, MSIs) are rejected whatever they are named, with That file contains a program or script and cannot be attached.
The optional description records what the file is, so an attachment list reads as more than a pile of file names.
Authentication: Requires Bearer token.
Request
Responses
- 200
- 401
- 403
- 422
- 429
OK
Response Headers
Unauthenticated — the bearer token is missing, revoked, expired, or malformed. Never retry automatically; fix the credential. See the Errors guide.
Forbidden — the token lacks a required scope, the endpoint is not available to API tokens, or the user behind the token lacks the permission. A human must adjust the token scopes or user permissions; do not retry.
Unprocessable Entity
Response Headers
Rate limited — platform limit is 1,000 requests/min; individual tokens may carry lower limits. Honor the Retry-After header before retrying. See the Rate Limits guide.