Skip to main content

Endpoint

Authentication

This endpoint requires an OAuth access token. Send it as a bearer token:
Required scope: 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 neither files 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 an X-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.
Or when the access token’s user may not reach the task.

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 its base64_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.
Pass reply_to with the ID of an existing activity log entry to thread the attachment underneath it, for example when responding to a counterparty email already recorded on the task. Entry IDs come from Get Activity Logs.
To reference files already on the task from a new activity log entry without re-uploading them, send their attachment_ids with attach_to_task set to false.

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_to to keep an exchange and its attachments together on the activity log