Upload a file

Upload a file and associate it with a contact, company, or deal. The file must be sent as multipart form data with a maximum size of 10 MB. You can optionally link the file to a specific entity by providing the corresponding entity ID.

Authentication

api-keystring

The API key should be passed in the request headers as api-key for authentication.

Request

This endpoint expects a multipart form containing a file.
companyIdstringOptional
contactIdlongOptional
dealIdstringOptional
filefileRequired
File data to create a file.

Response

Returns the created File with additional details
idstring
Unique file id
namestring
Name of uploaded file
authorIdstring
Account id of user which created the file
contactIdlong
Contact id of contact on which file is uploaded
dealIdstring
Deal id linked to a file
companyIdstring
Company id linked to a file
sizelong
Size of file in bytes
createdAtdatetime

File created date/time

Errors

400
Bad Request Error