API Reference Endpoints
Tunnels
Create, list, inspect, rename, copy and archive tunnels, the persistent identities of your agents.
A tunnel is the persistent identity of an agent: a mail address <name>@mot.email, a 10-digit tunnel number, a shell it wears, a voice and a persona. The model that drives a tunnel (a cable) can change; the tunnel stays. Account-level actions (create, rename, copy, archive, voice) need the account root key; a tunnel key can read and report on its own tunnel only. Paths that take :id accept the tunnel UUID; where noted, a tunnel key can also use me instead of its own tunnel UUID.
All errors use the envelope described in Errors. Keys are described in Authentication.
#List tunnels
GET /v1/lines
Returns the tunnels of the account that are not archived, ordered by handle. Use it to find tunnel IDs and see which tunnels are live.
Authentication: root key or tunnel key. The root key sees every tunnel of the account; a tunnel key sees only its own tunnel.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
format | query | string | no | csv returns the rows as CSV instead of JSON. |
Request
curl -sS https://api.mot3r.com/v1/lines \
-H "Authorization: Bearer mot_lk_live_xxxxxxxxxxxx"Response 200
{
"rows": [
{
"id": "3f2b8c1e-7a4d-4e5b-9c6f-1d2e3a4b5c6d",
"handle": "support-bot@",
"display_name": "Support bot",
"status": "active",
"holder": null,
"heartbeat_at": null,
"soul_version": 1,
"pulse": "offline",
"key_prefix": null,
"spend_30d_micros": 0
}
],
"max_lines": 3,
"measured_at": "2026-10-16T15:38:32.298Z"
}| Name | Type | Description |
|---|---|---|
rows[].id | uuid | Tunnel ID. |
rows[].handle | string | Handle of the tunnel inside the account, ending in @. |
rows[].display_name | string or null | Name shown for the tunnel. |
rows[].status | string | active, paused or archived. |
rows[].holder | string or null | Client currently holding the tunnel. |
rows[].heartbeat_at | ISO 8601 or null | Last heartbeat from the holder. |
rows[].soul_version | integer | Current persona version. |
rows[].pulse | string | live (heartbeat in the last 2 minutes), quiet (last hour) or offline. |
rows[].key_prefix | string or null | Prefix of the newest active tunnel key, or null. |
rows[].spend_30d_micros | integer | Spend of the tunnel over the last 30 days, in micro-USD. |
max_lines | integer or null | Tunnel limit of the account's trust level. |
Error 401
{"error":{"status":401,"reason":"invalid_credential","message":"Invalid or revoked key. Send Authorization: Bearer <tunnel key or root key>."}}#Create a tunnel
POST /v1/lines
Creates an agent tunnel that works from the first second: its address <name>@mot.email, its mailbox, a tunnel number and a starter shell from the chosen profile. The address is given once and never returns to the pool.
Authentication: root key only. The Idempotency-Key header is mandatory: repeating a request with the same key returns the same tunnel instead of creating a second one.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
Idempotency-Key | header | string | yes | 1 to 128 characters from A-Z a-z 0-9 . _ : -. |
name | body | string | yes | Local part of the address and the handle. 3 to 40 characters: lowercase letters, digits, ., _, -; starts and ends with a letter or digit; no ... Stored in lowercase. |
profile | body | string | no | Starter shell: empty (default), assistant or dispatcher. See List tunnel profiles. |
display_name | body | string or null | no | Up to 80 characters, no control characters, never a key or token. |
class | body | string | no | public (default, the tunnel answers outsiders) or own (only your own people). |
kind | body | string | no | Only agent is accepted. |
Any other body field is refused with 400 unknown_field.
Request
curl -sS -X POST https://api.mot3r.com/v1/lines \
-H "Authorization: Bearer $MOT_ROOT_KEY" \
-H "Idempotency-Key: create-support-bot-1" \
-H "content-type: application/json" \
-d '{"name":"support-bot","profile":"assistant","display_name":"Support bot"}'Response 200
The card object is the full tunnel card, the same object as Get a tunnel card; it is shortened here.
{
"created": true,
"replay": false,
"line_id": "3f2b8c1e-7a4d-4e5b-9c6f-1d2e3a4b5c6d",
"name": "support-bot",
"address": "support-bot@mot.email",
"public_number": "4821093756",
"profile": "assistant",
"wallet": {
"mode": "dry_run",
"slider": "agent_lines",
"free_lines": 1,
"agent_lines": 1,
"billable_lines": 0,
"line_micros_per_day": 0,
"line_cents_per_day": 0,
"balance_available_micros": 0,
"balance_short": false
},
"card": {
"line_id": "3f2b8c1e-7a4d-4e5b-9c6f-1d2e3a4b5c6d",
"handle": "support-bot@",
"display_name": "Support bot",
"kind": "agent",
"class": "public",
"address": "support-bot@mot.email",
"public_number": "4821093756",
"status": "active"
},
"created_at": "2026-10-16T15:40:02.114Z",
"measured_at": "2026-10-16T15:40:02.131Z"
}| Name | Type | Description |
|---|---|---|
created | boolean | true when this request created the tunnel. |
replay | boolean | true when the same Idempotency-Key was used before; the existing tunnel is returned. |
address | string | <name>@mot.email, fixed for the life of the tunnel. |
public_number | string | 10-digit tunnel number. |
wallet | object | Effect on the agent_lines wallet slider: free and billable agent tunnels, the price this tunnel adds per day (micro-USD and cents; 0 for a free tunnel) and whether the balance covers one day. |
card | object | The tunnel card. |
Other refusals: 400 line_name_reserved (with category), 400 bad_line_name (with rule), 400 unknown_line_profile, 409 idempotency_key_reused (same key, different body), 429 max_lines, 402 insufficient_balance.
Error 409
{"error":{"status":409,"reason":"line_name_taken","message":"This name is taken. An address is given once and never returns to the pool. Pick another one."}}#List tunnel profiles
GET /v1/line-profiles
Returns the starter shell profiles you can pass as profile when you create a tunnel. Each profile lists the shell parts it fills, without their content.
Authentication: none.
Parameters
This endpoint takes no parameters.
Request
curl -sS https://api.mot3r.com/v1/line-profilesResponse 200
{
"rows": [
{
"sort": 10,
"about": "The line wears its born shell with no parts filled in. You write the shell yourself.",
"label": "Empty",
"parts": [],
"profile": "empty",
"shell_label": null
},
{
"sort": 20,
"about": "A helpful assistant of the owner: reads the line inbox, answers in the thread, asks the owner before acting outside the line.",
"label": "Assistant",
"parts": ["soul", "head", "eyes", "living"],
"profile": "assistant",
"shell_label": "Assistant"
},
{
"sort": 30,
"about": "A dispatcher: sorts what reaches the line, hands each task to the right line of the owner, reports status as a dot and a word.",
"label": "Dispatcher",
"parts": ["soul", "head", "eyes", "living"],
"profile": "dispatcher",
"shell_label": "Dispatcher"
}
],
"measured_at": "2026-10-16T15:38:32.298Z"
}#Get a tunnel card
GET /v1/lines/:id/card
Returns the full card of a tunnel: identity, mailbox, the lease of the cable that holds it, persona, voice, memory, inbox, state, every wired channel account, the cable rack, the worn shell and the alarms that follow from all of these. Use it as the single read for a tunnel's health.
Authentication: root key (any tunnel of the account), tunnel key or test key (its own tunnel; :id may be me).
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | uuid or me | yes | Tunnel ID. me works with a tunnel key. |
Request
curl -sS https://api.mot3r.com/v1/lines/3f2b8c1e-7a4d-4e5b-9c6f-1d2e3a4b5c6d/card \
-H "Authorization: Bearer mot_lk_live_xxxxxxxxxxxx"Response 200
Shortened; the table lists every top-level field.
{
"line_id": "3f2b8c1e-7a4d-4e5b-9c6f-1d2e3a4b5c6d",
"handle": "support-bot@",
"display_name": "Support bot",
"kind": "agent",
"class": "public",
"address": "support-bot@mot.email",
"public_number": "4821093756",
"status": "active",
"archived_reason": null,
"mayl": {"account_id": "8a1d4c2b-5e6f-4a7b-8c9d-0e1f2a3b4c5d", "address": "support-bot@mot.email"},
"lease": null,
"voice": null,
"state": null,
"cables": [],
"model_account": null,
"avatar": null,
"mode": "on",
"alarms": [
{
"rule": "no_cable",
"lamp": "fault",
"subject": "a line that answers outsiders has no cable on duty",
"ref": null,
"since": null,
"until": null
}
],
"measured_at": "2026-10-16T15:41:10.552Z"
}| Name | Type | Description |
|---|---|---|
line_id, handle, display_name | Identity of the tunnel. | |
kind | string | agent, human or robot. |
class | string | public or own. |
address | string or null | Tunnel address. |
public_number | string or null | 10-digit tunnel number. |
status | string | active, paused or archived. |
archived_reason | string or null | Reason given when the tunnel was archived. |
mayl | object or null | The tunnel's mailbox account: account_id, address. |
upstream | object | App link of the tunnel: role (primary or shadow), identity_id, app_user_id, sunset_on, key_sealed. The sealed key itself is never returned. |
lease | object or null | Cable holding the tunnel: cable_id, cable, model, model_account_id, account_label, epoch, expires_at, live, took_over_from. |
soul | object | Persona: version, signed, alg, manifest_sha256, signature, public_key, manifest. |
voice | object or null | Current voice (see Set the tunnel voice). |
memory | object | Memory of the tunnel: brief, search_tool, used, limit, pipe (waiting, dead, oldest_at, stalled) and connected sources. |
inbox | object | pending (incoming messages without a reply), overdue, oldest_overdue_at, overdue_after_s. |
state | object or null | Last reported state: status, task, mission_id, goal. |
wiring | array | Every channel account wired to the tunnel, enabled or not, with direction, memory, status, healthy and error counts. |
cables | array | Cable rack of the tunnel. See Cables. |
model_account | object or null | Model account of the cable in the lease. |
shell | object | The worn shell: label, version, origin, parts filled, epoch, wardrobe size. See Shells. |
avatar | object or null | sha256, mime, updated_at. |
mode | string | Tunnel mode: on, mute or off. |
channels | array | One row per channel kind with enabled wiring: kind, owner, accounts, active, healthy. |
alarms | array | rule, lamp (waiting, fault, info), subject, ref, since, until. |
Alarm rules: account_unverified, terms_unconfirmed, mayl_missing, cable_shelf_forbidden, cable_account_disabled, cable_account_exhausted, account_down, no_cable, reply_overdue, memory_full, memory_pipe_stalled, voice_missing.
Error 400
{"error":{"status":400,"reason":"line_required","message":"With the account root key, name the tunnel: /v1/lines/<tunnel id>/..."}}#Get tunnel state
GET /v1/lines/:id/state
Returns what the tunnel last reported: status, task, mission, goal, progress and where it runs, plus the last heartbeat.
Authentication: root key, tunnel key or test key (tunnel and test keys: own tunnel only; :id may be me).
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | uuid or me | yes | Tunnel ID. |
Request
curl -sS https://api.mot3r.com/v1/lines/me/state \
-H "Authorization: Bearer mot_lk_live_xxxxxxxxxxxx"Response 200
{
"line_id": "3f2b8c1e-7a4d-4e5b-9c6f-1d2e3a4b5c6d",
"handle": "support-bot@",
"reported": true,
"status": "working",
"task": "Answering the morning queue",
"mission_id": null,
"goal": "Inbox at zero by noon",
"progress_pct": 40,
"runs_on": "vps",
"seq": 12,
"updated_at": "2026-10-16T09:12:44.010Z",
"heartbeat_at": "2026-10-16T09:13:01.502Z",
"holder_present": true,
"measured_at": "2026-10-16T09:13:05.880Z"
}reported is false and the state fields are null before the tunnel's first report.
Error 403
{"error":{"status":403,"reason":"other_line","message":"A tunnel key can only read and change its own tunnel."}}#Report tunnel state
PUT /v1/lines/:id/state
Sets what the tunnel is doing now. The whole state is replaced on each call. A line.state event is emitted only when the state changes.
Authentication: tunnel key (own tunnel, :id may be me) or root key.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | uuid or me | yes | Tunnel ID. |
status | body | string | yes | idle, working, waiting, blocked or offline. |
task | body | string or null | no | Up to 200 characters. |
goal | body | string or null | no | Up to 200 characters. |
mission_id | body | uuid or null | no | A mission the tunnel takes part in. |
progress_pct | body | integer or null | no | 0 to 100. |
runs_on | body | string or null | no | Short lowercase name such as vps, laptop or phone. |
Request
curl -sS -X PUT https://api.mot3r.com/v1/lines/me/state \
-H "Authorization: Bearer mot_lk_live_xxxxxxxxxxxx" \
-H "content-type: application/json" \
-d '{"status":"working","task":"Answering the morning queue","progress_pct":40,"runs_on":"vps"}'Response 200
{
"changed": true,
"line_id": "3f2b8c1e-7a4d-4e5b-9c6f-1d2e3a4b5c6d",
"handle": "support-bot@",
"reported": true,
"status": "working",
"task": "Answering the morning queue",
"mission_id": null,
"goal": null,
"progress_pct": 40,
"runs_on": "vps",
"seq": 13,
"updated_at": "2026-10-16T09:20:00.114Z",
"measured_at": "2026-10-16T09:20:00.120Z"
}Error 400
{"error":{"status":400,"reason":"bad_status","message":"Unknown status."}}#Rename a tunnel
PUT /v1/lines/:id/name
Changes only the display name of a tunnel. The address, the mail address and the handle never change. Sending the current name returns replay: true.
Authentication: root key.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | uuid | yes | Tunnel ID. |
display_name | body | string or null | yes | Up to 80 characters, no control characters, never a key or token. Empty or null clears the name. |
reason | body | string | no | Up to 200 characters, kept in the account audit log. |
Request
curl -sS -X PUT https://api.mot3r.com/v1/lines/3f2b8c1e-7a4d-4e5b-9c6f-1d2e3a4b5c6d/name \
-H "Authorization: Bearer $MOT_ROOT_KEY" \
-H "content-type: application/json" \
-d '{"display_name":"Support desk","reason":"new team name"}'Response 200
{
"line_id": "3f2b8c1e-7a4d-4e5b-9c6f-1d2e3a4b5c6d",
"handle": "support-bot@",
"address": "support-bot@mot.email",
"mail_address": "support-bot@mot.email",
"display_name": "Support desk",
"replay": false,
"measured_at": "2026-10-16T10:02:11.400Z"
}Error 409
{"error":{"status":409,"reason":"line_archived","message":"This line is archived."}}#Upload a tunnel avatar
PUT /v1/lines/:id/avatar
Sets the avatar of a tunnel from raw image bytes. The type is read from the bytes, not from the content-type header: PNG, JPEG and WebP are accepted, SVG and other types are refused. Maximum size 256 KB. Uploading the same bytes again returns replay: true.
Authentication: root key.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | uuid | yes | Tunnel ID. |
| (body) | body | bytes | yes | The image file, up to 262 144 bytes. |
Request
curl -sS -X PUT https://api.mot3r.com/v1/lines/3f2b8c1e-7a4d-4e5b-9c6f-1d2e3a4b5c6d/avatar \
-H "Authorization: Bearer $MOT_ROOT_KEY" \
-H "content-type: image/png" \
--data-binary @avatar.pngResponse 200
{
"line_id": "3f2b8c1e-7a4d-4e5b-9c6f-1d2e3a4b5c6d",
"avatar": {
"sha256": "9b74c9897bac770ffc029102a200c5de4f1b2c3d4e5f60718293a4b5c6d7e8f9",
"mime": "image/png",
"bytes": 18432,
"updated_at": "2026-10-16T10:05:40.007Z"
},
"replay": false,
"measured_at": "2026-10-16T10:05:40.010Z"
}Other refusals: 400 avatar_empty, 413 avatar_too_large (with max_bytes), 409 line_archived.
Error 415
{"error":{"status":415,"reason":"avatar_type_unsupported","message":"The avatar is a PNG, JPEG or WebP image; the type is read from the bytes. SVG and other types are refused.","types":["image/png","image/jpeg","image/webp"]}}#Get a tunnel avatar
GET /v1/lines/:id/avatar
Returns the avatar image bytes with their stored content type. The ETag is the SHA-256 of the image; send it back in If-None-Match to get 304 when it has not changed.
Authentication: root key, tunnel key or test key (tunnel and test keys: own tunnel; :id may be me).
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | uuid or me | yes | Tunnel ID. |
If-None-Match | header | string | no | ETag from a previous response. |
Request
curl -sS https://api.mot3r.com/v1/lines/3f2b8c1e-7a4d-4e5b-9c6f-1d2e3a4b5c6d/avatar \
-H "Authorization: Bearer mot_lk_live_xxxxxxxxxxxx" \
-o avatar.pngResponse 200
The body is the image. Response headers:
content-type: image/png
cache-control: private, max-age=60
x-content-type-options: nosniff
content-security-policy: default-src 'none'; sandbox
etag: "9b74c9897bac770ffc029102a200c5de4f1b2c3d4e5f60718293a4b5c6d7e8f9"Error 404
{"error":{"status":404,"reason":"avatar_not_set"}}#Delete a tunnel avatar
DELETE /v1/lines/:id/avatar
Removes the avatar of a tunnel. Deleting when there is no avatar returns replay: true.
Authentication: root key.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | uuid | yes | Tunnel ID. |
Request
curl -sS -X DELETE https://api.mot3r.com/v1/lines/3f2b8c1e-7a4d-4e5b-9c6f-1d2e3a4b5c6d/avatar \
-H "Authorization: Bearer $MOT_ROOT_KEY"Response 200
{
"line_id": "3f2b8c1e-7a4d-4e5b-9c6f-1d2e3a4b5c6d",
"avatar": null,
"replay": false,
"measured_at": "2026-10-16T10:07:12.330Z"
}Error 409
{"error":{"status":409,"reason":"line_archived","message":"This line is archived."}}#Set the tunnel voice
PUT /v1/lines/:id/voice
Adds a new voice version to a tunnel. The voice belongs to the tunnel, not to the cable, so every channel and call uses the same voice. Versions only grow; earlier versions stay in history.
Authentication: root key.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | uuid | yes | Tunnel ID. |
engine | body | string | yes | elevenlabs, google, openai, local or browser. |
voice_ref | body | string | yes | Voice identifier at the engine, 1 to 120 characters. |
pitch_semitones | body | number | no | -12 to 12, rounded to one decimal. Default 0. |
rate | body | number | no | 0.5 to 2, rounded to two decimals. Default 1. |
note | body | string | no | Up to 200 characters. |
Request
curl -sS -X PUT https://api.mot3r.com/v1/lines/3f2b8c1e-7a4d-4e5b-9c6f-1d2e3a4b5c6d/voice \
-H "Authorization: Bearer $MOT_ROOT_KEY" \
-H "content-type: application/json" \
-d '{"engine":"openai","voice_ref":"alloy","pitch_semitones":0,"rate":1.1,"note":"calm support voice"}'Response 200
{
"line_id": "3f2b8c1e-7a4d-4e5b-9c6f-1d2e3a4b5c6d",
"voice": {
"version": 2,
"engine": "openai",
"voice_ref": "alloy",
"pitch_semitones": 0,
"rate": 1.1,
"note": "calm support voice",
"created_at": "2026-10-16T10:10:00.501Z"
},
"measured_at": "2026-10-16T10:10:00.507Z"
}Error 400
{"error":{"status":400,"reason":"bad_voice_engine","message":"The voice engine is elevenlabs, google, openai, local or browser. See path."}}#Clone a tunnel
POST /v1/lines/:id/clone
Creates a new tunnel in the same account from an existing one. The copy gets a free handle (the one you give, or <handle>-<n>@), a new mail address, the same shell wardrobe with the same worn shell and the same voices. It does not take the tunnel address, number, mailbox, channel accounts, cables, lease, keys, log or memory. The persona must be signed again for the new tunnel (persona.needs_signature).
Authentication: root key.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | uuid | yes | Source tunnel ID. |
handle | body | string | no | Handle of the copy, ending in @ (for example support-bot-eu@). |
display_name | body | string or null | no | Up to 80 characters. Defaults to the source name. |
public_number | body | string | no | A new 10-digit number for the copy. The source number is never copied. |
reason | body | string | no | Up to 200 characters. |
Request
curl -sS -X POST https://api.mot3r.com/v1/lines/3f2b8c1e-7a4d-4e5b-9c6f-1d2e3a4b5c6d/clone \
-H "Authorization: Bearer $MOT_ROOT_KEY" \
-H "content-type: application/json" \
-d '{"handle":"support-bot-eu@","display_name":"Support bot EU"}'Response 200
{
"replay": false,
"origin": "clone",
"line_id": "6c1a9e2f-3b4d-4f5a-8b7c-2d3e4f5a6b7c",
"handle": "support-bot-eu@",
"display_name": "Support bot EU",
"kind": "agent",
"class": "public",
"status": "active",
"address": null,
"public_number": null,
"mail_address": "support-bot-eu@mot.email",
"source_line_id": "3f2b8c1e-7a4d-4e5b-9c6f-1d2e3a4b5c6d",
"shells": [
{
"shell_id": "7d2e4f6a-8b9c-4d1e-9f2a-3b4c5d6e7f8a",
"label": "Assistant",
"worn": true,
"parts_sha256": "2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae"
}
],
"worn_shell_id": "7d2e4f6a-8b9c-4d1e-9f2a-3b4c5d6e7f8a",
"voices": 2,
"persona": {"copied": false, "needs_signature": false, "version": null, "manifest_sha256": null},
"adjusted": [],
"not_copied": ["address", "mayl", "channel_accounts", "wiring", "cables", "lease", "keys", "journal", "memory", "persona_signature"],
"measured_at": "2026-10-16T10:15:03.912Z"
}adjusted lists changes the copy made inside shells so the new tunnel never points at something it does not own: persona_pinned_to_follow, voice_pinned_to_follow, channels_dropped, ledger_ref_dropped, each with its path.
Other refusals: 409 line_exists, 409 number_taken, 429 max_lines, 402 line_needs_balance.
Error 409
{"error":{"status":409,"reason":"human_line_not_copied","message":"A human line has no copies."}}#Export a tunnel
GET /v1/lines/:id/export
Returns the tunnel as a portable document in the format mot.line/v1: identity (for information), persona text and hash without the signature, voices, the shell wardrobe and wiring without secrets. Feed it to Import a tunnel to recreate the tunnel in any account.
Authentication: root key.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | uuid | yes | Tunnel ID. |
Request
curl -sS https://api.mot3r.com/v1/lines/3f2b8c1e-7a4d-4e5b-9c6f-1d2e3a4b5c6d/export \
-H "Authorization: Bearer $MOT_ROOT_KEY" \
-o support-bot.line.jsonResponse 200
Shell entries are shortened here; each one also carries the shell parts soul, head, eyes, living, ledger and ext (see Shells).
{
"format": "mot.line/v1",
"exported_at": "2026-10-16T10:20:00.000Z",
"line": {
"line_id": "3f2b8c1e-7a4d-4e5b-9c6f-1d2e3a4b5c6d",
"handle": "support-bot@",
"display_name": "Support bot",
"kind": "agent",
"class": "public",
"status": "active",
"address": "support-bot@mot.email",
"public_number": "4821093756",
"mail_address": "support-bot@mot.email"
},
"persona": null,
"voices": [
{"version": 1, "engine": "openai", "voice_ref": "alloy", "pitch_semitones": 0, "rate": 1, "note": null}
],
"shells": [
{"label": "Assistant", "note": null, "worn": true, "parts_sha256": "2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae"}
],
"wiring": [
{"kind": "ours_mayl", "external_id": "support-bot@mot.email", "label": null, "status": "active", "direction": "both", "default_out": true, "memory": "all", "enabled": true, "has_secret": false}
],
"not_exported": ["secrets", "keys", "cables", "lease", "journal", "memory", "persona_signature"],
"measured_at": "2026-10-16T10:20:00.004Z"
}When the tunnel has a signed persona, persona holds version, manifest_sha256, public_key and manifest (the persona text, or null).
Error 404
{"error":{"status":404,"reason":"line_not_found","message":"No such line in this account."}}#Import a tunnel
POST /v1/lines/import
Creates a new tunnel in the key's account from a mot.line/v1 document. The new tunnel gets its own mail address; the address and number in the document are never taken over. References to secrets outside the account and to channel accounts are dropped and listed in adjusted. The body may be up to 1 MB.
Authentication: root key.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
document | body | object | yes | A document from Export a tunnel. |
handle | body | string | no | Handle of the new tunnel, ending in @. Defaults to a free handle based on the document's handle. |
display_name | body | string or null | no | Up to 80 characters. Defaults to the document's name. |
public_number | body | string | no | A new 10-digit number. |
reason | body | string | no | Up to 200 characters. |
Request
curl -sS -X POST https://api.mot3r.com/v1/lines/import \
-H "Authorization: Bearer $MOT_ROOT_KEY" \
-H "content-type: application/json" \
-d "{\"handle\":\"support-bot@\",\"document\":$(cat support-bot.line.json)}"Response 200
Same object as Clone a tunnel, with "origin": "import" and source_line_id taken from the document.
{
"replay": false,
"origin": "import",
"line_id": "9e8d7c6b-5a4f-4e3d-8c2b-1a0f9e8d7c6b",
"handle": "support-bot@",
"display_name": "Support bot",
"kind": "agent",
"class": "public",
"status": "active",
"address": null,
"public_number": null,
"mail_address": "support-bot@mot.email",
"source_line_id": "3f2b8c1e-7a4d-4e5b-9c6f-1d2e3a4b5c6d",
"shells": [
{
"shell_id": "1b2c3d4e-5f6a-4b7c-8d9e-0f1a2b3c4d5e",
"label": "Assistant",
"worn": true,
"parts_sha256": "2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae"
}
],
"worn_shell_id": "1b2c3d4e-5f6a-4b7c-8d9e-0f1a2b3c4d5e",
"voices": 1,
"persona": {"copied": false, "needs_signature": false, "version": null, "manifest_sha256": null},
"adjusted": [],
"not_copied": ["address", "mayl", "channel_accounts", "wiring", "cables", "lease", "keys", "journal", "memory", "persona_signature"],
"measured_at": "2026-10-16T10:25:41.218Z"
}Other refusals: 413 body_too_large (over 1 MB), 400 shell_secret_value (with path), 409 line_exists, 429 max_lines, 402 line_needs_balance.
Error 400
{"error":{"status":400,"reason":"bad_line_format","message":"Send a line document in the format mot.line/v1 (GET /v1/lines/:id/export) as document.","path":"document"}}#Archive a tunnel
POST /v1/lines/:id/archive
Sets a tunnel to archived. The address, mail, wardrobe and memory stay; the cable lease is released and pending transfer offers for the tunnel are cancelled. An archived tunnel no longer appears in List tunnels and does not count toward the tunnel limit. Archiving an archived tunnel returns replay: true.
Authentication: root key.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | uuid | yes | Tunnel ID. |
reason | body | string | yes | 10 to 200 characters. |
Request
curl -sS -X POST https://api.mot3r.com/v1/lines/3f2b8c1e-7a4d-4e5b-9c6f-1d2e3a4b5c6d/archive \
-H "Authorization: Bearer $MOT_ROOT_KEY" \
-H "content-type: application/json" \
-d '{"reason":"season is over, pause the bot"}'Response 200
{
"status": "archived",
"replay": false,
"line_id": "3f2b8c1e-7a4d-4e5b-9c6f-1d2e3a4b5c6d",
"archived_reason": "season is over, pause the bot",
"lease_released": true,
"offers_cancelled": 0,
"measured_at": "2026-10-16T10:30:00.010Z"
}Error 400
{"error":{"status":400,"reason":"reason_min_10_chars","message":"Give a reason of at least 10 characters."}}#Unarchive a tunnel
POST /v1/lines/:id/unarchive
Makes an archived tunnel active again. The account tunnel limit applies as when creating a tunnel. Unarchiving an active tunnel returns replay: true.
Authentication: root key.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | uuid | yes | Tunnel ID. |
reason | body | string | no | Up to 200 characters. |
Request
curl -sS -X POST https://api.mot3r.com/v1/lines/3f2b8c1e-7a4d-4e5b-9c6f-1d2e3a4b5c6d/unarchive \
-H "Authorization: Bearer $MOT_ROOT_KEY" \
-H "content-type: application/json" \
-d '{"reason":"back for the new season"}'Response 200
{
"status": "active",
"replay": false,
"line_id": "3f2b8c1e-7a4d-4e5b-9c6f-1d2e3a4b5c6d",
"archived_reason": null,
"lease_released": false,
"offers_cancelled": 0,
"measured_at": "2026-10-16T10:35:00.020Z"
}Other refusals: 429 max_lines, 402 line_needs_balance.
Error 409
{"error":{"status":409,"reason":"line_not_archived","message":"This line is not archived."}}#Get the tunnel persona
GET /v1/lines/:id/soul
Returns the current persona version of the tunnel (SHA-256 of the persona manifest, Ed25519 signature and public key) and its version history, newest first. A cable uses it to check that the persona it loads is the one the owner signed.
Authentication: root key, tunnel key or test key (tunnel and test keys: own tunnel; :id may be me).
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | uuid or me | yes | Tunnel ID. |
limit | query | integer | no | History entries to return, 1 to 100. Default 20. |
Request
curl -sS "https://api.mot3r.com/v1/lines/me/soul?limit=5" \
-H "Authorization: Bearer mot_lk_live_xxxxxxxxxxxx"Response 200
{
"line_id": "3f2b8c1e-7a4d-4e5b-9c6f-1d2e3a4b5c6d",
"handle": "support-bot@",
"soul_version": 2,
"signed": true,
"alg": "ed25519",
"manifest_sha256": "5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8",
"signature": "q3vV0m3Jb3dYw6yQ0x9yX5s9k2k1oQ2xY8m7V6c5B4a3Z2y1X0w9V8u7T6s5R4q3P2o1N0m9L8k7J6i5H4g3Fw==",
"public_key": "11qYAYKxCrfVS/7TyWQHOg7hcvPapiMlrwIaaPcHURo=",
"updated_at": "2026-10-15T18:02:44.120Z",
"history": [
{
"version": 2,
"manifest_sha256": "5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8",
"signature": "q3vV0m3Jb3dYw6yQ0x9yX5s9k2k1oQ2xY8m7V6c5B4a3Z2y1X0w9V8u7T6s5R4q3P2o1N0m9L8k7J6i5H4g3Fw==",
"public_key": "11qYAYKxCrfVS/7TyWQHOg7hcvPapiMlrwIaaPcHURo=",
"alg": "ed25519",
"key_changed": false,
"written_by": "root",
"note": "tone for the new season",
"created_at": "2026-10-15T18:02:44.120Z"
}
],
"measured_at": "2026-10-16T10:40:00.300Z"
}signed is false and the hash, signature and key are null when the tunnel has no signed persona. written_by is the kind of key that wrote the version.
Error 404
{"error":{"status":404,"reason":"line_not_found","message":"No such line in this account."}}#Set the tunnel persona
PUT /v1/lines/:id/soul
Records the next signed version of the persona of a tunnel: the SHA-256 of the persona text, an Ed25519 signature over it and the public key that verifies the signature. The persona text itself can travel in the same call. Versions are never changed or removed; read them back with Get the tunnel persona.
Authentication: root key with the keys:rw scope, or a tunnel key with the mcp scope for its own tunnel (:id may be me). Only the root key can send manifest (the persona text), write the first signed version of a tunnel that has an address, a cable or wired channel accounts, or change the signing key. A tunnel key that belongs to a cable never writes a persona. Test keys get 403 key_kind_not_allowed.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | uuid or me | yes | The tunnel. With the root key it must be a uuid (otherwise 400 line_required). |
version | body | integer | yes | Version number, 1 or more. It must be the current version plus 1; for the first signed version it is the tunnel's current soul_version (1 for a new tunnel). Any other number: 409 soul_version_conflict with expected_version. |
manifest_sha256 | body | string | yes | 64 hexadecimal characters: the SHA-256 of the persona text in UTF-8. |
signature | body | string | yes | The Ed25519 signature, 64 bytes, base64 or base64url. |
public_key | body | string | yes | The raw Ed25519 public key, 32 bytes, base64 or base64url. A key different from the one on record is a signing-key change (root key only). |
alg | body | string | no | Only ed25519. Anything else: 400 bad_alg. |
note | body | string | no | A note for the history, up to 200 characters. |
manifest | body | string | no | The persona text, 1 to 32000 characters. Its SHA-256 (UTF-8) must equal manifest_sha256, otherwise 400 manifest_hash_mismatch. Root key only: with a tunnel key the whole call is refused with 403 key_kind_not_allowed and no version is stored. Hash and text are stored together or not at all. |
Signing. The signed text has four parts separated by a newline character (\n), with no newline at the end: the fixed soul signing prefix (version 1), the tunnel id (a uuid, also when :id is me), the version number, and the SHA-256 in lowercase hexadecimal. Sign the UTF-8 bytes of that text with the Ed25519 private key that belongs to public_key. A signature made for another tunnel or another version does not verify (400 soul_signature_invalid).
Request
curl -sS -X PUT https://api.mot3r.com/v1/lines/3f2b8c1e-7a4d-4e5b-9c6f-1d2e3a4b5c6d/soul \
-H "Authorization: Bearer $MOT_ROOT_KEY" \
-H "content-type: application/json" \
-d '{"version":3,"manifest_sha256":"5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8","signature":"q3vV0m3Jb3dYw6yQ0x9yX5s9k2k1oQ2xY8m7V6c5B4a3Z2y1X0w9V8u7T6s5R4q3P2o1N0m9L8k7J6i5H4g3Fw==","public_key":"11qYAYKxCrfVS/7TyWQHOg7hcvPapiMlrwIaaPcHURo=","note":"tone for the new season"}'Response 200
The response is the new persona state of the tunnel. Sending a version that is already recorded with the same hash and signature returns the same state with replay: true and records no new entry. When manifest was sent, the response also carries manifest with version, manifest_sha256, chars (length of the text) and replay (true when that text was already stored).
{
"line_id": "3f2b8c1e-7a4d-4e5b-9c6f-1d2e3a4b5c6d",
"handle": "support-bot@",
"soul_version": 3,
"signed": true,
"alg": "ed25519",
"manifest_sha256": "5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8",
"signature": "q3vV0m3Jb3dYw6yQ0x9yX5s9k2k1oQ2xY8m7V6c5B4a3Z2y1X0w9V8u7T6s5R4q3P2o1N0m9L8k7J6i5H4g3Fw==",
"public_key": "11qYAYKxCrfVS/7TyWQHOg7hcvPapiMlrwIaaPcHURo=",
"updated_at": "2026-10-16T10:42:10.221Z",
"measured_at": "2026-10-16T10:42:10.240Z"
}| Name | Type | Description |
|---|---|---|
soul_version | integer | The version now in force. |
signed | boolean | true once a signed version exists. |
manifest_sha256 | string | Hex SHA-256 of the persona text of this version. |
signature, public_key | string | Signature and public key of this version, base64. |
updated_at | string | When this version was recorded. |
replay | boolean | Present and true only when the same version was already recorded. |
manifest | object | Present only when manifest was sent. |
Other refusals: 401 missing_credential, 401 invalid_credential, 400 bad_version, 400 bad_manifest_sha256, 400 bad_signature, 400 bad_public_key, 400 bad_note, 400 bad_manifest, 403 scope_missing, 403 line_key_required, 403 other_line, 403 persona_needs_owner_key, 403 soul_key_change_needs_root_key, 404 line_not_found, 409 line_archived.
Error 409
{"error":{"status":409,"reason":"soul_version_conflict","message":"This is not the next soul version. Read the current version and send the one after it.","expected_version":3}}#Set the alarm chat of a tunnel
PUT /v1/lines/:id/owner-alert
Chooses the Telegram chat that receives the alarms of a tunnel, or clears that choice. When an inbound message of a tunnel that a cable has held waits more than 10 minutes without a reply or a skip, mot queues a short alarm to this chat through the channel account you name; the alarm for a tunnel memory that stops being written (memory_pipe_stalled) goes to the same chat. Alarms carry the tunnel address, counts and times, never message content.
Authentication: root key with the keys:rw scope. Tunnel keys and test keys get 403 key_kind_not_allowed. A root key sees only the tunnels of its own account; any other tunnel is 404 line_not_found.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | uuid | yes | The tunnel. me is not accepted. |
account_id | body | uuid or null | yes | A Telegram bot account of your mot account (see Channels) that is wired to this tunnel with direction out or both, enabled, and in status active. null clears the alarm chat. |
thread_key | body | string | yes, unless account_id is null | The Telegram chat id, optionally followed by : and a topic id, for example 123456789, -1001234567890 or -1001234567890:7. The chat must already have written to this bot, because a bot cannot open a chat. Ignored when account_id is null. |
reason | body | string | yes | 10 to 200 characters, recorded in the account audit log. |
actor | body | string | no | A short label for who makes the change, 2 to 40 characters: lowercase letters, digits, ., _, @ and -, starting with a letter or a digit. Recorded in the audit log. |
If the channel account has allow_to in its config, the chat id (the part before :) must be in that list.
Request
curl -sS -X PUT https://api.mot3r.com/v1/lines/7c1d2e3f-4a5b-4c6d-8e7f-9a0b1c2d3e4f/owner-alert \
-H "Authorization: Bearer $MOT_ROOT_KEY" \
-H "content-type: application/json" \
-d '{"account_id":"3f2b8c1e-7a4d-4e5b-9c6f-1d2e3a4b5c6d","thread_key":"123456789","reason":"Send alarms to the owner chat"}'Response 200
Returns the stored alarm chat.
{
"replay": false,
"line_id": "7c1d2e3f-4a5b-4c6d-8e7f-9a0b1c2d3e4f",
"owner_alert": {
"account_id": "3f2b8c1e-7a4d-4e5b-9c6f-1d2e3a4b5c6d",
"thread_key": "123456789",
"kind": "telegram_bot"
},
"measured_at": "2026-10-27T10:15:00.000Z"
}| Name | Type | Description |
|---|---|---|
replay | boolean | true when the tunnel already had exactly this alarm chat: no record was written and no entry was added to the audit log. |
line_id | uuid | The tunnel. |
owner_alert | object or null | The stored alarm chat. null after clearing, or when none is set. |
owner_alert.account_id | uuid | The channel account that sends the alarms. |
owner_alert.thread_key | string | The chat the alarms go to. |
owner_alert.kind | string | The kind of the channel account. Always telegram_bot. |
measured_at | string | ISO 8601. |
To clear the alarm chat, send {"account_id":null,"reason":"Stop alarms for this tunnel"}. The response has "owner_alert": null.
An alarm is sent only while the account is still wired to the tunnel for sending, enabled and active; otherwise it is skipped.
Other refusals: 400 bad_line_id, 400 bad_actor, 400 reason_min_10_chars, 400 bad_reason, 400 account_id_required, 400 bad_account_id, 400 bad_thread_key, 401 missing_credential, 401 invalid_credential, 403 key_kind_not_allowed, 403 scope_missing, 403 recipient_not_allowed, 404 line_not_found, 409 account_not_wired, 409 account_inactive.
Error 400
{"error":{"status":400,"reason":"reason_min_10_chars","message":"Give a reason of at least 10 characters."}}Error 409
{"error":{"status":409,"reason":"owner_alert_thread_not_heard","message":"Owner alert thread not heard."}}owner_alert_thread_not_heard means that chat never wrote to this bot account. Send the bot a message from that chat first.
Error 409
{"error":{"status":409,"reason":"owner_alert_kind_unsupported","message":"Owner alert kind unsupported.","kind":"slack"}}Only telegram_bot accounts can carry alarms. kind names the kind of the account you passed.