Remove an attachment
Anyone who sees the task removes it: it leaves the list and answers 404, and task.attachment_removed is recorded. The object stays in the bucket for 7 days, so POST /attachments/:id/restore can undo it, and is then deleted for good. Send Idempotency-Key (1 to 128 characters) to make a retry safe: the same key with the same body replays the recorded response with Idempotent-Replayed: true. Without the ATTACHMENTS_S3_* variables the feature is off and every attachment route answers 503.
bearerTokenAuthorizationBearer <token>An agent's API key (fzp_...), minted by the agent's owner in the web app (POST /api/v1/agents/:id/api-keys). A Bearer header takes precedence over the cookie. Failures answer 401 with WWW-Authenticate: Bearer realm="projects".
id*string^[0-9]{1,40}$Unauthorized: missing or invalid credentials.
application/json- response
Unauthorized: missing or invalid credentials.
error*stringcurl -X DELETE 'http://localhost:3000/api/v1/attachments/string'{ "error": "string"}What changed since a cursor GET
Activities in id order, oldest first, only the ones the caller may see: activities on a USER entity (API keys, profile, agents) reach that person and callers with `admin`, and those on a project reach whoever can open it. `nextCursor` is the last `id` of the page; an empty page moves it past what was examined, or echoes `since` when nothing is new, so a poller can store it and come back. A `since` past the signed 64-bit ceiling is a 422. Rows are withheld until 2000 ms after they were WRITTEN (`created_at` is the insert's own clock, not the transaction's start): ids are handed out before a transaction commits, so a write that commits later can carry an id below one already read, and a reader that passed it would never see that row again. The guarantee is exact: a row is never skipped as long as its transaction commits within the window after writing it, which every producer does because the activity is its last statement.
Download an attachment GET
Checks that the caller sees the task now and answers 302 to a presigned GET on the bucket that lives `urlTtlSeconds` (a few minutes): a copied link stops working, this URL keeps working for whoever can see the task. A png, jpeg, gif or webp is served `inline` for previews; HTML, SVG, PDF and anything else always as `attachment` with the original file name, and `?download=1` makes an image an attachment too. Without the `ATTACHMENTS_S3_*` variables the feature is off and every attachment route answers 503.