Upload URLs

Files are never sent through the API itself. Ask for a signed upload URL,

PUT
the 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

MethodPathDescription
POST/s3-url-signingCreate an upload URL

Request fields

FieldTypeDescription
typestringRequired. What the file is for; decides where it is stored and which ID is required (table below).
filenamestringRequired. Original file name. It is sanitized and prefixed with a timestamp.
contentTypestringMIME type of the file. Default application/octet-stream. The upload must use the same Content-Type.
file_sizeintegerSize in bytes.
organization_idintegerOrganization, for types not tied to another record.
conversation_idintegerConversation, for conversation-file.
contact_idintegerContact, for contact-avatar and crm-file.
company_idintegerCompany, for company-avatar and crm-file.
deal_idintegerDeal, for crm-file.
product_idintegerProduct, for product-media.
ticket_idintegerSupport ticket, for support-ticket-file.
automation_idintegerAutomation, for automation-file.
estimate_idintegerEstimate, for estimate-file.
invoice_idintegerInvoice, for invoice-file.
contract_idintegerContract, for contract-document and contract-related-file.
entity_typestringFor custom-field-file: contact, company, deal, ticket, reservation, product, estimate or invoice.
entity_idintegerFor custom-field-file: ID of that record.
field_keystringFor custom-field-file: key of the file custom field.

Upload types

typeRequired fieldsUsed by
conversation-fileconversation_idConversation files and message attachments.
conversation-predefined-messageorganization_idMedia of predefined messages.
whatsapp-templateorganization_idHeader media of WhatsApp templates.
contact-avatarcontact_idContact avatar.
company-avatarcompany_idCompany avatar.
crm-fileone of contact_id, deal_id, company_idFiles attached to a contact, deal or company.
product-mediaproduct_idProduct media.
support-ticket-fileticket_idSupport ticket attachments.
automation-fileautomation_idFiles used by automations.
custom-field-fileentity_type, entity_id, field_keyValues of file custom fields.
estimate-file / invoice-fileestimate_id / invoice_idEstimate and invoice attachments.
contract-document / contract-related-filecontract_idContract files.
organization-logoorganization_idOrganization 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.