Skip to content
view raw .md

Plan API quickstart

Make your first Dailybot Plan API calls in under five minutes: get a token, list boards, create a task, move it and comment on it, with curl and the CLI.

Beta

Plan is in beta. Everything under /plan in the web app, the CLI and agent skill commands for projects, goals, boards and tasks, and the /v1/plan/ public API may change before general availability. Want to try it with your team? Write to [email protected].

request beta access

In about five minutes you will sign in, find a board, create a task, move it to “in progress” and leave a comment on it. Every step shows the curl call and the Dailybot CLI equivalent.

You need curl and jq (to read JSON in the shell), and an email address that belongs to a Dailybot organization enabled for the Plan Beta.

1. Get a token

The quickest credential is a CLI user token: it acts as you, with your role. Ask for a one-time code by email:

curl -sS -X POST "https://api.dailybot.com/v1/cli/auth/request-code/" \
  -H "Content-Type: application/json" \
  -d '{"email": "[email protected]"}'

Paste the code from the email in place of 123456 and keep the token in DAILYBOT_TOKEN:

export DAILYBOT_TOKEN=$(curl -sS -X POST "https://api.dailybot.com/v1/cli/auth/verify-code/" \
  -H "Content-Type: application/json" \
  -d '{"email": "[email protected]", "code": "123456"}' | jq -r .access_token)

If your email belongs to several organizations, the first call answers "status": "select_organization" with a list: send it again with "organization_uuid" set to the one you want.

From the CLI, dailybot login runs the same email-code flow and keeps the session for you:

dailybot login

A personal API key works too (X-API-KEY: $DAILYBOT_API_KEY) and acts as you, with no scope to request. An agent or organization key acts as a system actor, needs Plan scopes enabled for it (during the Beta, write to [email protected]) and is refused on the endpoints that need a person. See Authentication for Plan.

2. Check that Plan is enabled

curl -sS "https://api.dailybot.com/v1/plan/entitlements/" \
  -H "Authorization: Bearer $DAILYBOT_TOKEN"

You want "enabled": true. If you get "enabled": false, or any other Plan call answers 402 plan_upgrade_required, that is expected: your organization is not in the Beta yet. Write to [email protected] and we will enable it.

3. List your boards

curl -sS "https://api.dailybot.com/v1/plan/boards/" \
  -H "Authorization: Bearer $DAILYBOT_TOKEN" | jq '.results[] | {uuid, key, name}'

Keep the first board’s uuid for the next steps:

export BOARD=$(curl -sS "https://api.dailybot.com/v1/plan/boards/" \
  -H "Authorization: Bearer $DAILYBOT_TOKEN" | jq -r '.results[0].uuid')

From the CLI:

dailybot plan board list --json

4. Create a task

board and title are required. The Idempotency-Key header makes the call safe to retry: sending it again with the same key and body returns the first task instead of creating a second one.

export TASK=$(curl -sS -X POST "https://api.dailybot.com/v1/plan/tasks/" \
  -H "Authorization: Bearer $DAILYBOT_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: quickstart-$(date +%s)" \
  -d "{\"board\": \"$BOARD\", \"title\": \"My first task from the API\"}" | jq -r .key)
echo "$TASK"

TASK now holds the task’s key, such as ENG-143. You can use it anywhere a task is addressed.

From the CLI:

dailybot plan task create -t "My first task from the API" -b "$BOARD"

5. Move it to "in progress"

A board’s columns are its workflow states. Find the first state whose category is in_progress, then move the task there:

export STATE=$(curl -sS "https://api.dailybot.com/v1/plan/boards/$BOARD/states/" \
  -H "Authorization: Bearer $DAILYBOT_TOKEN" | jq -r '[.[] | select(.category == "in_progress")][0].uuid')

curl -sS -X POST "https://api.dailybot.com/v1/plan/tasks/$TASK/move/" \
  -H "Authorization: Bearer $DAILYBOT_TOKEN" \
  -H "Content-Type: application/json" \
  -d "{\"state\": \"$STATE\"}" | jq '{key, state: .state.name, version}'

Without after or before, the task goes to the end of the column. Moving is the only way to change a task’s state.

From the CLI:

dailybot plan task move "$TASK" --state in_progress

6. Comment on it

curl -sS -X POST "https://api.dailybot.com/v1/plan/tasks/$TASK/comments/" \
  -H "Authorization: Bearer $DAILYBOT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"body": "Created and moved from the Plan API quickstart."}' | jq '{uuid, body, created_at}'

From the CLI:

dailybot plan task comment "$TASK" "Created and moved from the Plan API quickstart."

That is the whole loop: you have read a board, created a task, changed its state and talked about it.

These CLI commands ship in the next Dailybot CLI release. Add --json to any of them for machine-readable output.

Next steps