Skip to content

REST API reference

The SwitchDesk AI Access REST API: one route per tool at api.switchdesk.org/v1, auth header, GET vs POST, responses, errors, idempotency and limits.

This page as Markdown · All docs as one file · Generated from the API and CLI source, checked 2026-10-21

Base URL and auth

https://api.switchdesk.org/v1/<tool>
Authorization: Bearer sda_…

The key (sda_ + 32 characters + an 8-character checksum) is created in Settings → AI Access and shown once. Send it only in the Authorization header, never in a URL. Sign-in tokens don’t work here: they belong to https://mcp.switchdesk.org/mcp. The full schema is openapi.json.

Requests

  • Every tool is POST /v1/<tool> with a JSON body of its arguments (see the tool reference).
  • Reads without user-written text also accept GET with query parameters. Anything carrying text (query, titles, notes) must be a POST body, because URLs end up in logs.
  • Browsers can’t call the API: a request with an Origin header is refused (origin_not_allowed).
  • Writes take an optional idempotency_key (1–100 characters). Resending it within 24 hours returns the first answer.
curl -s https://api.switchdesk.org/v1/list_todos \
  -H "Authorization: Bearer $SWITCHDESK_TOKEN" -H "Content-Type: application/json" \
  -d '{"section":"today"}'

curl -s https://api.switchdesk.org/v1/add_todo \
  -H "Authorization: Bearer $SWITCHDESK_TOKEN" -H "Content-Type: application/json" \
  -d '{"title":"Call Ana","category":"Fernhill","due":"2026-10-14","idempotency_key":"call-ana-1"}'

Responses

HTTPMeans
200Done: {"ok": true, …}
201Created (a new to-do, category or note)
202Waiting for the person: {"ok": true, "status": "pending_approval", "proposal_id": "…"}
4xx{"ok": false, "error", "message", "hint"}: see below

Routes

RouteGET tooPermission
POST /v1/get_accessyesnone
POST /v1/list_categoriesyescategories.read
POST /v1/list_todosyestodos.read
POST /v1/get_todoyestodos.read
POST /v1/add_todotodos.add_incoming / todos.add
POST /v1/update_todotodos.edit
POST /v1/set_todo_statetodos.complete
POST /v1/delete_todostodos.delete
POST /v1/add_todo_notetodos.edit (+ team.write on a shared to-do)
POST /v1/delete_todo_notetodos.edit (+ team.write on a shared to-do)
POST /v1/propose_changesapprovals.ask
POST /v1/ask_meapprovals.ask
POST /v1/get_proposalyesapprovals.ask (or any write in Ask mode)
POST /v1/list_proposalsyesapprovals.ask (or any write in Ask mode)
POST /v1/create_categorycategories.write
POST /v1/update_categorycategories.write (+ team.write when shared or used by a meeting automation)
POST /v1/list_meetingsyesmeetings.read
POST /v1/get_meetingmeetings.read (+ meetings.transcripts for the transcript)
POST /v1/search_meetingsmeetings.read
POST /v1/list_notesyesnotes.read
POST /v1/get_noteyesnotes.read
POST /v1/search_notesnotes.read
POST /v1/create_notenotes.write
POST /v1/append_to_notenotes.write
POST /v1/update_notenotes.write
POST /v1/delete_notenotes.write
POST /v1/get_recapyesrecaps.read
POST /v1/search_brainbrain.read
POST /v1/get_brain_pageyesbrain.read
POST /v1/rememberbrain.write

Errors

Error codeHTTPCLI exitHint the API sends
missing_key4012Send the key in the Authorization header: Bearer sda_…
invalid_key4012The key is wrong or was deleted. Ask the person for a new key from SwitchDesk → Settings → AI Access.
revoked4012The person revoked this connection. Ask them for a new key.
expired4012This connection expired (90 days unused, or its end date). Ask the person for a new key.
plan_required4032SwitchDesk Pro is needed for AI access.
capability_off4032Not allowed. Turn it on in SwitchDesk → Settings → AI Access.
needs_confirm4034The person needs to confirm Meetings & Notes access for this connection with the code SwitchDesk emails them (Settings → AI Access).
copy_off4034The person needs to turn on "Share meetings & notes with your AIs" in SwitchDesk → Settings → AI Access on their Mac.
transcripts_off4034The person needs to tick "Include full transcripts" in SwitchDesk → Settings → AI Access on their Mac.
not_found4041
unknown_tool4041
paused4232The person paused this connection's changes. Reads still work; they can resume it in SwitchDesk → Settings → AI Access.
rate_limited4295Too many requests. Wait retry_after seconds.
too_many_pending4291
incoming_full4291
try_again4091The person's day just turned over (3 AM in their time zone). Send the same request again.
duplicate_category4091A category with that name exists; use update_category with its id.
no_mac4094The person's Mac hasn't connected yet. Ask them to open SwitchDesk on it.
brain_off_for_ai4034The person needs to choose what connected AIs may see in SwitchDesk → Settings → Brain.
brain_off4034The person's Brain is off. They can turn it on in SwitchDesk → Settings → Brain.
not_available_yet5014Coming soon.
series_stop_required4221This to-do repeats. Pass series: "stop" to delete it and end the series.
ambiguous_category4221Several categories match; pass category_id from list_categories.
unknown_category4221No category matched; call list_categories for the names.
timezone_required4221SwitchDesk doesn't know the person's time zone yet: pass timezone (e.g. "America/New_York").
invalid_timezone4221Use an IANA time zone name like "America/New_York".
invalid_repeat4221Send an RRULE like "FREQ=WEEKLY;BYDAY=MO" or a rule object (see the docs).
sub_todo4221Sub-to-dos follow their parent. Move or date the parent, or send parent_id: null first.
teammate_subtree4221A sub-to-do belongs to a teammate, so the whole block can't be moved or deleted.
nothing_to_change4221Every field already has that value.
reserved_name4221Today's Todo and This Week are built in.
repeat_not_allowed4221Reopen the to-do (or wait for its review) before making it repeat.
unknown_space4221Use a space name or id from get_access (brain.spaces), or leave space out.
secret4222SwitchDesk never keeps passwords, keys, card, bank or ID numbers in the Brain. Suggest a password manager instead.

Rate-limited answers (429) carry retry_after and a Retry-After header. Per-connection and account limits: Limits.

SwitchDesk is a Mac app

Send yourself the download link, then open it on your Mac.

switchdesk.org/download

Or scan it with your phone’s camera.