Pular para o conteúdo

Labels

Este conteúdo não está disponível em sua língua ainda.

Direct-id label operations. List and create labels under a Project; these endpoints update or remove an existing label.

Rename or recolor one project label definition (full non-guest project member). Only pass fields to change; duplicate names report duplicate_label.

PATCH /v1/workspaces/{workspaceId}/labels/{labelId}

Terminal window
curl -X PATCH "https://api.dotby.app/v1/workspaces/acme/labels/LABEL_ID" \
-H "Authorization: Bearer $DOTBY_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name":"Platform work"}'

Response: the resulting object as JSON.

Delete one project label definition (project admin). Existing Task-label links are removed through the bounded cleanup path before and after the definition is deleted.

DELETE /v1/workspaces/{workspaceId}/labels/{labelId}

Terminal window
curl -X DELETE -H "Authorization: Bearer $DOTBY_TOKEN" \
"https://api.dotby.app/v1/workspaces/acme/labels/LABEL_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:

  • 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_required means 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: same Idempotency-Key, different body. Mint a new key.
  • 429 — rate_limited: back off for the number of seconds in Retry-After, then retry.
  • 400 — validation_failed: the request shape is wrong. Fix the request; retrying unchanged will fail again.