Aller au contenu

Attachments

Ce contenu n’est pas encore disponible dans votre langue.

Read and delete attached files by attachment id. Uploading happens on the task: see the …/issues/{issueId}/attachments endpoints on the Tasks page.

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}

Terminal window
curl -H "Authorization: Bearer $DOTBY_TOKEN" \
"https://api.dotby.app/v1/workspaces/acme/attachments/ATTACHMENT_ID"

Response: the resulting object as JSON.

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}

Terminal window
curl -X DELETE -H "Authorization: Bearer $DOTBY_TOKEN" \
"https://api.dotby.app/v1/workspaces/acme/attachments/ATTACHMENT_ID"

Response: the resulting object as JSON.

Every error is an RFC 9457 application/problem+json body with a machine-stable code. Branch on the code, not the message:

  • 401unauthenticated / invalid_token: the bearer token is missing, expired, or revoked. Re-authenticate; do not retry as-is.
  • 403insufficient_scope / forbidden / upgrade_required: the token works but may not do this. upgrade_required means the workspace is not on Pro.
  • 404not_found_or_forbidden: the resource does not exist for this token. Never probe for existence.
  • 409idempotency_conflict: same Idempotency-Key, different body. Mint a new key.
  • 429rate_limited: back off for the number of seconds in Retry-After, then retry.
  • 400validation_failed: the request shape is wrong. Fix the request; retrying unchanged will fail again.