APIFleet

API endpoint and MCP tool reference

Use the same workspace key for REST and MCP. Each action shows its inputs, effects and examples. Connect an MCP client or configure authentication.

Assistants

List assistants

GET /assistants · MCP tool: list_assistants.

List assistants in the authenticated workspace.

Effects: read-only; repeat has the same intended effect.

No parameters.

Response: HTTP 200 with a JSON array. Response fields match the native REST operation; errors retain their native shape.

REST example:

curl "https://apifleet.dev/assistants" \
  -H "Authorization: Bearer $APIFLEET_API_KEY"

MCP request body (POST to https://apifleet.dev/mcp with the Bearer and JSON headers above):

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "list_assistants",
    "arguments": {}
  }
}


Get assistant

GET /assistants/{id} · MCP tool: get_assistant.

Get one assistant belonging to this workspace.

Effects: read-only; repeat has the same intended effect.

  • id (path, string, required): Resource identifier returned by a previous request.

Response: HTTP 200 with a JSON object. Response fields match the native REST operation; errors retain their native shape.

REST example:

curl "https://apifleet.dev/assistants/RESOURCE_ID" \
  -H "Authorization: Bearer $APIFLEET_API_KEY"

MCP request body (POST to https://apifleet.dev/mcp with the Bearer and JSON headers above):

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get_assistant",
    "arguments": {
      "id": "RESOURCE_ID"
    }
  }
}


Create assistant

POST /assistants · MCP tool: create_assistant.

Create a assistant. Saving configuration does not place a call. The REST response includes revision, configuration and attached resource identifiers.

Effects: changes workspace state; do not automatically repeat; may reach an external service.

  • JSON request body: Resource fields. Saving configuration does not place a call. The REST response includes revision, configuration and attached resource identifiers. Additional settings are documented in https://apifleet.dev/docs In MCP, put this object in data.
  • name (body, string): Display name. Fields omitted on PATCH retain their current values; creation requirements are validated by the resource handler.
  • instructions (body, string): Business instructions for the assistant. Fields omitted on PATCH retain their current values; creation requirements are validated by the resource handler.
  • first_message (body, string): Opening message. Fields omitted on PATCH retain their current values; creation requirements are validated by the resource handler.
  • model (body, string): Supported model identifier. Fields omitted on PATCH retain their current values; creation requirements are validated by the resource handler.
  • voice (body, string): Voice identifier. Fields omitted on PATCH retain their current values; creation requirements are validated by the resource handler.
  • pipeline_mode (body, string): realtime | cascading Fields omitted on PATCH retain their current values; creation requirements are validated by the resource handler.

Response: HTTP 201 with a JSON object. Response fields match the native REST operation; errors retain their native shape.

REST example:

curl -X POST "https://apifleet.dev/assistants" \
  -H "Authorization: Bearer $APIFLEET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Example receptionist","instructions":"Answer questions about opening hours. Do not invent bookings.","first_message":"Hello, how can I help?"}'

MCP request body (POST to https://apifleet.dev/mcp with the Bearer and JSON headers above):

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "create_assistant",
    "arguments": {
      "data": {
        "name": "Example receptionist",
        "instructions": "Answer questions about opening hours. Do not invent bookings.",
        "first_message": "Hello, how can I help?"
      }
    }
  }
}


Update assistant

PATCH /assistants/{id} · MCP tool: update_assistant.

Update selected assistant fields. Omitted fields retain their values.

Effects: changes workspace state; do not automatically repeat; may reach an external service.

  • id (path, string, required): Resource identifier returned by a previous request.
  • JSON request body: Resource fields. Saving configuration does not place a call. The REST response includes revision, configuration and attached resource identifiers. Additional settings are documented in https://apifleet.dev/docs In MCP, put this object in data.
  • name (body, string): Display name. Fields omitted on PATCH retain their current values; creation requirements are validated by the resource handler.
  • instructions (body, string): Business instructions for the assistant. Fields omitted on PATCH retain their current values; creation requirements are validated by the resource handler.
  • first_message (body, string): Opening message. Fields omitted on PATCH retain their current values; creation requirements are validated by the resource handler.
  • model (body, string): Supported model identifier. Fields omitted on PATCH retain their current values; creation requirements are validated by the resource handler.
  • voice (body, string): Voice identifier. Fields omitted on PATCH retain their current values; creation requirements are validated by the resource handler.
  • pipeline_mode (body, string): realtime | cascading Fields omitted on PATCH retain their current values; creation requirements are validated by the resource handler.
  • If-Match (REST header) / if_revision (MCP integer): optional current assistant revision for optimistic concurrency. A stale revision returns 409.

Response: HTTP 200 with a JSON object. Response fields match the native REST operation; errors retain their native shape.

REST example:

curl -X PATCH "https://apifleet.dev/assistants/RESOURCE_ID" \
  -H "Authorization: Bearer $APIFLEET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Updated example"}'

MCP request body (POST to https://apifleet.dev/mcp with the Bearer and JSON headers above):

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "update_assistant",
    "arguments": {
      "id": "RESOURCE_ID",
      "data": {
        "name": "Updated example"
      }
    }
  }
}


Delete assistant

DELETE /assistants/{id} · MCP tool: delete_assistant.

Delete this assistant. Review the identifier before deleting; the change cannot be undone.

Effects: changes workspace state; repeat has the same intended effect; may reach an external service.

  • id (path, string, required): Resource identifier returned by a previous request.
  • If-Match (REST header) / if_revision (MCP integer): optional current assistant revision for optimistic concurrency. A stale revision returns 409.

Response: HTTP 204 with an empty body on success.

REST example:

curl -X DELETE "https://apifleet.dev/assistants/RESOURCE_ID" \
  -H "Authorization: Bearer $APIFLEET_API_KEY"

MCP request body (POST to https://apifleet.dev/mcp with the Bearer and JSON headers above):

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "delete_assistant",
    "arguments": {
      "id": "RESOURCE_ID"
    }
  }
}


Set assistant tools

PUT /assistants/{id}/tools · MCP tool: set_assistant_tools.

Replace all attached HTTP tools with existing tools owned by this workspace. Empty tool_ids detaches every tool.

Effects: changes workspace state; repeat has the same intended effect; may reach an external service.

  • id (path, string, required): Resource identifier returned by a previous request.
  • JSON request body: Attachment set. In MCP, put this object in data.
  • tool_ids (body, array): Complete replacement list; an empty list removes every attachment. Fields omitted on PATCH retain their current values; creation requirements are validated by the resource handler.

Response: HTTP 200 with a JSON object. Response fields match the native REST operation; errors retain their native shape.

REST example:

curl -X PUT "https://apifleet.dev/assistants/ASSISTANT_ID/tools" \
  -H "Authorization: Bearer $APIFLEET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"tool_ids":["TOOL_ID"]}'

MCP request body (POST to https://apifleet.dev/mcp with the Bearer and JSON headers above):

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "set_assistant_tools",
    "arguments": {
      "id": "ASSISTANT_ID",
      "data": {
        "tool_ids": [
          "TOOL_ID"
        ]
      }
    }
  }
}


Set assistant knowledge

PUT /assistants/{id}/knowledge · MCP tool: set_assistant_knowledge.

Replace all attached knowledge documents. Each document must belong to this workspace.

Effects: changes workspace state; repeat has the same intended effect; may reach an external service.

  • id (path, string, required): Resource identifier returned by a previous request.
  • JSON request body: Attachment set. In MCP, put this object in data.
  • knowledge_ids (body, array): Complete replacement list; an empty list removes every attachment. Fields omitted on PATCH retain their current values; creation requirements are validated by the resource handler.

Response: HTTP 200 with a JSON object. Response fields match the native REST operation; errors retain their native shape.

REST example:

curl -X PUT "https://apifleet.dev/assistants/ASSISTANT_ID/knowledge" \
  -H "Authorization: Bearer $APIFLEET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"knowledge_ids":["DOCUMENT_ID"]}'

MCP request body (POST to https://apifleet.dev/mcp with the Bearer and JSON headers above):

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "set_assistant_knowledge",
    "arguments": {
      "id": "ASSISTANT_ID",
      "data": {
        "knowledge_ids": [
          "DOCUMENT_ID"
        ]
      }
    }
  }
}


Create browser test token

POST /assistants/{id}/test-token · MCP tool: create_browser_test_token.

Issue a short-lived browser voice-test URL. Opening its WebSocket can incur usage. Never publish the returned token.

Effects: changes workspace state; do not automatically repeat; may reach an external service.

  • id (path, string, required): Resource identifier returned by a previous request.
  • JSON request body: Test session options. In MCP, put this object in data.
  • ttl_seconds (body, integer): Token lifetime, clamped to 30–3600 seconds. Fields omitted on PATCH retain their current values; creation requirements are validated by the resource handler.
  • max_duration_seconds (body, integer): Call duration limit, clamped to 30–3600 seconds. Fields omitted on PATCH retain their current values; creation requirements are validated by the resource handler.

Response: HTTP 200 with a JSON object. Response fields match the native REST operation; errors retain their native shape.

REST example:

curl -X POST "https://apifleet.dev/assistants/ASSISTANT_ID/test-token" \
  -H "Authorization: Bearer $APIFLEET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"ttl_seconds":300,"max_duration_seconds":60}'

MCP request body (POST to https://apifleet.dev/mcp with the Bearer and JSON headers above):

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "create_browser_test_token",
    "arguments": {
      "id": "ASSISTANT_ID",
      "data": {
        "ttl_seconds": 300,
        "max_duration_seconds": 60
      }
    }
  }
}


Phone numbers

List numbers

GET /numbers · MCP tool: list_numbers.

List number bindings. This does not buy phone numbers from a carrier.

Effects: read-only; repeat has the same intended effect.

No parameters.

Response: HTTP 200 with a JSON array. Response fields match the native REST operation; errors retain their native shape.

REST example:

curl "https://apifleet.dev/numbers" \
  -H "Authorization: Bearer $APIFLEET_API_KEY"

MCP request body (POST to https://apifleet.dev/mcp with the Bearer and JSON headers above):

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "list_numbers",
    "arguments": {}
  }
}


Bind number

PUT /numbers/{number} · MCP tool: bind_number.

Bind an existing carrier number to a workspace assistant. This changes incoming call routing; configure the carrier webhook separately.

Effects: changes workspace state; do not automatically repeat.

  • number (path, string, required): International E.164 number, including the leading +.
  • JSON request body: Number binding. In MCP, put this object in data.
  • assistant_id (body, string): Resource identifier returned by a previous request. Fields omitted on PATCH retain their current values; creation requirements are validated by the resource handler.
  • provider (body, string): telnyx | twilio | voximplant | voipcloud Fields omitted on PATCH retain their current values; creation requirements are validated by the resource handler.
  • region (body, string): Carrier region, when required. Fields omitted on PATCH retain their current values; creation requirements are validated by the resource handler.

Response: HTTP 200 with a JSON object. Response fields match the native REST operation; errors retain their native shape.

REST example:

curl -X PUT "https://apifleet.dev/numbers/%2B13125550100" \
  -H "Authorization: Bearer $APIFLEET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"assistant_id":"ASSISTANT_ID","provider":"telnyx"}'

MCP request body (POST to https://apifleet.dev/mcp with the Bearer and JSON headers above):

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "bind_number",
    "arguments": {
      "number": "+13125550100",
      "data": {
        "assistant_id": "ASSISTANT_ID",
        "provider": "telnyx"
      }
    }
  }
}


Unbind number

DELETE /numbers/{number} · MCP tool: unbind_number.

Remove the routing binding. This does not release or cancel the carrier number.

Effects: changes workspace state; repeat has the same intended effect.

  • number (path, string, required): International E.164 number, including the leading +.

Response: HTTP 204 with an empty body on success.

REST example:

curl -X DELETE "https://apifleet.dev/numbers/%2B13125550100" \
  -H "Authorization: Bearer $APIFLEET_API_KEY"

MCP request body (POST to https://apifleet.dev/mcp with the Bearer and JSON headers above):

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "unbind_number",
    "arguments": {
      "number": "+13125550100"
    }
  }
}


Calls

List calls

GET /calls · MCP tool: list_calls.

Read call logs, summary statistics and pagination. Each row may contain transcript, analysis, costs and recording links; recordings require separate authentication.

Effects: read-only; repeat has the same intended effect.

  • page (query, integer, optional): Page number; default 1.
  • limit (query, integer, optional): Rows per page; default 200, maximum 1000.
  • search (query, string, optional): Text or call identifier search.
  • assistant_id (query, string, optional): Resource identifier returned by a previous request.
  • source (query, string, optional): Call source filter.
  • model (query, string, optional): Model filter.
  • voice (query, string, optional): Voice filter.
  • outcome (query, string, optional): Outcome filter.
  • sentiment (query, string, optional): Sentiment filter.
  • date_from (query, string, optional): Start date filter.
  • date_to (query, string, optional): End date filter.
  • sort (query, string, optional): Supported sort column; default started_at.
  • order (query, string, optional): Filter. Allowed: asc, desc.

Response: HTTP 200 with a JSON object. An object containing calls[], stats and pagination, not a bare array.

REST example:

curl "https://apifleet.dev/calls?page=1&limit=10" \
  -H "Authorization: Bearer $APIFLEET_API_KEY"

MCP request body (POST to https://apifleet.dev/mcp with the Bearer and JSON headers above):

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "list_calls",
    "arguments": {
      "page": 1,
      "limit": 10
    }
  }
}


Create outbound call

POST /calls/outbound · MCP tool: create_outbound_call.

Place a real telephone call. Ask the user to approve recipient, caller number and expected usage first. Billing/provider/carrier checks are the same as REST. No automatic retry or universal idempotency guarantee.

Effects: changes workspace state; do not automatically repeat; can incur usage; may reach an external service.

  • JSON request body: Call request. In MCP, put this object in data.
  • assistant_id (body, string): Resource identifier returned by a previous request. Fields omitted on PATCH retain their current values; creation requirements are validated by the resource handler.
  • to (body, string): International E.164 number, including the leading +. Fields omitted on PATCH retain their current values; creation requirements are validated by the resource handler.
  • from (body, string): International E.164 number, including the leading +. Fields omitted on PATCH retain their current values; creation requirements are validated by the resource handler.
  • user_number (body, string): International E.164 number, including the leading +. Fields omitted on PATCH retain their current values; creation requirements are validated by the resource handler.
  • confirm (MCP boolean, required): must be true after the user approves this paid action. Not part of the REST body.

Response: HTTP 201 with a JSON object. 201 means the carrier accepted initiation; it does not mean the conversation completed. Inspect call logs afterward.

REST example:

curl -X POST "https://apifleet.dev/calls/outbound" \
  -H "Authorization: Bearer $APIFLEET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"assistant_id":"ASSISTANT_ID","to":"+13125550101","from":"+13125550100"}'

MCP request body (POST to https://apifleet.dev/mcp with the Bearer and JSON headers above):

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "create_outbound_call",
    "arguments": {
      "data": {
        "assistant_id": "ASSISTANT_ID",
        "to": "+13125550101",
        "from": "+13125550100"
      },
      "confirm": true
    }
  }
}


Get recording

GET /calls/{id}/recording · MCP: unavailable for this workflow; use REST or the dashboard.

Download authenticated recording bytes, supporting Range requests. Keep customer recordings private.

Effects: read-only; repeat has the same intended effect.

  • id (path, string, required): Resource identifier returned by a previous request.

Response: Binary audio response; this is not a JSON document.

REST example:

curl "https://apifleet.dev/calls/CALL_ID/recording" \
  -H "Authorization: Bearer $APIFLEET_API_KEY" \
  --output recording.wav


Get waveform

GET /calls/{id}/waveform · MCP tool: get_waveform.

Read recording waveform metadata and available audio channels.

Effects: read-only; repeat has the same intended effect.

  • id (path, string, required): Resource identifier returned by a previous request.

Response: HTTP 200 with a JSON object. Response fields match the native REST operation; errors retain their native shape.

REST example:

curl "https://apifleet.dev/calls/CALL_ID/waveform" \
  -H "Authorization: Bearer $APIFLEET_API_KEY"

MCP request body (POST to https://apifleet.dev/mcp with the Bearer and JSON headers above):

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get_waveform",
    "arguments": {
      "id": "CALL_ID"
    }
  }
}


Delete recording

DELETE /calls/{id}/recording · MCP tool: delete_recording.

Permanently remove a call recording. The call log remains. Confirm the identifier before deleting.

Effects: changes workspace state; repeat has the same intended effect.

  • id (path, string, required): Resource identifier returned by a previous request.

Response: HTTP 204 with an empty body on success.

REST example:

curl -X DELETE "https://apifleet.dev/calls/CALL_ID/recording" \
  -H "Authorization: Bearer $APIFLEET_API_KEY"

MCP request body (POST to https://apifleet.dev/mcp with the Bearer and JSON headers above):

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "delete_recording",
    "arguments": {
      "id": "CALL_ID"
    }
  }
}


HTTP tools

List tools

GET /tools · MCP tool: list_tools.

List http tools in the authenticated workspace.

Effects: read-only; repeat has the same intended effect.

No parameters.

Response: HTTP 200 with a JSON array. Response fields match the native REST operation; errors retain their native shape.

REST example:

curl "https://apifleet.dev/tools" \
  -H "Authorization: Bearer $APIFLEET_API_KEY"

MCP request body (POST to https://apifleet.dev/mcp with the Bearer and JSON headers above):

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "list_tools",
    "arguments": {}
  }
}


Get tool

GET /tools/{id} · MCP tool: get_tool.

Get one tool belonging to this workspace.

Effects: read-only; repeat has the same intended effect.

  • id (path, string, required): Resource identifier returned by a previous request.

Response: HTTP 200 with a JSON object. Response fields match the native REST operation; errors retain their native shape.

REST example:

curl "https://apifleet.dev/tools/RESOURCE_ID" \
  -H "Authorization: Bearer $APIFLEET_API_KEY"

MCP request body (POST to https://apifleet.dev/mcp with the Bearer and JSON headers above):

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get_tool",
    "arguments": {
      "id": "RESOURCE_ID"
    }
  }
}


Create tool

POST /tools · MCP tool: create_tool.

Create a tool. Creating a tool returns its signing secret once. Configuring a tool does not invoke its URL; attached tools can call it during conversations.

Effects: changes workspace state; do not automatically repeat.

  • JSON request body: Resource fields. Creating a tool returns its signing secret once. Configuring a tool does not invoke its URL; attached tools can call it during conversations. Additional settings are documented in https://apifleet.dev/docs In MCP, put this object in data.
  • name (body, string): Function name: letters, digits and underscore; cannot start with a digit. Fields omitted on PATCH retain their current values; creation requirements are validated by the resource handler.
  • url (body, string): Public HTTPS callback URL; private network targets are rejected. Fields omitted on PATCH retain their current values; creation requirements are validated by the resource handler.
  • method (body, string): GET | POST | PUT | PATCH | DELETE Fields omitted on PATCH retain their current values; creation requirements are validated by the resource handler.
  • description (body, string): Tool purpose. Fields omitted on PATCH retain their current values; creation requirements are validated by the resource handler.
  • parameters (body, object): JSON Schema for tool arguments. Fields omitted on PATCH retain their current values; creation requirements are validated by the resource handler.
  • timeout_ms (body, integer): Resource option. Fields omitted on PATCH retain their current values; creation requirements are validated by the resource handler.

Response: HTTP 201 with a JSON object. Response fields match the native REST operation; errors retain their native shape.

REST example:

curl -X POST "https://apifleet.dev/tools" \
  -H "Authorization: Bearer $APIFLEET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"lookup_hours","description":"Read opening hours.","url":"https://example.com/voice/hours","method":"GET","parameters":{"type":"object","properties":{}}}'

MCP request body (POST to https://apifleet.dev/mcp with the Bearer and JSON headers above):

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "create_tool",
    "arguments": {
      "data": {
        "name": "lookup_hours",
        "description": "Read opening hours.",
        "url": "https://example.com/voice/hours",
        "method": "GET",
        "parameters": {
          "type": "object",
          "properties": {}
        }
      }
    }
  }
}


Update tool

PATCH /tools/{id} · MCP tool: update_tool.

Update selected tool fields. Omitted fields retain their values.

Effects: changes workspace state; do not automatically repeat.

  • id (path, string, required): Resource identifier returned by a previous request.
  • JSON request body: Resource fields. Creating a tool returns its signing secret once. Configuring a tool does not invoke its URL; attached tools can call it during conversations. Additional settings are documented in https://apifleet.dev/docs In MCP, put this object in data.
  • name (body, string): Function name: letters, digits and underscore; cannot start with a digit. Fields omitted on PATCH retain their current values; creation requirements are validated by the resource handler.
  • url (body, string): Public HTTPS callback URL; private network targets are rejected. Fields omitted on PATCH retain their current values; creation requirements are validated by the resource handler.
  • method (body, string): GET | POST | PUT | PATCH | DELETE Fields omitted on PATCH retain their current values; creation requirements are validated by the resource handler.
  • description (body, string): Tool purpose. Fields omitted on PATCH retain their current values; creation requirements are validated by the resource handler.
  • parameters (body, object): JSON Schema for tool arguments. Fields omitted on PATCH retain their current values; creation requirements are validated by the resource handler.
  • timeout_ms (body, integer): Resource option. Fields omitted on PATCH retain their current values; creation requirements are validated by the resource handler.

Response: HTTP 200 with a JSON object. Response fields match the native REST operation; errors retain their native shape.

REST example:

curl -X PATCH "https://apifleet.dev/tools/RESOURCE_ID" \
  -H "Authorization: Bearer $APIFLEET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Updated example"}'

MCP request body (POST to https://apifleet.dev/mcp with the Bearer and JSON headers above):

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "update_tool",
    "arguments": {
      "id": "RESOURCE_ID",
      "data": {
        "name": "Updated example"
      }
    }
  }
}


Delete tool

DELETE /tools/{id} · MCP tool: delete_tool.

Delete this tool. Review the identifier before deleting; the change cannot be undone.

Effects: changes workspace state; repeat has the same intended effect.

  • id (path, string, required): Resource identifier returned by a previous request.

Response: HTTP 204 with an empty body on success.

REST example:

curl -X DELETE "https://apifleet.dev/tools/RESOURCE_ID" \
  -H "Authorization: Bearer $APIFLEET_API_KEY"

MCP request body (POST to https://apifleet.dev/mcp with the Bearer and JSON headers above):

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "delete_tool",
    "arguments": {
      "id": "RESOURCE_ID"
    }
  }
}


Knowledge

List knowledge documents

GET /knowledge · MCP tool: list_knowledge_documents.

List knowledge in the authenticated workspace.

Effects: read-only; repeat has the same intended effect.

No parameters.

Response: HTTP 200 with a JSON array. Response fields match the native REST operation; errors retain their native shape.

REST example:

curl "https://apifleet.dev/knowledge" \
  -H "Authorization: Bearer $APIFLEET_API_KEY"

MCP request body (POST to https://apifleet.dev/mcp with the Bearer and JSON headers above):

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "list_knowledge_documents",
    "arguments": {}
  }
}


Get knowledge document

GET /knowledge/{id} · MCP tool: get_knowledge_document.

Get one knowledge document belonging to this workspace.

Effects: read-only; repeat has the same intended effect.

  • id (path, string, required): Resource identifier returned by a previous request.

Response: HTTP 200 with a JSON object. Response fields match the native REST operation; errors retain their native shape.

REST example:

curl "https://apifleet.dev/knowledge/RESOURCE_ID" \
  -H "Authorization: Bearer $APIFLEET_API_KEY"

MCP request body (POST to https://apifleet.dev/mcp with the Bearer and JSON headers above):

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get_knowledge_document",
    "arguments": {
      "id": "RESOURCE_ID"
    }
  }
}


Create knowledge document

POST /knowledge · MCP tool: create_knowledge_document.

Create a knowledge document. Attach documents separately to use them in an assistant. Total injected knowledge has a 200 KiB limit.

Effects: changes workspace state; do not automatically repeat.

  • JSON request body: Resource fields. Attach documents separately to use them in an assistant. Total injected knowledge has a 200 KiB limit. Additional settings are documented in https://apifleet.dev/docs In MCP, put this object in data.
  • name (body, string): Unique document name in this workspace. Fields omitted on PATCH retain their current values; creation requirements are validated by the resource handler.
  • content (body, string): Plain text; maximum 50 KiB per document. Fields omitted on PATCH retain their current values; creation requirements are validated by the resource handler.
  • source (body, string): Source label; defaults to text. Fields omitted on PATCH retain their current values; creation requirements are validated by the resource handler.

Response: HTTP 201 with a JSON object. Response fields match the native REST operation; errors retain their native shape.

REST example:

curl -X POST "https://apifleet.dev/knowledge" \
  -H "Authorization: Bearer $APIFLEET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Opening hours","content":"Open Monday to Friday, 09:00–17:00.","source":"text"}'

MCP request body (POST to https://apifleet.dev/mcp with the Bearer and JSON headers above):

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "create_knowledge_document",
    "arguments": {
      "data": {
        "name": "Opening hours",
        "content": "Open Monday to Friday, 09:00–17:00.",
        "source": "text"
      }
    }
  }
}


Update knowledge document

PATCH /knowledge/{id} · MCP tool: update_knowledge_document.

Update selected knowledge document fields. Omitted fields retain their values.

Effects: changes workspace state; do not automatically repeat.

  • id (path, string, required): Resource identifier returned by a previous request.
  • JSON request body: Resource fields. Attach documents separately to use them in an assistant. Total injected knowledge has a 200 KiB limit. Additional settings are documented in https://apifleet.dev/docs In MCP, put this object in data.
  • name (body, string): Unique document name in this workspace. Fields omitted on PATCH retain their current values; creation requirements are validated by the resource handler.
  • content (body, string): Plain text; maximum 50 KiB per document. Fields omitted on PATCH retain their current values; creation requirements are validated by the resource handler.
  • source (body, string): Source label; defaults to text. Fields omitted on PATCH retain their current values; creation requirements are validated by the resource handler.

Response: HTTP 200 with a JSON object. Response fields match the native REST operation; errors retain their native shape.

REST example:

curl -X PATCH "https://apifleet.dev/knowledge/RESOURCE_ID" \
  -H "Authorization: Bearer $APIFLEET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Updated example"}'

MCP request body (POST to https://apifleet.dev/mcp with the Bearer and JSON headers above):

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "update_knowledge_document",
    "arguments": {
      "id": "RESOURCE_ID",
      "data": {
        "name": "Updated example"
      }
    }
  }
}


Delete knowledge document

DELETE /knowledge/{id} · MCP tool: delete_knowledge_document.

Delete this knowledge document. Review the identifier before deleting; the change cannot be undone.

Effects: changes workspace state; repeat has the same intended effect.

  • id (path, string, required): Resource identifier returned by a previous request.

Response: HTTP 204 with an empty body on success.

REST example:

curl -X DELETE "https://apifleet.dev/knowledge/RESOURCE_ID" \
  -H "Authorization: Bearer $APIFLEET_API_KEY"

MCP request body (POST to https://apifleet.dev/mcp with the Bearer and JSON headers above):

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "delete_knowledge_document",
    "arguments": {
      "id": "RESOURCE_ID"
    }
  }
}


Webhooks

List webhooks

GET /webhooks · MCP tool: list_webhooks.

List webhooks in the authenticated workspace.

Effects: read-only; repeat has the same intended effect.

No parameters.

Response: HTTP 200 with a JSON array. Response fields match the native REST operation; errors retain their native shape.

REST example:

curl "https://apifleet.dev/webhooks" \
  -H "Authorization: Bearer $APIFLEET_API_KEY"

MCP request body (POST to https://apifleet.dev/mcp with the Bearer and JSON headers above):

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "list_webhooks",
    "arguments": {}
  }
}


Create webhook

POST /webhooks · MCP tool: create_webhook.

Create a webhook. Creation returns a signing secret once; verify delivery signatures against the raw body. Events may be retried.

Effects: changes workspace state; do not automatically repeat.

  • JSON request body: Resource fields. Creation returns a signing secret once; verify delivery signatures against the raw body. Events may be retried. Additional settings are documented in https://apifleet.dev/docs In MCP, put this object in data.
  • url (body, string): Public HTTPS receiver. Fields omitted on PATCH retain their current values; creation requirements are validated by the resource handler.
  • events (body, array): Resource option. Fields omitted on PATCH retain their current values; creation requirements are validated by the resource handler.
  • enabled (body, boolean): Resource option. Fields omitted on PATCH retain their current values; creation requirements are validated by the resource handler.

Response: HTTP 201 with a JSON object. Response fields match the native REST operation; errors retain their native shape.

REST example:

curl -X POST "https://apifleet.dev/webhooks" \
  -H "Authorization: Bearer $APIFLEET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://example.com/hooks/apifleet","events":["call.ended"]}'

MCP request body (POST to https://apifleet.dev/mcp with the Bearer and JSON headers above):

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "create_webhook",
    "arguments": {
      "data": {
        "url": "https://example.com/hooks/apifleet",
        "events": [
          "call.ended"
        ]
      }
    }
  }
}


Update webhook

PATCH /webhooks/{id} · MCP tool: update_webhook.

Update selected webhook fields. Omitted fields retain their values.

Effects: changes workspace state; do not automatically repeat.

  • id (path, string, required): Resource identifier returned by a previous request.
  • JSON request body: Resource fields. Creation returns a signing secret once; verify delivery signatures against the raw body. Events may be retried. Additional settings are documented in https://apifleet.dev/docs In MCP, put this object in data.
  • url (body, string): Public HTTPS receiver. Fields omitted on PATCH retain their current values; creation requirements are validated by the resource handler.
  • events (body, array): Resource option. Fields omitted on PATCH retain their current values; creation requirements are validated by the resource handler.
  • enabled (body, boolean): Resource option. Fields omitted on PATCH retain their current values; creation requirements are validated by the resource handler.

Response: HTTP 200 with a JSON object. Response fields match the native REST operation; errors retain their native shape.

REST example:

curl -X PATCH "https://apifleet.dev/webhooks/WEBHOOK_ID" \
  -H "Authorization: Bearer $APIFLEET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"enabled":false}'

MCP request body (POST to https://apifleet.dev/mcp with the Bearer and JSON headers above):

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "update_webhook",
    "arguments": {
      "id": "WEBHOOK_ID",
      "data": {
        "enabled": false
      }
    }
  }
}


Delete webhook

DELETE /webhooks/{id} · MCP tool: delete_webhook.

Delete this webhook. Review the identifier before deleting; the change cannot be undone.

Effects: changes workspace state; repeat has the same intended effect.

  • id (path, string, required): Resource identifier returned by a previous request.

Response: HTTP 204 with an empty body on success.

REST example:

curl -X DELETE "https://apifleet.dev/webhooks/RESOURCE_ID" \
  -H "Authorization: Bearer $APIFLEET_API_KEY"

MCP request body (POST to https://apifleet.dev/mcp with the Bearer and JSON headers above):

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "delete_webhook",
    "arguments": {
      "id": "RESOURCE_ID"
    }
  }
}


Simulation personas

List simulation personas

GET /simulations/personas · MCP tool: list_simulation_personas.

List simulation personas in the authenticated workspace.

Effects: read-only; repeat has the same intended effect.

No parameters.

Response: HTTP 200 with a JSON array. Response fields match the native REST operation; errors retain their native shape.

REST example:

curl "https://apifleet.dev/simulations/personas" \
  -H "Authorization: Bearer $APIFLEET_API_KEY"

MCP request body (POST to https://apifleet.dev/mcp with the Bearer and JSON headers above):

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "list_simulation_personas",
    "arguments": {}
  }
}


Get simulation persona

GET /simulations/personas/{id} · MCP tool: get_simulation_persona.

Get one simulation persona belonging to this workspace.

Effects: read-only; repeat has the same intended effect.

  • id (path, string, required): Resource identifier returned by a previous request.

Response: HTTP 200 with a JSON object. Response fields match the native REST operation; errors retain their native shape.

REST example:

curl "https://apifleet.dev/simulations/personas/RESOURCE_ID" \
  -H "Authorization: Bearer $APIFLEET_API_KEY"

MCP request body (POST to https://apifleet.dev/mcp with the Bearer and JSON headers above):

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get_simulation_persona",
    "arguments": {
      "id": "RESOURCE_ID"
    }
  }
}


Create simulation persona

POST /simulations/personas · MCP tool: create_simulation_persona.

Create a simulation persona.

Effects: changes workspace state; do not automatically repeat.

  • JSON request body: Resource fields. Additional settings are documented in https://apifleet.dev/docs In MCP, put this object in data.
  • name (body, string): Persona name. Fields omitted on PATCH retain their current values; creation requirements are validated by the resource handler.
  • system_prompt (body, string): Instructions for the simulated caller. Fields omitted on PATCH retain their current values; creation requirements are validated by the resource handler.

Response: HTTP 201 with a JSON object. Response fields match the native REST operation; errors retain their native shape.

REST example:

curl -X POST "https://apifleet.dev/simulations/personas" \
  -H "Authorization: Bearer $APIFLEET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Opening-hours caller","system_prompt":"Ask when the business closes on Friday."}'

MCP request body (POST to https://apifleet.dev/mcp with the Bearer and JSON headers above):

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "create_simulation_persona",
    "arguments": {
      "data": {
        "name": "Opening-hours caller",
        "system_prompt": "Ask when the business closes on Friday."
      }
    }
  }
}


Update simulation persona

PATCH /simulations/personas/{id} · MCP tool: update_simulation_persona.

Update selected simulation persona fields. Omitted fields retain their values.

Effects: changes workspace state; do not automatically repeat.

  • id (path, string, required): Resource identifier returned by a previous request.
  • JSON request body: Resource fields. Additional settings are documented in https://apifleet.dev/docs In MCP, put this object in data.
  • name (body, string): Persona name. Fields omitted on PATCH retain their current values; creation requirements are validated by the resource handler.
  • system_prompt (body, string): Instructions for the simulated caller. Fields omitted on PATCH retain their current values; creation requirements are validated by the resource handler.

Response: HTTP 200 with a JSON object. Response fields match the native REST operation; errors retain their native shape.

REST example:

curl -X PATCH "https://apifleet.dev/simulations/personas/RESOURCE_ID" \
  -H "Authorization: Bearer $APIFLEET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Updated example"}'

MCP request body (POST to https://apifleet.dev/mcp with the Bearer and JSON headers above):

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "update_simulation_persona",
    "arguments": {
      "id": "RESOURCE_ID",
      "data": {
        "name": "Updated example"
      }
    }
  }
}


Delete simulation persona

DELETE /simulations/personas/{id} · MCP tool: delete_simulation_persona.

Delete this simulation persona. Review the identifier before deleting; the change cannot be undone.

Effects: changes workspace state; repeat has the same intended effect.

  • id (path, string, required): Resource identifier returned by a previous request.

Response: HTTP 204 with an empty body on success.

REST example:

curl -X DELETE "https://apifleet.dev/simulations/personas/RESOURCE_ID" \
  -H "Authorization: Bearer $APIFLEET_API_KEY"

MCP request body (POST to https://apifleet.dev/mcp with the Bearer and JSON headers above):

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "delete_simulation_persona",
    "arguments": {
      "id": "RESOURCE_ID"
    }
  }
}


Simulation scenarios

List simulation scenarios

GET /simulations/scenarios · MCP tool: list_simulation_scenarios.

List simulation scenarios in the authenticated workspace.

Effects: read-only; repeat has the same intended effect.

No parameters.

Response: HTTP 200 with a JSON array. Response fields match the native REST operation; errors retain their native shape.

REST example:

curl "https://apifleet.dev/simulations/scenarios" \
  -H "Authorization: Bearer $APIFLEET_API_KEY"

MCP request body (POST to https://apifleet.dev/mcp with the Bearer and JSON headers above):

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "list_simulation_scenarios",
    "arguments": {}
  }
}


Get simulation scenario

GET /simulations/scenarios/{id} · MCP tool: get_simulation_scenario.

Get one simulation scenario belonging to this workspace.

Effects: read-only; repeat has the same intended effect.

  • id (path, string, required): Resource identifier returned by a previous request.

Response: HTTP 200 with a JSON object. Response fields match the native REST operation; errors retain their native shape.

REST example:

curl "https://apifleet.dev/simulations/scenarios/RESOURCE_ID" \
  -H "Authorization: Bearer $APIFLEET_API_KEY"

MCP request body (POST to https://apifleet.dev/mcp with the Bearer and JSON headers above):

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get_simulation_scenario",
    "arguments": {
      "id": "RESOURCE_ID"
    }
  }
}


Create simulation scenario

POST /simulations/scenarios · MCP tool: create_simulation_scenario.

Create a simulation scenario.

Effects: changes workspace state; do not automatically repeat.

  • JSON request body: Resource fields. Additional settings are documented in https://apifleet.dev/docs In MCP, put this object in data.
  • name (body, string): Scenario name. Fields omitted on PATCH retain their current values; creation requirements are validated by the resource handler.
  • instructions (body, string): Scenario instructions. Fields omitted on PATCH retain their current values; creation requirements are validated by the resource handler.
  • evaluations (body, array): Resource option. Fields omitted on PATCH retain their current values; creation requirements are validated by the resource handler.

Response: HTTP 201 with a JSON object. Response fields match the native REST operation; errors retain their native shape.

REST example:

curl -X POST "https://apifleet.dev/simulations/scenarios" \
  -H "Authorization: Bearer $APIFLEET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Ask opening hours","instructions":"Find out when the business closes on Friday.","evaluations":[{"kind":"transcript","role":"assistant","includes":"17:00"}]}'

MCP request body (POST to https://apifleet.dev/mcp with the Bearer and JSON headers above):

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "create_simulation_scenario",
    "arguments": {
      "data": {
        "name": "Ask opening hours",
        "instructions": "Find out when the business closes on Friday.",
        "evaluations": [
          {
            "kind": "transcript",
            "role": "assistant",
            "includes": "17:00"
          }
        ]
      }
    }
  }
}


Update simulation scenario

PATCH /simulations/scenarios/{id} · MCP tool: update_simulation_scenario.

Update selected simulation scenario fields. Omitted fields retain their values.

Effects: changes workspace state; do not automatically repeat.

  • id (path, string, required): Resource identifier returned by a previous request.
  • JSON request body: Resource fields. Additional settings are documented in https://apifleet.dev/docs In MCP, put this object in data.
  • name (body, string): Scenario name. Fields omitted on PATCH retain their current values; creation requirements are validated by the resource handler.
  • instructions (body, string): Scenario instructions. Fields omitted on PATCH retain their current values; creation requirements are validated by the resource handler.
  • evaluations (body, array): Resource option. Fields omitted on PATCH retain their current values; creation requirements are validated by the resource handler.

Response: HTTP 200 with a JSON object. Response fields match the native REST operation; errors retain their native shape.

REST example:

curl -X PATCH "https://apifleet.dev/simulations/scenarios/RESOURCE_ID" \
  -H "Authorization: Bearer $APIFLEET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Updated example"}'

MCP request body (POST to https://apifleet.dev/mcp with the Bearer and JSON headers above):

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "update_simulation_scenario",
    "arguments": {
      "id": "RESOURCE_ID",
      "data": {
        "name": "Updated example"
      }
    }
  }
}


Delete simulation scenario

DELETE /simulations/scenarios/{id} · MCP tool: delete_simulation_scenario.

Delete this simulation scenario. Review the identifier before deleting; the change cannot be undone.

Effects: changes workspace state; repeat has the same intended effect.

  • id (path, string, required): Resource identifier returned by a previous request.

Response: HTTP 204 with an empty body on success.

REST example:

curl -X DELETE "https://apifleet.dev/simulations/scenarios/RESOURCE_ID" \
  -H "Authorization: Bearer $APIFLEET_API_KEY"

MCP request body (POST to https://apifleet.dev/mcp with the Bearer and JSON headers above):

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "delete_simulation_scenario",
    "arguments": {
      "id": "RESOURCE_ID"
    }
  }
}


Simulations

List simulations

GET /simulations · MCP tool: list_simulations.

List simulations in the authenticated workspace.

Effects: read-only; repeat has the same intended effect.

  • assistant_id (query, string, optional): Resource identifier returned by a previous request.

Response: HTTP 200 with a JSON array. Response fields match the native REST operation; errors retain their native shape.

REST example:

curl "https://apifleet.dev/simulations" \
  -H "Authorization: Bearer $APIFLEET_API_KEY"

MCP request body (POST to https://apifleet.dev/mcp with the Bearer and JSON headers above):

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "list_simulations",
    "arguments": {}
  }
}


Get simulation

GET /simulations/{id} · MCP tool: get_simulation.

Get one simulation belonging to this workspace.

Effects: read-only; repeat has the same intended effect.

  • id (path, string, required): Resource identifier returned by a previous request.

Response: HTTP 200 with a JSON object. Response fields match the native REST operation; errors retain their native shape.

REST example:

curl "https://apifleet.dev/simulations/RESOURCE_ID" \
  -H "Authorization: Bearer $APIFLEET_API_KEY"

MCP request body (POST to https://apifleet.dev/mcp with the Bearer and JSON headers above):

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get_simulation",
    "arguments": {
      "id": "RESOURCE_ID"
    }
  }
}


Create simulation

POST /simulations · MCP tool: create_simulation.

Create a simulation.

Effects: changes workspace state; do not automatically repeat.

  • JSON request body: Resource fields. Additional settings are documented in https://apifleet.dev/docs In MCP, put this object in data.
  • assistant_id (body, string): Resource identifier returned by a previous request. Fields omitted on PATCH retain their current values; creation requirements are validated by the resource handler.
  • persona_id (body, string): Resource identifier returned by a previous request. Fields omitted on PATCH retain their current values; creation requirements are validated by the resource handler.
  • scenario_id (body, string): Resource identifier returned by a previous request. Fields omitted on PATCH retain their current values; creation requirements are validated by the resource handler.
  • name (body, string): Optional simulation name. Fields omitted on PATCH retain their current values; creation requirements are validated by the resource handler.

Response: HTTP 201 with a JSON object. Response fields match the native REST operation; errors retain their native shape.

REST example:

curl -X POST "https://apifleet.dev/simulations" \
  -H "Authorization: Bearer $APIFLEET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"assistant_id":"ASSISTANT_ID","persona_id":"PERSONA_ID","scenario_id":"SCENARIO_ID"}'

MCP request body (POST to https://apifleet.dev/mcp with the Bearer and JSON headers above):

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "create_simulation",
    "arguments": {
      "data": {
        "assistant_id": "ASSISTANT_ID",
        "persona_id": "PERSONA_ID",
        "scenario_id": "SCENARIO_ID"
      }
    }
  }
}


Update simulation

PATCH /simulations/{id} · MCP tool: update_simulation.

Update selected simulation fields. Omitted fields retain their values.

Effects: changes workspace state; do not automatically repeat.

  • id (path, string, required): Resource identifier returned by a previous request.
  • JSON request body: Resource fields. Additional settings are documented in https://apifleet.dev/docs In MCP, put this object in data.
  • assistant_id (body, string): Resource identifier returned by a previous request. Fields omitted on PATCH retain their current values; creation requirements are validated by the resource handler.
  • persona_id (body, string): Resource identifier returned by a previous request. Fields omitted on PATCH retain their current values; creation requirements are validated by the resource handler.
  • scenario_id (body, string): Resource identifier returned by a previous request. Fields omitted on PATCH retain their current values; creation requirements are validated by the resource handler.
  • name (body, string): Optional simulation name. Fields omitted on PATCH retain their current values; creation requirements are validated by the resource handler.

Response: HTTP 200 with a JSON object. Response fields match the native REST operation; errors retain their native shape.

REST example:

curl -X PATCH "https://apifleet.dev/simulations/SIMULATION_ID" \
  -H "Authorization: Bearer $APIFLEET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Friday hours check"}'

MCP request body (POST to https://apifleet.dev/mcp with the Bearer and JSON headers above):

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "update_simulation",
    "arguments": {
      "id": "SIMULATION_ID",
      "data": {
        "name": "Friday hours check"
      }
    }
  }
}


Delete simulation

DELETE /simulations/{id} · MCP tool: delete_simulation.

Delete this simulation. Review the identifier before deleting; the change cannot be undone.

Effects: changes workspace state; repeat has the same intended effect.

  • id (path, string, required): Resource identifier returned by a previous request.

Response: HTTP 204 with an empty body on success.

REST example:

curl -X DELETE "https://apifleet.dev/simulations/RESOURCE_ID" \
  -H "Authorization: Bearer $APIFLEET_API_KEY"

MCP request body (POST to https://apifleet.dev/mcp with the Bearer and JSON headers above):

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "delete_simulation",
    "arguments": {
      "id": "RESOURCE_ID"
    }
  }
}


Simulation runs

List simulation runs

GET /simulations/runs · MCP tool: list_simulation_runs.

List simulation runs and pagination; inspect status before starting another run.

Effects: read-only; repeat has the same intended effect.

  • assistant_id (query, string, optional): Resource identifier returned by a previous request.
  • simulation_id (query, string, optional): Resource identifier returned by a previous request.
  • batch_id (query, string, optional): Resource identifier returned by a previous request.
  • status (query, string, optional): Filter. Allowed: queued, running, completed, error.
  • page (query, integer, optional): Page number.
  • limit (query, integer, optional): Rows per page.

Response: HTTP 200 with a JSON object. Response fields match the native REST operation; errors retain their native shape.

REST example:

curl "https://apifleet.dev/simulations/runs?page=1&limit=10" \
  -H "Authorization: Bearer $APIFLEET_API_KEY"

MCP request body (POST to https://apifleet.dev/mcp with the Bearer and JSON headers above):

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "list_simulation_runs",
    "arguments": {
      "page": 1,
      "limit": 10
    }
  }
}


Get simulation run

GET /simulations/runs/{id} · MCP tool: get_simulation_run.

Read a run, its evaluations and linked call when available.

Effects: read-only; repeat has the same intended effect.

  • id (path, string, required): Resource identifier returned by a previous request.

Response: HTTP 200 with a JSON object. Response fields match the native REST operation; errors retain their native shape.

REST example:

curl "https://apifleet.dev/simulations/runs/RUN_ID" \
  -H "Authorization: Bearer $APIFLEET_API_KEY"

MCP request body (POST to https://apifleet.dev/mcp with the Bearer and JSON headers above):

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get_simulation_run",
    "arguments": {
      "id": "RUN_ID"
    }
  }
}


Delete simulation run

DELETE /simulations/runs/{id} · MCP tool: delete_simulation_run.

Delete a completed simulation result. Running runs may reject deletion.

Effects: changes workspace state; repeat has the same intended effect.

  • id (path, string, required): Resource identifier returned by a previous request.

Response: HTTP 204 with an empty body on success.

REST example:

curl -X DELETE "https://apifleet.dev/simulations/runs/RUN_ID" \
  -H "Authorization: Bearer $APIFLEET_API_KEY"

MCP request body (POST to https://apifleet.dev/mcp with the Bearer and JSON headers above):

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "delete_simulation_run",
    "arguments": {
      "id": "RUN_ID"
    }
  }
}


Start simulation run

POST /simulations/{id}/runs · MCP tool: start_simulation_run.

Queue an asynchronous test. Models and speech can incur usage. Approve the run first and poll the returned identifier; do not enqueue again while it is running.

Effects: changes workspace state; do not automatically repeat; can incur usage; may reach an external service.

  • id (path, string, required): Resource identifier returned by a previous request.
  • JSON request body: Run options. In MCP, put this object in data.
  • mode (body, string): chat | voice Fields omitted on PATCH retain their current values; creation requirements are validated by the resource handler.
  • confirm (MCP boolean, required): must be true after the user approves this paid action. Not part of the REST body.

Response: HTTP 201 with a JSON object. Response fields match the native REST operation; errors retain their native shape.

REST example:

curl -X POST "https://apifleet.dev/simulations/SIMULATION_ID/runs" \
  -H "Authorization: Bearer $APIFLEET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"mode":"chat"}'

MCP request body (POST to https://apifleet.dev/mcp with the Bearer and JSON headers above):

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "start_simulation_run",
    "arguments": {
      "id": "SIMULATION_ID",
      "data": {
        "mode": "chat"
      },
      "confirm": true
    }
  }
}


Start simulation batch

POST /simulations/runs/batch · MCP tool: start_simulation_batch.

Queue every simulation for one assistant. This can incur multiple test runs; approve the batch first.

Effects: changes workspace state; do not automatically repeat; can incur usage; may reach an external service.

  • JSON request body: Batch options. In MCP, put this object in data.
  • assistant_id (body, string): Resource identifier returned by a previous request. Fields omitted on PATCH retain their current values; creation requirements are validated by the resource handler.
  • mode (body, string): chat | voice Fields omitted on PATCH retain their current values; creation requirements are validated by the resource handler.
  • confirm (MCP boolean, required): must be true after the user approves this paid action. Not part of the REST body.

Response: HTTP 201 with a JSON object. Response fields match the native REST operation; errors retain their native shape.

REST example:

curl -X POST "https://apifleet.dev/simulations/runs/batch" \
  -H "Authorization: Bearer $APIFLEET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"assistant_id":"ASSISTANT_ID","mode":"chat"}'

MCP request body (POST to https://apifleet.dev/mcp with the Bearer and JSON headers above):

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "start_simulation_batch",
    "arguments": {
      "data": {
        "assistant_id": "ASSISTANT_ID",
        "mode": "chat"
      },
      "confirm": true
    }
  }
}


Voice and speech

List tts rates

GET /tts/rates · MCP tool: list_tts_rates.

Read configured voice-cost reference rates. These are not an invoice or a complete call price.

Effects: read-only; repeat has the same intended effect.

No parameters.

Response: HTTP 200 with a JSON object. Response fields match the native REST operation; errors retain their native shape.

REST example:

curl "https://apifleet.dev/tts/rates" \
  -H "Authorization: Bearer $APIFLEET_API_KEY"

MCP request body (POST to https://apifleet.dev/mcp with the Bearer and JSON headers above):

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "list_tts_rates",
    "arguments": {}
  }
}


List tts voices

GET /tts/voices · MCP tool: list_tts_voices.

Read a provider voice catalog using configured server-side credentials. Catalog failure may return an empty list and error; it is not evidence the provider has no voices.

Effects: read-only; repeat has the same intended effect; may reach an external service.

  • provider (query, string, optional): Voice provider identifier.

Response: HTTP 200 with a JSON object. Response fields match the native REST operation; errors retain their native shape.

REST example:

curl "https://apifleet.dev/tts/voices?provider=piper" \
  -H "Authorization: Bearer $APIFLEET_API_KEY"

MCP request body (POST to https://apifleet.dev/mcp with the Bearer and JSON headers above):

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "list_tts_voices",
    "arguments": {
      "provider": "piper"
    }
  }
}


List voice presets

GET /voice-presets · MCP tool: list_voice_presets.

Read configured runnable voice presets. Provider catalog requests may reach a vendor.

Effects: read-only; repeat has the same intended effect; may reach an external service.

  • provider (query, string, optional): Optional catalog provider.
  • realtime_provider (query, string, optional): Optional realtime provider.
  • model (query, string, optional): Optional realtime model.

Response: HTTP 200 with a JSON object. Response fields match the native REST operation; errors retain their native shape.

REST example:

curl "https://apifleet.dev/voice-presets" \
  -H "Authorization: Bearer $APIFLEET_API_KEY"

MCP request body (POST to https://apifleet.dev/mcp with the Bearer and JSON headers above):

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "list_voice_presets",
    "arguments": {}
  }
}


Get assistant voice presets

GET /assistants/{id}/voice-presets · MCP tool: get_assistant_voice_presets.

Read voices compatible with this assistant configuration.

Effects: read-only; repeat has the same intended effect; may reach an external service.

  • id (path, string, required): Resource identifier returned by a previous request.

Response: HTTP 200 with a JSON object. Response fields match the native REST operation; errors retain their native shape.

REST example:

curl "https://apifleet.dev/assistants/ASSISTANT_ID/voice-presets" \
  -H "Authorization: Bearer $APIFLEET_API_KEY"

MCP request body (POST to https://apifleet.dev/mcp with the Bearer and JSON headers above):

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get_assistant_voice_presets",
    "arguments": {
      "id": "ASSISTANT_ID"
    }
  }
}


Get tts settings

GET /tts/settings-spec · MCP tool: get_tts_settings.

Read supported provider voice settings and validation ranges.

Effects: read-only; repeat has the same intended effect.

  • provider (query, string, optional): Optional voice provider.

Response: HTTP 200 with a JSON object. Response fields match the native REST operation; errors retain their native shape.

REST example:

curl "https://apifleet.dev/tts/settings-spec?provider=piper" \
  -H "Authorization: Bearer $APIFLEET_API_KEY"

MCP request body (POST to https://apifleet.dev/mcp with the Bearer and JSON headers above):

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get_tts_settings",
    "arguments": {
      "provider": "piper"
    }
  }
}


Preview voice

POST /tts/preview · MCP: unavailable for this workflow; use REST or the dashboard.

Generate a short fixed voice sample. Can incur provider usage; returns audio bytes. Play from the dashboard or call REST directly.

Effects: changes workspace state; do not automatically repeat; can incur usage; may reach an external service.

  • JSON request body: Voice provider and voice selection; see Models & voices. In MCP, put this object in data.

Response: Binary audio response; this is not a JSON document.

REST example:

curl -X POST "https://apifleet.dev/tts/preview" \
  -H "Authorization: Bearer $APIFLEET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"provider":"piper","voice":"en_US-lessac-medium"}' \
  --output voice-sample.audio


Transcribe audio

POST /stt/transcribe · MCP: unavailable for this workflow; use REST or the dashboard.

Transcribe an uploaded or inline audio sample. Can incur provider usage. Use the REST audio-upload contract; live call transcription is configured on the assistant.

Effects: changes workspace state; do not automatically repeat; can incur usage; may reach an external service.

  • JSON request body: Audio request; see the speech transcription section. In MCP, put this object in data.

Response: HTTP 200 with a JSON object. Response fields match the native REST operation; errors retain their native shape.

REST example:

curl -X POST "https://apifleet.dev/stt/transcribe" \
  -H "Authorization: Bearer $APIFLEET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"audio_base64":"BASE64_AUDIO","mime_type":"audio/wav"}'


Credentials

List provider credentials

GET /credentials · MCP tool: list_provider_credentials.

List which provider credentials are configured. Returns metadata only, never provider secret values.

Effects: read-only; repeat has the same intended effect.

No parameters.

Response: HTTP 200 with a JSON array. Response fields match the native REST operation; errors retain their native shape.

REST example:

curl "https://apifleet.dev/credentials" \
  -H "Authorization: Bearer $APIFLEET_API_KEY"

MCP request body (POST to https://apifleet.dev/mcp with the Bearer and JSON headers above):

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "list_provider_credentials",
    "arguments": {}
  }
}


Set provider credentials

PUT /credentials/{provider} · MCP: unavailable for this workflow; use REST or the dashboard.

Store provider credentials through a trusted backend or the dashboard. Do not paste provider secrets into a model conversation. Provider fields vary; see Tenant credentials.

Effects: changes workspace state; do not automatically repeat.

  • provider (path, string, required): Provider identifier, e.g. openai or telnyx.
  • JSON request body: Provider-specific secret fields. In MCP, put this object in data.

Response: HTTP 200 with a JSON object. Response fields match the native REST operation; errors retain their native shape.

REST example:

curl -X PUT "https://apifleet.dev/credentials/openai" \
  -H "Authorization: Bearer $APIFLEET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"api_key":"YOUR_PROVIDER_KEY"}'


Delete provider credentials

DELETE /credentials/{provider} · MCP: unavailable for this workflow; use REST or the dashboard.

Remove a provider credential. Dependent live calls may stop working. Use REST or the credentials dashboard.

Effects: changes workspace state; repeat has the same intended effect.

  • provider (path, string, required): Provider identifier.

Response: HTTP 204 with an empty body on success.

REST example:

curl -X DELETE "https://apifleet.dev/credentials/openai" \
  -H "Authorization: Bearer $APIFLEET_API_KEY"


API keys

List api keys

GET /api-keys · MCP tool: list_api_keys.

List this workspace API-key metadata. Full key values cannot be retrieved.

Effects: read-only; repeat has the same intended effect.

No parameters.

Response: HTTP 200 with a JSON array. Response fields match the native REST operation; errors retain their native shape.

REST example:

curl "https://apifleet.dev/api-keys" \
  -H "Authorization: Bearer $APIFLEET_API_KEY"

MCP request body (POST to https://apifleet.dev/mcp with the Bearer and JSON headers above):

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "list_api_keys",
    "arguments": {}
  }
}


Create api key

POST /api-keys · MCP tool: create_api_key.

Create a new full workspace key. The secret is returned once. Store it privately; never put it in public client code.

Effects: changes workspace state; do not automatically repeat.

  • JSON request body: Key label. In MCP, put this object in data.
  • name (body, string): Human-readable key label. Fields omitted on PATCH retain their current values; creation requirements are validated by the resource handler.

Response: HTTP 201 with a JSON object. Response fields match the native REST operation; errors retain their native shape.

REST example:

curl -X POST "https://apifleet.dev/api-keys" \
  -H "Authorization: Bearer $APIFLEET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Backend integration"}'

MCP request body (POST to https://apifleet.dev/mcp with the Bearer and JSON headers above):

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "create_api_key",
    "arguments": {
      "data": {
        "name": "Backend integration"
      }
    }
  }
}


Revoke api key

DELETE /api-keys/{id} · MCP tool: revoke_api_key.

Revoke a workspace API key immediately. Revoking the key in use disconnects this MCP client on its next request.

Effects: changes workspace state; repeat has the same intended effect.

  • id (path, string, required): Resource identifier returned by a previous request.

Response: HTTP 204 with an empty body on success.

REST example:

curl -X DELETE "https://apifleet.dev/api-keys/KEY_ID" \
  -H "Authorization: Bearer $APIFLEET_API_KEY"

MCP request body (POST to https://apifleet.dev/mcp with the Bearer and JSON headers above):

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "revoke_api_key",
    "arguments": {
      "id": "KEY_ID"
    }
  }
}


Billing

Get wallet

GET /billing/wallet · MCP tool: get_wallet.

Read available, reserved and total prepaid funds, policy, funding availability and runtime enforcement. Amounts ending in microusd are integer millionths of a USD.

Effects: read-only; repeat has the same intended effect.

No parameters.

Response: HTTP 200 with a JSON object. Response fields match the native REST operation; errors retain their native shape.

REST example:

curl "https://apifleet.dev/billing/wallet" \
  -H "Authorization: Bearer $APIFLEET_API_KEY"

MCP request body (POST to https://apifleet.dev/mcp with the Bearer and JSON headers above):

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get_wallet",
    "arguments": {}
  }
}


Get billing policy

GET /billing/policy · MCP tool: get_billing_policy.

Read the actual workspace policy. Internal exempt workspaces can differ from the public tariff.

Effects: read-only; repeat has the same intended effect.

No parameters.

Response: HTTP 200 with a JSON object. Response fields match the native REST operation; errors retain their native shape.

REST example:

curl "https://apifleet.dev/billing/policy" \
  -H "Authorization: Bearer $APIFLEET_API_KEY"

MCP request body (POST to https://apifleet.dev/mcp with the Bearer and JSON headers above):

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get_billing_policy",
    "arguments": {}
  }
}


List balance activity

GET /billing/ledger · MCP tool: list_balance_activity.

Read balance activity and pagination cursor. Funding is credited only after verified payment processing.

Effects: read-only; repeat has the same intended effect.

  • limit (query, integer, optional): Maximum entries; defaults to 50.
  • before (query, integer, optional): Return entries before this ledger identifier.

Response: HTTP 200 with a JSON object. Response fields match the native REST operation; errors retain their native shape.

REST example:

curl "https://apifleet.dev/billing/ledger?limit=10" \
  -H "Authorization: Bearer $APIFLEET_API_KEY"

MCP request body (POST to https://apifleet.dev/mcp with the Bearer and JSON headers above):

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "list_balance_activity",
    "arguments": {
      "limit": 10
    }
  }
}


List payments

GET /billing/payments · MCP tool: list_payments.

Read confirmed and pending workspace payment records for the configured live/test environment.

Effects: read-only; repeat has the same intended effect.

No parameters.

Response: HTTP 200 with a JSON object. Response fields match the native REST operation; errors retain their native shape.

REST example:

curl "https://apifleet.dev/billing/payments" \
  -H "Authorization: Bearer $APIFLEET_API_KEY"

MCP request body (POST to https://apifleet.dev/mcp with the Bearer and JSON headers above):

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "list_payments",
    "arguments": {}
  }
}


Create checkout

POST /billing/checkout · MCP: unavailable for this workflow; use REST or the dashboard.

Open the owner-only funding flow from the billing dashboard. Workspace API keys cannot start checkout.

Effects: changes workspace state; do not automatically repeat.

  • JSON request body: Checkout is initiated by the dashboard; no amount body is accepted here. In MCP, put this object in data.

Response: HTTP 201 with a JSON object. Response fields match the native REST operation; errors retain their native shape.

REST example:

# Owner session required; integrations normally use /app/billing.
# APIFLEET_DASHBOARD_SESSION is the private af_session cookie value.
curl -X POST "https://apifleet.dev/billing/checkout" \
  --cookie "af_session=$APIFLEET_DASHBOARD_SESSION" \
  -H "Origin: https://apifleet.dev" \
  -H "Content-Type: application/json" \
  -d '{}'


Metrics

Get metrics

GET /metrics · MCP tool: get_metrics.

Read the authenticated workspace metrics snapshot. Metrics may reset with the application process and are not a complete billing ledger.

Effects: read-only; repeat has the same intended effect.

No parameters.

Response: HTTP 200 with a JSON object. Response fields match the native REST operation; errors retain their native shape.

REST example:

curl "https://apifleet.dev/metrics" \
  -H "Authorization: Bearer $APIFLEET_API_KEY"

MCP request body (POST to https://apifleet.dev/mcp with the Bearer and JSON headers above):

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get_metrics",
    "arguments": {}
  }
}