GetItDoneGetItDone Docs
API ReferenceAttachments

Start an attachment upload

POST
/v1/tasks/{task_id}/attachments/uploads

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).

Authorization

bearerAuth
headerAuthorizationBearer <token>

A gid_ API key (Profile → API Keys) or an OAuth 2.1 access token.

Path Parameters

task_id*string

Task short id, e.g. T-123 (a bare 123 is also accepted on input).

Match^(?:T-)?[0-9]{1,12}$

Header Parameters

Idempotency-Key?string

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.

Length1 <= length <= 255

Request Body

application/json
  1. body

What you are about to upload.

file_name*string
Length1 <= length <= 255
content_type*string
Length1 <= length <= 255
size*integer

File size in bytes — checked against the organization's plan file-size and storage allowances.

Range1 <= value <= 9007199254740991

Response Body

Where to PUT the file.

application/json
  1. response

Phase 1 of the two-phase upload: where to PUT the file.

upload_url*string

Presigned URL — PUT the raw file bytes here (Content-Type must match what you declared).

upload_method*string
file_key*string

Opaque storage key; pass it back when registering the attachment after the upload succeeds.

expires_at*string

When the upload URL stops working, ISO-8601 UTC.

Match^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
Formatdate-time
Example Request
curl -X POST 'https://app.nowgetitdone.com/v1/tasks/T-123/attachments/uploads' \  -H 'Content-Type: application/json' \  -d '{  "file_name": "screenshot.png",  "content_type": "image/png",  "size": 1}'
Example Response
{  "upload_url": "string",  "upload_method": "PUT",  "file_key": "string",  "expires_at": "2019-08-24T14:15:22Z"}