Attachments
Esta página aún no está disponible en tu idioma.
Read and delete attached files by attachment id. Uploading happens on the task: see the …/issues/{issueId}/attachments endpoints on the Tasks page.
Read attachment
Section titled “Read attachment”Read one attached file. A PNG/JPEG/GIF/WebP image under 5MB comes back as an actual image you can look at — use this to inspect a screenshot or photo someone attached. Any other file (PDF, Office document, svg, oversized image) comes back as JSON with a short-lived signed download url and a reason explaining why it wasn’t inlined. Get attachmentId from get_issue with include: [“attachments”].
GET /v1/workspaces/{workspaceId}/attachments/{attachmentId}
curl -H "Authorization: Bearer $DOTBY_TOKEN" \ "https://api.dotby.app/v1/workspaces/acme/attachments/ATTACHMENT_ID"Response: the resulting object as JSON.
Delete attachment
Section titled “Delete attachment”Permanently delete an attached file and its stored bytes. Irreversible. Allowed for the uploader, a project admin, or a workspace manager+.
DELETE /v1/workspaces/{workspaceId}/attachments/{attachmentId}
curl -X DELETE -H "Authorization: Bearer $DOTBY_TOKEN" \ "https://api.dotby.app/v1/workspaces/acme/attachments/ATTACHMENT_ID"Response: the resulting object as JSON.
Errors
Section titled “Errors”Every error is an RFC 9457 application/problem+json body with a machine-stable code. Branch on the code, not the message:
401—unauthenticated/invalid_token: the bearer token is missing, expired, or revoked. Re-authenticate; do not retry as-is.403—insufficient_scope/forbidden/upgrade_required: the token works but may not do this.upgrade_requiredmeans the workspace is not on Pro.404—not_found_or_forbidden: the resource does not exist for this token. Never probe for existence.409—idempotency_conflict: sameIdempotency-Key, different body. Mint a new key.429—rate_limited: back off for the number of seconds inRetry-After, then retry.400—validation_failed: the request shape is wrong. Fix the request; retrying unchanged will fail again.