Skip to content
Panel

API Reference Endpoints

Tunnel transfers

Hand a tunnel over to another account in two steps, an offer and an acceptance.

A transfer moves a tunnel, with its identity, mail address, mailbox, shells and memory limit, from one account to another. It takes two steps: the owner offers the tunnel, and the receiving account accepts it before the offer expires. Every call needs the root key of the account taking part; the path segment for these routes is reins.

All errors use the envelope described in Errors. Tunnels are described in Tunnels.

What moves with the tunnel on acceptance: identity, mail_address, mayl, shells, persona_pointer, memory_limit, line_state. What stays with the previous owner: journal_before, cables, cable_history, keys, channel_accounts, persona_history, voice_history, events, billing, memory_link. The previous owner's tunnel keys are revoked and their cables disabled. Memory usage of the tunnel is measured again from zero in the new account.

#Offer a tunnel

POST /v1/lines/:id/reins

Creates a pending transfer offer for one of your tunnels. Name the receiver by the mail address of any of its tunnels (to_address) or by its account ID (to_tenant_id), exactly one of the two. An offer by address returns the same 200 response whether or not the address exists, and the sender never sees the receiving account ID. A tunnel has at most one pending offer; repeating the same offer returns replay: true.

Authentication: root key of the account that owns the tunnel.

Parameters

NameInTypeRequiredDescription
idpathuuidyesTunnel ID.
to_addressbodystringone ofMail address of a tunnel in the receiving account, <name>@mot.email.
to_tenant_idbodyuuidone ofID of the receiving account.
reasonbodystringyes10 to 200 characters.
ttl_hoursbodyintegernoHours until the offer expires, 1 to 720. Default 72.

Request

bash
curl -sS -X POST https://api.mot3r.com/v1/lines/3f2b8c1e-7a4d-4e5b-9c6f-1d2e3a4b5c6d/reins \
  -H "Authorization: Bearer $MOT_ROOT_KEY" \
  -H "content-type: application/json" \
  -d '{"to_address":"ops@mot.email","reason":"client takes over the support bot","ttl_hours":48}'

Response 200

JSON
{
  "replay": false,
  "offer_id": "5a6b7c8d-9e0f-4a1b-8c2d-3e4f5a6b7c8d",
  "line_id": "3f2b8c1e-7a4d-4e5b-9c6f-1d2e3a4b5c6d",
  "handle": "support-bot@",
  "from_tenant_id": "2b3c4d5e-6f7a-4b8c-9d0e-1f2a3b4c5d6e",
  "to_tenant_id": null,
  "direction": "outgoing",
  "state": "pending",
  "reason": "client takes over the support bot",
  "expires_at": "2026-10-18T11:00:00.000Z",
  "created_at": "2026-10-16T11:00:00.000Z",
  "decided_at": null,
  "decided_reason": null,
  "to_address": "ops@mot.email",
  "measured_at": "2026-10-16T11:00:00.004Z"
}
NameTypeDescription
offer_iduuidID used to accept, decline or cancel the offer.
to_tenant_iduuid or nullReceiving account. null for the sender of an offer by address.
directionstringoutgoing for the sender, incoming for the receiver.
statestringpending, accepted, declined, cancelled or expired.
to_addressstringPresent only on offers made by address.

Other refusals: 400 reins_same_tenant, 400 reason_min_10_chars, 400 bad_to_address, 400 bad_ttl_hours, 409 reins_offer_pending (with the offer_id of the pending offer), 409 line_archived, 409 line_not_active, 409 human_line_reins, 409 line_app_linked.

Error 400

JSON
{"error":{"status":400,"reason":"reins_target_ambiguous","message":"Pass exactly one receiver: to_address (<name>@mot.email) or to_tenant_id."}}

#List transfer offers

GET /v1/reins

Returns the transfer offers made to your account (incoming) and by your account (outgoing), up to 100 of each, newest first. A pending offer past its expiry shows as expired.

Authentication: root key.

Parameters

This endpoint takes no parameters.

Request

bash
curl -sS https://api.mot3r.com/v1/reins \
  -H "Authorization: Bearer $MOT_ROOT_KEY"

Response 200

JSON
{
  "incoming": [
    {
      "offer_id": "5a6b7c8d-9e0f-4a1b-8c2d-3e4f5a6b7c8d",
      "line_id": "3f2b8c1e-7a4d-4e5b-9c6f-1d2e3a4b5c6d",
      "handle": "support-bot@",
      "from_tenant_id": "2b3c4d5e-6f7a-4b8c-9d0e-1f2a3b4c5d6e",
      "to_tenant_id": "4d5e6f7a-8b9c-4d0e-9f1a-2b3c4d5e6f7a",
      "direction": "incoming",
      "state": "pending",
      "reason": "client takes over the support bot",
      "expires_at": "2026-10-18T11:00:00.000Z",
      "created_at": "2026-10-16T11:00:00.000Z",
      "decided_at": null,
      "decided_reason": null,
      "to_address": "ops@mot.email"
    }
  ],
  "outgoing": [],
  "measured_at": "2026-10-16T11:05:00.010Z"
}

Error 403

JSON
{"error":{"status":403,"reason":"key_kind_not_allowed","message":"This kind of key cannot do this. Use a tunnel key or the account root key."}}

#Accept a transfer

POST /v1/reins/:id/accept

Accepts an incoming offer and moves the tunnel into your account. Pass handle when the tunnel's handle is already used in your account. Your account's tunnel limit applies as when creating a tunnel.

Authentication: root key of the receiving account.

Parameters

NameInTypeRequiredDescription
idpathuuidyesOffer ID.
handlebodystringnoHandle of the tunnel in your account, ending in @. Defaults to the current handle.
reasonbodystringnoUp to 200 characters.

Request

bash
curl -sS -X POST https://api.mot3r.com/v1/reins/5a6b7c8d-9e0f-4a1b-8c2d-3e4f5a6b7c8d/accept \
  -H "Authorization: Bearer $MOT_ROOT_KEY" \
  -H "content-type: application/json" \
  -d '{"handle":"support-bot@","reason":"taking over support"}'

Response 200

JSON
{
  "replay": false,
  "offer_id": "5a6b7c8d-9e0f-4a1b-8c2d-3e4f5a6b7c8d",
  "line_id": "3f2b8c1e-7a4d-4e5b-9c6f-1d2e3a4b5c6d",
  "handle": "support-bot@",
  "from_tenant_id": "2b3c4d5e-6f7a-4b8c-9d0e-1f2a3b4c5d6e",
  "to_tenant_id": "4d5e6f7a-8b9c-4d0e-9f1a-2b3c4d5e6f7a",
  "state": "accepted",
  "address": "support-bot@mot.email",
  "mail_address": "support-bot@mot.email",
  "keys_revoked": 1,
  "cables_disabled": 1,
  "lease_released": true,
  "unwired": 0,
  "accounts_moved": 2,
  "shells_adjusted": 0,
  "moved": ["identity", "mail_address", "mayl", "shells", "persona_pointer", "memory_limit", "line_state"],
  "left_with_previous_owner": ["journal_before", "cables", "cable_history", "keys", "channel_accounts", "persona_history", "voice_history", "events", "billing", "memory_link"],
  "measured_at": "2026-10-16T11:10:00.021Z"
}
NameTypeDescription
keys_revokedintegerTunnel keys of the previous owner that were revoked.
cables_disabledintegerCables of the previous owner that were disabled.
lease_releasedbooleantrue when a cable was holding the tunnel.
unwiredintegerChannel accounts of the previous owner detached from the tunnel.
accounts_movedintegerAccounts that moved with the tunnel (its mailbox and mail inbound).
shells_adjustedintegerShells whose references to the previous owner's accounts or secrets were removed.

Other refusals: 404 reins_offer_not_found, 409 reins_offer_closed (with state), 409 reins_offer_stale, 409 line_exists (with handle), 429 max_lines, 402 line_needs_balance.

Error 410

JSON
{"error":{"status":410,"reason":"reins_offer_expired","message":"This reins offer expired. Ask the owner for a new one."}}

#Decline a transfer

POST /v1/reins/:id/decline

Declines an incoming offer. The tunnel stays with its owner.

Authentication: root key of the receiving account.

Parameters

NameInTypeRequiredDescription
idpathuuidyesOffer ID.
reasonbodystringnoUp to 200 characters.

Request

bash
curl -sS -X POST https://api.mot3r.com/v1/reins/5a6b7c8d-9e0f-4a1b-8c2d-3e4f5a6b7c8d/decline \
  -H "Authorization: Bearer $MOT_ROOT_KEY" \
  -H "content-type: application/json" \
  -d '{"reason":"not our line"}'

Response 200

JSON
{
  "replay": false,
  "offer_id": "5a6b7c8d-9e0f-4a1b-8c2d-3e4f5a6b7c8d",
  "line_id": "3f2b8c1e-7a4d-4e5b-9c6f-1d2e3a4b5c6d",
  "handle": "support-bot@",
  "from_tenant_id": "2b3c4d5e-6f7a-4b8c-9d0e-1f2a3b4c5d6e",
  "to_tenant_id": "4d5e6f7a-8b9c-4d0e-9f1a-2b3c4d5e6f7a",
  "direction": "incoming",
  "state": "declined",
  "reason": "client takes over the support bot",
  "expires_at": "2026-10-18T11:00:00.000Z",
  "created_at": "2026-10-16T11:00:00.000Z",
  "decided_at": "2026-10-16T11:12:00.000Z",
  "decided_reason": "not our line",
  "to_address": "ops@mot.email",
  "measured_at": "2026-10-16T11:12:00.006Z"
}

Error 409

JSON
{"error":{"status":409,"reason":"reins_offer_closed","message":"This reins offer is already closed (accepted, declined, cancelled or expired).","state":"accepted"}}

#Cancel a transfer

POST /v1/reins/:id/cancel

Withdraws an offer you made while it is still pending.

Authentication: root key of the account that made the offer.

Parameters

NameInTypeRequiredDescription
idpathuuidyesOffer ID.
reasonbodystringnoUp to 200 characters.

Request

bash
curl -sS -X POST https://api.mot3r.com/v1/reins/5a6b7c8d-9e0f-4a1b-8c2d-3e4f5a6b7c8d/cancel \
  -H "Authorization: Bearer $MOT_ROOT_KEY" \
  -H "content-type: application/json" \
  -d '{"reason":"wrong receiver"}'

Response 200

JSON
{
  "replay": false,
  "offer_id": "5a6b7c8d-9e0f-4a1b-8c2d-3e4f5a6b7c8d",
  "line_id": "3f2b8c1e-7a4d-4e5b-9c6f-1d2e3a4b5c6d",
  "handle": "support-bot@",
  "from_tenant_id": "2b3c4d5e-6f7a-4b8c-9d0e-1f2a3b4c5d6e",
  "to_tenant_id": null,
  "direction": "outgoing",
  "state": "cancelled",
  "reason": "client takes over the support bot",
  "expires_at": "2026-10-18T11:00:00.000Z",
  "created_at": "2026-10-16T11:00:00.000Z",
  "decided_at": "2026-10-16T11:15:00.000Z",
  "decided_reason": "wrong receiver",
  "to_address": "ops@mot.email",
  "measured_at": "2026-10-16T11:15:00.004Z"
}

Error 404

JSON
{"error":{"status":404,"reason":"reins_offer_not_found","message":"There is no such reins offer for this account."}}