Endpoint
Authentication
This endpoint requires an OAuth access token. Send it as a bearer token:tasks:write
The upload runs as the access token’s user, and the resulting activity log entry is attributed to
them. A user who cannot reach the task receives
403.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
400 Bad Request
Returned when the access token has no user behind it.client_credentials tokens act as the admin who created the application, so this applies only to
tokens issued before application creators were recorded.
401 Unauthorized
Returned when the access token is missing, unknown, revoked, or expired, or when anX-API-Key was
sent instead of a bearer token. See OAuth error responses.
403 Forbidden
Returned when the token does not carry the required scope.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.
429 Too Many Requests
Returned when your organization exceeds its per-minute request limit.500 Internal Server Error
Returned when the request fails due to a server error.Notes
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