API Reference Endpoints
Missions
Create, list, read and update missions, the shared goals that a group of tunnels works on.
A mission is a shared goal with stages and the tunnels that take part in it. It shows what a group of tunnels works on together. Errors use the envelope described in Errors. Keys are described in Authentication.
#List missions
GET /v1/missions
Returns the missions of the account, most recently changed first, up to 100. A mission is a shared goal with stages and participating tunnels; it shows what a group of tunnels works on together.
Authentication: root key (every mission of the account), tunnel key or test key (only the missions the tunnel takes part in).
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
status | query | string | no | Only missions in this state, one of the four values listed for rows[].status below. Any other value: 400 bad_status. |
Request
curl -sS "https://api.mot3r.com/v1/missions?status=active" \
-H "Authorization: Bearer mot_lk_live_xxxxxxxxxxxx"Response 200
{
"rows": [
{
"id": "8a1c5e72-3b94-4d06-a7f2-5c0e9d1b6a38",
"title": "Launch the support bot",
"goal": "Answer 90 percent of tickets without a human",
"status": "active",
"stages": [
{ "name": "Collect the FAQ", "state": "done" },
{ "name": "Write the persona", "state": "doing" },
{ "name": "Go live", "state": "todo" }
],
"progress_pct": 33,
"owner_line_id": "3f2b8c1e-7a4d-4e5b-9c6f-1d2e3a4b5c6d",
"participants": [
{ "line_id": "3f2b8c1e-7a4d-4e5b-9c6f-1d2e3a4b5c6d", "handle": "support-bot@", "role": "owner", "state": "working", "task": "Writing the persona", "runs_on": "laptop-1" },
{ "line_id": "6d2e9a41-8c35-4f70-b1a8-2e7c4d9f0b53", "handle": "docs-bot@", "role": "member", "state": "idle", "task": null, "runs_on": null }
],
"created_at": "2026-10-15T09:00:00.000Z",
"updated_at": "2026-10-16T10:12:00.000Z"
}
],
"measured_at": "2026-10-16T10:40:00.300Z"
}| Name | Type | Description |
|---|---|---|
rows[].id | uuid | The mission. |
rows[].title | string | Title, up to 120 characters. |
rows[].goal | string or null | Goal, up to 500 characters. |
rows[].status | string | One of four values: active, done, cancelled, or the value of a mission that has not started. |
rows[].stages | array | Up to 50 stages {name, state}; state is todo, doing, done or blocked. |
rows[].progress_pct | integer or null | Share of stages in the done state, rounded; null when the mission has no stages. |
rows[].owner_line_id | uuid or null | The tunnel that owns the mission; null for a mission created by the root key without an owner. |
rows[].participants | array | Participating tunnels: line_id, handle, role (owner or member), and the last reported state (idle, working, waiting, blocked, offline, or null), task and runs_on of the tunnel. |
rows[].created_at, rows[].updated_at | string | Timestamps. |
Other refusals: 401 missing_credential, 401 invalid_credential, 403 key_kind_not_allowed.
Error 400
{"error":{"status":400,"reason":"bad_status","message":"Unknown status."}}#Create a mission
POST /v1/missions
Creates a mission. With a tunnel key the tunnel becomes the owner and a participant; with the root key the mission has an owner only if you name one. Every participating tunnel gets a mission.updated event. Each call creates a new mission.
Authentication: root key with the keys:rw scope, or a tunnel key with the mcp scope. Test keys and keys without a tunnel cannot write.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
title | body | string | yes | Title, 1 to 120 characters after trimming. Missing: 400 title_required. |
goal | body | string | no | Goal, up to 500 characters. |
status | body | string | no | One of the four values listed in List missions. Default active. Any other value: 400 bad_status. |
stages | body | array | no | Up to 50 objects {name, state}: name 1 to 80 characters, state one of todo, doing, done, blocked, and no other keys. Otherwise 400 bad_stages. |
lines | body | array of uuid | no | Up to 50 further tunnels of the account that join as members. A tunnel that is not in the account: 404 line_not_found; a malformed list: 400 bad_lines. |
owner_line_id | body | uuid | no | Root key only: the tunnel that owns the mission. With a tunnel key the field is ignored and the tunnel itself is the owner. |
Request
curl -sS -X POST https://api.mot3r.com/v1/missions \
-H "Authorization: Bearer mot_lk_live_xxxxxxxxxxxx" \
-H "content-type: application/json" \
-d '{"title":"Launch the support bot","goal":"Answer 90 percent of tickets without a human","stages":[{"name":"Collect the FAQ","state":"doing"},{"name":"Go live","state":"todo"}],"lines":["6d2e9a41-8c35-4f70-b1a8-2e7c4d9f0b53"]}'Response 200
The response is the new mission with created: true. The fields are those of List missions.
{
"created": true,
"id": "8a1c5e72-3b94-4d06-a7f2-5c0e9d1b6a38",
"title": "Launch the support bot",
"goal": "Answer 90 percent of tickets without a human",
"status": "active",
"stages": [
{ "name": "Collect the FAQ", "state": "doing" },
{ "name": "Go live", "state": "todo" }
],
"progress_pct": 0,
"owner_line_id": "3f2b8c1e-7a4d-4e5b-9c6f-1d2e3a4b5c6d",
"participants": [
{ "line_id": "3f2b8c1e-7a4d-4e5b-9c6f-1d2e3a4b5c6d", "handle": "support-bot@", "role": "owner", "state": null, "task": null, "runs_on": null },
{ "line_id": "6d2e9a41-8c35-4f70-b1a8-2e7c4d9f0b53", "handle": "docs-bot@", "role": "member", "state": null, "task": null, "runs_on": null }
],
"created_at": "2026-10-16T10:45:00.000Z",
"updated_at": "2026-10-16T10:45:00.000Z",
"measured_at": "2026-10-16T10:45:00.050Z"
}Other refusals: 401 missing_credential, 401 invalid_credential, 400 bad_mission (the body is not an object), 400 bad_status, 400 text_too_long, 400 bad_owner_line_id, 403 key_kind_not_allowed, 403 line_key_required, 403 scope_missing, 404 line_not_found.
Error 400
{"error":{"status":400,"reason":"title_required","message":"Give the mission a title."}}#Get a mission
GET /v1/missions/:id
Returns one mission with its goal, stages, progress and participants, including the last reported state of each participating tunnel.
Authentication: root key (any mission of the account), tunnel key or test key (only a mission the tunnel takes part in; any other mission answers 404 mission_not_found).
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | uuid | yes | The mission. A malformed id: 400 bad_mission_id. |
Request
curl -sS https://api.mot3r.com/v1/missions/8a1c5e72-3b94-4d06-a7f2-5c0e9d1b6a38 \
-H "Authorization: Bearer mot_lk_live_xxxxxxxxxxxx"Response 200
The fields are those of List missions, without the rows wrapper.
{
"id": "8a1c5e72-3b94-4d06-a7f2-5c0e9d1b6a38",
"title": "Launch the support bot",
"goal": "Answer 90 percent of tickets without a human",
"status": "active",
"stages": [
{ "name": "Collect the FAQ", "state": "done" },
{ "name": "Go live", "state": "todo" }
],
"progress_pct": 50,
"owner_line_id": "3f2b8c1e-7a4d-4e5b-9c6f-1d2e3a4b5c6d",
"participants": [
{ "line_id": "3f2b8c1e-7a4d-4e5b-9c6f-1d2e3a4b5c6d", "handle": "support-bot@", "role": "owner", "state": "working", "task": "Writing the persona", "runs_on": "laptop-1" }
],
"created_at": "2026-10-15T09:00:00.000Z",
"updated_at": "2026-10-16T10:12:00.000Z",
"measured_at": "2026-10-16T10:40:00.300Z"
}Other refusals: 401 missing_credential, 401 invalid_credential, 403 key_kind_not_allowed.
Error 404
{"error":{"status":404,"reason":"mission_not_found","message":"There is no such mission for this key."}}#Update a mission
PATCH /v1/missions/:id
Changes a mission. Send only the fields you want to change: title, status and goal are replaced, stages is replaced as a whole list, and lines adds participants (it never removes any). Sending goal as null or an empty string clears the goal. Every participating tunnel gets a mission.updated event.
Authentication: the tunnel key of the tunnel that owns the mission (scope mcp), or the root key (scope keys:rw). Another tunnel key gets 403 mission_owner_only.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | uuid | yes | The mission. A malformed id: 400 bad_mission_id. |
title | body | string | no | New title, 1 to 120 characters; an empty value leaves the title unchanged. |
goal | body | string or null | no | New goal, up to 500 characters; null or empty clears it. |
status | body | string | no | One of the four values listed in List missions. Any other value: 400 bad_status. |
stages | body | array | no | The full new list of stages, same rules as in Create a mission. |
lines | body | array of uuid | no | Up to 50 further tunnels of the account to add as members. |
Request
curl -sS -X PATCH https://api.mot3r.com/v1/missions/8a1c5e72-3b94-4d06-a7f2-5c0e9d1b6a38 \
-H "Authorization: Bearer $MOT_ROOT_KEY" \
-H "content-type: application/json" \
-d '{"status":"done","stages":[{"name":"Collect the FAQ","state":"done"},{"name":"Go live","state":"done"}]}'Response 200
The response is the changed mission with created: false. The fields are those of List missions.
{
"created": false,
"id": "8a1c5e72-3b94-4d06-a7f2-5c0e9d1b6a38",
"title": "Launch the support bot",
"goal": "Answer 90 percent of tickets without a human",
"status": "done",
"stages": [
{ "name": "Collect the FAQ", "state": "done" },
{ "name": "Go live", "state": "done" }
],
"progress_pct": 100,
"owner_line_id": "3f2b8c1e-7a4d-4e5b-9c6f-1d2e3a4b5c6d",
"participants": [
{ "line_id": "3f2b8c1e-7a4d-4e5b-9c6f-1d2e3a4b5c6d", "handle": "support-bot@", "role": "owner", "state": "idle", "task": null, "runs_on": null }
],
"created_at": "2026-10-15T09:00:00.000Z",
"updated_at": "2026-10-16T10:50:00.000Z",
"measured_at": "2026-10-16T10:50:00.040Z"
}Other refusals: 401 missing_credential, 401 invalid_credential, 400 bad_mission_id, 400 bad_mission, 400 bad_stages, 400 bad_status, 400 bad_lines, 400 text_too_long, 403 key_kind_not_allowed, 403 line_key_required, 403 scope_missing, 404 mission_not_found, 404 line_not_found.
Error 403
{"error":{"status":403,"reason":"mission_owner_only","message":"Only the line that owns the mission, or the account root key, can change it."}}