---
canonical_url: "https://docs.composio.dev/toolkits/keiki_mcp"
markdown_url: "https://docs.composio.dev/toolkits/keiki_mcp.md"
product: "platform"
version: null
last_updated: null
---

# Keiki MCP

Build and manage Keiki agents, conversations, evaluations, channels, billing, integrations, and organization settings through the official hosted MCP server.

- **Category:** model context protocol
- **Auth:** DCR_OAUTH
- **Composio-managed OAuth available?** No
- **Tools:** 336
- **Triggers:** 0
- **Slug:** `KEIKI_MCP`
- **Version:** 00000000_00

## Tools

### Cancel job

**Slug:** `KEIKI_MCP_CANCEL_JOB`

Stop a job started by a long call, and ask the work behind it to stop too. Use it when the user no longer wants the answer; a job left alone keeps running and can be read later with check_job.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `jobId` | string | Yes | The job to stop. |

### Check job

**Slug:** `KEIKI_MCP_CHECK_JOB`

Read a job that a long call handed back instead of a result: its status, the text and tool calls it has produced so far, and its final result once it has finished. Pass waitMs to have this call wait for the job to finish (up to 30000ms) rather than answering immediately.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `jobId` | string | Yes | The job id a call returned instead of a result. |
| `waitMs` | number | No | How long to wait for the job to finish before answering anyway, in milliseconds (max 30000). Defaults to 0: answer with whatever the job is doing right now. |

### Current context

**Slug:** `KEIKI_MCP_CURRENT_CONTEXT`

Who this token acts as, which organization it is bound to, and the current time.

### Delete agent groups by id

**Slug:** `KEIKI_MCP_DELETE_AGENT_GROUPS_BY_ID`

Delete an agent group, so its members can no longer ask each other through it. Owners and admins only.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

DELETE /agent-groups/:id → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /agent-groups/:id. |

### Delete agents by id

**Slug:** `KEIKI_MCP_DELETE_AGENTS_BY_ID`

Delete an agent with its tools, alerts, loops and configuration, releasing its Keiki VM if it has one. SDK-managed (local) agents are refused.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

DELETE /agents/:id → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /agents/:id. |

### Delete agents capabilities by slug

**Slug:** `KEIKI_MCP_DELETE_AGENTS_CAPABILITIES_BY_SLUG`

Uninstall a capability from an agent, dropping its version pin. Owners and admins only.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

DELETE /agents/:id/capabilities/:publisherRef/:slug → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /agents/:id/capabilities/:publisherRef/:slug. |
| `slug` | string | Yes | The :slug in /agents/:id/capabilities/:publisherRef/:slug. |
| `publisherRef` | string | Yes | The :publisherRef in /agents/:id/capabilities/:publisherRef/:slug. |

### Delete agents identity webhook

**Slug:** `KEIKI_MCP_DELETE_AGENTS_IDENTITY_WEBHOOK`

Remove sender identity checks; returns { ok }. Owners/admins only.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

DELETE /agents/:id/identity-webhook → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /agents/:id/identity-webhook. |

### Delete agents lines by number

**Slug:** `KEIKI_MCP_DELETE_AGENTS_LINES_BY_NUMBER`

Remove a phone line from an agent; the agent stops receiving on it.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

DELETE /agents/:id/lines/:number → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /agents/:id/lines/:number. |
| `number` | string | Yes | The :number in /agents/:id/lines/:number. |

### Delete agents loops by loop id

**Slug:** `KEIKI_MCP_DELETE_AGENTS_LOOPS_BY_LOOP_ID`

Delete one of the agent’s scheduled loops for good: its schedule stops and its run history is removed.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

DELETE /agents/:id/loops/:loopId → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /agents/:id/loops/:loopId. |
| `loopId` | string | Yes | The :loopId in /agents/:id/loops/:loopId. |

### Delete agents mcp presets by preset id

**Slug:** `KEIKI_MCP_DELETE_AGENTS_MCP_PRESETS_BY_PRESET_ID`

Disconnect an MCP preset from the agent and remove it from its daemon. A connection shared by the organization cannot be removed here; change its grants instead.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

DELETE /agents/:id/mcp-presets/:presetId → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /agents/:id/mcp-presets/:presetId. |
| `presetId` | string | Yes | The :presetId in /agents/:id/mcp-presets/:presetId. |

### Delete agents tools by tool id

**Slug:** `KEIKI_MCP_DELETE_AGENTS_TOOLS_BY_TOOL_ID`

Delete an authored tool.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

DELETE /agents/:id/tools/:toolId → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /agents/:id/tools/:toolId. |
| `toolId` | string | Yes | The :toolId in /agents/:id/tools/:toolId. |

### Delete agents wallet intents by intent id

**Slug:** `KEIKI_MCP_DELETE_AGENTS_WALLET_INTENTS_BY_INTENT_ID`

Revoke a purchase: cancels its payment credential so it can no longer be charged, and returns the updated purchase. Owners and admins only.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

DELETE /agents/:id/wallet/intents/:intentId → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /agents/:id/wallet/intents/:intentId. |
| `intentId` | string | Yes | The :intentId in /agents/:id/wallet/intents/:intentId. |

### Delete conversations block

**Slug:** `KEIKI_MCP_DELETE_CONVERSATIONS_BLOCK`

Unblock one identity for this conversation’s agent so its messages trigger replies again. Also how an ended inter-agent thread is reopened.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

DELETE /conversations/:phone/block → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `phone` | string | Yes | The :phone in /conversations/:phone/block. |
| `query` | object | No |  |

### Delete conversations contact card

**Slug:** `KEIKI_MCP_DELETE_CONVERSATIONS_CONTACT_CARD`

Clear the dynamic contact card for this conversation. Clearing re-enables the native daily contact-card share.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

DELETE /conversations/:phone/contact-card → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `phone` | string | Yes | The :phone in /conversations/:phone/contact-card. |
| `query` | object | No |  |

### Delete conversations history

**Slug:** `KEIKI_MCP_DELETE_CONVERSATIONS_HISTORY`

Permanently delete one agent’s stored message history with an identity and return how many messages were cleared. The identity must be unblocked first (409 otherwise); opt-out status is unchanged.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

DELETE /conversations/:phone/history → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `phone` | string | Yes | The :phone in /conversations/:phone/history. |
| `query` | object | No |  |

### Delete conversations takeover

**Slug:** `KEIKI_MCP_DELETE_CONVERSATIONS_TAKEOVER`

End a human takeover early and hand the conversation back to the agent, including any hold taken from a Slack thread.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

DELETE /conversations/:phone/takeover → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `phone` | string | Yes | The :phone in /conversations/:phone/takeover. |
| `query` | object | No |  |

### Delete deployment

**Slug:** `KEIKI_MCP_DELETE_DEPLOYMENT`

Delete one deployment and release its connected channels.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `externalRef` | string | Yes |  |

### Delete evals cases by id

**Slug:** `KEIKI_MCP_DELETE_EVALS_CASES_BY_ID`

Delete an organization eval case permanently, not just archive it. Returns ok even if the case is absent.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

DELETE /evals/cases/:id → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /evals/cases/:id. |

### Delete identities by id

**Slug:** `KEIKI_MCP_DELETE_IDENTITIES_BY_ID`

Delete an identity: tears down its inbound routing and deactivates it, so the channel stops answering. The provider-side app or number is untouched.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

DELETE /identities/:id → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /identities/:id. |

### Delete identities slack installs by install id

**Slug:** `KEIKI_MCP_DELETE_IDENTITIES_SLACK_INSTALLS_BY_INSTALL_ID`

Stop answering in one workspace that installed this Slack identity, without touching the app or its other workspaces — the workspace keeps the app in Slack; only its stored token is dropped.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

DELETE /identities/:id/slack/installs/:installId → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /identities/:id/slack/installs/:installId. |
| `installId` | string | Yes | The :installId in /identities/:id/slack/installs/:installId. |

### Delete identities slack operators by slack user id

**Slug:** `KEIKI_MCP_DELETE_IDENTITIES_SLACK_OPERATORS_BY_SLACK_USER_ID`

Remove one Slack user from a Slack identity’s operator allowlist. Owners and admins only. Returns the resulting list.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

DELETE /identities/:id/slack/operators/:slackUserId → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /identities/:id/slack/operators/:slackUserId. |
| `slackUserId` | string | Yes | The :slackUserId in /identities/:id/slack/operators/:slackUserId. |

### Delete identities slack teams by team id

**Slug:** `KEIKI_MCP_DELETE_IDENTITIES_SLACK_TEAMS_BY_TEAM_ID`

Stop routing one customer Slack workspace to its agent. The install stays; the workspace gets an “unbound” notice until it is bound again. Owners and admins only.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

DELETE /identities/:id/slack/teams/:teamId → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /identities/:id/slack/teams/:teamId. |
| `teamId` | string | Yes | The :teamId in /identities/:id/slack/teams/:teamId. |

### Delete identities teams installs by install id

**Slug:** `KEIKI_MCP_DELETE_IDENTITIES_TEAMS_INSTALLS_BY_INSTALL_ID`

Forget one tenant’s install of a Teams identity so the agent stops answering there. Teams still has the app installed; the next verified activity from that tenant would recreate the install.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

DELETE /identities/:id/teams/installs/:installId → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /identities/:id/teams/installs/:installId. |
| `installId` | string | Yes | The :installId in /identities/:id/teams/installs/:installId. |

### Delete invitations by id

**Slug:** `KEIKI_MCP_DELETE_INVITATIONS_BY_ID`

Revoke a pending invitation so its link no longer works. Owners and admins only.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

DELETE /invitations/:id → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /invitations/:id. |

### Delete mcp clients by token id

**Slug:** `KEIKI_MCP_DELETE_MCP_CLIENTS_BY_TOKEN_ID`

Revoke this user’s organization OAuth connection; returns { ok }.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

DELETE /mcp-clients/:tokenId → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `tokenId` | string | Yes | The :tokenId in /mcp-clients/:tokenId. |

### Delete members by id

**Slug:** `KEIKI_MCP_DELETE_MEMBERS_BY_ID`

Remove a member from the organization. Owners and admins only; the owner cannot be removed (transfer ownership first) and you cannot remove yourself.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

DELETE /members/:id → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /members/:id. |

### Delete org mcp integrations by id

**Slug:** `KEIKI_MCP_DELETE_ORG_MCP_INTEGRATIONS_BY_ID`

Stop sharing an org MCP integration, removing it from every agent it was granted to. Owners and admins only.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

DELETE /org-mcp-integrations/:id → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /org-mcp-integrations/:id. |

### Delete payments

**Slug:** `KEIKI_MCP_DELETE_PAYMENTS`

Disconnect payments; returns { ok }. Owners/admins only.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

DELETE /payments → { status, ok, data, error }

### Delete payments payees by id

**Slug:** `KEIKI_MCP_DELETE_PAYMENTS_PAYEES_BY_ID`

Delete a payee; returns { ok }. Owners/admins only.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

DELETE /payments/payees/:id → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /payments/payees/:id. |

### Delete provider accounts by id

**Slug:** `KEIKI_MCP_DELETE_PROVIDER_ACCOUNTS_BY_ID`

Disconnect one of the organization’s own Photon accounts. Owners and admins only. Removes Keiki’s webhook from the Photon project, forgets its stored secrets, takes its lines offline and unassigns them from agents. The lines stay in the customer’s Photon project.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

DELETE /provider-accounts/:id → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /provider-accounts/:id. |

### Delete sandbox scripts by id

**Slug:** `KEIKI_MCP_DELETE_SANDBOX_SCRIPTS_BY_ID`

Delete a sandbox script; agents it is attached to stop running it.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

DELETE /sandbox-scripts/:id → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /sandbox-scripts/:id. |

### Delete secrets by name

**Slug:** `KEIKI_MCP_DELETE_SECRETS_BY_NAME`

Delete a secret and its bound mirrors; returns { ok, name }. Configurers only.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

DELETE /secrets/:name → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `name` | string | Yes | The :name in /secrets/:name. |

### Delete skills by id

**Slug:** `KEIKI_MCP_DELETE_SKILLS_BY_ID`

Delete a skill or document; agents using it lose it.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

DELETE /skills/:id → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /skills/:id. |

### Delete sso

**Slug:** `KEIKI_MCP_DELETE_SSO`

Disable SSO; returns { ok }. Owners/admins only.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

DELETE /sso → { status, ok, data, error }

### Delete sso domains by id

**Slug:** `KEIKI_MCP_DELETE_SSO_DOMAINS_BY_ID`

Remove an SSO domain; returns { ok }. Eligible owners/admins only.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

DELETE /sso/domains/:id → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /sso/domains/:id. |

### Delete trace exporters by id

**Slug:** `KEIKI_MCP_DELETE_TRACE_EXPORTERS_BY_ID`

Delete a destination and its agent attachments. Owners, admins and members only.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

DELETE /trace-exporters/:id → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /trace-exporters/:id. |

### Delete webhooks by id

**Slug:** `KEIKI_MCP_DELETE_WEBHOOKS_BY_ID`

Delete a webhook endpoint. 409 while an agent’s escalation route still uses it.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

DELETE /webhooks/:id → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /webhooks/:id. |

### Deploy agent

**Slug:** `KEIKI_MCP_DEPLOY_AGENT`

Create or update an agent deployment using the body format of POST /api/v1/developer/deployments.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `agent` | object | Yes |  |
| `tools` | array | No |  |
| `actions` | string | No |  |
| `channels` | array | No |  |
| `identity` | string | No |  |
| `webhook_url` | string | No |  |
| `external_ref` | string | Yes |  |
| `mcp_connections` | array | No |  |

### Escalate

**Slug:** `KEIKI_MCP_ESCALATE`

File a bug report or feature request about the Keiki platform itself with the engineering team. Use it when something is broken or missing in the platform — not for a problem the user can fix in their own agent's configuration, which you should fix or recommend instead. File once per finding, with the evidence you actually observed (trace ids, error strings, the endpoint and response, what the user reported); a trace is not required. Escalating fixes nothing: still tell the user what you found.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `kind` | string ("bug" | "feature") | Yes | bug for something broken or wrong, feature for something missing. |
| `title` | string | Yes | One line an engineer can triage from, e.g. "Tool calls time out on agents with >20 skills". |
| `summary` | string | Yes | What happens and what should happen instead, in plain language. |
| `evidence` | string | Yes | The observations that support this: trace ids, span names, error strings, counts, durations, agent names. When nothing in telemetry shows the problem — a platform-wide gap, a broken dashboard behaviour, a bug you read out of the code — describe what you observed and where instead, and say that no trace is attached. Never invent any of it: cite only what you actually read. |
| `severity` | string ("low" | "medium" | "high" | "critical") | Yes | Impact on users: critical for data loss or a broken core flow, low for polish. |
| `recommendation` | string | Yes | The change you propose, and why it addresses the mechanism you found. |
| `code_references` | string | No | Files, functions or symbols a repository tool actually returned to you, and that implement the behaviour. Leave this out rather than guessing at a path: a reference to a file that does not exist costs an engineer more than no reference at all. |

### Get agent goals

**Slug:** `KEIKI_MCP_GET_AGENT_GOALS`

The outcome kinds each agent has produced and whether any carry money — what an agent’s CRM columns stand for.

GET /agent-goals → { status, ok, data, error }

### Get agent groups

**Slug:** `KEIKI_MCP_GET_AGENT_GROUPS`

List the organization’s agent groups — which agents may ask each other with ask_agent — with each group’s name, description and members (agent, description, hub or spoke role).

GET /agent-groups → { status, ok, data, error }

### Get agent groups activity

**Slug:** `KEIKI_MCP_GET_AGENT_GROUPS_ACTIVITY`

Every agent group’s running peer threads and live roster in one read — the way to answer how all the groups (swarms) are doing at once.

GET /agent-groups/activity → { status, ok, data, error }

### Get agent groups note

**Slug:** `KEIKI_MCP_GET_AGENT_GROUPS_NOTE`

The group’s shared note — what its agents have settled among themselves (decisions, who does what, findings) — with its revision, last author and update time.

GET /agent-groups/:id/note → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /agent-groups/:id/note. |

### Get agent groups note versions

**Slug:** `KEIKI_MCP_GET_AGENT_GROUPS_NOTE_VERSIONS`

History of the group note, newest first: one entry per saved version, with the sha to fetch it by.

GET /agent-groups/:id/note/versions → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /agent-groups/:id/note/versions. |

### Get agent groups note versions by sha

**Slug:** `KEIKI_MCP_GET_AGENT_GROUPS_NOTE_VERSIONS_BY_SHA`

The group note body as it was at one historical version (a sha from the versions list).

GET /agent-groups/:id/note/versions/:sha → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /agent-groups/:id/note/versions/:sha. |
| `sha` | string | Yes | The :sha in /agent-groups/:id/note/versions/:sha. |

### Get agent groups roster

**Slug:** `KEIKI_MCP_GET_AGENT_GROUPS_ROSTER`

Live roster of one group: per member its status (running, waiting, idle, ended), running turns, pending asks, background tasks and 24h tokens and cost, plus totals. The place to answer how a swarm is doing.

GET /agent-groups/:id/roster → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /agent-groups/:id/roster. |

### Get agent groups threads

**Slug:** `KEIKI_MCP_GET_AGENT_GROUPS_THREADS`

The asker→peer threads currently live among one group’s members (who is asking whom right now). Empty for an unknown group.

GET /agent-groups/:id/threads → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /agent-groups/:id/threads. |

### Get agentmail domains

**Slug:** `KEIKI_MCP_GET_AGENTMAIL_DOMAINS`

Custom email domains the organization added for agent inboxes, each with its region and live DNS verification state from AgentMail.

GET /agentmail/domains → { status, ok, data, error }

### Get agents

**Slug:** `KEIKI_MCP_GET_AGENTS`

List every agent in the organization with its status, model and channels.

GET /agents → { status, ok, data, error }

### Get agents a2a

**Slug:** `KEIKI_MCP_GET_AGENTS_A2A`

Whether other vendors’ agents can call the agent over A2A, with its Agent Card URL and JSON-RPC endpoint.

GET /agents/:id/a2a → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /agents/:id/a2a. |

### Get agents actions

**Slug:** `KEIKI_MCP_GET_AGENTS_ACTIONS`

List the agent’s persisted approval actions (tool calls waiting on, or past, a human decision), newest first, with their status, arguments and group id.

GET /agents/:id/actions → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /agents/:id/actions. |
| `query` | object | No |  |

### Get agents analytics

**Slug:** `KEIKI_MCP_GET_AGENTS_ANALYTICS`

Engagement for one agent over a date range: contact and agent response times, received/sent message breakdowns such as where contacts write from (null when event analytics is not configured), and public profile visits.

GET /agents/:id/analytics → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /agents/:id/analytics. |
| `query` | object | No |  |

### Get agents api gateway

**Slug:** `KEIKI_MCP_GET_AGENTS_API_GATEWAY`

Whether the agent answers on the OpenAI/Anthropic-compatible API and in passthrough mode, with the base URLs and the model name a client sends.

GET /agents/:id/api-gateway → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /agents/:id/api-gateway. |

### Get agents by id

**Slug:** `KEIKI_MCP_GET_AGENTS_BY_ID`

Agent detail: its configuration and features, line routing status, harness, template version, tools, attached skills, its 50 most recent conversations, and connection issues to fix.

GET /agents/:id → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /agents/:id. |

### Get agents capabilities

**Slug:** `KEIKI_MCP_GET_AGENTS_CAPABILITIES`

List the marketplace capabilities installed on an agent, including disabled ones, with each pinned version, how it was installed, any newer version available, and declared secrets the org has not set yet.

GET /agents/:id/capabilities → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /agents/:id/capabilities. |

### Get agents conversations

**Slug:** `KEIKI_MCP_GET_AGENTS_CONVERSATIONS`

Every conversation one agent is having, newest first — who it is talking to, the last message, message count, whether the thread is active and whether it has errors. Start here for how an agent’s conversations are going, then open the ones that matter with /agents/:id/conversations/:phone. For money owed, pair it with /outcomes?status=pending&agent_id=… (a pending outcome committed and has not paid).

GET /agents/:id/conversations → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /agents/:id/conversations. |
| `query` | object | No |  |

### Get agents conversations by phone

**Slug:** `KEIKI_MCP_GET_AGENTS_CONVERSATIONS_BY_PHONE`

One conversation thread between the agent and a contact (`phone` is their phone number, email or tg: identity, URL-encoded): its metadata, messages and the trace spans of the turns that produced them.

GET /agents/:id/conversations/:phone → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /agents/:id/conversations/:phone. |
| `phone` | string | Yes | The :phone in /agents/:id/conversations/:phone. |
| `query` | object | No |  |

### Get agents conversations sentiment

**Slug:** `KEIKI_MCP_GET_AGENTS_CONVERSATIONS_SENTIMENT`

One conversation’s mood per user turn, oldest first (0 angry to 4 delighted; unclassified turns have no score), with drop/recovery shifts, the reply that caused each shift and why, and the signals on each turn.

GET /agents/:id/conversations/:phone/sentiment → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /agents/:id/conversations/:phone/sentiment. |
| `phone` | string | Yes | The :phone in /agents/:id/conversations/:phone/sentiment. |
| `query` | object | No |  |

### Get agents edit

**Slug:** `KEIKI_MCP_GET_AGENTS_EDIT`

The agent form payload: the full editable config (name, model, systemPrompt, features, escalationRoutes, skillIds, sandboxScriptIds, sandboxEnvSecrets, execPolicy, userSecrets, responseSchemaOverlay, updatedAt) plus the org’s lines. Always read it before updating. When `passthroughPrompt` is set, or the gateway is passthrough with it empty, the caller’s instructions lead each turn and `systemPrompt` is only an amendment to them; `responseSchemaOverlay` likewise only reorders and re-describes fields the caller’s response_format already declares. `responseSchemaLint` quotes prompt rules about field order the schema does not satisfy, and `responseSchemaLint.suggested` is the overlay to save as `responseSchemaOverlay` instead of rewording the prompt.

GET /agents/:id/edit → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /agents/:id/edit. |

### Get agents evals channel preview

**Slug:** `KEIKI_MCP_GET_AGENTS_EVALS_CHANNEL_PREVIEW`

Preview a real-channel eval run per hosted driver (imessage, email, x): whether it is available and why not, the handle it would message, and the eligible and excluded cases — plus any active run and the last run. Needs a paid plan.

GET /agents/:id/evals/channel/preview → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /agents/:id/evals/channel/preview. |

### Get agents executor

**Slug:** `KEIKI_MCP_GET_AGENTS_EXECUTOR`

Resolve the agent’s Executor.sh sandbox daemon and return its current short-lived MCP URL, base URL and scope (never its auth token). Needs the agent’s Sandbox and MCP capabilities enabled; boots the daemon if needed.

GET /agents/:id/executor → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /agents/:id/executor. |

### Get agents fine tune

**Slug:** `KEIKI_MCP_GET_AGENTS_FINE_TUNE`

Read fine-tune readiness for the agent’s current version: graded conversation counts, progress toward the kickoff threshold, whether the caller may start one, and any request already on file.

GET /agents/:id/fine-tune → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /agents/:id/fine-tune. |

### Get agents harness status

**Slug:** `KEIKI_MCP_GET_AGENTS_HARNESS_STATUS`

Report what runs the agent and whether it is connected: the platform harness, a self-hosted Hermes relay or dispatch URL (with why it is waiting), or a Maritime Keiki VM and its state.

GET /agents/:id/harness-status → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /agents/:id/harness-status. |

### Get agents loops

**Slug:** `KEIKI_MCP_GET_AGENTS_LOOPS`

List the scheduled loops attached to an agent with their schedule and state.

GET /agents/:id/loops → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /agents/:id/loops. |

### Get agents loops runs

**Slug:** `KEIKI_MCP_GET_AGENTS_LOOPS_RUNS`

Read a loop’s recent runs, newest first, from a bounded retention window: status (the platform’s turn and tool-health view), timings, error, trace id and detail. A blocked_auth detail names the connection unavailable when the run started, not proof that it still is.

GET /agents/:id/loops/:loopId/runs → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /agents/:id/loops/:loopId/runs. |
| `query` | object | No |  |
| `loopId` | string | Yes | The :loopId in /agents/:id/loops/:loopId/runs. |

### Get agents mcp presets tools

**Slug:** `KEIKI_MCP_GET_AGENTS_MCP_PRESETS_TOOLS`

The tools a connected MCP exposes, read live from the daemon, each with the permission (allow/ask/deny) in force, plus the default permission and every stored per-tool choice.

GET /agents/:id/mcp-presets/:presetId/tools → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /agents/:id/mcp-presets/:presetId/tools. |
| `presetId` | string | Yes | The :presetId in /agents/:id/mcp-presets/:presetId/tools. |

### Get agents note

**Slug:** `KEIKI_MCP_GET_AGENTS_NOTE`

Read the agent’s working note — the durable scratchpad it rewrites while it works — with its revision.

GET /agents/:id/note → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /agents/:id/note. |

### Get agents note versions

**Slug:** `KEIKI_MCP_GET_AGENTS_NOTE_VERSIONS`

List the working note’s version history, newest first, with the sha of each version.

GET /agents/:id/note/versions → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /agents/:id/note/versions. |

### Get agents note versions by sha

**Slug:** `KEIKI_MCP_GET_AGENTS_NOTE_VERSIONS_BY_SHA`

Read the working note body as it was at one version sha from the history.

GET /agents/:id/note/versions/:sha → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /agents/:id/note/versions/:sha. |
| `sha` | string | Yes | The :sha in /agents/:id/note/versions/:sha. |

### Get agents public profile

**Slug:** `KEIKI_MCP_GET_AGENTS_PUBLIC_PROFILE`

Whether the agent’s public profile page is published, its URL slug and tagline, and whether the caller may change it.

GET /agents/:id/public-profile → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /agents/:id/public-profile. |

### Get agents quality

**Slug:** `KEIKI_MCP_GET_AGENTS_QUALITY`

Turn-quality review for one agent: review stats, its review settings, and the prompt or model fixes the reviewer drafted (state, summary, rationale, proposed prompt/model, score before and after).

GET /agents/:id/quality → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /agents/:id/quality. |

### Get agents rollouts

**Slug:** `KEIKI_MCP_GET_AGENTS_ROLLOUTS`

Read the agent’s open staged rollout (mode, percent of conversations on the staged config, the staged config itself) and its recent ended rollouts.

GET /agents/:id/rollouts → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /agents/:id/rollouts. |

### Get agents sandbox script runs

**Slug:** `KEIKI_MCP_GET_AGENTS_SANDBOX_SCRIPT_RUNS`

The latest 50 runs of the agent’s sandbox scripts, newest first — status, exit code and output tails. Script failures degrade silently, so this is where a broken script shows up.

GET /agents/:id/sandbox-script-runs → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /agents/:id/sandbox-script-runs. |

### Get agents shared line

**Slug:** `KEIKI_MCP_GET_AGENTS_SHARED_LINE`

The shared iMessage number and join code contacts text to reach this agent. join is null when Keiki has no shared number, or without a plan (planRequired) unless ?test=1: onboarding's test, which keeps a plan-less agent answering on it for 15 minutes, capped like Live Test.

GET /agents/:id/shared-line → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /agents/:id/shared-line. |

### Get agents signals

**Slug:** `KEIKI_MCP_GET_AGENTS_SIGNALS`

Built-in quality signals for one agent over a date range: each signal’s events, share of classified users and change against the previous period of the same length, plus average mood (0 angry to 4 delighted) and the biggest mood drops with the judge’s reason.

GET /agents/:id/signals → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /agents/:id/signals. |
| `query` | object | No |  |

### Get agents signals events

**Slug:** `KEIKI_MCP_GET_AGENTS_SIGNALS_EVENTS`

The turns one signal (`key`, as returned by the signals summary) fired on, newest first: phone, trace id, source, mood and shift. Pass `nextCursor` from a page as `cursor` to read the next one.

GET /agents/:id/signals/:key/events → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /agents/:id/signals/:key/events. |
| `key` | string | Yes | The :key in /agents/:id/signals/:key/events. |
| `query` | object | No |  |

### Get agents user connections

**Slug:** `KEIKI_MCP_GET_AGENTS_USER_CONNECTIONS`

List the personal provider definitions declared on the agent — services each conversation user authorizes with their own account. No credentials are returned. Read this before replacing them.

GET /agents/:id/user-connections → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /agents/:id/user-connections. |

### Get agents versions

**Slug:** `KEIKI_MCP_GET_AGENTS_VERSIONS`

List the agent configuration’s version history, with the sha of each version.

GET /agents/:id/versions → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /agents/:id/versions. |

### Get agents versions by sha

**Slug:** `KEIKI_MCP_GET_AGENTS_VERSIONS_BY_SHA`

Read the agent configuration snapshot saved at one version sha.

GET /agents/:id/versions/:sha → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /agents/:id/versions/:sha. |
| `sha` | string | Yes | The :sha in /agents/:id/versions/:sha. |

### Get agents wallet

**Slug:** `KEIKI_MCP_GET_AGENTS_WALLET`

The agent’s wallet: spending policy, connection state, spend so far, pending purchase approvals and history — or null when it has none — plus the payment programme, default policy, and whether the caller may manage it.

GET /agents/:id/wallet → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /agents/:id/wallet. |

### Get agents wallet payment methods

**Slug:** `KEIKI_MCP_GET_AGENTS_WALLET_PAYMENT_METHODS`

Labelled payment methods on the wallet’s connected account (never card numbers), for choosing `paymentMethodId`. Owners and admins only.

GET /agents/:id/wallet/payment-methods → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /agents/:id/wallet/payment-methods. |

### Get agent templates

**Slug:** `KEIKI_MCP_GET_AGENT_TEMPLATES`

Complete agent templates the platform can provision in one call (e.g. Orchid): id, name, description, model, required secrets, user connections and pinned capabilities. Create one by passing its id as `template` when creating an agent.

GET /agent-templates → { status, ok, data, error }

### Get audit

**Slug:** `KEIKI_MCP_GET_AUDIT`

List audit events as { events, nextCursor }; filter by cursor, limit, actor, action, target_type, target_id, from, to. Owners/admins only.

GET /audit → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `query` | object | No |  |

### Get audit verify

**Slug:** `KEIKI_MCP_GET_AUDIT_VERIFY`

Verify the organization audit hash chain and return its verification result. Owners/admins only.

GET /audit/verify → { status, ok, data, error }

### Get auto

**Slug:** `KEIKI_MCP_GET_AUTO`

Read whether the organization’s plan allows Auto mode and which front and worker models it uses.

GET /auto → { status, ok, data, error }

### Get axiom traces

**Slug:** `KEIKI_MCP_GET_AXIOM_TRACES`

Spans read from the OTLP collector — kept past the 14-day window of /traces, and alongside spans other services exported under the same trace. Returns { range, spans }. 503 when no collector is configured; use /traces then.

GET /axiom/traces → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `query` | object | No |  |

### Get billing

**Slug:** `KEIKI_MCP_GET_BILLING`

Read the organization’s billing overview: available phone lines, usage, customer plan details, upcoming invoice and default plan id. The upcoming invoice may be a mid-cycle estimate.

GET /billing → { status, ok, data, error }

### Get billing activity

**Slug:** `KEIKI_MCP_GET_BILLING_ACTIVITY`

List the organization’s invoice and platform credit grant activity, newest first. Returns items and nextCursor; pass nextCursor as cursor to read the next page.

GET /billing/activity → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `query` | object | No |  |

### Get billing auto top up

**Slug:** `KEIKI_MCP_GET_BILLING_AUTO_TOP_UP`

Read the organization’s auto top-up settings: enabled, threshold, quantity, whether it is available on the plan, whether a payment method is saved, and the last failed top-up if any.

GET /billing/auto-top-up → { status, ok, data, error }

### Get billing capability pricing

**Slug:** `KEIKI_MCP_GET_BILLING_CAPABILITY_PRICING`

Read the default plan’s per-capability billing metadata, included amounts, units and price labels. Returns capabilities for explaining costs and BYOK offsets, not customer-specific usage.

GET /billing/capability-pricing → { status, ok, data, error }

### Get billing capability usage by agent

**Slug:** `KEIKI_MCP_GET_BILLING_CAPABILITY_USAGE_BY_AGENT`

Read local capability usage grouped by feature and agent for each feature’s latest recorded billing period, including unattributed and deleted-agent buckets. Returns features with units and period ends; this is platform attribution, not Autumn per-agent billing or invoice reconciliation, and capabilities share the ai_tokens meter.

GET /billing/capability-usage-by-agent → { status, ok, data, error }

### Get billing consumer pricing

**Slug:** `KEIKI_MCP_GET_BILLING_CONSUMER_PRICING`

Read public consumer plans, add-ons and feature pricing metadata from the billing catalog. Returns display-only prices and allowances, or an unavailable error when pricing cannot be loaded.

GET /billing/consumer-pricing → { status, ok, data, error }

### Get billing included allowance

**Slug:** `KEIKI_MCP_GET_BILLING_INCLUDED_ALLOWANCE`

Read public default-plan included token-credit allowances without customer data. Returns allowances with feature id, positive included amount and denomination, deduplicated by feature.

GET /billing/included-allowance → { status, ok, data, error }

### Get billing plans

**Slug:** `KEIKI_MCP_GET_BILLING_PLANS`

List the organization’s available non-add-on, non-archived plans with display prices, features, trial information and current/scheduled flags. Returns plans, or an empty list if the catalog cannot be loaded.

GET /billing/plans → { status, ok, data, error }

### Get billing portal

**Slug:** `KEIKI_MCP_GET_BILLING_PORTAL`

Create a Stripe billing portal link for the organization. Returns url to share with the user; do not follow it yourself.

GET /billing/portal → { status, ok, data, error }

### Get billing pricing account

**Slug:** `KEIKI_MCP_GET_BILLING_PRICING_ACCOUNT`

Read the connected organization’s current plan and status, usage and credit access checks. Returns customer, usage, access and canManage; canManage indicates whether the caller is an owner or admin.

GET /billing/pricing-account → { status, ok, data, error }

### Get billing public plans

**Slug:** `KEIKI_MCP_GET_BILLING_PUBLIC_PLANS`

Read public recurring plans with included limits and platform credit conversion rates for comparing options. Returns plans and rates without customer data, or an unavailable error.

GET /billing/public-plans → { status, ok, data, error }

### Get billing service spend

**Slug:** `KEIKI_MCP_GET_BILLING_SERVICE_SPEND`

Read the organization’s recorded customer service charges for the billing period. Returns itemized services, total, unassigned remainder and reconciliation status, or available false if no currency balance exists.

GET /billing/service-spend → { status, ok, data, error }

### Get billing status

**Slug:** `KEIKI_MCP_GET_BILLING_STATUS`

Check the organization’s lightweight plan gate rather than loading its billing overview. Returns sandbox, indicating plan-less or unavailable billing, and the default plan id.

GET /billing/status → { status, ok, data, error }

### Get billing usage by conversation

**Slug:** `KEIKI_MCP_GET_BILLING_USAGE_BY_CONVERSATION`

List up to 100 conversations with the most recorded token usage across the organization’s active developer configurations, excluding playground and copilot traffic. Returns all-time turn, token, tool-call and duration totals, models and last-turn time per conversation, not monetary costs or a billing-period filter.

GET /billing/usage-by-conversation → { status, ok, data, error }

### Get blog

**Slug:** `KEIKI_MCP_GET_BLOG`

Keiki's own blog, newest first: each post's slug, title, category (Changelog, Product, Announcements), publish date, summary and URL. Read one with GET /blog/:slug.

GET /blog → { status, ok, data, error }

### Get blog by slug

**Slug:** `KEIKI_MCP_GET_BLOG_BY_SLUG`

One Keiki blog post in full: its title, category, date and summary, plus the whole post as `markdown`. Changelog posts list what shipped on Keiki and when. 404 for an unknown slug.

GET /blog/:slug → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `slug` | string | Yes | The :slug in /blog/:slug. |

### Get capability tools

**Slug:** `KEIKI_MCP_GET_CAPABILITY_TOOLS`

Every platform capability offered on this deployment and the tools each adds to an agent that enables it, as feature, tool name and tool description.

GET /capability-tools → { status, ok, data, error }

### Get channel access requests

**Slug:** `KEIKI_MCP_GET_CHANNEL_ACCESS_REQUESTS`

List organization early-access requests as { requests }.

GET /channel-access-requests → { status, ok, data, error }

### Get conversations

**Slug:** `KEIKI_MCP_GET_CONVERSATIONS`

One page of the organization’s conversations, most recent first, each with its agent, identity and latest state; with q, a full-text search of message content returning matching conversations with snippets. An unknown filter is refused, not ignored.

GET /conversations → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `query` | object | No |  |

### Get conversations by phone

**Slug:** `KEIKI_MCP_GET_CONVERSATIONS_BY_PHONE`

One conversation thread by identity (phone number, email, or prefixed id like tg:123): its messages with their trace spans, the agent, blocked and takeover state, whether a turn is running, background tasks, and the peer for inter-agent threads. Long threads are large; page the messages with limit and offset.

GET /conversations/:phone → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `phone` | string | Yes | The :phone in /conversations/:phone. |
| `query` | object | No |  |

### Get conversations contact card

**Slug:** `KEIKI_MCP_GET_CONVERSATIONS_CONTACT_CARD`

Read the contact card set specifically for this conversation, and whether dynamic contact cards are available. The conversation must belong to this organization; provide agentId or apiKey to disambiguate shared identities.

GET /conversations/:phone/contact-card → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `phone` | string | Yes | The :phone in /conversations/:phone/contact-card. |
| `query` | object | No |  |

### Get conversations count

**Slug:** `KEIKI_MCP_GET_CONVERSATIONS_COUNT`

How many conversations match the same filters as the conversation list, and how many of those need a person: { all, needsReview }.

GET /conversations/count → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `query` | object | No |  |

### Get dashboard

**Slug:** `KEIKI_MCP_GET_DASHBOARD`

Home-page summary for the signed-in user: their name, email, role and orgs (with the active one), headline stats (active conversations, messages today, average response time, total turns) and every agent in the org.

GET /dashboard → { status, ok, data, error }

### Get deployment

**Slug:** `KEIKI_MCP_GET_DEPLOYMENT`

Read one deployment in the current organization.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `externalRef` | string | Yes |  |

### Get evals cases

**Slug:** `KEIKI_MCP_GET_EVALS_CASES`

List the organization agent’s persisted eval cases, including generated, user-authored and regression cases. Returns cases without generating anything; a new agent may have an empty suite.

GET /evals/cases → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `query` | object | Yes |  |

### Get evals cases versions

**Slug:** `KEIKI_MCP_GET_EVALS_CASES_VERSIONS`

Read the generated eval suite’s version history for an agent in the organization. Returns versions.

GET /evals/cases/versions → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `query` | object | Yes |  |

### Get evals diffs

**Slug:** `KEIKI_MCP_GET_EVALS_DIFFS`

Compare two organization eval runs as their results arrive. Returns diff with both arms’ scores and case-level fail-to-pass or pass-to-fail changes; use the run ids returned when starting a version comparison.

GET /evals/diffs → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `query` | object | Yes |  |

### Get evals runs by id

**Slug:** `KEIKI_MCP_GET_EVALS_RUNS_BY_ID`

Read one organization eval run’s status, candidates, rankings and per-case results with trace ids. Marks stale runs as failed before reading and annotates outdated when the agent behavior changed.

GET /evals/runs/:id → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /evals/runs/:id. |

### Get evals runs cases

**Slug:** `KEIKI_MCP_GET_EVALS_RUNS_CASES`

Read the full persisted case records referenced by an organization eval run, including archived cases. Returns cases for inspecting or restarting a historical run; the case records may have been edited since it ran.

GET /evals/runs/:id/cases → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /evals/runs/:id/cases. |

### Get evals runs latest

**Slug:** `KEIKI_MCP_GET_EVALS_RUNS_LATEST`

Read the agent’s latest eval run, optionally limited to single-model, sweep or real-channel runs. Returns run or null, with outdated when the current agent behavior differs from its recorded fingerprint.

GET /evals/runs/latest → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `query` | object | Yes |  |

### Get evals runs transcript

**Slug:** `KEIKI_MCP_GET_EVALS_RUNS_TRANSCRIPT`

Read an organization real-channel eval run’s recorded message transcript. Returns messages with caseId, inbound/outbound direction, text and ISO timestamp; runs without channel messages return an empty list.

GET /evals/runs/:id/transcript → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /evals/runs/:id/transcript. |

### Get evals suggestions

**Slug:** `KEIKI_MCP_GET_EVALS_SUGGESTIONS`

Find behaviors worth testing from the agent’s recorded production traffic in the chosen window, with trace counts, error rates, models and existing suite coverage. Returns a sampled summary with suggestions; no model is called and no paid plan is required.

GET /evals/suggestions → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `query` | object | Yes |  |

### Get identities

**Slug:** `KEIKI_MCP_GET_IDENTITIES`

List the org’s active messaging identities — SMS lines, Telegram, WhatsApp, Slack, Teams, X and AgentMail — with the agent each is attached to and its routing status. Slack rows include each workspace install, the install URL when the app is distributable, and the home channel; Teams rows include tenant installs and the messaging endpoint.

GET /identities → { status, ok, data, error }

### Get identities phone calls forwardable lines

**Slug:** `KEIKI_MCP_GET_IDENTITIES_PHONE_CALLS_FORWARDABLE_LINES`

List the agent's iMessage lines and whether each can forward its calls: `{ lines: [{ number, support, connected }] }`. `support` is `instant`, `ticket` (the provider sets it up within a few days), `shared` (not possible) or `unsupported` (request it instead).

GET /identities/phone-calls/forwardable-lines → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `query` | object | Yes |  |

### Get identities phone calls numbers

**Slug:** `KEIKI_MCP_GET_IDENTITIES_PHONE_CALLS_NUMBERS`

Search Telnyx for available US local voice numbers in an area code or state, or anywhere in the US when neither is given. Returns `{ numbers: [{ phoneNumber, locality, state, monthlyCost }] }`; nothing is reserved or bought.

GET /identities/phone-calls/numbers → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `query` | object | Yes |  |

### Get identities phone calls voices

**Slug:** `KEIKI_MCP_GET_IDENTITIES_PHONE_CALLS_VOICES`

List the ElevenLabs voices a phone line can use: `{ voices: [{ id, name, description, previewUrl, labels }] }`.

GET /identities/phone-calls/voices → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `query` | object | Yes |  |

### Get identities slack channels

**Slug:** `KEIKI_MCP_GET_IDENTITIES_SLACK_CHANNELS`

Per workspace that installed this Slack identity, the channels its bot is already in — the channel ids an escalation route may name — plus the scopes the install is missing, or an error when its token cannot list channels.

GET /identities/:id/slack/channels → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /identities/:id/slack/channels. |

### Get identities slack manifest

**Slug:** `KEIKI_MCP_GET_IDENTITIES_SLACK_MANIFEST`

Build the Slack app manifest for a new identity and a prefilled api.slack.com app-creation URL, plus the events, interactivity and OAuth redirect URLs to configure and the bot scopes to grant.

GET /identities/slack/manifest → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `query` | object | No |  |

### Get identities slack operators

**Slug:** `KEIKI_MCP_GET_IDENTITIES_SLACK_OPERATORS`

List the Slack users allowed to press this identity’s consequential buttons — taking a conversation over, replying to a customer, running an offered action. Org owners and admins whose Slack email matches are always allowed and need no entry.

GET /identities/:id/slack/operators → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /identities/:id/slack/operators. |

### Get identities slack signing probe by probe id

**Slug:** `KEIKI_MCP_GET_IDENTITIES_SLACK_SIGNING_PROBE_BY_PROBE_ID`

Check a Slack signing-secret probe: pending until a signed event from Slack arrives, then proven or failed. Returns the probe status and its channel.

GET /identities/slack/signing-probe/:probeId → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `probeId` | string | Yes | The :probeId in /identities/slack/signing-probe/:probeId. |

### Get identities slack teams

**Slug:** `KEIKI_MCP_GET_IDENTITIES_SLACK_TEAMS`

For a Slack app that routes customer workspaces to different agents, list each workspace: its team id, the bound agent (or null), whether the app is installed there, and when it was last messaged while unbound.

GET /identities/:id/slack/teams → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /identities/:id/slack/teams. |

### Get identities teams manifest

**Slug:** `KEIKI_MCP_GET_IDENTITIES_TEAMS_MANIFEST`

The Teams app manifest for a connected Teams identity — it names that identity’s Microsoft App ID. Returns `{ messagingEndpoint, manifest }`, or the upload-ready zip package with icons when `format=zip`.

GET /identities/teams/manifest → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `query` | object | Yes |  |

### Get identities teams setup

**Slug:** `KEIKI_MCP_GET_IDENTITIES_TEAMS_SETUP`

Return the messaging endpoint an Azure Bot registration must point at before a Teams identity can be connected.

GET /identities/teams/setup → { status, ok, data, error }

### Get identities whatsapp kapso available

**Slug:** `KEIKI_MCP_GET_IDENTITIES_WHATSAPP_KAPSO_AVAILABLE`

Read platform Kapso configuration as { available }.

GET /identities/whatsapp/kapso/available → { status, ok, data, error }

### Get identities x oauth available

**Slug:** `KEIKI_MCP_GET_IDENTITIES_X_OAUTH_AVAILABLE`

Whether “Log in with X” can be offered — an X OAuth client is configured — plus which app-level credentials the platform already has, the redirect URI to register on the X app, and the hosted eval driver’s handle when one exists.

GET /identities/x/oauth/available → { status, ok, data, error }

### Get identities x oauth callback

**Slug:** `KEIKI_MCP_GET_IDENTITIES_X_OAUTH_CALLBACK`

The redirect X sends the user back to after authorizing. Exchanges the code, checks the required scopes and offline access, resolves the account, and parks the grant for the connect call; it redirects to the channels page rather than answering JSON.

GET /identities/x/oauth/callback → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `query` | object | Yes |  |

### Get identities x oauth status

**Slug:** `KEIKI_MCP_GET_IDENTITIES_X_OAUTH_STATUS`

Poll a started X login: returns the authorization’s status and, once complete, the X account it resolved to — the input the connect call needs as `oauthState`.

GET /identities/x/oauth/status → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `query` | object | Yes |  |

### Get insights

**Slug:** `KEIKI_MCP_GET_INSIGHTS`

Org analytics over a date range: daily activity, totals (messages, conversations, turns, errors, tokens, average latency), turns and messages per agent, task outcomes and response times.

GET /insights → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `query` | object | No |  |

### Get invitations

**Slug:** `KEIKI_MCP_GET_INVITATIONS`

List the organization’s invitations, newest first, with email, role, status (pending, accepted or revoked) and expiry. Owners and admins only.

GET /invitations → { status, ok, data, error }

### Get keys

**Slug:** `KEIKI_MCP_GET_KEYS`

List the organization’s API keys: name, prefix (never the full secret), scopes, bound agent, and last-used, expiry, revocation and creation times.

GET /keys → { status, ok, data, error }

### Get keys usage

**Slug:** `KEIKI_MCP_GET_KEYS_USAGE`

Daily usage of one API key, aggregated by day, by route and method, and by agent, with accepted vs rejected (revoked/expired) counts and first/last seen times. Requests still arriving after revocation (`attemptsAfterRevocation`) are the signal it is still in use. No per-request detail.

GET /keys/:id/usage → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /keys/:id/usage. |
| `query` | object | No |  |

### Get lines

**Slug:** `KEIKI_MCP_GET_LINES`

List the organization’s phone lines with channel, line type, routing status and message, activation time, and the agent each is assigned to.

GET /lines → { status, ok, data, error }

### Get lines contact card

**Slug:** `KEIKI_MCP_GET_LINES_CONTACT_CARD`

Read the contact card iMessage shows for a line — first and last name, photo URL, and whether the provider has applied it — straight from the line’s provider, plus the line’s channel.

GET /lines/:number/contact-card → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `number` | string | Yes | The :number in /lines/:number/contact-card. |

### Get lines price

**Slug:** `KEIKI_MCP_GET_LINES_PRICE`

The display price of a new iMessage line (`price`, e.g. "$5", and `priceDetail`, e.g. "per month"); both are null when billing cannot be reached.

GET /lines/price → { status, ok, data, error }

### Get lines providers

**Slug:** `KEIKI_MCP_GET_LINES_PROVIDERS`

Status of each iMessage line provider (Photon, Linq, Blooio) as shown on the status page: today’s `state`, reachability, last check, 90-day uptime and daily history. The response includes `defaultProvider`; when set, it identifies the forced purchase provider and `components` is empty.

GET /lines/providers → { status, ok, data, error }

### Get lines provisioning by id

**Slug:** `KEIKI_MCP_GET_LINES_PROVISIONING_BY_ID`

Progress of one of the organization’s line purchases: `status` (pending, provisioning, action_required, requested, completed or error), the `phoneNumber` once ready, the Blooio `actionUrl` when the purchase needs completing, or the `error`.

GET /lines/provisioning/:id → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /lines/provisioning/:id. |

### Get live snapshot

**Slug:** `KEIKI_MCP_GET_LIVE_SNAPSHOT`

What the org’s agents are doing right now: the agents, turns from the last five minutes plus any still running with their steps, outcomes and new people from the last half hour, and today’s numbers.

GET /live/snapshot → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `query` | object | No |  |

### Get loops

**Slug:** `KEIKI_MCP_GET_LOOPS`

List the organization’s scheduled loops, newest first: agent, the person it runs for, schedule, enabled and auto-paused state, last status and error, last and next run, and run count.

GET /loops → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `query` | object | No |  |

### Get marketplace capabilities

**Slug:** `KEIKI_MCP_GET_MARKETPLACE_CAPABILITIES`

Browse published (reviewed) marketplace capabilities, one listing per capability with its newest version and the other versions available to pin, plus whether the caller is a capability reviewer.

GET /marketplace/capabilities → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `query` | object | No |  |

### Get marketplace mine

**Slug:** `KEIKI_MCP_GET_MARKETPLACE_MINE`

List the capabilities this organization has published itself, in every review state (draft, pending review, published, rejected).

GET /marketplace/mine → { status, ok, data, error }

### Get marketplace reviews

**Slug:** `KEIKI_MCP_GET_MARKETPLACE_REVIEWS`

List the capabilities awaiting publication review. Allowlisted capability reviewers and platform admins only.

GET /marketplace/reviews → { status, ok, data, error }

### Get mcp brand lookup

**Slug:** `KEIKI_MCP_GET_MCP_BRAND_LOOKUP`

Resolve the brand behind an MCP server endpoint URL — its name, domain, description and logo. Returns `{ brand: null }` when nothing is known.

GET /mcp/brand-lookup → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `query` | object | Yes |  |

### Get mcp catalog

**Slug:** `KEIKI_MCP_GET_MCP_CATALOG`

Search the approved integrations.sh catalog of connectable services (name, domain, description, kind, icon, categories). With `q` the registry’s ranked search answers; without it the whole index comes back, optionally filtered by kind. Use an entry’s domain with the catalog-domain lookup to get its endpoints.

GET /mcp/catalog → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `query` | object | No |  |

### Get mcp catalog by domain

**Slug:** `KEIKI_MCP_GET_MCP_CATALOG_BY_DOMAIN`

Resolve one catalogued domain into its connectable surfaces — MCP endpoints, OpenAPI/GraphQL specs and CLIs — with each surface’s URL, transports and the credential alternatives it needs.

GET /mcp/catalog/:domain → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `domain` | string | Yes | The :domain in /mcp/catalog/:domain. |

### Get mcp clients

**Slug:** `KEIKI_MCP_GET_MCP_CLIENTS`

List this user’s organization OAuth connections as { connections }.

GET /mcp-clients → { status, ok, data, error }

### Get members

**Slug:** `KEIKI_MCP_GET_MEMBERS`

List the members of the connected organization with their role and last sign-in, plus the caller’s own user id and role and whether the caller may manage members.

GET /members → { status, ok, data, error }

### Get models

**Slug:** `KEIKI_MCP_GET_MODELS`

Search the models an agent can run on — ids, context window, price per million tokens, and tool, reasoning and vision support. Resolve a model the user names here before setting it on an agent.

GET /models → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `query` | object | No |  |

### Get notifications

**Slug:** `KEIKI_MCP_GET_NOTIFICATIONS`

The signed-in user’s daily digest preference (`digestOptOut`) and the timezone the digest is sent in (null when none was reported).

GET /notifications → { status, ok, data, error }

### Get org mcp integrations

**Slug:** `KEIKI_MCP_GET_ORG_MCP_INTEGRATIONS`

List the organization-owned MCP integrations: endpoint, auth mode, header names (never values), which groups and agents each is granted to, and every materialised agent’s connection status and last error.

GET /org-mcp-integrations → { status, ok, data, error }

### Get orgs

**Slug:** `KEIKI_MCP_GET_ORGS`

List every organization the signed-in user belongs to, with their role and logo in each, plus the id of the currently active organization.

GET /orgs → { status, ok, data, error }

### Get orgs brand logo

**Slug:** `KEIKI_MCP_GET_ORGS_BRAND_LOGO`

Look up the brand logo URL for a domain. Returns the normalized domain and `logoUrl` (null when none is found).

GET /orgs/brand-logo → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `query` | object | Yes |  |

### Get orgs current

**Slug:** `KEIKI_MCP_GET_ORGS_CURRENT`

Read the active organization’s id, name, logo domain and logo URL, and whether the caller may edit it (`canManage`).

GET /orgs/current → { status, ok, data, error }

### Get orgs current build recommendations

**Slug:** `KEIKI_MCP_GET_ORGS_CURRENT_BUILD_RECOMMENDATIONS`

Read the agent ideas Home shows for the active organization: up to three items (title, description, channel, prompt) the organization wrote itself, else generated from its saved website domain, else a generic set. `source` says which (custom, website or generic).

GET /orgs/current/build-recommendations → { status, ok, data, error }

### Get outcomes

**Slug:** `KEIKI_MCP_GET_OUTCOMES`

Recorded business outcomes — sales, bookings, qualified leads — newest first, with totals per kind for the same agent, person and time scope.

GET /outcomes → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `query` | object | No |  |

### Get payments

**Slug:** `KEIKI_MCP_GET_PAYMENTS`

Read the organization’s Grosso payments account: connected, pending a signup code, or not connected; test or live; and whether Grosso still accepts its key. Never returns the key.

GET /payments → { status, ok, data, error }

### Get payments payees

**Slug:** `KEIKI_MCP_GET_PAYMENTS_PAYEES`

Read the organization’s newest 100 Grosso payees (businesses it collects payments for): owner email, business name, status, whether it can be charged, and the one agent it belongs to (null when unassigned).

GET /payments/payees → { status, ok, data, error }

### Get people

**Slug:** `KEIKI_MCP_GET_PEOPLE`

Directory of the people behind the organization’s conversations, most recently seen first, with the total matching count.

GET /people → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `query` | object | No |  |

### Get people by person id

**Slug:** `KEIKI_MCP_GET_PEOPLE_BY_PERSON_ID`

One person: their identities across channels, conversations, loops, connected accounts, and their confirmed outcome count and value.

GET /people/:personId → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `personId` | string | Yes | The :personId in /people/:personId. |

### Get provider accounts

**Slug:** `KEIKI_MCP_GET_PROVIDER_ACCOUNTS`

List the organization’s own Photon accounts connected to Keiki: label, Photon project id, connection status (`active`, or `error` with a message when Keiki’s webhook or credentials stopped working) and the lines imported from each.

GET /provider-accounts → { status, ok, data, error }

### Get sandbox providers

**Slug:** `KEIKI_MCP_GET_SANDBOX_PROVIDERS`

Read sandbox provider availability as { providers }.

GET /sandbox-providers → { status, ok, data, error }

### Get sandbox scripts

**Slug:** `KEIKI_MCP_GET_SANDBOX_SCRIPTS`

List the org’s sandbox scripts with the agents running each and its newest run — where a script that fails every boot shows up.

GET /sandbox-scripts → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `query` | object | No |  |

### Get sandbox scripts by id

**Slug:** `KEIKI_MCP_GET_SANDBOX_SCRIPTS_BY_ID`

Read one sandbox script, including its body, targets, timeout and env secret names.

GET /sandbox-scripts/:id → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /sandbox-scripts/:id. |

### Get sandbox scripts runs

**Slug:** `KEIKI_MCP_GET_SANDBOX_SCRIPTS_RUNS`

Every sandbox run of one script across its agents, newest first — status, exit code and output tails. Use it to see why a script fails.

GET /sandbox-scripts/:id/runs → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /sandbox-scripts/:id/runs. |

### Get sandbox scripts versions

**Slug:** `KEIKI_MCP_GET_SANDBOX_SCRIPTS_VERSIONS`

Version history of a sandbox script, newest first — each entry carries the commit sha to read it at.

GET /sandbox-scripts/:id/versions → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /sandbox-scripts/:id/versions. |

### Get sandbox scripts versions by sha

**Slug:** `KEIKI_MCP_GET_SANDBOX_SCRIPTS_VERSIONS_BY_SHA`

Read a sandbox script’s body as of one version, by the sha from its version history.

GET /sandbox-scripts/:id/versions/:sha → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /sandbox-scripts/:id/versions/:sha. |
| `sha` | string | Yes | The :sha in /sandbox-scripts/:id/versions/:sha. |

### Get secrets

**Slug:** `KEIKI_MCP_GET_SECRETS`

List the organization’s developer secret names with created/updated times and any host binding; values are never returned. Setting or deleting a secret is not available as a call — use the manage_secret card.

GET /secrets → { status, ok, data, error }

### Get signals

**Slug:** `KEIKI_MCP_GET_SIGNALS`

Built-in quality signals across every agent in the org, or one agent: events, share of classified users, change against the previous period, and average mood.

GET /signals → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `query` | object | No |  |

### Get skills

**Slug:** `KEIKI_MCP_GET_SKILLS`

List the org’s skills and knowledge documents (metadata, no body) with the agents each is attached to.

GET /skills → { status, ok, data, error }

### Get skills by id

**Slug:** `KEIKI_MCP_GET_SKILLS_BY_ID`

Read one skill or document, including its full body.

GET /skills/:id → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /skills/:id. |

### Get skills presets

**Slug:** `KEIKI_MCP_GET_SKILLS_PRESETS`

List the built-in preset skills (id, capability, name, description, kind) and whether the org already added each. Install one with POST /skills, sourceType "preset".

GET /skills/presets → { status, ok, data, error }

### Get skills versions

**Slug:** `KEIKI_MCP_GET_SKILLS_VERSIONS`

Version history of a skill, newest first — each entry carries the commit sha to read it at.

GET /skills/:id/versions → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /skills/:id/versions. |

### Get skills versions by sha

**Slug:** `KEIKI_MCP_GET_SKILLS_VERSIONS_BY_SHA`

Read a skill’s body and metadata as of one version, by the sha from its version history.

GET /skills/:id/versions/:sha → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /skills/:id/versions/:sha. |
| `sha` | string | Yes | The :sha in /skills/:id/versions/:sha. |

### Get sso

**Slug:** `KEIKI_MCP_GET_SSO`

Read SSO connection, domains, eligibility and platform configuration. Owners/admins only.

GET /sso → { status, ok, data, error }

### Get trace exporters

**Slug:** `KEIKI_MCP_GET_TRACE_EXPORTERS`

List the destinations the org ships finished turns to — format, endpoint, header names (never values), enabled, attached agent ids, last delivery status — plus the formats available.

GET /trace-exporters → { status, ok, data, error }

### Get traces

**Slug:** `KEIKI_MCP_GET_TRACES`

List one page of the org’s agent turns (traces), newest first, with status, model, tokens and error. Any query key not listed here is a 400. The page has no total; use /traces/count for that.

GET /traces → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `query` | object | No |  |

### Get traces by trace id

**Slug:** `KEIKI_MCP_GET_TRACES_BY_TRACE_ID`

One turn with all its spans (every model step and tool call with full input/output). A turn with big tool payloads is large: try /traces/:traceId/summary first, or page the spans with limit/offset.

GET /traces/:traceId → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `query` | object | No |  |
| `traceId` | string | Yes | The :traceId in /traces/:traceId. |

### Get traces count

**Slug:** `KEIKI_MCP_GET_TRACES_COUNT`

Count the turns matching the same filters as /traces; returns { total }. Any other query key is a 400.

GET /traces/count → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `query` | object | No |  |

### Get traces summary

**Slug:** `KEIKI_MCP_GET_TRACES_SUMMARY`

What one turn did, in a small response: the reply it sent, every tool call with clipped input/output, and the spans that errored. Start here when debugging a turn.

GET /traces/:traceId/summary → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `traceId` | string | Yes | The :traceId in /traces/:traceId/summary. |

### Get wallet programme

**Slug:** `KEIKI_MCP_GET_WALLET_PROGRAMME`

Whether agent wallets are offered on this deployment: each payment provider with whether it is configured and in test mode, plus overall configured/available flags. Wallet tools and routes do not exist when none is.

GET /wallet/programme → { status, ok, data, error }

### Get webhook deliveries

**Slug:** `KEIKI_MCP_GET_WEBHOOK_DELIVERIES`

List 50 outgoing consent/test webhook deliveries in this org, newest first. Legacy handoff and channel webhooks are not included.

GET /webhook-deliveries → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `query` | object | No |  |

### Get webhook deliveries by id

**Slug:** `KEIKI_MCP_GET_WEBHOOK_DELIVERIES_BY_ID`

Read one org-owned outgoing delivery, its immutable event payload and the latest 100 attempts.

GET /webhook-deliveries/:id → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /webhook-deliveries/:id. |

### Get webhooks

**Slug:** `KEIKI_MCP_GET_WEBHOOKS`

List the org’s webhook endpoints (id, name, url) — the targets an escalation route can post to.

GET /webhooks → { status, ok, data, error }

### Get webhooks by id

**Slug:** `KEIKI_MCP_GET_WEBHOOKS_BY_ID`

One webhook endpoint: its name, url and the events it subscribes to.

GET /webhooks/:id → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /webhooks/:id. |

### List agent templates

**Slug:** `KEIKI_MCP_LIST_AGENT_TEMPLATES`

List the agent templates available for deployments.

### List channel types

**Slug:** `KEIKI_MCP_LIST_CHANNEL_TYPES`

List the channel types and required deployment fields.

### Patch identities group chat

**Slug:** `KEIKI_MCP_PATCH_IDENTITIES_GROUP_CHAT`

Patch a Telegram identity’s group-chat behaviour — only the fields sent change; omitted fields keep their stored value. Returns the merged group-chat settings. Telegram identities only.

PATCH /identities/:id/group-chat → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /identities/:id/group-chat. |
| `body` | object | Yes |  |

### Patch identities phone calls voice

**Slug:** `KEIKI_MCP_PATCH_IDENTITIES_PHONE_CALLS_VOICE`

Set a phone line's voice: answering model, ElevenLabs voice and delivery, first message, language, turn-taking, persona and tone. Omitted fields fall back to defaults. Returns the saved voice.

PATCH /identities/phone-calls/:id/voice → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /identities/phone-calls/:id/voice. |
| `body` | object | Yes |  |

### Patch members by id

**Slug:** `KEIKI_MCP_PATCH_MEMBERS_BY_ID`

Change one member’s role, or their display name — one or the other per call. Changing a role, or anyone else’s name, is owners and admins only; you cannot change your own role.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

PATCH /members/:id → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /members/:id. |
| `body` | object | Yes |  |

### Patch notifications

**Slug:** `KEIKI_MCP_PATCH_NOTIFICATIONS`

Update the signed-in user’s daily digest settings; only the fields sent change. Returns the resulting preferences. An unrecognised timezone is rejected.

PATCH /notifications → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `body` | object | Yes |  |

### Patch orgs current

**Slug:** `KEIKI_MCP_PATCH_ORGS_CURRENT`

Rename the active organization, change its logo domain, or upload a logo; only the fields sent change. Changing the domain re-fetches the logo from it unless a logo is uploaded in the same call. Owners and admins only. Returns the updated organization.

PATCH /orgs/current → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `body` | object | Yes |  |

### Patch people by person id

**Slug:** `KEIKI_MCP_PATCH_PEOPLE_BY_PERSON_ID`

Set the fields an operator owns on a person, patching only those sent: displayName, primaryEmail, notes. An omitted or blank name or email leaves the current value; notes are replaced by what is sent. Returns the person.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

PATCH /people/:personId → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `body` | object | Yes |  |
| `personId` | string | Yes | The :personId in /people/:personId. |

### Patch sso

**Slug:** `KEIKI_MCP_PATCH_SSO`

Update IdP metadata/configuration and defaultRole, enforce, activate; returns SSO settings. Eligible owners/admins only.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

PATCH /sso → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `body` | object | Yes |  |

### Post agent groups

**Slug:** `KEIKI_MCP_POST_AGENT_GROUPS`

Create an agent group, optionally with its members, and return its id. Owners and admins only. Names are unique per organization (409 if taken). With no hub every member asks every other; with one hub, spokes see and ask only the hub, the hub asks its spokes and alone keeps the group note.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

POST /agent-groups → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `body` | object | Yes |  |

### Post agent groups end

**Slug:** `KEIKI_MCP_POST_AGENT_GROUPS_END`

Stop a whole group: end every live peer thread among its members and cancel their background tasks. Returns how many threads were ended and tasks cancelled. Owners and admins only.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

POST /agent-groups/:id/end → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /agent-groups/:id/end. |

### Post agentmail domains

**Slug:** `KEIKI_MCP_POST_AGENTMAIL_DOMAINS`

Add a custom email domain for agent inboxes. Returns the domain with the DNS records to publish; it can host inboxes once AgentMail has verified them. A domain already added by this or another org is refused.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

POST /agentmail/domains → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `body` | object | Yes |  |

### Post agents

**Slug:** `KEIKI_MCP_POST_AGENTS`

Create an agent and return its id. Either send a full config (name, model and systemPrompt are required; everything else defaults), or send `template` to provision a complete template agent (only name, model, reasoningEffort and lineNumber are read alongside it) — that also returns `missing_secrets` still to set.

POST /agents → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `body` | object | Yes |  |

### Post agents a2a

**Slug:** `KEIKI_MCP_POST_AGENTS_A2A`

Turn the agent’s A2A endpoint and Agent Card on or off. Returns the updated A2A view.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

POST /agents/:id/a2a → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /agents/:id/a2a. |
| `body` | object | Yes |  |

### Post agents actions decide

**Slug:** `KEIKI_MCP_POST_AGENTS_ACTIONS_DECIDE`

Approve (run) or decline one pending agent action and return the updated action; when its inputs changed since it was proposed it comes back superseded with what changed. Owners and admins only. Actions needing speaker scopes must be decided from Slack or the conversation instead.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

POST /agents/:id/actions/:actionId/decide → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /agents/:id/actions/:actionId/decide. |
| `body` | object | Yes |  |
| `actionId` | string | Yes | The :actionId in /agents/:id/actions/:actionId/decide. |

### Post agents actions groups decide

**Slug:** `KEIKI_MCP_POST_AGENTS_ACTIONS_GROUPS_DECIDE`

Approve or decline every pending action sharing a group id (from GET /agents/:id/actions), in order; approving stops at the first one that fails or is superseded. Returns each action’s outcome. Owners and admins only.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

POST /agents/:id/actions/groups/:groupId/decide → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /agents/:id/actions/groups/:groupId/decide. |
| `body` | object | Yes |  |
| `groupId` | string | Yes | The :groupId in /agents/:id/actions/groups/:groupId/decide. |

### Post agents api gateway

**Slug:** `KEIKI_MCP_POST_AGENTS_API_GATEWAY`

Turn the agent’s OpenAI/Anthropic-compatible API on or off, and/or switch passthrough mode (the caller’s own prompt leads each turn) — send at least one. Passthrough needs the gateway on. Returns the updated gateway view.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

POST /agents/:id/api-gateway → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /agents/:id/api-gateway. |
| `body` | object | Yes |  |

### Post agents by id

**Slug:** `KEIKI_MCP_POST_AGENTS_BY_ID`

Update an agent from its GET /agents/:id/edit config with your changes applied. Patches: an omitted field, or an omitted features toggle, keeps its stored value, but skillIds, sandboxScriptIds, sandboxEnvSecrets and userSecrets each replace their whole list. features.operatorHandoff hands work to a person in Slack and needs escalationRoutes.slack naming a connected install. Pass expectedUpdatedAt to refuse the save if someone else changed the agent. SDK-managed (local) agents are refused.

POST /agents/:id → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /agents/:id. |
| `body` | object | Yes |  |

### Post agents capabilities

**Slug:** `KEIKI_MCP_POST_AGENTS_CAPABILITIES`

Install a marketplace capability version on an agent, or re-pin an installed one to another version. Owners and admins only; the version must be published or the org’s own.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

POST /agents/:id/capabilities → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /agents/:id/capabilities. |
| `body` | object | Yes |  |

### Post agents capabilities enabled

**Slug:** `KEIKI_MCP_POST_AGENTS_CAPABILITIES_ENABLED`

Enable or disable an installed capability, keeping its pinned version. Owners and admins only.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

POST /agents/:id/capabilities/:publisherRef/:slug/enabled → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /agents/:id/capabilities/:publisherRef/:slug/enabled. |
| `body` | object | Yes |  |
| `slug` | string | Yes | The :slug in /agents/:id/capabilities/:publisherRef/:slug/enabled. |
| `publisherRef` | string | Yes | The :publisherRef in /agents/:id/capabilities/:publisherRef/:slug/enabled. |

### Post agents evals channel hosted

**Slug:** `KEIKI_MCP_POST_AGENTS_EVALS_CHANNEL_HOSTED`

Start a real-channel eval run in which a platform-owned identity messages the agent over a real channel; returns the run id (watch it at /watch/:runId), the target handle and the cases run or excluded. Needs a paid plan, a configured driver and an active line for that channel; one channel run per agent at a time.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

POST /agents/:id/evals/channel/hosted → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /agents/:id/evals/channel/hosted. |
| `body` | object | No |  |

### Post agents fine tune start

**Slug:** `KEIKI_MCP_POST_AGENTS_FINE_TUNE_START`

Record a fine-tune request for the agent’s current version; refused until enough graded conversations exist. Owners and admins only. Training is scheduled separately, and repeating it returns the request already on file.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

POST /agents/:id/fine-tune/start → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /agents/:id/fine-tune/start. |

### Post agents harness redeploy

**Slug:** `KEIKI_MCP_POST_AGENTS_HARNESS_REDEPLOY`

Replace a Maritime agent’s Keiki VM with a fresh one built from the current runner and return the new VM status. Only for agents on the maritime harness.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

POST /agents/:id/harness/redeploy → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /agents/:id/harness/redeploy. |

### Post agents harness signing secret

**Slug:** `KEIKI_MCP_POST_AGENTS_HARNESS_SIGNING_SECRET`

Rotate an external harness credential; returns { signingSecret }.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

POST /agents/:id/harness/signing-secret → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /agents/:id/harness/signing-secret. |

### Post agents lines

**Slug:** `KEIKI_MCP_POST_AGENTS_LINES`

Give an agent another phone line. A line belongs to one agent: a line another agent holds is refused; move it instead.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

POST /agents/:id/lines → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /agents/:id/lines. |
| `body` | object | Yes |  |

### Post agents lines move

**Slug:** `KEIKI_MCP_POST_AGENTS_LINES_MOVE`

Move a line this agent holds to another agent in one step. A refused destination leaves the line where it was.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

POST /agents/:id/lines/:number/move → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /agents/:id/lines/:number/move. |
| `body` | object | Yes |  |
| `number` | string | Yes | The :number in /agents/:id/lines/:number/move. |

### Post agents loops clear history

**Slug:** `KEIKI_MCP_POST_AGENTS_LOOPS_CLEAR_HISTORY`

Reset a loop: zero its run count and last status, delete its run history, and drop the snapshot it diffs against, so the next run starts fresh. Returns whether a snapshot was cleared.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

POST /agents/:id/loops/:loopId/clear-history → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /agents/:id/loops/:loopId/clear-history. |
| `loopId` | string | Yes | The :loopId in /agents/:id/loops/:loopId/clear-history. |

### Post agents loops enabled

**Slug:** `KEIKI_MCP_POST_AGENTS_LOOPS_ENABLED`

Pause or resume one of the agent’s scheduled loops. Resuming recomputes its schedule, so a one-shot loop whose time has passed cannot be resumed.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

POST /agents/:id/loops/:loopId/enabled → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /agents/:id/loops/:loopId/enabled. |
| `body` | object | Yes |  |
| `loopId` | string | Yes | The :loopId in /agents/:id/loops/:loopId/enabled. |

### Post agents loops run

**Slug:** `KEIKI_MCP_POST_AGENTS_LOOPS_RUN`

Run one of the agent’s scheduled loops now, through the same pipeline as a scheduled run. Returns whether it was queued or skipped, plus any capabilities that blocked it.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

POST /agents/:id/loops/:loopId/run → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /agents/:id/loops/:loopId/run. |
| `loopId` | string | Yes | The :loopId in /agents/:id/loops/:loopId/run. |

### Post agents mcp presets connect

**Slug:** `KEIKI_MCP_POST_AGENTS_MCP_PRESETS_CONNECT`

Connect (or reconnect) one MCP preset on the agent’s Executor daemon. Returns the preset; when it needs OAuth its status asks for authorization and it carries the URL to open. Needs the Sandbox and MCP capabilities.

POST /agents/:id/mcp-presets/:presetId/connect → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /agents/:id/mcp-presets/:presetId/connect. |
| `presetId` | string | Yes | The :presetId in /agents/:id/mcp-presets/:presetId/connect. |

### Post agents mcp presets share

**Slug:** `KEIKI_MCP_POST_AGENTS_MCP_PRESETS_SHARE`

Share an agent’s MCP connection with the organization: its credential moves to an org-owned integration granted to the given groups and agents, then installed on each. Owners and admins only; a per-user-auth or already-shared connection cannot be shared. Returns the integration.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

POST /agents/:id/mcp-presets/:presetId/share → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /agents/:id/mcp-presets/:presetId/share. |
| `body` | object | No |  |
| `presetId` | string | Yes | The :presetId in /agents/:id/mcp-presets/:presetId/share. |

### Post agents mcp presets status

**Slug:** `KEIKI_MCP_POST_AGENTS_MCP_PRESETS_STATUS`

Re-check an MCP preset’s connection on the daemon without restarting OAuth — poll it after the user authorizes. Returns the preset with its current status.

POST /agents/:id/mcp-presets/:presetId/status → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /agents/:id/mcp-presets/:presetId/status. |
| `presetId` | string | Yes | The :presetId in /agents/:id/mcp-presets/:presetId/status. |

### Post agents notice

**Slug:** `KEIKI_MCP_POST_AGENTS_NOTICE`

Tell the agent something in its own conversations and let it decide whether the people in them hear about it — how you notify everyone using an agent (an outage, a capability going away, a migration). The text is never delivered: the agent reads it as a platform notice and decides, in each contact’s history and tone, whether and how to say anything, so write it for the agent and never draft the message itself. With `phone` it runs one conversation and returns its outcome (ran, queued for its next turn, or unavailable); without it it fans out over every conversation (newest first, bounded) and answers 202 with how many it started — report that as started, not delivered.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

POST /agents/:id/notice → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /agents/:id/notice. |
| `body` | object | Yes |  |

### Post agents quality apply

**Slug:** `KEIKI_MCP_POST_AGENTS_QUALITY_APPLY`

Apply a drafted fix to the agent’s live configuration (a new agent version). Only a draft that passed its evaluation gate can be applied. A model-change draft needs the model chosen in the body; a prompt draft takes no body.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

POST /agents/:id/quality/:proposalId/apply → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /agents/:id/quality/:proposalId/apply. |
| `body` | object | No |  |
| `proposalId` | string | Yes | The :proposalId in /agents/:id/quality/:proposalId/apply. |

### Post agents quality dismiss

**Slug:** `KEIKI_MCP_POST_AGENTS_QUALITY_DISMISS`

Dismiss a drafted fix, together with the failure cluster it came from so the same symptom is not suggested again.

POST /agents/:id/quality/:proposalId/dismiss → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /agents/:id/quality/:proposalId/dismiss. |
| `proposalId` | string | Yes | The :proposalId in /agents/:id/quality/:proposalId/dismiss. |

### Post agents quality settings

**Slug:** `KEIKI_MCP_POST_AGENTS_QUALITY_SETTINGS`

Change the agent’s turn-review settings. Patches only the fields sent; a threshold outside its bounds is refused.

POST /agents/:id/quality/settings → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /agents/:id/quality/settings. |
| `body` | object | Yes |  |

### Post agents rollouts percent

**Slug:** `KEIKI_MCP_POST_AGENTS_ROLLOUTS_PERCENT`

Set the share of conversations an open rollout serves its staged config to, and resume it when paused. Returns the updated rollout; promote it to reach 100.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

POST /agents/:id/rollouts/:rolloutId/percent → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /agents/:id/rollouts/:rolloutId/percent. |
| `body` | object | Yes |  |
| `rolloutId` | string | Yes | The :rolloutId in /agents/:id/rollouts/:rolloutId/percent. |

### Post agents rollouts promote

**Slug:** `KEIKI_MCP_POST_AGENTS_ROLLOUTS_PROMOTE`

Make the rollout’s staged config live for every conversation, recorded as a new version, and end the rollout.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

POST /agents/:id/rollouts/:rolloutId/promote → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /agents/:id/rollouts/:rolloutId/promote. |
| `rolloutId` | string | Yes | The :rolloutId in /agents/:id/rollouts/:rolloutId/promote. |

### Post agents rollouts rollback

**Slug:** `KEIKI_MCP_POST_AGENTS_ROLLOUTS_ROLLBACK`

End the rollout and send every conversation back to the live config. The live config is not changed.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

POST /agents/:id/rollouts/:rolloutId/rollback → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /agents/:id/rollouts/:rolloutId/rollback. |
| `rolloutId` | string | Yes | The :rolloutId in /agents/:id/rollouts/:rolloutId/rollback. |

### Post agents template import

**Slug:** `KEIKI_MCP_POST_AGENTS_TEMPLATE_IMPORT`

Re-apply the agent’s own template, at the template’s current version, onto its configuration (e.g. when GET /agents/:id reports the template as outdated). Fails when the agent was not made from a template.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

POST /agents/:id/template/import → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /agents/:id/template/import. |

### Post agents tools

**Slug:** `KEIKI_MCP_POST_AGENTS_TOOLS`

Save a new authored code tool as a disabled draft (saving under the name of an existing authored tool rewrites that draft). Test it, then enable it to publish. Returns the saved tool.

POST /agents/:id/tools → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /agents/:id/tools. |
| `body` | object | Yes |  |

### Post agents tools enable

**Slug:** `KEIKI_MCP_POST_AGENTS_TOOLS_ENABLE`

Publish an authored tool to the agent so it can call it, or unpublish it with enabled false. Returns the tool.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

POST /agents/:id/tools/:toolId/enable → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /agents/:id/tools/:toolId/enable. |
| `body` | object | No |  |
| `toolId` | string | Yes | The :toolId in /agents/:id/tools/:toolId/enable. |

### Post agents versions restore

**Slug:** `KEIKI_MCP_POST_AGENTS_VERSIONS_RESTORE`

Roll the agent back to the configuration saved at a version sha, recorded as a new version whose sha is returned.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

POST /agents/:id/versions/:sha/restore → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /agents/:id/versions/:sha/restore. |
| `sha` | string | Yes | The :sha in /agents/:id/versions/:sha/restore. |

### Post billing credits purchase

**Slug:** `KEIKI_MCP_POST_BILLING_CREDITS_PURCHASE`

Buy usage credits for the organization; owners and admins only. Charges the saved payment method, or returns a checkoutUrl to share with the user when none is saved; a null URL means the credits were added.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

POST /billing/credits/purchase → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `body` | object | Yes |  |

### Post billing plans attach

**Slug:** `KEIKI_MCP_POST_BILLING_PLANS_ATTACH`

Attach the selected plan to the organization; owners and admins only. Read available plans first and choose one with selfServe: true; other plans are operator-assigned and attach rejects them. Share any returned checkoutUrl with the user; a null URL means no checkout is needed.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

POST /billing/plans/attach → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `body` | object | Yes |  |

### Post billing release line

**Slug:** `KEIKI_MCP_POST_BILLING_RELEASE_LINE`

Release an active phone line owned by the organization and unassign it from agents; owners and admins only. For the last dedicated Photon line, also stop its subscription; returns ok, billingStopped and numberReturned to distinguish billing cancellation from number return.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

POST /billing/release-line → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `body` | object | Yes |  |

### Post channel access requests

**Slug:** `KEIKI_MCP_POST_CHANNEL_ACCESS_REQUESTS`

Submit { channel, purpose, expectedVolume }; returns { request }. Configurers only.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

POST /channel-access-requests → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `body` | object | Yes |  |

### Post conversations block

**Slug:** `KEIKI_MCP_POST_CONVERSATIONS_BLOCK`

Block one identity for this conversation’s agent, so its messages no longer trigger agent replies.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

POST /conversations/:phone/block → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `phone` | string | Yes | The :phone in /conversations/:phone/block. |
| `query` | object | No |  |

### Post conversations end

**Slug:** `KEIKI_MCP_POST_CONVERSATIONS_END`

End an inter-agent (agent:) thread: settle its pending asks and refuse new ones until the identity is unblocked. Returns how many asks were settled. 409 for a customer conversation.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

POST /conversations/:phone/end → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `phone` | string | Yes | The :phone in /conversations/:phone/end. |
| `query` | object | No |  |

### Post conversations messages

**Slug:** `KEIKI_MCP_POST_CONVERSATIONS_MESSAGES`

Send a message the contact reads as the agent’s, over the conversation’s own channel, and renew the takeover. Only while the conversation is taken over (409 otherwise, or on a channel with no outbound send).

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

POST /conversations/:phone/messages → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `body` | object | Yes |  |
| `phone` | string | Yes | The :phone in /conversations/:phone/messages. |
| `query` | object | No |  |

### Post conversations steer

**Slug:** `KEIKI_MCP_POST_CONVERSATIONS_STEER`

Run a turn on this conversation as if the contact had written the text, and return what the agent would answer with its trace id. Nothing reaches the contact: delivery tools are refused and the answer is kept in the dashboard, marked as never sent. Works during a takeover as a draft; refused (409) while the agent is mid-turn.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

POST /conversations/:phone/steer → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `body` | object | Yes |  |
| `phone` | string | Yes | The :phone in /conversations/:phone/steer. |
| `query` | object | No |  |

### Post conversations takeover

**Slug:** `KEIKI_MCP_POST_CONVERSATIONS_TAKEOVER`

Hold one conversation for a human for 30 minutes: incoming messages are stored for them to answer and no agent turn runs. Returns the takeover with its expiry; sending a message renews it.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

POST /conversations/:phone/takeover → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `phone` | string | Yes | The :phone in /conversations/:phone/takeover. |
| `query` | object | No |  |

### Post evals cases

**Slug:** `KEIKI_MCP_POST_EVALS_CASES`

Add a user-authored eval case to an agent in the organization and return the saved case. Name and prompt are required, and a duplicate active case name is rejected; code-tool check inputs are free-form JSON.

POST /evals/cases → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `body` | object | Yes |  |

### Post evals cases generate

**Slug:** `KEIKI_MCP_POST_EVALS_CASES_GENERATE`

Re-author and persist the agent’s generated eval suite from its current configuration, keeping user and regression cases and recording a suite version. Requires a paid plan and, for passthrough agents, a captured caller spec; returns cases and spends OpenRouter credits using the resolved platform or BYOK key.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

POST /evals/cases/generate → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `body` | object | Yes |  |

### Post evals diffs

**Slug:** `KEIKI_MCP_POST_EVALS_DIFFS`

Start paid-plan evals comparing two different readable config versions of the organization’s agent against up to 12 existing cases. Requires a nonempty suite and no in-flight comparison; returns base_run_id and candidate_run_id to poll the comparison, and spends credits running both versions.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

POST /evals/diffs → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `body` | object | Yes |  |

### Post evals runs

**Slug:** `KEIKI_MCP_POST_EVALS_RUNS`

Start a paid-plan eval run on the agent’s saved suite, or selected case ids including archived cases; generation occurs only if the saved suite is empty. Omit candidates to use the configured model, or supply up to 20 distinct models for comparison; returns run_id to poll, or a conflict with the already running run_id.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

POST /evals/runs → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `body` | object | Yes |  |

### Post evals runs cancel

**Slug:** `KEIKI_MCP_POST_EVALS_RUNS_CANCEL`

Request cooperative cancellation of an organization eval run that is still running; the runner checks between cases. Returns ok true only when a running run was marked cancelled, otherwise false; no body is read.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

POST /evals/runs/:id/cancel → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /evals/runs/:id/cancel. |

### Post evals suggestions create

**Slug:** `KEIKI_MCP_POST_EVALS_SUGGESTIONS_CREATE`

Create regression eval cases from selected production suggestions by replaying recorded conversation evidence in a mocked world, without model calls. Read suggestions for the same window first; returns caseIds, skipped suggestion ids and the saved cases, skipping stale or already covered suggestions.

POST /evals/suggestions/create → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `body` | object | Yes |  |

### Post identities agentmail

**Slug:** `KEIKI_MCP_POST_IDENTITIES_AGENTMAIL`

Create an AgentMail email identity attached to an agent — a new inbox on the managed domain or one of the org’s verified custom domains, or an existing inbox the org already owns — and register its inbound webhook. An agent can have only one AgentMail inbox.

POST /identities/agentmail → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `body` | object | Yes |  |

### Post identities agentmail reconnect

**Slug:** `KEIKI_MCP_POST_IDENTITIES_AGENTMAIL_RECONNECT`

Rotate an AgentMail identity’s inbox-scoped API key — mints a replacement, stores it, deletes the old key, and when attached re-registers the inbound webhook.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

POST /identities/:id/agentmail/reconnect → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /identities/:id/agentmail/reconnect. |

### Post identities agentmail verify

**Slug:** `KEIKI_MCP_POST_IDENTITIES_AGENTMAIL_VERIFY`

Verify an AgentMail identity: re-fetches the inbox, and when the identity is attached to an agent (re)registers the inbound webhook. Updates and returns the routing status.

POST /identities/:id/agentmail/verify → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /identities/:id/agentmail/verify. |

### Post identities attach

**Slug:** `KEIKI_MCP_POST_IDENTITIES_ATTACH`

Route an identity to an agent: registers the channel’s inbound webhook or subscription and marks the identity routing-active. Requires a paid plan. Returns the resulting routing status.

POST /identities/:id/attach → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /identities/:id/attach. |
| `body` | object | Yes |  |

### Post identities detach

**Slug:** `KEIKI_MCP_POST_IDENTITIES_DETACH`

Stop routing an identity to its agent: tears down the channel’s webhook or subscription and leaves the identity unattached, so inbound messages stop being answered. The identity itself is kept.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

POST /identities/:id/detach → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /identities/:id/detach. |

### Post identities phone calls

**Slug:** `KEIKI_MCP_POST_IDENTITIES_PHONE_CALLS`

Buy a voice number in the area code or state (or any US number when neither is given) and connect it to the agent for inbound phone calls (charges the org). Returns the identity id and the purchased number. With `forwardFrom`, the agent's iMessage line forwards its calls to a hidden voice number instead and stays the public number; `forwarding` is `active`, or `pending` while the line's provider sets it up.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

POST /identities/phone-calls → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `body` | object | Yes |  |

### Post identities phone calls forwarding requests

**Slug:** `KEIKI_MCP_POST_IDENTITIES_PHONE_CALLS_FORWARDING_REQUESTS`

Ask the team to set up call forwarding by hand for an iMessage line whose provider cannot do it automatically.

POST /identities/phone-calls/forwarding-requests → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `body` | object | Yes |  |

### Post identities phone calls voices preview

**Slug:** `KEIKI_MCP_POST_IDENTITIES_PHONE_CALLS_VOICES_PREVIEW`

Speak a short text (at most 300 characters; defaults to the first message) in a voice. Returns MP3 audio.

POST /identities/phone-calls/voices/preview → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `body` | object | Yes |  |

### Post identities slack

**Slug:** `KEIKI_MCP_POST_IDENTITIES_SLACK`

Create a Slack identity from a manually-built Slack app: bot token and signing secret are required, the OAuth client pair makes the app installable by other workspaces. Optionally attached to an agent. Fails if the app is already connected.

POST /identities/slack → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `body` | object | Yes |  |

### Post identities slack install link

**Slug:** `KEIKI_MCP_POST_IDENTITIES_SLACK_INSTALL_LINK`

Mint a signed Slack install link that binds the installing workspace to an agent. Owners and admins only. An unpinned link can be reused by any workspace that is not bound yet.

POST /identities/:id/slack/install-link → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /identities/:id/slack/install-link. |
| `body` | object | Yes |  |

### Post identities slack install links revoke

**Slug:** `KEIKI_MCP_POST_IDENTITIES_SLACK_INSTALL_LINKS_REVOKE`

Stop every install link made so far for a customer-workspace Slack app, without touching its signing secret. Installed workspaces keep working. Owners and admins only.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

POST /identities/:id/slack/install-links/revoke → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /identities/:id/slack/install-links/revoke. |

### Post identities slack operators

**Slug:** `KEIKI_MCP_POST_IDENTITIES_SLACK_OPERATORS`

Add one Slack user to a Slack identity’s operator allowlist without touching the other entries. Owners and admins only. Returns the resulting list.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

POST /identities/:id/slack/operators → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /identities/:id/slack/operators. |
| `body` | object | Yes |  |

### Post identities slack reconnect

**Slug:** `KEIKI_MCP_POST_IDENTITIES_SLACK_RECONNECT`

Replace a Slack identity’s credentials with a fresh bot token for the same Slack app — the token must resolve to the app already connected — plus its signing secret. The pasted token replaces that workspace’s install; a blank OAuth client keeps the one already stored.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

POST /identities/:id/slack/reconnect → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /identities/:id/slack/reconnect. |
| `body` | object | Yes |  |

### Post identities slack signing probe

**Slug:** `KEIKI_MCP_POST_IDENTITIES_SLACK_SIGNING_PROBE`

Store a candidate Slack signing secret and have the bot post a setup instruction into a channel; a human then mentions the bot there so Slack’s signed event proves the secret. Returns the probe id and whether the instruction was posted.

POST /identities/slack/signing-probe → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `body` | object | Yes |  |

### Post identities slack validate

**Slug:** `KEIKI_MCP_POST_IDENTITIES_SLACK_VALIDATE`

Check pasted Slack app credentials before storing them: the workspace and bot the token belongs to, the scopes the install is missing, the channels the bot can see, whether the OAuth client pair is real, and whether the app is already connected. The signing secret cannot be checked here — only a signed request from Slack proves it.

POST /identities/slack/validate → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `body` | object | Yes |  |

### Post identities slack verify

**Slug:** `KEIKI_MCP_POST_IDENTITIES_SLACK_VERIFY`

Re-check every workspace install of a Slack identity against Slack: refreshes workspace names and granted scopes, and retires an install whose token Slack has revoked. Returns per-install results; a revoked everywhere token raises a routing fault on the identity.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

POST /identities/:id/slack/verify → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /identities/:id/slack/verify. |

### Post identities teams

**Slug:** `KEIKI_MCP_POST_IDENTITIES_TEAMS`

Create a Microsoft Teams identity from an Azure Bot registration — the App ID and a client secret are validated by minting a Bot Framework token. Optionally attached to an agent. Returns the identity id, routing status, and the messaging endpoint the registration must point at.

POST /identities/teams → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `body` | object | Yes |  |

### Post identities telegram

**Slug:** `KEIKI_MCP_POST_IDENTITIES_TELEGRAM`

Create a Telegram bot identity, optionally attached to an agent; the inbound webhook is registered only when an agent is attached. Returns the new identity id, its routing status, and the resolved bot. Fails if the bot is already connected anywhere.

POST /identities/telegram → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `body` | object | Yes |  |

### Post identities telegram validate

**Slug:** `KEIKI_MCP_POST_IDENTITIES_TELEGRAM_VALIDATE`

Resolve a Telegram bot token through getMe and return the bot’s id, username and first name, without persisting anything. Use it to preview which bot a token belongs to before creating the identity.

POST /identities/telegram/validate → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `body` | object | Yes |  |

### Post identities whatsapp

**Slug:** `KEIKI_MCP_POST_IDENTITIES_WHATSAPP`

Create a WhatsApp Cloud API identity, optionally attached to an agent; webhook subscription runs only when an agent is attached. Returns the identity id, routing status, the resolved number, and the webhook URL to point the Meta app at. Fails if the number is already connected.

POST /identities/whatsapp → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `body` | object | Yes |  |

### Post identities whatsapp kapso

**Slug:** `KEIKI_MCP_POST_IDENTITIES_WHATSAPP_KAPSO`

Connect { phoneNumberId, agentId? } from this organization’s Kapso signup; returns { ok, id, routingStatus, number }.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

POST /identities/whatsapp/kapso → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `body` | object | Yes |  |

### Post identities whatsapp kapso own

**Slug:** `KEIKI_MCP_POST_IDENTITIES_WHATSAPP_KAPSO_OWN`

Connect { apiKey, phoneNumberId, agentId? } from a tenant Kapso account; returns { ok, id, routingStatus, number }.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

POST /identities/whatsapp/kapso/own → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `body` | object | Yes |  |

### Post identities whatsapp kapso start

**Slug:** `KEIKI_MCP_POST_IDENTITIES_WHATSAPP_KAPSO_START`

Mint an organization Kapso signup link; returns { url } for the user to open.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

POST /identities/whatsapp/kapso/start → { status, ok, data, error }

### Post identities whatsapp validate

**Slug:** `KEIKI_MCP_POST_IDENTITIES_WHATSAPP_VALIDATE`

Resolve a Meta access token + phone number id to the WhatsApp number they belong to — display number and verified name — plus the webhook URL to register, without persisting anything.

POST /identities/whatsapp/validate → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `body` | object | Yes |  |

### Post identities x

**Slug:** `KEIKI_MCP_POST_IDENTITIES_X`

Create an X account identity for public mentions and direct messages, from a completed “Log in with X” grant. The app credentials sign and register webhooks — when the platform app authorized the login they may be omitted. Attaching an agent requires a paid plan. Fails if the account is already connected.

POST /identities/x → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `body` | object | Yes |  |

### Post identities x oauth start

**Slug:** `KEIKI_MCP_POST_IDENTITIES_X_OAUTH_START`

Start an X OAuth 2.0 login that mints a refreshable user token for an X identity. Returns the state and the authorize URL to send the user through; the callback parks the grant for the connect call.

POST /identities/x/oauth/start → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `body` | object | No |  |

### Post identities x reconnect

**Slug:** `KEIKI_MCP_POST_IDENTITIES_X_RECONNECT`

Replace the authorization of an X identity whose token X revoked, using a completed “Log in with X” for the same account. The grant is consumed once; app credential fields update only when sent.

POST /identities/:id/x/reconnect → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /identities/:id/x/reconnect. |
| `body` | object | Yes |  |

### Post identities x validate app credentials

**Slug:** `KEIKI_MCP_POST_IDENTITIES_X_VALIDATE_APP_CREDENTIALS`

Check that an X app API key + API key secret pair can mint the app-only bearer token that registers the X webhook, without storing anything. Returns the bearer inspection, or `{ ok: false, error }`.

POST /identities/x/validate-app-credentials → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `body` | object | Yes |  |

### Post invitations

**Slug:** `KEIKI_MCP_POST_INVITATIONS`

Invite someone to the organization by email. Owners and admins only. Emails the invitation when email is configured; otherwise returns the accept link (`acceptUrl`) to share.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

POST /invitations → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `body` | object | Yes |  |

### Post invitations resend

**Slug:** `KEIKI_MCP_POST_INVITATIONS_RESEND`

Resend a pending invitation with a fresh accept link and a renewed expiry. Owners and admins only. Returns whether the email was sent, and the accept link (`acceptUrl`) to share when email is not configured.

POST /invitations/:id/resend → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /invitations/:id/resend. |

### Post keys

**Slug:** `KEIKI_MCP_POST_KEYS`

Create an API key, optionally bound to a single agent of this organization. Returns the full key once — it cannot be read again.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

POST /keys → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `body` | object | Yes |  |

### Post keys revoke

**Slug:** `KEIKI_MCP_POST_KEYS_REVOKE`

Revoke an API key so every later request with it is rejected.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

POST /keys/:id/revoke → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /keys/:id/revoke. |

### Post keys rotate

**Slug:** `KEIKI_MCP_POST_KEYS_ROTATE`

Rotate an API key: the old secret stops working and the new full key is returned once.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

POST /keys/:id/rotate → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /keys/:id/rotate. |

### Post lines contact card

**Slug:** `KEIKI_MCP_POST_LINES_CONTACT_CARD`

Set the first and last name iMessage shows for a line, applied through its provider (Photon or Linq) and returned as the saved card. Owners and admins only. The photo is unchanged; uploading one is only possible from the dashboard.

POST /lines/:number/contact-card → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `body` | object | Yes |  |
| `number` | string | Yes | The :number in /lines/:number/contact-card. |

### Post lines preview

**Slug:** `KEIKI_MCP_POST_LINES_PREVIEW`

Quote a new iMessage line with a coupon applied, without charging, redeeming the coupon or provisioning: returns subtotal, total and currency (major units) and the next invoice, which may include other plans. Owners and admins only; an invalid coupon is a 400.

POST /lines/preview → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `body` | object | Yes |  |

### Post lines purchase

**Slug:** `KEIKI_MCP_POST_LINES_PURCHASE`

Buy a new iMessage line for the organization from Photon (default) or Blooio, optionally with a coupon and connected straight to an agent. Owners and admins only. Returns a `checkoutUrl` the user must open when payment details are needed. Otherwise the selected provider provisions the line; when `DEFAULT_IMESSAGE_PROVIDER` is set, it overrides the request body’s `provider`. A Photon line is provisioned immediately and its `phoneNumber` returned; a Blooio purchase may instead return `status: "provisioning"` (or `"action_required"` with an `actionUrl`) and a `requestId` to follow with GET /lines/provisioning/:id.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

POST /lines/purchase → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `body` | object | No |  |

### Post lines request

**Slug:** `KEIKI_MCP_POST_LINES_REQUEST`

Ask the Keiki team for a Linq line. Owners and admins only. Nothing is charged; the request is recorded, the team is alerted and fills it by hand later. Returns the `requestId`; repeating while one is open returns the same request. Returns 409 without recording when `DEFAULT_IMESSAGE_PROVIDER` forces Photon or Blooio.

POST /lines/request → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `body` | object | No |  |

### Post lines verify

**Slug:** `KEIKI_MCP_POST_LINES_VERIFY`

Check one line’s inbound webhook registration with its provider and its stored routing status; it changes nothing except promoting a degraded or unserved status back to active when the webhook checks out. Returns the expected webhook URL, whether a webhook is registered and matches the stored id, and findings such as missing webhooks, id mismatches, channel/provider mismatches or no outbound line selection. It does not prove outbound delivery works, and the stored channel is configuration intent (possibly the `linq` default), not proof.

POST /lines/:number/verify → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `number` | string | Yes | The :number in /lines/:number/verify. |

### Post marketplace mine submit

**Slug:** `KEIKI_MCP_POST_MARKETPLACE_MINE_SUBMIT`

Submit one of the organization’s own capability versions for marketplace publication review; it is emailed to the review inbox. Owners and admins only. A bundle zip and notes can only be attached from the dashboard upload form, not through this call.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

POST /marketplace/mine/:capabilityId/submit → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `capabilityId` | string | Yes | The :capabilityId in /marketplace/mine/:capabilityId/submit. |

### Post marketplace reviews by capability id

**Slug:** `KEIKI_MCP_POST_MARKETPLACE_REVIEWS_BY_CAPABILITY_ID`

Approve (publish) or reject a capability that is awaiting review, with an optional note to the publisher. Allowlisted capability reviewers and platform admins only; fails unless the capability is pending review.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

POST /marketplace/reviews/:capabilityId → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `body` | object | Yes |  |
| `capabilityId` | string | Yes | The :capabilityId in /marketplace/reviews/:capabilityId. |

### Post members transfer ownership

**Slug:** `KEIKI_MCP_POST_MEMBERS_TRANSFER_OWNERSHIP`

Make another member the owner of the organization; the current owner becomes an admin. Owner only. Find the member’s user id with the member list first.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

POST /members/transfer-ownership → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `body` | object | Yes |  |

### Post org mcp integrations sync

**Slug:** `KEIKI_MCP_POST_ORG_MCP_INTEGRATIONS_SYNC`

Re-run the reconciliation of an org MCP integration into every granted agent now, in the background. Owners and admins only. Returns the integration as it stands; poll the list for each agent’s new status.

POST /org-mcp-integrations/:id/sync → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /org-mcp-integrations/:id/sync. |

### Post payments identity verification

**Slug:** `KEIKI_MCP_POST_PAYMENTS_IDENTITY_VERIFICATION`

Start payment identity verification; returns { url }. Owners/admins only.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

POST /payments/identity-verification → { status, ok, data, error }

### Post payments key

**Slug:** `KEIKI_MCP_POST_PAYMENTS_KEY`

Connect Grosso using { apiKey }; returns { account } without its key. Owners/admins only.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

POST /payments/key → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `body` | object | Yes |  |

### Post payments live

**Slug:** `KEIKI_MCP_POST_PAYMENTS_LIVE`

Switch payments to live mode; returns { account }. Owners/admins only.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

POST /payments/live → { status, ok, data, error }

### Post payments payees

**Slug:** `KEIKI_MCP_POST_PAYMENTS_PAYEES`

Create { ownerEmail, agentId, maxAmount, dailyAmount } (integer cents); returns { payee, onboardingUrl }. Owners/admins only.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

POST /payments/payees → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `body` | object | Yes |  |

### Post payments payees by id

**Slug:** `KEIKI_MCP_POST_PAYMENTS_PAYEES_BY_ID`

Assign a payee with { agentId }; returns { payee }. Owners/admins only.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

POST /payments/payees/:id → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /payments/payees/:id. |
| `body` | object | Yes |  |

### Post payments signup

**Slug:** `KEIKI_MCP_POST_PAYMENTS_SIGNUP`

Start Grosso signup with { email, name }; returns { account }. Owners/admins only.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

POST /payments/signup → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `body` | object | Yes |  |

### Post payments verify

**Slug:** `KEIKI_MCP_POST_PAYMENTS_VERIFY`

Verify signup with { code, acceptTerms: true }; returns { account }. Owners/admins only.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

POST /payments/verify → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `body` | object | Yes |  |

### Post sandbox scripts

**Slug:** `KEIKI_MCP_POST_SANDBOX_SCRIPTS`

Create a sandbox script: a "build" script runs once per sandbox (again when its body changes), a "startup" script on every boot. Creating does not attach it to any agent. Returns the created script.

POST /sandbox-scripts → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `body` | object | Yes |  |

### Post skills

**Slug:** `KEIKI_MCP_POST_SKILLS`

Create a skill or knowledge document — always a new one. Owners, admins and members only. sourceType picks the source: "file" (filename + inline content, .md/.markdown/.txt, up to 2 MB), "url" (a raw .md/.txt URL), "website" (a web page imported as a document), "npx" (an `npx skills add` GitHub source) or "preset" (presetId from /skills/presets; 409 if already added). Returns the created skill. Does not attach it to any agent.

POST /skills → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `body` | object | Yes |  |

### Post sso domains

**Slug:** `KEIKI_MCP_POST_SSO_DOMAINS`

Register { domain }; returns { domain } with its verification record. Eligible owners/admins only.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

POST /sso/domains → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `body` | object | Yes |  |

### Post sso setup link

**Slug:** `KEIKI_MCP_POST_SSO_SETUP_LINK`

Create a single-use SSO setup credential; returns { setupUrl, expiresAt }. Eligible owners/admins only.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

POST /sso/setup-link → { status, ok, data, error }

### Post sso test

**Slug:** `KEIKI_MCP_POST_SSO_TEST`

Start an SSO test; returns { url } for the user to open. Eligible owners/admins only.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

POST /sso/test → { status, ok, data, error }

### Post subagent tasks cancel

**Slug:** `KEIKI_MCP_POST_SUBAGENT_TASKS_CANCEL`

Cancel one running or suspended background task an agent delegated; the agent is told it was cancelled. Returns cancelled: false when the task had already finished. Owners and admins only.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

POST /subagent-tasks/:id/cancel → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /subagent-tasks/:id/cancel. |

### Post trace exporters

**Slug:** `KEIKI_MCP_POST_TRACE_EXPORTERS`

Add a destination that receives every finished turn of its attached agents. Owners, admins and members only. The endpoint must resolve to a public address at delivery. Returns the created exporter.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

POST /trace-exporters → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `body` | object | Yes |  |

### Post traces abort

**Slug:** `KEIKI_MCP_POST_TRACES_ABORT`

Ask a running turn to stop; it halts at its next step. 409 if the turn is not running.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

POST /traces/:traceId/abort → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `traceId` | string | Yes | The :traceId in /traces/:traceId/abort. |

### Post traces retry

**Slug:** `KEIKI_MCP_POST_TRACES_RETRY`

Re-run a failed turn with its original input, or re-run its linked loop; returns which was queued. 409 with a reason when it cannot (not failed, conversation moved on or busy, taken over by a person, input gone).

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

POST /traces/:traceId/retry → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `traceId` | string | Yes | The :traceId in /traces/:traceId/retry. |

### Post webhook deliveries resend

**Slug:** `KEIKI_MCP_POST_WEBHOOK_DELIVERIES_RESEND`

Owners/admins only: queue a resend using the original event ID/payload. The destination must be enabled and no attempt can be in progress.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

POST /webhook-deliveries/:id/resend → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /webhook-deliveries/:id/resend. |

### Post webhooks

**Slug:** `KEIKI_MCP_POST_WEBHOOKS`

Create a named webhook endpoint. 409 if the name is taken. Returns the webhook.

POST /webhooks → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `body` | object | Yes |  |

### Post webhooks signing secret

**Slug:** `KEIKI_MCP_POST_WEBHOOKS_SIGNING_SECRET`

Rotate a destination webhook credential; returns { signingSecret }. Owners/admins only.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

POST /webhooks/:id/signing-secret → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /webhooks/:id/signing-secret. |

### Post webhooks test

**Slug:** `KEIKI_MCP_POST_WEBHOOKS_TEST`

Queue a synthetic webhook delivery; returns { eventId } with status 202. Owners/admins only.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

POST /webhooks/:id/test → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /webhooks/:id/test. |

### Put agent groups by id

**Slug:** `KEIKI_MCP_PUT_AGENT_GROUPS_BY_ID`

Update an agent group: patches only the name and description sent, and when members is sent replaces the whole member list with it (read the group first to keep existing members). Owners and admins only.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

PUT /agent-groups/:id → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /agent-groups/:id. |
| `body` | object | Yes |  |

### Put agent groups note

**Slug:** `KEIKI_MCP_PUT_AGENT_GROUPS_NOTE`

Replace the whole group note with a new body and return the new revision; restoring a past version is a PUT of that version’s body. Read the note first to keep what still holds. Owners and admins only.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

PUT /agent-groups/:id/note → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /agent-groups/:id/note. |
| `body` | object | Yes |  |

### Put agents harness connection

**Slug:** `KEIKI_MCP_PUT_AGENTS_HARNESS_CONNECTION`

Configure an external harness with { mode: "inbox"|"push", dispatchUrl? }; returns { ok }.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

PUT /agents/:id/harness/connection → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /agents/:id/harness/connection. |
| `body` | object | Yes |  |

### Put agents live

**Slug:** `KEIKI_MCP_PUT_AGENTS_LIVE`

Pause an agent or put it back live. A paused agent keeps its channels and settings and replies to no one until it is live again. Returns { live }.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

PUT /agents/:id/live → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /agents/:id/live. |
| `body` | object | Yes |  |

### Put agents mcp presets

**Slug:** `KEIKI_MCP_PUT_AGENTS_MCP_PRESETS`

Replace the agent’s whole MCP preset list (at most 10): presets left out are disconnected and removed, and editing a preset’s name, endpoint, kind, auth mode or headers reconnects it — read the agent’s current presets first and send them back with their ids. Needs the Sandbox and MCP capabilities. Returns the reconciled presets.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

PUT /agents/:id/mcp-presets → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /agents/:id/mcp-presets. |
| `body` | object | Yes |  |

### Put agents mcp presets tool permissions

**Slug:** `KEIKI_MCP_PUT_AGENTS_MCP_PRESETS_TOOL_PERMISSIONS`

Replace the allow/ask/deny choices for one MCP’s tools and push them to the daemon. Both fields are required and replace what is stored, so read the tools first and carry over the stored choices.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

PUT /agents/:id/mcp-presets/:presetId/tool-permissions → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /agents/:id/mcp-presets/:presetId/tool-permissions. |
| `body` | object | Yes |  |
| `presetId` | string | Yes | The :presetId in /agents/:id/mcp-presets/:presetId/tool-permissions. |

### Put agents note

**Slug:** `KEIKI_MCP_PUT_AGENTS_NOTE`

Replace the whole working note body (read it first to keep what matters) and return the new revision. Owners and admins only.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

PUT /agents/:id/note → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /agents/:id/note. |
| `body` | object | Yes |  |

### Put agents public profile

**Slug:** `KEIKI_MCP_PUT_AGENTS_PUBLIC_PROFILE`

Publish or unpublish the agent’s public profile page (which shows its name and phone line) and set its tagline. Owners and admins only. Replaces both: an omitted tagline is cleared, so read the profile first to keep it.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

PUT /agents/:id/public-profile → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /agents/:id/public-profile. |
| `body` | object | Yes |  |

### Put agents tools by tool id

**Slug:** `KEIKI_MCP_PUT_AGENTS_TOOLS_BY_TOOL_ID`

Update an authored tool. Patches only the fields sent; any save disables the tool again until it is re-enabled. Returns the saved tool.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

PUT /agents/:id/tools/:toolId → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /agents/:id/tools/:toolId. |
| `body` | object | Yes |  |
| `toolId` | string | Yes | The :toolId in /agents/:id/tools/:toolId. |

### Put agents user connections

**Slug:** `KEIKI_MCP_PUT_AGENTS_USER_CONNECTIONS`

Replace the agent’s personal provider definitions with the list sent (read GET first and keep the providers you are not changing) and return the saved list. A non-empty list needs the MCP and sandbox features on; SDK-managed agents are refused. This only offers providers: each user still authorizes through connect_account, and no shared credential is copied.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

PUT /agents/:id/user-connections → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /agents/:id/user-connections. |
| `body` | object | Yes |  |

### Put agents wallet

**Slug:** `KEIKI_MCP_PUT_AGENTS_WALLET`

Update the agent’s wallet, creating it if needed: spending limits, approval threshold, merchant allowlist, user-card policy, payment method, payment provider (only while nothing is connected) or pause/resume. Owners and admins only. Patches only the fields sent. Returns the saved wallet.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

PUT /agents/:id/wallet → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /agents/:id/wallet. |
| `body` | object | Yes |  |

### Put billing auto top up

**Slug:** `KEIKI_MCP_PUT_BILLING_AUTO_TOP_UP`

Turn auto top-up on or off; owners and admins only. While enabled, credits are bought with the saved payment method whenever the balance falls below threshold. threshold and quantity are required even when disabling.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

PUT /billing/auto-top-up → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `body` | object | Yes |  |

### Put conversations contact card

**Slug:** `KEIKI_MCP_PUT_CONVERSATIONS_CONTACT_CARD`

Set the name, organization, title and optional photo for this conversation’s contact card. The conversation must belong to this organization; provide agentId or apiKey to disambiguate shared identities.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

PUT /conversations/:phone/contact-card → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `body` | object | Yes |  |
| `phone` | string | Yes | The :phone in /conversations/:phone/contact-card. |
| `query` | object | No |  |

### Put evals cases by id

**Slug:** `KEIKI_MCP_PUT_EVALS_CASES_BY_ID`

Replace an eval case’s editable fields and adopt it as user-authored so regeneration preserves it; read the current case first, since omitted history, world, channel, stubs, features and ordinary checks reset to defaults. Omitted seed and checks.effects/executes are preserved; returns the saved case, with free-form JSON code-tool inputs.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

PUT /evals/cases/:id → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /evals/cases/:id. |
| `body` | object | Yes |  |

### Put identities slack events webhook

**Slug:** `KEIKI_MCP_PUT_IDENTITIES_SLACK_EVENTS_WEBHOOK`

Send a customer-workspace Slack app’s slack.installed, slack.uninstalled and slack.unbound_message events to one of the org’s saved webhooks (GET /webhooks lists them). Owners and admins only.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

PUT /identities/:id/slack/events-webhook → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /identities/:id/slack/events-webhook. |
| `body` | object | Yes |  |

### Put identities slack operators

**Slug:** `KEIKI_MCP_PUT_IDENTITIES_SLACK_OPERATORS`

Replace a Slack identity’s operator allowlist wholesale. Owners and admins only. This overwrites the whole list — read it first with GET /identities/:id/slack/operators, and prefer POST / DELETE to change one person without risking a concurrent edit.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

PUT /identities/:id/slack/operators → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /identities/:id/slack/operators. |
| `body` | object | Yes |  |

### Put identities slack teams by team id

**Slug:** `KEIKI_MCP_PUT_IDENTITIES_SLACK_TEAMS_BY_TEAM_ID`

Route one customer Slack workspace to an agent, replacing any previous binding. Owners and admins only. Returns the workspace list.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

PUT /identities/:id/slack/teams/:teamId → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /identities/:id/slack/teams/:teamId. |
| `body` | object | Yes |  |
| `teamId` | string | Yes | The :teamId in /identities/:id/slack/teams/:teamId. |

### Put org mcp integrations credentials

**Slug:** `KEIKI_MCP_PUT_ORG_MCP_INTEGRATIONS_CREDENTIALS`

Replace the authentication headers of a header-authenticated org MCP integration; every granted agent is reconnected with the new values in the background. Owners and admins only. Returns the updated integration.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

PUT /org-mcp-integrations/:id/credentials → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /org-mcp-integrations/:id/credentials. |
| `body` | object | Yes |  |

### Put org mcp integrations grants

**Slug:** `KEIKI_MCP_PUT_ORG_MCP_INTEGRATIONS_GRANTS`

Replace the full set of groups and agents an org MCP integration is granted to — anything not listed loses access, so read the current grants first. The integration’s source agent always stays granted. Owners and admins only. Granted agents are reconciled in the background; returns the updated integration.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

PUT /org-mcp-integrations/:id/grants → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /org-mcp-integrations/:id/grants. |
| `body` | object | Yes |  |

### Put orgs current build recommendations

**Slug:** `KEIKI_MCP_PUT_ORGS_CURRENT_BUILD_RECOMMENDATIONS`

Replace the Home ideas the active organization wrote itself; they take precedence over the website-based ones. Send all of them (at most three) every time; an empty list clears them. Owners and admins only. Returns the ideas Home now shows.

PUT /orgs/current/build-recommendations → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `body` | object | Yes |  |

### Put sandbox scripts by id

**Slug:** `KEIKI_MCP_PUT_SANDBOX_SCRIPTS_BY_ID`

Edit a sandbox script in place, patching only the fields sent; id, attachments and version history survive. Changing a build script’s body makes already provisioned sandboxes run it again. Returns the updated script.

PUT /sandbox-scripts/:id → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /sandbox-scripts/:id. |
| `body` | object | Yes |  |

### Put secrets by name

**Slug:** `KEIKI_MCP_PUT_SECRETS_BY_NAME`

Store an encrypted secret with { value }; returns { ok, name }, never its value. Configurers only.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

PUT /secrets/:name → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `body` | object | Yes |  |
| `name` | string | Yes | The :name in /secrets/:name. |

### Put skills by id

**Slug:** `KEIKI_MCP_PUT_SKILLS_BY_ID`

Edit a skill in place, patching only the fields sent; its id, slug, agent attachments and version history survive. A content that is a full SKILL.md sets the name and description from its frontmatter, and an explicit name or description wins over it. Returns the updated skill.

PUT /skills/:id → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /skills/:id. |
| `body` | object | Yes |  |

### Put trace exporters by id

**Slug:** `KEIKI_MCP_PUT_TRACE_EXPORTERS_BY_ID`

Update a destination — replaces name, format, endpoint, enabled and agentIds, so read it first and send them all; headers are kept when omitted. Owners, admins and members only. Returns the updated exporter.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

PUT /trace-exporters/:id → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /trace-exporters/:id. |
| `body` | object | Yes |  |

### Put webhooks by id

**Slug:** `KEIKI_MCP_PUT_WEBHOOKS_BY_ID`

Update a webhook endpoint — replaces both name and url, so send both. Returns the webhook.

Destructive — deleting, spending money, or changing who has access. Show the user what it will do and get their confirmation first.

PUT /webhooks/:id → { status, ok, data, error }

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The :id in /webhooks/:id. |
| `body` | object | Yes |  |

### Switch organization

**Slug:** `KEIKI_MCP_SWITCH_ORGANIZATION`

List the organizations this account belongs to, or switch this connection to one of them. Every later call then acts in that organization, with the role the user has there. Call it with no organization to see the choices first.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `organization` | string | No | The organization to switch to, by name or id. Omit it to list the organizations this account belongs to. |

### Talk to agent

**Slug:** `KEIKI_MCP_TALK_TO_AGENT`

Send one message to one of this organization's agents as a real user, and read what it replies. The turn runs on the agent's own configuration and tools; nothing is delivered to a real line, but every other tool it calls (MCP integrations, sandbox, browser, loops, payments) runs for real and can change or delete data outside this conversation, and fresh: true erases this client’s earlier thread with the agent. Use it to find out what an agent actually answers, to reproduce something a user reported, or to check an agent after changing it. Call it again to continue the conversation. A turn that uses tools takes a minute or more and reports progress while it runs; if it is still going when your client would give up, it answers with a jobId instead of a reply — that is not a failure, read the rest with check_job. Files the agent sends come back in `files` with download URLs valid for up to 15 minutes, never past their retention expiry; `check_job` on a finished job re-issues them while they are retained.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `agent` | string | Yes | The agent to talk to, by name or id. It must be an agent in this organization. |
| `fresh` | boolean | No | Clear the thread before sending, so the agent starts from nothing. Defaults to false: successive calls continue the same conversation. |
| `message` | string | Yes | What to send the agent, worded as a real user would word it. |
