Upload URLs
Files are never sent through the API itself. Ask for a signed upload URL, PUTthe file bytes to it, then save the returned key on the record that uses the file (a conversation file, product media, a custom field value...).
Endpoints
| Method | Path | Description |
|---|---|---|
POST | /s3-url-signing | Create an upload URL |
Request fields
| Field | Type | Description |
|---|---|---|
type | string | Required. What the file is for; decides where it is stored and which ID is required (table below). |
filename | string | Required. Original file name. It is sanitized and prefixed with a timestamp. |
contentType | string | MIME type of the file. Default application/octet-stream. The upload must use the same Content-Type. |
file_size | integer | Size in bytes. |
organization_id | integer | Organization, for types not tied to another record. |
conversation_id | integer | Conversation, for conversation-file. |
contact_id | integer | Contact, for contact-avatar and crm-file. |
company_id | integer | Company, for company-avatar and crm-file. |
deal_id | integer | Deal, for crm-file. |
product_id | integer | Product, for product-media. |
ticket_id | integer | Support ticket, for support-ticket-file. |
automation_id | integer | Automation, for automation-file. |
estimate_id | integer | Estimate, for estimate-file. |
invoice_id | integer | Invoice, for invoice-file. |
contract_id | integer | Contract, for contract-document and contract-related-file. |
entity_type | string | For custom-field-file: contact, company, deal, ticket, reservation, product, estimate or invoice. |
entity_id | integer | For custom-field-file: ID of that record. |
field_key | string | For custom-field-file: key of the file custom field. |
Upload types
type | Required fields | Used by |
|---|---|---|
conversation-file | conversation_id | Conversation files and message attachments. |
conversation-predefined-message | organization_id | Media of predefined messages. |
whatsapp-template | organization_id | Header media of WhatsApp templates. |
contact-avatar | contact_id | Contact avatar. |
company-avatar | company_id | Company avatar. |
crm-file | one of contact_id, deal_id, company_id | Files attached to a contact, deal or company. |
product-media | product_id | Product media. |
support-ticket-file | ticket_id | Support ticket attachments. |
automation-file | automation_id | Files used by automations. |
custom-field-file | entity_type, entity_id, field_key | Values of file custom fields. |
estimate-file / invoice-file | estimate_id / invoice_id | Estimate and invoice attachments. |
contract-document / contract-related-file | contract_id | Contract files. |
organization-logo | organization_id | Organization logo. |
The service also accepts types used only by the AchieveApex app (website builder, presentations, whiteboards, internal support chat and others); they are not part of the public API.
Related
Report an issue with this documentation
Please log in to report issues with our documentation.