Skip to main content

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.

ActionMethodPath
Upload a filePOST/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

NameTypeRequiredDescription
filefileYesUp 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).
commentstringNoComment 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)

StatusWhenBody
422No file sent."File field is required"
415File type not allowed.File type is not supported: text/plain
413File 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​

All the contact's files, including the new one.