Skip to content
Panel

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

NameInTypeRequiredDescription
formatquerystringnocsv returns the rows as CSV instead of JSON.

Request

bash
curl -sS https://api.mot3r.com/v1/lines \
  -H "Authorization: Bearer mot_lk_live_xxxxxxxxxxxx"

Response 200

JSON
{
  "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"
}
NameTypeDescription
rows[].iduuidTunnel ID.
rows[].handlestringHandle of the tunnel inside the account, ending in @.
rows[].display_namestring or nullName shown for the tunnel.
rows[].statusstringactive, paused or archived.
rows[].holderstring or nullClient currently holding the tunnel.
rows[].heartbeat_atISO 8601 or nullLast heartbeat from the holder.
rows[].soul_versionintegerCurrent persona version.
rows[].pulsestringlive (heartbeat in the last 2 minutes), quiet (last hour) or offline.
rows[].key_prefixstring or nullPrefix of the newest active tunnel key, or null.
rows[].spend_30d_microsintegerSpend of the tunnel over the last 30 days, in micro-USD.
max_linesinteger or nullTunnel limit of the account's trust level.

Error 401

JSON
{"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

NameInTypeRequiredDescription
Idempotency-Keyheaderstringyes1 to 128 characters from A-Z a-z 0-9 . _ : -.
namebodystringyesLocal 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.
profilebodystringnoStarter shell: empty (default), assistant or dispatcher. See List tunnel profiles.
display_namebodystring or nullnoUp to 80 characters, no control characters, never a key or token.
classbodystringnopublic (default, the tunnel answers outsiders) or own (only your own people).
kindbodystringnoOnly agent is accepted.

Any other body field is refused with 400 unknown_field.

Request

bash
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.

JSON
{
  "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"
}
NameTypeDescription
createdbooleantrue when this request created the tunnel.
replaybooleantrue when the same Idempotency-Key was used before; the existing tunnel is returned.
addressstring<name>@mot.email, fixed for the life of the tunnel.
public_numberstring10-digit tunnel number.
walletobjectEffect 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.
cardobjectThe 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

JSON
{"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

bash
curl -sS https://api.mot3r.com/v1/line-profiles

Response 200

JSON
{
  "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

NameInTypeRequiredDescription
idpathuuid or meyesTunnel ID. me works with a tunnel key.

Request

bash
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.

JSON
{
  "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"
}
NameTypeDescription
line_id, handle, display_nameIdentity of the tunnel.
kindstringagent, human or robot.
classstringpublic or own.
addressstring or nullTunnel address.
public_numberstring or null10-digit tunnel number.
statusstringactive, paused or archived.
archived_reasonstring or nullReason given when the tunnel was archived.
maylobject or nullThe tunnel's mailbox account: account_id, address.
upstreamobjectApp link of the tunnel: role (primary or shadow), identity_id, app_user_id, sunset_on, key_sealed. The sealed key itself is never returned.
leaseobject or nullCable holding the tunnel: cable_id, cable, model, model_account_id, account_label, epoch, expires_at, live, took_over_from.
soulobjectPersona: version, signed, alg, manifest_sha256, signature, public_key, manifest.
voiceobject or nullCurrent voice (see Set the tunnel voice).
memoryobjectMemory of the tunnel: brief, search_tool, used, limit, pipe (waiting, dead, oldest_at, stalled) and connected sources.
inboxobjectpending (incoming messages without a reply), overdue, oldest_overdue_at, overdue_after_s.
stateobject or nullLast reported state: status, task, mission_id, goal.
wiringarrayEvery channel account wired to the tunnel, enabled or not, with direction, memory, status, healthy and error counts.
cablesarrayCable rack of the tunnel. See Cables.
model_accountobject or nullModel account of the cable in the lease.
shellobjectThe worn shell: label, version, origin, parts filled, epoch, wardrobe size. See Shells.
avatarobject or nullsha256, mime, updated_at.
modestringTunnel mode: on, mute or off.
channelsarrayOne row per channel kind with enabled wiring: kind, owner, accounts, active, healthy.
alarmsarrayrule, 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

JSON
{"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

NameInTypeRequiredDescription
idpathuuid or meyesTunnel ID.

Request

bash
curl -sS https://api.mot3r.com/v1/lines/me/state \
  -H "Authorization: Bearer mot_lk_live_xxxxxxxxxxxx"

Response 200

JSON
{
  "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

JSON
{"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

NameInTypeRequiredDescription
idpathuuid or meyesTunnel ID.
statusbodystringyesidle, working, waiting, blocked or offline.
taskbodystring or nullnoUp to 200 characters.
goalbodystring or nullnoUp to 200 characters.
mission_idbodyuuid or nullnoA mission the tunnel takes part in.
progress_pctbodyinteger or nullno0 to 100.
runs_onbodystring or nullnoShort lowercase name such as vps, laptop or phone.

Request

bash
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

JSON
{
  "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

JSON
{"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

NameInTypeRequiredDescription
idpathuuidyesTunnel ID.
display_namebodystring or nullyesUp to 80 characters, no control characters, never a key or token. Empty or null clears the name.
reasonbodystringnoUp to 200 characters, kept in the account audit log.

Request

bash
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

JSON
{
  "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

JSON
{"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

NameInTypeRequiredDescription
idpathuuidyesTunnel ID.
(body)bodybytesyesThe image file, up to 262 144 bytes.

Request

bash
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.png

Response 200

JSON
{
  "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

JSON
{"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

NameInTypeRequiredDescription
idpathuuid or meyesTunnel ID.
If-None-MatchheaderstringnoETag from a previous response.

Request

bash
curl -sS https://api.mot3r.com/v1/lines/3f2b8c1e-7a4d-4e5b-9c6f-1d2e3a4b5c6d/avatar \
  -H "Authorization: Bearer mot_lk_live_xxxxxxxxxxxx" \
  -o avatar.png

Response 200

The body is the image. Response headers:

HTTP
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

JSON
{"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

NameInTypeRequiredDescription
idpathuuidyesTunnel ID.

Request

bash
curl -sS -X DELETE https://api.mot3r.com/v1/lines/3f2b8c1e-7a4d-4e5b-9c6f-1d2e3a4b5c6d/avatar \
  -H "Authorization: Bearer $MOT_ROOT_KEY"

Response 200

JSON
{
  "line_id": "3f2b8c1e-7a4d-4e5b-9c6f-1d2e3a4b5c6d",
  "avatar": null,
  "replay": false,
  "measured_at": "2026-10-16T10:07:12.330Z"
}

Error 409

JSON
{"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

NameInTypeRequiredDescription
idpathuuidyesTunnel ID.
enginebodystringyeselevenlabs, google, openai, local or browser.
voice_refbodystringyesVoice identifier at the engine, 1 to 120 characters.
pitch_semitonesbodynumberno-12 to 12, rounded to one decimal. Default 0.
ratebodynumberno0.5 to 2, rounded to two decimals. Default 1.
notebodystringnoUp to 200 characters.

Request

bash
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

JSON
{
  "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

JSON
{"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

NameInTypeRequiredDescription
idpathuuidyesSource tunnel ID.
handlebodystringnoHandle of the copy, ending in @ (for example support-bot-eu@).
display_namebodystring or nullnoUp to 80 characters. Defaults to the source name.
public_numberbodystringnoA new 10-digit number for the copy. The source number is never copied.
reasonbodystringnoUp to 200 characters.

Request

bash
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

JSON
{
  "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

JSON
{"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

NameInTypeRequiredDescription
idpathuuidyesTunnel ID.

Request

bash
curl -sS https://api.mot3r.com/v1/lines/3f2b8c1e-7a4d-4e5b-9c6f-1d2e3a4b5c6d/export \
  -H "Authorization: Bearer $MOT_ROOT_KEY" \
  -o support-bot.line.json

Response 200

Shell entries are shortened here; each one also carries the shell parts soul, head, eyes, living, ledger and ext (see Shells).

JSON
{
  "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

JSON
{"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

NameInTypeRequiredDescription
documentbodyobjectyesA document from Export a tunnel.
handlebodystringnoHandle of the new tunnel, ending in @. Defaults to a free handle based on the document's handle.
display_namebodystring or nullnoUp to 80 characters. Defaults to the document's name.
public_numberbodystringnoA new 10-digit number.
reasonbodystringnoUp to 200 characters.

Request

bash
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.

JSON
{
  "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

JSON
{"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

NameInTypeRequiredDescription
idpathuuidyesTunnel ID.
reasonbodystringyes10 to 200 characters.

Request

bash
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

JSON
{
  "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

JSON
{"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

NameInTypeRequiredDescription
idpathuuidyesTunnel ID.
reasonbodystringnoUp to 200 characters.

Request

bash
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

JSON
{
  "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

JSON
{"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

NameInTypeRequiredDescription
idpathuuid or meyesTunnel ID.
limitqueryintegernoHistory entries to return, 1 to 100. Default 20.

Request

bash
curl -sS "https://api.mot3r.com/v1/lines/me/soul?limit=5" \
  -H "Authorization: Bearer mot_lk_live_xxxxxxxxxxxx"

Response 200

JSON
{
  "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

JSON
{"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

NameInTypeRequiredDescription
idpathuuid or meyesThe tunnel. With the root key it must be a uuid (otherwise 400 line_required).
versionbodyintegeryesVersion 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_sha256bodystringyes64 hexadecimal characters: the SHA-256 of the persona text in UTF-8.
signaturebodystringyesThe Ed25519 signature, 64 bytes, base64 or base64url.
public_keybodystringyesThe 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).
algbodystringnoOnly ed25519. Anything else: 400 bad_alg.
notebodystringnoA note for the history, up to 200 characters.
manifestbodystringnoThe 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

bash
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).

JSON
{
  "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"
}
NameTypeDescription
soul_versionintegerThe version now in force.
signedbooleantrue once a signed version exists.
manifest_sha256stringHex SHA-256 of the persona text of this version.
signature, public_keystringSignature and public key of this version, base64.
updated_atstringWhen this version was recorded.
replaybooleanPresent and true only when the same version was already recorded.
manifestobjectPresent 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

JSON
{"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

NameInTypeRequiredDescription
idpathuuidyesThe tunnel. me is not accepted.
account_idbodyuuid or nullyesA 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_keybodystringyes, unless account_id is nullThe 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.
reasonbodystringyes10 to 200 characters, recorded in the account audit log.
actorbodystringnoA 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

bash
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.

JSON
{
  "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"
}
NameTypeDescription
replaybooleantrue when the tunnel already had exactly this alarm chat: no record was written and no entry was added to the audit log.
line_iduuidThe tunnel.
owner_alertobject or nullThe stored alarm chat. null after clearing, or when none is set.
owner_alert.account_iduuidThe channel account that sends the alarms.
owner_alert.thread_keystringThe chat the alarms go to.
owner_alert.kindstringThe kind of the channel account. Always telegram_bot.
measured_atstringISO 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

JSON
{"error":{"status":400,"reason":"reason_min_10_chars","message":"Give a reason of at least 10 characters."}}

Error 409

JSON
{"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

JSON
{"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.