Register an uploaded attachment
Phase 2 of the two-phase upload: attaches the uploaded file (by its `file_key`) to the task's CURRENT version — exactly how the in-app flow registers uploads after the presigned PUT. Supports the optional `Idempotency-Key` header for exactly-once retries.
Phase 2 of the two-phase upload: attaches the uploaded file (by its file_key) to the task's CURRENT version — exactly how the in-app flow registers uploads after the presigned PUT. Supports the optional Idempotency-Key header for exactly-once retries.
Authorization
bearerAuth A gid_ API key (Settings → API keys) or an OAuth 2.1 access token.
In: header
Path Parameters
Task short id, e.g. T-123 (a bare 123 is also accepted on input).
^(?:T-)?[0-9]{1,12}$Header Parameters
Optional client-generated key (1-255 visible ASCII characters; a UUID works) making this POST safely retryable. Retrying with the SAME key and byte-identical body within 24h replays the stored first response (marked Idempotency-Replayed: true, never re-executed, never charged against quota). The same key with a different body answers 422 idempotency_key_reused; a retry racing the first execution answers 409 idempotency_in_progress. Omitting the header executes normally with no idempotency guarantee.
1 <= length <= 255Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Phase 2 of the two-phase upload: register the uploaded file on the task.
Response Body
application/json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
curl -X POST "https://example.com/v1/tasks/string/attachments" \ -H "Content-Type: application/json" \ -d '{ "file_name": "string", "file_key": "string", "content_type": "string", "size": 1 }'{ "id": "string", "file_name": "string", "content_type": "string", "size": -9007199254740991, "created_at": "2019-08-24T14:15:22Z"}List task attachments GET
Cursor-paginated attachments of the task's CURRENT version, newest first (metadata only — mint download URLs per attachment via the `download-url` endpoint).
Start an attachment upload POST
Phase 1 of the two-phase upload (the SAME presign flow the in-app uploader uses): declares the file and answers a short-lived presigned PUT URL plus the `file_key` to register afterwards. Checked against the plan's file-size and storage allowances. Nothing is attached until phase 2. Supports the optional `Idempotency-Key` header (a replay returns the SAME URL, which may have expired — start a fresh upload instead of replaying old keys).