Upload Contact File
POST/accounts/:account_id/contacts/:contact_id/add_file
Attach a document to a contact's profile.
Documents attached to a contact profile (for example contracts or ID scans), with an optional comment.
| Action | Method | Path |
|---|---|---|
| Upload a file | POST | /api/v1/accounts/{account_id}/contacts/{contact_id}/add_file |
Authorization: user token. Listing requires the Retrieve Contact permission (new rules: Contacts → read). Uploading, updating and deleting require the Update Contact permission (new rules: Contacts → update). Legacy roles: any agent. Agent-bot tokens: not allowed.
Upload (form-data) parameters
| Name | Type | Required | Description |
|---|---|---|---|
file | file | Yes | Up to 10 MB. Allowed types: PDF, CSV, RTF, DOC/DOCX, XLS/XLSX, PNG, JPEG. The account's upload policy may restrict this further (for example, text/plain can be rejected). |
comment | string | No | Comment stored with the file (max 500 characters on update). |
Example: upload a file
curl -X POST 'https://online.99digital.co.il/api/v1/accounts/12/contacts/801/add_file' \
-H 'api_access_token: <YOUR_API_ACCESS_TOKEN>' \
-F 'file=@invoice.png;type=image/png' \
-F 'comment=Invoice for order A-1001'
Response (200 OK): all files of the contact.
[
{
"id": 3101,
"data_url": "https://online.99digital.co.il/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsiZGF0YSI6MzIwMX19--b7c1/invoice.png",
"file_type": "image",
"thumb_url": "https://online.99digital.co.il/rails/active_storage/representations/redirect/eyJfcmFpbHMiOnsiZGF0YSI6MzIwMX19--b7c1/invoice.png",
"comment": "Invoice for order A-1001",
"created_at_exact": "12/11/26 08:00"
}
]
file_type is image, audio, video or the file's MIME type. thumb_url is returned only for images.
Error responses (upload)
| Status | When | Body |
|---|---|---|
422 | No file sent. | "File field is required" |
415 | File type not allowed. | File type is not supported: text/plain |
413 | File larger than 10 MB. | Error message |
Remarks
- The code samples add the file once you choose one under Request → Body.
- To change the comment later, use Update Contact File.
Request
Responses
- 200
- 401
- 403
- 404
- 413
- 415
- 422
All the contact's files, including the new one.
The access token is missing or wrong, or its user does not belong to this account.
The token's role does not have the permission this endpoint needs, or the endpoint is not open to agent-bot tokens. See Authorization.
The resource does not exist in this account.
The file is larger than 10 MB.
The file type is not allowed.
No file was sent.