Attach a file to a contact

Step 2 of the upload. Call POST /v1/contacts/{id}/attachments/upload-url, upload the file with the returned presigned POST, then call this endpoint with the returned key to link the file to the contact. The file size, URL and extension are read from the stored object; a key can be linked only once. The response has the same shape as an item of GET /v1/contacts/{id}/attachments. Attachments created through the API have uploaded_by: null.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
uuid
required

UUID

Body Params
string
required

The key returned by the upload-url endpoint.

string
required
length ≤ 255

Original file name. Its extension must match the extension of key.

string
length ≤ 255

Display name. Defaults to file_name.

Headers
string
required

API Token

Responses

INVALID_KEY, INVALID_FILE_NAME, INVALID_NAME, FILE_NAME_EXTENSION_MISMATCH, FILE_NOT_UPLOADED, CONTENT_TYPE_MISMATCH.

contacts:write scope.

KEY_ALREADY_ATTACHED, UPLOAD_IN_PROGRESS. For KEY_ALREADY_ATTACHED, details also carries documentId, attachmentId and contactId of the existing attachment, so a client retrying after a lost response can recognise its own earlier success.

QUOTA_FILE_TOO_LARGE, QUOTA_STORAGE_EXCEEDED, INVALID_FILE_SIZE.

Language
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json