Skip to content
Panel

API Reference Endpoints

Vault

Store passwords, API keys and tokens for external tools, scoped to one tunnel or the whole account, track their service, expiry and status, rotate them, and reveal a value once.

The vault holds the passwords, API keys, tokens and notes that a tunnel's agent needs for external tools. An entry belongs to one tunnel or to the whole account. Values are sealed by mot and never appear in a list; the owner can reveal a value on purpose, and every reveal is recorded with the caller's IP address. All endpoints below need the account root key; writes and reveals also need the keys:rw scope. Agents read vault entries through the MCP tools vault_list and vault_get, not through these endpoints. See Errors for the error envelope.

An entry has one of these kinds: haslo (password), klucz_api (API key), token, notatka (note), inne (other).

#Lifecycle of an entry

Besides its value, an entry records where it came from and whether it can still be used. These fields come back on every list, create and update response and can be sent on create and update.

FieldTypeDescription
statusstringzywy (live, the default) or martwy (dead: revoked, or replaced by a newer key). A dead entry stays in the vault so you can still reveal it.
expires_atstring or nullWhen the key stops being valid. null means no expiry. Send a full timestamp with a zone (2027-01-31T23:59:59Z) or a plain date (2027-01-31), which means the end of that day in UTC.
expiredbooleantrue once expires_at has passed. It is worked out on every read, never stored.
servicestring or nullThe service the key belongs to: shopify, fal, magnific, linear, deepseek, openrouter, gemini, openai, anthropic, stripe, github, telegram, twilio, telnyx, postal or inne (any other).
used_bystring or nullWho uses the key, for example nightly stock sync. One row, up to 200 characters.
verify_hintstring or nullHow to check that the key still works: a command or an address, up to 500 characters. Describe the check, never paste the key into it; a request that contains the entry's value in used_by or verify_hint is refused with 400 value_in_text.
rotated_fromuuid or nullThe entry this one replaced when it was created by a rotation. null for other entries, and after the older entry is deleted.

#List vault entries

GET /v1/vault

Lists vault entries without their values. With line_id, returns the entries of that tunnel plus the entries of the whole account; without it, every entry of the account. Tunnel entries come first, then account entries, each sorted by name.

Authentication: root key only. Other key kinds get 403 key_kind_not_allowed.

Parameters

NameInTypeRequiredDescription
line_idqueryuuidnoTunnel whose entries to include. A tunnel of another account returns 404 line_not_found.

Request

bash
curl -sS "https://api.mot3r.com/v1/vault?line_id=3f2b8c1e-7a4d-4e5b-9c6f-1d2e3a4b5c6d" \
  -H "Authorization: Bearer $MOT_ROOT_KEY"

Response 200

JSON
{
  "line_id": "3f2b8c1e-7a4d-4e5b-9c6f-1d2e3a4b5c6d",
  "limit": 500,
  "rows": [
    {
      "item_id": "6e8f0a2b-3c5d-4e7f-9a1b-2c4d6e8f0a3b",
      "line_id": "3f2b8c1e-7a4d-4e5b-9c6f-1d2e3a4b5c6d",
      "scope": "line",
      "name": "crm-api",
      "description": "Read-only key for the CRM",
      "kind": "klucz_api",
      "fingerprint": "a3f09c1d7e42",
      "created_at": "2026-10-14T09:12:03.411Z",
      "updated_at": "2026-10-14T09:12:03.411Z",
      "last_read_at": null,
      "last_read_by": null,
      "status": "zywy",
      "service": "inne",
      "expires_at": "2027-03-31T23:59:59.000Z",
      "expired": false,
      "used_by": "nightly CRM sync",
      "verify_hint": "GET /api/me with the key returns 200",
      "rotated_from": null
    },
    {
      "item_id": "7f9a1b3c-4d6e-4f8a-8b2c-3d5e7f9a1b4c",
      "line_id": null,
      "scope": "account",
      "name": "shared-sftp",
      "description": null,
      "kind": "haslo",
      "fingerprint": "5b7d9f1a3c6e",
      "created_at": "2026-10-10T07:30:00.000Z",
      "updated_at": "2026-10-12T11:02:45.000Z",
      "last_read_at": "2026-10-15T18:20:11.000Z",
      "last_read_by": "owner@example.com",
      "status": "martwy",
      "service": null,
      "expires_at": null,
      "expired": false,
      "used_by": null,
      "verify_hint": null,
      "rotated_from": null
    }
  ],
  "account_count": 2,
  "measured_at": "2026-10-16T15:40:00.000Z"
}
NameTypeDescription
scopestringline for an entry of one tunnel, account for an entry of the whole account (line_id is null).
status, service, expires_at, expired, used_by, verify_hint, rotated_fromThe lifecycle fields described above.
account_countintegerEntries in the whole account, also when line_id narrows the list.
fingerprintstring12 hex characters derived from the value. Two entries with the same fingerprint hold the same value.
last_read_atstring or nullTime of the last reveal.
last_read_bystring or nullWho revealed the value last.
limitintegerMost entries an account can hold.

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."}}

#Create a vault entry

POST /v1/vault

Stores a new entry. The value is sealed by mot; the response carries only its fingerprint.

Authentication: root key only, with the keys:rw scope.

Parameters

NameInTypeRequiredDescription
line_idbodyuuid or nullnoTunnel the entry belongs to. Omit or null for the whole account.
namebodystringyes1 to 80 characters, unique within its scope.
descriptionbodystring or nullnoUp to 500 characters.
kindbodystringyeshaslo, klucz_api, token, notatka or inne.
valuebodystringyes1 to 8192 characters. Kept as sent, without trimming.
statusbodystringnozywy (default) or martwy.
servicebodystring or nullnoOne of the services listed under Lifecycle of an entry.
expires_atbodystring or nullnoA full timestamp with a zone, or a plain date (end of that day, UTC).
used_bybodystring or nullnoUp to 200 characters, one row.
verify_hintbodystring or nullnoUp to 500 characters.

An account holds at most 500 entries; the next one returns 409 vault_limit. A bad lifecycle field returns 400 with the reason bad_status, bad_service, bad_expires_at, bad_used_by or bad_verify_hint; the value written into used_by or verify_hint returns 400 value_in_text.

Request

bash
curl -sS -X POST https://api.mot3r.com/v1/vault \
  -H "Authorization: Bearer $MOT_ROOT_KEY" \
  -H "content-type: application/json" \
  -d '{"line_id": "3f2b8c1e-7a4d-4e5b-9c6f-1d2e3a4b5c6d", "name": "crm-api", "description": "Read-only key for the CRM", "kind": "klucz_api", "value": "YOUR_CRM_API_KEY", "service": "inne", "expires_at": "2027-03-31", "used_by": "nightly CRM sync", "verify_hint": "GET /api/me with the key returns 200"}'

Response 200

JSON
{
  "item_id": "6e8f0a2b-3c5d-4e7f-9a1b-2c4d6e8f0a3b",
  "line_id": "3f2b8c1e-7a4d-4e5b-9c6f-1d2e3a4b5c6d",
  "scope": "line",
  "name": "crm-api",
  "description": "Read-only key for the CRM",
  "kind": "klucz_api",
  "fingerprint": "a3f09c1d7e42",
  "created_at": "2026-10-16T15:40:00.000Z",
  "updated_at": "2026-10-16T15:40:00.000Z",
  "last_read_at": null,
  "last_read_by": null,
  "status": "zywy",
  "service": "inne",
  "expires_at": "2027-03-31T23:59:59.000Z",
  "expired": false,
  "used_by": "nightly CRM sync",
  "verify_hint": "GET /api/me with the key returns 200",
  "rotated_from": null,
  "measured_at": "2026-10-16T15:40:00.000Z"
}

Error 409

JSON
{"error":{"status":409,"reason":"vault_name_taken","message":"Vault name taken."}}

#Update a vault entry

PATCH /v1/vault/:id

Changes the fields you send. A new value is sealed again and changes the fingerprint. description: null clears the description; line_id: null moves the entry to the whole account.

Authentication: root key only, with the keys:rw scope.

Parameters

NameInTypeRequiredDescription
idpathuuidyesEntry id (item_id).
namebodystringno1 to 80 characters, unique within its scope.
descriptionbodystring or nullnoUp to 500 characters.
kindbodystringnohaslo, klucz_api, token, notatka or inne.
line_idbodyuuid or nullnoTunnel the entry belongs to, or null for the whole account.
valuebodystringnoNew value, 1 to 8192 characters.
statusbodystringnozywy or martwy. Marking an entry martwy keeps it in the vault.
service, expires_at, used_by, verify_hintbodystring or nullnoThe lifecycle fields; null clears one. Same rules as on create.

A body that changes no field returns 400. To replace a key with a newer one, use Rotate a vault value rather than changing value in place: a rotation keeps the old value.

Request

bash
curl -sS -X PATCH https://api.mot3r.com/v1/vault/6e8f0a2b-3c5d-4e7f-9a1b-2c4d6e8f0a3b \
  -H "Authorization: Bearer $MOT_ROOT_KEY" \
  -H "content-type: application/json" \
  -d '{"value": "NEW_CRM_API_KEY", "description": "Rotated read-only key for the CRM"}'

Response 200

JSON
{
  "item_id": "6e8f0a2b-3c5d-4e7f-9a1b-2c4d6e8f0a3b",
  "line_id": "3f2b8c1e-7a4d-4e5b-9c6f-1d2e3a4b5c6d",
  "scope": "line",
  "name": "crm-api",
  "description": "Rotated read-only key for the CRM",
  "kind": "klucz_api",
  "fingerprint": "0e6b2d8f4a19",
  "created_at": "2026-10-14T09:12:03.411Z",
  "updated_at": "2026-10-16T15:45:00.000Z",
  "last_read_at": null,
  "last_read_by": null,
  "status": "zywy",
  "service": "inne",
  "expires_at": "2027-03-31T23:59:59.000Z",
  "expired": false,
  "used_by": "nightly CRM sync",
  "verify_hint": "GET /api/me with the key returns 200",
  "rotated_from": null,
  "measured_at": "2026-10-16T15:45:00.000Z"
}

Error 404

JSON
{"error":{"status":404,"reason":"vault_item_not_found","message":"Vault item not found."}}

#Rotate a vault value

POST /v1/vault/:id/rotate

Replaces a key with a newer one in a single step, so no agent is left without a working key. The old entry becomes martwy and is renamed <name> (dead YYYY-MM-DD); its value stays sealed and you can still reveal it if the new key turns out not to work. A new entry takes the old name, with the new value, a new fingerprint, status zywy, rotated_from set to the old entry's id, and the other fields (description, kind, service, used_by, verify_hint, scope) copied from the old one. The expiry is not copied: the new key has the one you send, or none. Agents that ask for the old name get the new key at once.

The new entry counts toward the 500-entry limit, so a full vault returns 409 vault_limit; delete a dead entry you no longer need first. Either both changes happen or neither does.

Authentication: root key only, with the keys:rw scope.

Parameters

NameInTypeRequiredDescription
idpathuuidyesEntry to replace (item_id).
valuebodystringyesThe new value, 1 to 8192 characters.
expires_atbodystring or nullnoExpiry of the new key: a full timestamp with a zone, or a plain date (end of that day, UTC).

Request

bash
curl -sS -X POST https://api.mot3r.com/v1/vault/6e8f0a2b-3c5d-4e7f-9a1b-2c4d6e8f0a3b/rotate \
  -H "Authorization: Bearer $MOT_ROOT_KEY" \
  -H "content-type: application/json" \
  -d '{"value": "NEW_CRM_API_KEY", "expires_at": "2027-09-30"}'

Response 200

JSON
{
  "item": {
    "item_id": "9c1e3a5b-7d2f-4a6c-8e0b-1f3d5a7c9e2b",
    "line_id": "3f2b8c1e-7a4d-4e5b-9c6f-1d2e3a4b5c6d",
    "scope": "line",
    "name": "crm-api",
    "description": "Read-only key for the CRM",
    "kind": "klucz_api",
    "fingerprint": "7d2f9a1c5e83",
    "created_at": "2026-10-27T08:00:00.000Z",
    "updated_at": "2026-10-27T08:00:00.000Z",
    "last_read_at": null,
    "last_read_by": null,
    "status": "zywy",
    "service": "inne",
    "expires_at": "2027-09-30T23:59:59.000Z",
    "expired": false,
    "used_by": "nightly CRM sync",
    "verify_hint": "GET /api/me with the key returns 200",
    "rotated_from": "6e8f0a2b-3c5d-4e7f-9a1b-2c4d6e8f0a3b"
  },
  "previous": {
    "item_id": "6e8f0a2b-3c5d-4e7f-9a1b-2c4d6e8f0a3b",
    "line_id": "3f2b8c1e-7a4d-4e5b-9c6f-1d2e3a4b5c6d",
    "scope": "line",
    "name": "crm-api (dead 2026-10-27)",
    "description": "Read-only key for the CRM",
    "kind": "klucz_api",
    "fingerprint": "0e6b2d8f4a19",
    "created_at": "2026-10-14T09:12:03.411Z",
    "updated_at": "2026-10-27T08:00:00.000Z",
    "last_read_at": null,
    "last_read_by": null,
    "status": "martwy",
    "service": "inne",
    "expires_at": "2027-03-31T23:59:59.000Z",
    "expired": false,
    "used_by": "nightly CRM sync",
    "verify_hint": "GET /api/me with the key returns 200",
    "rotated_from": null
  },
  "measured_at": "2026-10-27T08:00:00.000Z"
}

Error 404

JSON
{"error":{"status":404,"reason":"vault_item_not_found","message":"Vault item not found."}}

#What agents see

Agents never use these endpoints. The MCP tool vault_list returns, for each entry the tunnel may use, only name, description, kind, scope, service, status, expires_at and expired, with live entries first, and never a value. The tool vault_get returns the value of one entry together with status, expires_at, expired and service. When a live and a dead entry share a name, the live one wins, so after a rotation the old name leads to the new key. A dead or expired entry can still be read, but it is flagged, and the tool descriptions tell the agent to pick a live one.

#Delete a vault entry

DELETE /v1/vault/:id

Deletes the entry and its sealed value. The deletion stays on record with the entry's name.

Authentication: root key only, with the keys:rw scope.

Parameters

NameInTypeRequiredDescription
idpathuuidyesEntry id (item_id).

Request

bash
curl -sS -X DELETE https://api.mot3r.com/v1/vault/6e8f0a2b-3c5d-4e7f-9a1b-2c4d6e8f0a3b \
  -H "Authorization: Bearer $MOT_ROOT_KEY"

Response 200

JSON
{
  "item_id": "6e8f0a2b-3c5d-4e7f-9a1b-2c4d6e8f0a3b",
  "deleted": true,
  "measured_at": "2026-10-16T15:50:00.000Z"
}

Error 404

JSON
{"error":{"status":404,"reason":"vault_item_not_found","message":"Vault item not found."}}

#Reveal a vault value

POST /v1/vault/:id/reveal

Returns the value of one entry. The response is sent with Cache-Control: no-store. Each reveal updates last_read_at and last_read_by and is recorded with the caller's IP address. Reveals are limited to 60 calls per minute per key; more return 429 rate_limited.

Authentication: root key only, with the keys:rw scope.

Parameters

NameInTypeRequiredDescription
idpathuuidyesEntry id (item_id).
confirmbodybooleanyesMust be true.

Request

bash
curl -sS -X POST https://api.mot3r.com/v1/vault/6e8f0a2b-3c5d-4e7f-9a1b-2c4d6e8f0a3b/reveal \
  -H "Authorization: Bearer $MOT_ROOT_KEY" \
  -H "content-type: application/json" \
  -d '{"confirm": true}'

Response 200

JSON
{
  "item_id": "6e8f0a2b-3c5d-4e7f-9a1b-2c4d6e8f0a3b",
  "name": "crm-api",
  "kind": "klucz_api",
  "scope": "line",
  "value": "NEW_CRM_API_KEY",
  "read_at": "2026-10-16T15:55:00.000Z",
  "measured_at": "2026-10-16T15:55:00.000Z"
}

Error 400

JSON
{"error":{"status":400,"reason":"confirm_required","message":"Confirm required."}}