Skip to content
v1

Reference Tasks

Tasks

Create and complete team tasks with explicit write permission.

Task operations

These operations are part of API v1. Create an integration with the operations profile to authorize tasks:write; rotating an older key does not add that permission. Select the team with Totem-Team and supply a new Idempotency-Key for each distinct task action. Retry the same action with the same key and body.

POST /v1/tasks creates one open task. Member ids come from GET /v1/members, and a lead id must belong to the selected team. The server sets the actor and source. POST /v1/tasks/{id}/complete takes an empty JSON object and completes that task; completing an already completed task is safe.

Both return an operation. Acceptance is not completion: wait for status: succeeded and use the opaque task_ id in its result. The result contains no task text. These operations do not add tasks to the changes feed.

Create a task

POST /v1/tasks

Accepts a same-team task request as a durable operation. Follow its operation id until completion; retries with the same Idempotency-Key return the same logical operation. The server fixes task provenance and actor; current members and lead ownership are checked again before execution.

Scopes
tasks:write
Rate limit
write

Headers

  • Totem-Team string Conditional ID prefix team_…

    The team to read, as a team_… id. Omit it when the key reads one team; it is required when the key reads several (400 team_required). When you send it, it must name a team the key reads: a malformed id gets 400 invalid_request, and a team outside the key gets 404 team_not_accessible, as does a request without it once the key reads no team at all.

  • Idempotency-Key string Required 1–255 chars Pattern ^[\x21-\x7e]+$

    One unique visible-ASCII key per logical write; reuse exactly on retries and never retry outcome_unknown automatically.

Request body

Create one open task in the selected team. Member and lead ids must belong to that team; task source and actor are set by the server.

  • title string Required 1–300 chars

    Task title, up to 300 characters.

  • body_markdown string ≤ 50000 chars

    Task description in Markdown.

  • priority string

    Task priority; defaults to none.

    Possible values
    • none
    • low
    • medium
    • high
    • urgent
  • start_at string Nullable Format date-time
  • due_at string Nullable Format date-time
  • assigned_to_ids Array<string> ID prefix mem_… ≤ 50 items

    Current team members assigned to this task.

  • owner_id string Nullable ID prefix mem_…
  • lead_id string Nullable ID prefix lead_…
  • tags Array<string> ≤ 30 items

    Task tags, up to 30 entries of 50 characters.

  • reminders object Nullable

    Reminder preferences, or null for no reminder configuration.

Returns

Returns an Operation object.

Errors

+ 12 common errors

POST /v1/tasks
# Fictional fixtures: replace references and dates with current API values.
# Send consent or confirmation attestations only after the person confirms.
curl -X POST 'https://api.totemstudio.ai/v1/tasks' \
  -H "Authorization: Bearer $TOTEM_API_KEY" \
  -H "Totem-Team: $TOTEM_TEAM_ID" \
  -H "Idempotency-Key: ${TOTEM_IDEMPOTENCY_KEY:?Set one unique key for this logical write}" \
  -H "Content-Type: application/json" \
  --data '{"title": "Follow up on the proposal"}'
Response · 202JSON
{
  "object": "operation",
  "id": "op_m3yGe1tkVy6hn3m9LH9m7e640wg0O",
  "status": "queued",
  "endpoint": "tasks.create",
  "created_at": "2026-10-01T09:30:00.000Z",
  "updated_at": "2026-10-01T09:30:00.000Z",
  "result": null,
  "error": null
}

Complete a task

POST /v1/tasks/{id}/complete

Accepts completion of a task in the selected team as a durable operation. Completing a task already done is safe. The opaque task id and current execution authority are checked before any mutation; selecting a team never authorizes a task from another team.

Scopes
tasks:write
Rate limit
write

Path parameters

  • id string Required ID prefix task_…

    The task's public id.

Headers

  • Totem-Team string Conditional ID prefix team_…

    The team to read, as a team_… id. Omit it when the key reads one team; it is required when the key reads several (400 team_required). When you send it, it must name a team the key reads: a malformed id gets 400 invalid_request, and a team outside the key gets 404 team_not_accessible, as does a request without it once the key reads no team at all.

  • Idempotency-Key string Required 1–255 chars Pattern ^[\x21-\x7e]+$

    One unique visible-ASCII key per logical write; reuse exactly on retries and never retry outcome_unknown automatically.

Returns

Returns an Operation object.

Errors

+ 12 common errors

POST /v1/tasks/{id}/complete
# Fictional fixtures: replace references and dates with current API values.
# Send consent or confirmation attestations only after the person confirms.
curl -X POST 'https://api.totemstudio.ai/v1/tasks/task_m3wNC3n7WfzycfQJlLJiPi53sB5Dr/complete' \
  -H "Authorization: Bearer $TOTEM_API_KEY" \
  -H "Totem-Team: $TOTEM_TEAM_ID" \
  -H "Idempotency-Key: ${TOTEM_IDEMPOTENCY_KEY:?Set one unique key for this logical write}" \
  -H "Content-Type: application/json" \
  --data '{}'
Response · 202JSON
{
  "object": "operation",
  "id": "op_m40A600NVGDQxS7yvCzppa74RKZcs",
  "status": "succeeded",
  "endpoint": "tasks.complete",
  "created_at": "2026-10-01T09:30:00.000Z",
  "updated_at": "2026-10-01T09:30:01.000Z",
  "result": {
    "object": "task_receipt",
    "id": "task_m3wNC3n7WfzycfQJlLJiPi53sB5Dr",
    "status": "done"
  },
  "error": null
}

The TaskReceipt object

Minimal task receipt without task content or internal ids.

Attributes

  • object string

    Always task_receipt.

  • id string ID prefix task_…

    Opaque task id bound to its team and incarnation; never parse it.

  • status string

    Task state recorded by the completed operation.

    Possible values
    • open
    • done
TaskReceipt · exampleJSON
{
  "object": "task_receipt",
  "id": "task_m3wNC3n7WfzycfQJlLJiPi53sB5Dr",
  "status": "open"
}

API version 1.0.0