Endpoint
Authentication
This endpoint requires authentication via API key. Include your API key in theX-API-Key header:
Path Parameters
Request Body
All fields are optional, but a request that supplies neitherfiles nor attachment_ids records nothing.
File Object
Request Example
Response
Success Response
Status Code:200 OK
Response Fields
Error Responses
401 Unauthorized
Returned when authentication fails. See the authentication errors section for details.404 Not Found
Returned when no task exists with the given ID.422 Unprocessable Entity
Returned when the request body fails validation, for example a file missing itsbase64_content.
500 Internal Server Error
Returned when the request fails due to a server error.Notes
The upload is attributed to the API key’s owner unless you pass
user_email, in which case it is
attributed to that user. Use POST /v2/tasks/{task_id}/attachments
if you want the acting user taken from an OAuth token instead.attach_to_task controls where the files land. With false (the default) they are uploaded and
referenced from a new activity log entry, leaving the task’s own file list untouched. With true
they are additionally stored on the task, so they appear in List Task Files.Use Cases
This endpoint is useful for:- Email ingestion - Attach documents received from a counterparty to the task they belong to
- Supporting documentation - Add approvals, quotes, or certificates alongside a contract under review
- Threaded correspondence - Use
reply_toto keep an exchange and its attachments together on the activity log