API guide

How to authenticate with the Flying Donut v2 REST API and work with projects, sprints, cards, tasks, due dates and dependencies.

Get started#

Flying Donut API v2 is available at https://api.flyingdonut.io/api/v2. It uses HTTPS, JSON request and response bodies, and Bearer authentication.

Every endpoint and schema is in the interactive API documentation.

  • A personal API token acts as you, for scripts, tools and MCP clients
  • A service account belongs to a workspace and acts only in the projects assigned to it, for automated systems and reporting

Create a personal API token

  1. Open AccountSettingsAPI Access.
  2. Under Personal API Tokens, click Generate Token.
  3. Enter a Token name and click Generate Token.
  4. Copy the token. It is shown only once.
Account settings, API Access tab: no personal tokens yet, and the Generate Token button

Create a service account

  1. Open the workspace and its Service Accounts tab. Only workspace Admins see it.
  2. Click Create Service Account, enter a Service account name and tick the projects under Project access.
  3. Click Create Service Account.
  4. Click Manage on the service account, then Generate Token, and copy the token.

Authenticate requests#

Send a token in the Authorization header. Personal tokens act with their owner's existing permissions. Service Account tokens act only within their assigned projects.

Request
curl "https://api.flyingdonut.io/api/v2/projects/{projectId}" \
  -H "Authorization: Bearer fd_pat_your_token"

Tokens start with fd_pat_ for personal tokens or fd_sa_ for Service Account tokens. Never include tokens in URLs, query parameters, source control, or logs.

Core resources#

Responses are JSON. Resource IDs are strings, and dates use ISO 8601.

  • Projects: POST /projects; GET, PATCH, DELETE /projects/{projectId}
  • Project templates (see Projects): GET /projects?template=true lists the templates you can open; POST /projects with templateId creates a project from one and returns templateCopyState COPYING until its cards are copied; PATCH isTemplate marks or unmarks a project (Project Admins only)
  • Backlog buckets: GET, POST /projects/{projectId}/backlog/buckets; PATCH, DELETE /backlog/buckets/{bucketId}
  • Sprints: GET, POST /projects/{projectId}/sprints; GET, PATCH, DELETE /sprints/{sprintId}
  • Backlog cards: GET /projects/{projectId}/backlog/cards; GET, POST /backlog/buckets/{bucketId}/cards
  • Sprint cards: GET, POST /sprints/{sprintId}/cards; GET, PATCH, DELETE /cards/{cardId}
  • Tasks: GET, POST /cards/{cardId}/tasks; GET, PATCH, DELETE /tasks/{taskId}
  • Dependencies: GET /cards/{cardId}/dependencies, GET /tasks/{taskId}/dependencies; PUT /dependencies/{dependencyId}

Use dedicated action endpoints for workflow changes. For example, start a sprint at /sprints/{sprintId}/start or complete it at /sprints/{sprintId}/complete. Cards use /cards/{cardId}/move, /cards/{cardId}/assign, and /cards/{cardId}/unassign; tasks use /tasks/{taskId}/move and /time/remaining.

Due dates and reminders#

Cards carry dueDate, the start of the due day in the timezone of whoever set it, as an ISO 8601 date-time. Send it with your offset, for example 2026-11-14T00:00:00+02:00; a plain date is read as the start of that day in UTC, and null clears it. Responses also return the read-only dueDeadline (the end of the due day) and dueState.

  • dueState is one of none, upcoming, due_soon, due_today, overdue, done_on_time, done_late, or done when a Done card's completion time is unknown
  • Card lists accept dueAfter (inclusive), dueBefore (exclusive), dueState (repeated or comma-separated) and hasDueDate
  • My due cards: GET /me/cards lists the cards assigned to you, followed by you or with your active tasks that are overdue or due within dueWithinDays (30 by default) and not Done, across your projects, with dueState and projectId filters
  • Personal reminders: GET, PUT, DELETE /cards/{cardId}/reminder with remindAt (a future date-time with offset) and an optional note of up to 140 characters; GET /me/reminders lists your active reminders
  • Reminders are always your own: they never appear in card responses, and another person's reminder is never returned
  • /me endpoints need a token that acts for a person; Service Account tokens get 403

Dependencies#

A dependency is recorded wherever a card's description or comments, or a task's description, mention another card or task. Each row is labelled from the point of view of the card or task you ask about, so you never invert it: a card that is blocked_by LPA-12 reads blocks on LPA-12 (see Dependencies).

  • GET /cards/{cardId}/dependencies lists the card's dependencies, then its tasks'; GET /tasks/{taskId}/dependencies lists one task's own. Both answer in one page: nextCursor is always null
  • Filter with relation (blocked_by, blocks, depends_on, needed_by, duplicates, duplicated_by or relates_to) and open (true for rows whose other side is not done, false for done ones)
  • Each row has id, relation, direction (outgoing when the asked side's text holds the mention, incoming when the other side's does, both when each mentions the other), other (kind, id, cid, title, projectId, cardId for a task, status, done, blocked), ownSide, origins (the texts holding the mention, each with its dependencyId and its own direction), typeSource (ai, person or fallback), state (detecting, classified, failed or not_classified, with notClassifiedReason and detectionStartsAt) and canChangeType
  • PUT /dependencies/{dependencyId} with {"type": "blocks"} sets the type from the point of view of the text holding the mention: blocked_by, blocks, depends_on, duplicates, relates_to, or none for not a dependency. It needs edit rights on that card (403 FORBIDDEN otherwise, for example for a Follower), answers 400 INVALID_REQUEST for an unknown type, and returns the row on each side
  • Cards carry waitingOn: how many cards and tasks that are not done the card is blocked by or depends on, through its own description and comments (0 when none)
  • Dependencies whose other side the token cannot see are left out and never counted; those marked none are never listed

Example: create a card#

Create a card in a backlog bucket or sprint. The authenticated token determines the actor, so request bodies never include a username.

Request
curl -X POST "https://api.flyingdonut.io/api/v2/backlog/buckets/{bucketId}/cards" \
  -H "Authorization: Bearer fd_pat_your_token" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Add password strength indicator",
    "description": "Show a visual strength meter as users type.",
    "estimate": 5
  }'

Pagination and updates#

Collection endpoints accept an optional limit and opaque cursor. Continue fetching while nextCursor is not null.

Response
{
  "data": [
    { "id": "…", "title": "Add password strength indicator" }
  ],
  "nextCursor": "opaque-cursor-or-null"
}

Updates use JSON Merge Patch. Send only the fields to change with Content-Type: application/merge-patch+json. Omitted fields are unchanged; send null to clear a nullable field.

Errors and access control#

API errors use a consistent response shape. Handle the HTTP status and stable error code rather than parsing the message.

Error response
{
  "error": {
    "code": "INVALID_REQUEST",
    "message": "Request validation failed.",
    "details": []
  }
}
  • 400 INVALID_ID or INVALID_REQUEST: malformed IDs or invalid request data
  • 401 UNAUTHENTICATED: the Bearer token is missing, invalid, expired, or revoked
  • 403 FORBIDDEN: the authenticated token cannot access or change the project
  • 404 NOT_FOUND: the requested resource does not exist in the project
  • 422 INVALID_TRANSITION: the requested sprint or task workflow transition is not valid

Common questions#

Which token should I use?
Use a Personal API Token for tools acting on your behalf, including MCP clients, CLI tools and personal scripts. Use a Service Account for shared, non-human integrations such as CI/CD systems, and assign it only to the projects it needs.
Can a Service Account access every workspace project?
No. Workspace Admins assign projects to each Service Account. Requests to unassigned projects return 403 FORBIDDEN.
How do I rotate a token?
Create a new token, update the integration, then revoke the previous token. Service Accounts can have multiple active tokens to support zero-downtime rotation.
How do I discover every endpoint and field?
Use the interactive API documentation. It is generated from the running v2 API and includes request schemas, responses, and endpoint details.