{
  "openapi": "3.1.0",
  "info": {
    "title": "Cekura API",
    "version": "v1",
    "description": "Complete API documentation for the Cekura platform. This API provides endpoints for testing, observing, and evaluating AI voice agents — including managing agents, running evaluators, defining metrics, and analyzing call quality."
  },
  "paths": {
    "/.well-known/oauth-authorization-server": {
      "get": {
        "operationId": ".well-known-oauth-authorization-server-retrieve",
        "tags": [
          ".well-known"
        ],
        "responses": {
          "200": {
            "description": "No response body"
          }
        },
        "description": ".well known oauth authorization server"
      }
    },
    "/app/otel/validate/": {
      "get": {
        "operationId": "app-otel-validate-retrieve",
        "description": "Validate an API key owns the given agent or project.\n\nUsed by the OTel auth service. Returns 200 on success,\n401 on bad/missing key, 403 on ownership mismatch.\n\nQuery params: agent_id or project_id.",
        "tags": [
          "app"
        ],
        "security": [
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "description": "No response body"
          }
        }
      }
    },
    "/app/v1/product-chat/": {
      "post": {
        "operationId": "app-v1-product-chat-create",
        "description": "Send a product-chat message and start the agent run (legacy v1).\n\nCreates the user/assistant messages, mints a stream token, kicks off\nthe run in the agent runtime, and returns `{progress_id}` where\n`progress_id` is the assistant message id.",
        "tags": [
          "app"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "200": {
            "description": "No response body"
          }
        }
      }
    },
    "/app/v1/product-chat/cancel/": {
      "post": {
        "operationId": "app-v1-product-chat-cancel-create",
        "description": "Cancel an in-flight product-chat run (legacy v1).\n\nBody: `{progress_id}`. Flags the assistant message for cancel; the\nagent runtime picks up the flag on its next checkpoint.",
        "tags": [
          "app"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "200": {
            "description": "No response body"
          }
        }
      }
    },
    "/app/v1/product-chat/commands/": {
      "get": {
        "operationId": "app-v1-product-chat-commands-retrieve",
        "description": "List slash commands available in the product-chat sandbox typeahead.",
        "tags": [
          "app"
        ],
        "security": [
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "200": {
            "description": "{\"commands\": [{\"name\", \"description\", \"plugin\", \"command\"}, ...], \"cached_at\": \"<iso8601>\"}"
          },
          "401": {
            "description": "Authentication required (Supabase JWT only)."
          }
        }
      }
    },
    "/app/v1/product-chat/export-pdf/": {
      "post": {
        "operationId": "app-v1-product-chat-export-pdf-create",
        "description": "Export a product-chat assistant message as PDF (legacy v1).\n\nBody: `{session_id, message_index}`. Renders the assistant turn at\nthe given index via the shared PDF service and streams the result.",
        "tags": [
          "app"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "200": {
            "description": "No response body"
          }
        }
      }
    },
    "/app/v1/product-chat/feedback/": {
      "post": {
        "operationId": "app-v1-product-chat-feedback-create",
        "description": "Record user feedback on a product-chat assistant message (legacy v1).\n\nBody: `{session_id, message_index?, rating, feedback?}`. Two\nside-effects, matching the legacy contract:\n  1. Persist the rating/text on `Message.metadata.feedback` for later UI.\n  2. Best-effort Slack alert via `send_product_chat_feedback_alert` so\n     the team sees the report in real time. Slack failures don't fail\n     the user request — same as the original `ProductChatFeedbackView`.",
        "tags": [
          "app"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "200": {
            "description": "No response body"
          }
        }
      }
    },
    "/app/v1/product-chat/progress/": {
      "get": {
        "operationId": "app-v1-product-chat-progress-retrieve",
        "description": "Poll progress for an in-flight product-chat run (legacy v1).\n\nReturns the legacy `{status, chunks, session_id, ...}` shape. `chunks`\nis the delta of assistant content since the previous poll, computed\nvia a Redis cursor.",
        "tags": [
          "app"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "200": {
            "description": "No response body"
          }
        }
      }
    },
    "/app/v1/product-chat/sessions/": {
      "get": {
        "operationId": "app-v1-product-chat-sessions-retrieve",
        "description": "List the user's product-chat sessions (legacy v1).\n\nReturns each non-deleted conversation as\n`{session_id, name, messages, updated_at}`, ordered by most-recent update.",
        "tags": [
          "app"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "200": {
            "description": "No response body"
          }
        }
      }
    },
    "/app/v1/product-chat/sessions/{session_id}/": {
      "get": {
        "operationId": "app-v1-product-chat-sessions-retrieve_2",
        "description": "Read or delete a product-chat session (legacy v1).\n\nSoft-delete: sets `is_deleted=True` on the conversation. Accepts both\ncanonical UUIDs and legacy session ids.",
        "parameters": [
          {
            "in": "path",
            "name": "session_id",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "tags": [
          "app"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "200": {
            "description": "No response body"
          }
        }
      },
      "delete": {
        "operationId": "app-v1-product-chat-sessions-destroy",
        "description": "Read or delete a product-chat session (legacy v1).\n\nSoft-delete: sets `is_deleted=True` on the conversation. Accepts both\ncanonical UUIDs and legacy session ids.",
        "parameters": [
          {
            "in": "path",
            "name": "session_id",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "tags": [
          "app"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "204": {
            "description": "No response body"
          }
        }
      }
    },
    "/app/v2/product-chat/conversations/": {
      "get": {
        "operationId": "app-v2-product-chat-conversations-retrieve",
        "description": "List the user's product-chat conversations or create a new one.\n\n`GET` returns non-deleted conversations ordered by most-recent update.\n`POST` creates an empty conversation (optionally seeded with a name).",
        "tags": [
          "app"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "200": {
            "description": "No response body"
          }
        }
      },
      "post": {
        "operationId": "app-v2-product-chat-conversations-create",
        "description": "List the user's product-chat conversations or create a new one.\n\n`GET` returns non-deleted conversations ordered by most-recent update.\n`POST` creates an empty conversation (optionally seeded with a name).",
        "tags": [
          "app"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "200": {
            "description": "No response body"
          }
        }
      }
    },
    "/app/v2/product-chat/conversations/{conversation_id}/": {
      "get": {
        "operationId": "app-v2-product-chat-conversations-retrieve_2",
        "description": "Retrieve a product-chat conversation (with its messages) or soft-delete it.\n\n`GET` returns the conversation plus its ordered messages.\n`DELETE` soft-deletes it (sets `is_deleted=True`).",
        "parameters": [
          {
            "in": "path",
            "name": "conversation_id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          }
        ],
        "tags": [
          "app"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "200": {
            "description": "No response body"
          }
        }
      },
      "delete": {
        "operationId": "app-v2-product-chat-conversations-destroy",
        "description": "Retrieve a product-chat conversation (with its messages) or soft-delete it.\n\n`GET` returns the conversation plus its ordered messages.\n`DELETE` soft-deletes it (sets `is_deleted=True`).",
        "parameters": [
          {
            "in": "path",
            "name": "conversation_id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          }
        ],
        "tags": [
          "app"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "204": {
            "description": "No response body"
          }
        }
      }
    },
    "/app/v2/product-chat/conversations/{conversation_id}/messages/": {
      "post": {
        "operationId": "app-v2-product-chat-conversations-messages-create",
        "description": "Send a user message to a product-chat conversation and start the assistant run.\n\nCreates the user message + a streaming assistant message in one\ntransaction, mints a stream token, and returns the URL the browser\nshould open SSE against.",
        "parameters": [
          {
            "in": "path",
            "name": "conversation_id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          }
        ],
        "tags": [
          "app"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "200": {
            "description": "No response body"
          }
        }
      }
    },
    "/app/v2/product-chat/conversations/{conversation_id}/status/": {
      "get": {
        "operationId": "app-v2-product-chat-conversations-status-retrieve",
        "description": "Return the current run state of the conversation's latest assistant turn: its status, partial or final content, and any error. Use this to recover the true state of an in-flight or finished turn when the live stream is interrupted — the tab was backgrounded, the page reloaded, or the connection dropped. `active_message` is null when the conversation has no assistant turns yet; clarification prompts are included only when the turn is waiting on the user.",
        "summary": "Get a conversation's live turn status",
        "parameters": [
          {
            "in": "path",
            "name": "conversation_id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          }
        ],
        "tags": [
          "app"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConversationStatus"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/app/v2/product-chat/messages/{message_id}/cancel/": {
      "post": {
        "operationId": "app-v2-product-chat-messages-cancel-create",
        "description": "Cancel an in-flight product-chat assistant message.\n\nFlags the message for cancel; if no driver has attached yet, flips\nstatus synchronously so the message doesn't sit in `streaming` forever.",
        "parameters": [
          {
            "in": "path",
            "name": "message_id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          }
        ],
        "tags": [
          "app"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "200": {
            "description": "No response body"
          }
        }
      }
    },
    "/app/v2/product-chat/messages/{message_id}/export-pdf/": {
      "post": {
        "operationId": "app-v2-product-chat-messages-export-pdf-create",
        "description": "Returns the rendered report PDF for a given message.\n\nLooks up the assistant `Message` by id, computes its index within the\nconversation (preserved for compatibility with legacy filename / template\nfields), and delegates to `render_message_as_pdf()`.",
        "parameters": [
          {
            "in": "path",
            "name": "message_id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          }
        ],
        "tags": [
          "app"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "200": {
            "description": "No response body"
          }
        }
      }
    },
    "/app/v2/product-chat/messages/{message_id}/feedback/": {
      "post": {
        "operationId": "app-v2-product-chat-messages-feedback-create",
        "description": "Records feedback (thumbs up/down + optional text) on an assistant message.",
        "parameters": [
          {
            "in": "path",
            "name": "message_id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          }
        ],
        "tags": [
          "app"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "200": {
            "description": "No response body"
          }
        }
      }
    },
    "/app/v2/product-chat/org-mcp-servers/": {
      "get": {
        "operationId": "app-v2-product-chat-org-mcp-servers-retrieve",
        "description": "List or create MCP servers for the authenticated user's org.",
        "tags": [
          "app"
        ],
        "security": [
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "200": {
            "description": "No response body"
          }
        }
      },
      "post": {
        "operationId": "app-v2-product-chat-org-mcp-servers-create",
        "description": "List or create MCP servers for the authenticated user's org.",
        "tags": [
          "app"
        ],
        "security": [
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "200": {
            "description": "No response body"
          }
        }
      }
    },
    "/app/v2/product-chat/org-mcp-servers/{server_id}/": {
      "get": {
        "operationId": "app-v2-product-chat-org-mcp-servers-retrieve_2",
        "description": "Retrieve an update, or delete a single MCP server by ID",
        "parameters": [
          {
            "in": "path",
            "name": "server_id",
            "schema": {
              "type": "integer"
            },
            "required": true
          }
        ],
        "tags": [
          "app"
        ],
        "security": [
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "200": {
            "description": "No response body"
          }
        }
      },
      "patch": {
        "operationId": "app-v2-product-chat-org-mcp-servers-partial-update",
        "description": "Update an update, or delete a single MCP server",
        "parameters": [
          {
            "in": "path",
            "name": "server_id",
            "schema": {
              "type": "integer"
            },
            "required": true
          }
        ],
        "tags": [
          "app"
        ],
        "security": [
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "200": {
            "description": "No response body"
          }
        }
      },
      "delete": {
        "operationId": "app-v2-product-chat-org-mcp-servers-destroy",
        "description": "Delete an update, or delete a single MCP server",
        "parameters": [
          {
            "in": "path",
            "name": "server_id",
            "schema": {
              "type": "integer"
            },
            "required": true
          }
        ],
        "tags": [
          "app"
        ],
        "security": [
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "204": {
            "description": "No response body"
          }
        }
      }
    },
    "/app/v2/product-chat/org-skills/": {
      "get": {
        "operationId": "app-v2-product-chat-org-skills-retrieve",
        "description": "List all active custom skills for the org. Any member can read.",
        "tags": [
          "app"
        ],
        "security": [
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "200": {
            "description": "No response body"
          }
        }
      }
    },
    "/app/v2/product-chat/org-skills/{skill_id}/": {
      "get": {
        "operationId": "app-v2-product-chat-org-skills-retrieve_2",
        "description": "Retrieve a Read , toggle active/inactive or delete one skill by ID",
        "parameters": [
          {
            "in": "path",
            "name": "skill_id",
            "schema": {
              "type": "integer"
            },
            "required": true
          }
        ],
        "tags": [
          "app"
        ],
        "security": [
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "200": {
            "description": "No response body"
          }
        }
      },
      "patch": {
        "operationId": "app-v2-product-chat-org-skills-partial-update",
        "description": "Update a Read , toggle active/inactive or delete one skill",
        "parameters": [
          {
            "in": "path",
            "name": "skill_id",
            "schema": {
              "type": "integer"
            },
            "required": true
          }
        ],
        "tags": [
          "app"
        ],
        "security": [
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "200": {
            "description": "No response body"
          }
        }
      },
      "delete": {
        "operationId": "app-v2-product-chat-org-skills-destroy",
        "description": "Delete a Read , toggle active/inactive or delete one skill",
        "parameters": [
          {
            "in": "path",
            "name": "skill_id",
            "schema": {
              "type": "integer"
            },
            "required": true
          }
        ],
        "tags": [
          "app"
        ],
        "security": [
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "204": {
            "description": "No response body"
          }
        }
      }
    },
    "/app/v2/product-chat/org-skills/sources/": {
      "get": {
        "operationId": "app-v2-product-chat-org-skills-sources-retrieve",
        "description": "List or create skill sources for the authenticated user's org.\n\nPOST accepts either:\n  - multipart/form-data with source_type=zip and file=<.zip|.tar.gz>\n  - application/json with source_type=github and github_url=<url>",
        "tags": [
          "app"
        ],
        "security": [
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "200": {
            "description": "No response body"
          }
        }
      },
      "post": {
        "operationId": "app-v2-product-chat-org-skills-sources-create",
        "description": "List or create skill sources for the authenticated user's org.\n\nPOST accepts either:\n  - multipart/form-data with source_type=zip and file=<.zip|.tar.gz>\n  - application/json with source_type=github and github_url=<url>",
        "tags": [
          "app"
        ],
        "security": [
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "200": {
            "description": "No response body"
          }
        }
      }
    },
    "/app/v2/product-chat/org-skills/sources/{source_id}/": {
      "get": {
        "operationId": "app-v2-product-chat-org-skills-sources-retrieve_2",
        "description": "Retrieve a re-sync , or delete a skill source by ID",
        "parameters": [
          {
            "in": "path",
            "name": "source_id",
            "schema": {
              "type": "integer"
            },
            "required": true
          }
        ],
        "tags": [
          "app"
        ],
        "security": [
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "200": {
            "description": "No response body"
          }
        }
      },
      "post": {
        "operationId": "app-v2-product-chat-org-skills-sources-create_2",
        "description": "Re-sync a GitHub source (triggers a new Celery task).",
        "parameters": [
          {
            "in": "path",
            "name": "source_id",
            "schema": {
              "type": "integer"
            },
            "required": true
          }
        ],
        "tags": [
          "app"
        ],
        "security": [
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "200": {
            "description": "No response body"
          }
        }
      },
      "delete": {
        "operationId": "app-v2-product-chat-org-skills-sources-destroy",
        "description": "Delete a re-sync , or delete a skill source",
        "parameters": [
          {
            "in": "path",
            "name": "source_id",
            "schema": {
              "type": "integer"
            },
            "required": true
          }
        ],
        "tags": [
          "app"
        ],
        "security": [
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "204": {
            "description": "No response body"
          }
        }
      }
    },
    "/app/v2/product-chat/org-skills/sources/{source_id}/sync/": {
      "get": {
        "operationId": "app-v2-product-chat-org-skills-sources-sync-retrieve",
        "description": "App v2 product chat org skills sources sync",
        "parameters": [
          {
            "in": "path",
            "name": "source_id",
            "schema": {
              "type": "integer"
            },
            "required": true
          }
        ],
        "tags": [
          "app"
        ],
        "security": [
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "200": {
            "description": "No response body"
          }
        }
      },
      "post": {
        "operationId": "app-v2-product-chat-org-skills-sources-sync-create",
        "description": "Re-sync a GitHub source (triggers a new Celery task).",
        "parameters": [
          {
            "in": "path",
            "name": "source_id",
            "schema": {
              "type": "integer"
            },
            "required": true
          }
        ],
        "tags": [
          "app"
        ],
        "security": [
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "200": {
            "description": "No response body"
          }
        }
      },
      "delete": {
        "operationId": "app-v2-product-chat-org-skills-sources-sync-destroy",
        "description": "App v2 product chat org skills sources sync",
        "parameters": [
          {
            "in": "path",
            "name": "source_id",
            "schema": {
              "type": "integer"
            },
            "required": true
          }
        ],
        "tags": [
          "app"
        ],
        "security": [
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "204": {
            "description": "No response body"
          }
        }
      }
    },
    "/app/v2/product-chat/org-skills/upload/": {
      "post": {
        "operationId": "app-v2-product-chat-org-skills-upload-create",
        "description": "Upload a single .md file as a skill or command.\n\nAccepts multipart/form-data with a single \"file\" field.\nThe file is scanned immediately (synchronously) — fast because it's\na single file, no git clone or zip extraction required.",
        "tags": [
          "app"
        ],
        "security": [
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "200": {
            "description": "No response body"
          }
        }
      }
    },
    "/dashboards/dashboards/": {
      "get": {
        "operationId": "dashboards-list",
        "description": "List dashboards accessible to the authenticated user. **Always pass `project_id`** — without it, all dashboards across every project in your organisation are returned, which can be a large result set.\n\n**Dashboard workflow:**\n1. `POST /dashboards/dashboards` — create a dashboard with a name, project, and date-range filters\n2. `POST /dashboards/widgets` — add widgets (line, bar, pie, or stat charts)\n3. `GET /dashboards/widgets/{id}/data` — fetch chart data (requires a timestamp filter)\n4. `POST /dashboards/dashboards/{id}/duplicate` — clone an existing dashboard as a starting point",
        "summary": "List dashboards",
        "parameters": [
          {
            "name": "page",
            "required": false,
            "in": "query",
            "description": "A page number within the paginated result set.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "page_size",
            "required": false,
            "in": "query",
            "description": "Number of results to return per page.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "project_id",
            "schema": {
              "type": "integer"
            },
            "description": "Filter by project ID. Strongly recommended — omitting returns all dashboards across every project."
          }
        ],
        "tags": [
          "dashboards"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "shareable_link": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedDashboardListList"
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "dashboards-list",
            "description": "List dashboards accessible to the authenticated user. **Always pass `project_id`** — without it, all dashboards across every project in your organisation are returned, which can be a large result set.\n\n**Dashboard workflow:**\n1. `POST /dashboards/dashboards` — create a dashboard with a name, project, and date-range filters\n2. `POST /dashboards/widgets` — add widgets (line, bar, pie, or stat charts)\n3. `GET /dashboards/widgets/{id}/data` — fetch chart data (requires a timestamp filter)\n4. `POST /dashboards/dashboards/{id}/duplicate` — clone an existing dashboard as a starting point"
          }
        }
      },
      "post": {
        "operationId": "dashboards-create",
        "description": "Manage analytics dashboards for visualizing agent performance.\n\nDashboards contain configurable widgets — line, bar, pie, or stat charts — that\ndisplay call volume, quality scores, metric trends, and other agent KPIs.\n\n**Dashboard filters** scope all widgets on the dashboard. Set a date range here\nso every widget automatically restricts to the same time window. Widget-level filters\nAND-combine with the dashboard filter.\n\n**Filter format** (`filters` field): a JSON condition object.\nSimple condition: `{\"field\": \"agent.id\", \"op\": \"eq\", \"value\": 123}`.\nCompound: `{\"operator\": \"and\", \"conditions\": [{\"field\": \"timestamp\", \"op\": \"gte\", \"value\": \"now-7d\"}, {\"field\": \"timestamp\", \"op\": \"lte\", \"value\": \"now\"}]}`.\nSupported fields: `id`, `success`, `duration`, `customer_number`, `call_ended_reason`,\n`dropoff_point`, `topic`, `timestamp`, `is_reviewed`, `agent.id`, `agent.agent_name`,\n`metadata.<key>`, `metric_evaluations.value`.\nSupported operators: `eq`, `neq`, `gt`, `gte`, `lt`, `lte`, `contains`, `startswith`, `endswith`, `in`, `isnull`, `regex`.\n\nUse `duplicate` to clone an existing dashboard rather than building one from scratch.",
        "tags": [
          "dashboards"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Dashboard"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/Dashboard"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Dashboard"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "shareable_link": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Dashboard"
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "summary": "Create a dashboard",
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "dashboards-create",
            "description": "Manage analytics dashboards for visualizing agent performance.\n\nDashboards contain configurable widgets — line, bar, pie, or stat charts — that\ndisplay call volume, quality scores, metric trends, and other agent KPIs.\n\n**Dashboard filters** scope all widgets on the dashboard. Set a date range here\nso every widget automatically restricts to the same time window. Widget-level filters\nAND-combine with the dashboard filter.\n\n**Filter format** (`filters` field): a JSON condition object.\nSimple condition: `{\"field\": \"agent.id\", \"op\": \"eq\", \"value\": 123}`.\nCompound: `{\"operator\": \"and\", \"conditions\": [{\"field\": \"timestamp\", \"op\": \"gte\", \"value\": \"now-7d\"}, {\"field\": \"timestamp\", \"op\": \"lte\", \"value\": \"now\"}]}`.\nSupported fields: `id`, `success`, `duration`, `customer_number`, `call_ended_reason`,\n`dropoff_point`, `topic`, `timestamp`, `is_reviewed`, `agent.id`, `agent.agent_name`,\n`metadata.<key>`, `metric_evaluations.value`.\nSupported operators: `eq`, `neq`, `gt`, `gte`, `lt`, `lte`, `contains`, `startswith`, `endswith`, `in`, `isnull`, `regex`.\n\nUse `duplicate` to clone an existing dashboard rather than building one from scratch."
          }
        }
      }
    },
    "/dashboards/dashboards/{id}/": {
      "get": {
        "operationId": "dashboards-retrieve",
        "description": "Manage analytics dashboards for visualizing agent performance.\n\nDashboards contain configurable widgets — line, bar, pie, or stat charts — that\ndisplay call volume, quality scores, metric trends, and other agent KPIs.\n\n**Dashboard filters** scope all widgets on the dashboard. Set a date range here\nso every widget automatically restricts to the same time window. Widget-level filters\nAND-combine with the dashboard filter.\n\n**Filter format** (`filters` field): a JSON condition object.\nSimple condition: `{\"field\": \"agent.id\", \"op\": \"eq\", \"value\": 123}`.\nCompound: `{\"operator\": \"and\", \"conditions\": [{\"field\": \"timestamp\", \"op\": \"gte\", \"value\": \"now-7d\"}, {\"field\": \"timestamp\", \"op\": \"lte\", \"value\": \"now\"}]}`.\nSupported fields: `id`, `success`, `duration`, `customer_number`, `call_ended_reason`,\n`dropoff_point`, `topic`, `timestamp`, `is_reviewed`, `agent.id`, `agent.agent_name`,\n`metadata.<key>`, `metric_evaluations.value`.\nSupported operators: `eq`, `neq`, `gt`, `gte`, `lt`, `lte`, `contains`, `startswith`, `endswith`, `in`, `isnull`, `regex`.\n\nUse `duplicate` to clone an existing dashboard rather than building one from scratch.",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "tags": [
          "dashboards"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "shareable_link": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Dashboard"
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "summary": "Get a dashboard",
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "dashboards-retrieve",
            "description": "Manage analytics dashboards for visualizing agent performance.\n\nDashboards contain configurable widgets — line, bar, pie, or stat charts — that\ndisplay call volume, quality scores, metric trends, and other agent KPIs.\n\n**Dashboard filters** scope all widgets on the dashboard. Set a date range here\nso every widget automatically restricts to the same time window. Widget-level filters\nAND-combine with the dashboard filter.\n\n**Filter format** (`filters` field): a JSON condition object.\nSimple condition: `{\"field\": \"agent.id\", \"op\": \"eq\", \"value\": 123}`.\nCompound: `{\"operator\": \"and\", \"conditions\": [{\"field\": \"timestamp\", \"op\": \"gte\", \"value\": \"now-7d\"}, {\"field\": \"timestamp\", \"op\": \"lte\", \"value\": \"now\"}]}`.\nSupported fields: `id`, `success`, `duration`, `customer_number`, `call_ended_reason`,\n`dropoff_point`, `topic`, `timestamp`, `is_reviewed`, `agent.id`, `agent.agent_name`,\n`metadata.<key>`, `metric_evaluations.value`.\nSupported operators: `eq`, `neq`, `gt`, `gte`, `lt`, `lte`, `contains`, `startswith`, `endswith`, `in`, `isnull`, `regex`.\n\nUse `duplicate` to clone an existing dashboard rather than building one from scratch."
          }
        }
      },
      "put": {
        "operationId": "dashboards-update",
        "description": "Manage analytics dashboards for visualizing agent performance.\n\nDashboards contain configurable widgets — line, bar, pie, or stat charts — that\ndisplay call volume, quality scores, metric trends, and other agent KPIs.\n\n**Dashboard filters** scope all widgets on the dashboard. Set a date range here\nso every widget automatically restricts to the same time window. Widget-level filters\nAND-combine with the dashboard filter.\n\n**Filter format** (`filters` field): a JSON condition object.\nSimple condition: `{\"field\": \"agent.id\", \"op\": \"eq\", \"value\": 123}`.\nCompound: `{\"operator\": \"and\", \"conditions\": [{\"field\": \"timestamp\", \"op\": \"gte\", \"value\": \"now-7d\"}, {\"field\": \"timestamp\", \"op\": \"lte\", \"value\": \"now\"}]}`.\nSupported fields: `id`, `success`, `duration`, `customer_number`, `call_ended_reason`,\n`dropoff_point`, `topic`, `timestamp`, `is_reviewed`, `agent.id`, `agent.agent_name`,\n`metadata.<key>`, `metric_evaluations.value`.\nSupported operators: `eq`, `neq`, `gt`, `gte`, `lt`, `lte`, `contains`, `startswith`, `endswith`, `in`, `isnull`, `regex`.\n\nUse `duplicate` to clone an existing dashboard rather than building one from scratch.",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "tags": [
          "dashboards"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Dashboard"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/Dashboard"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Dashboard"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "shareable_link": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Dashboard"
                }
              }
            },
            "description": ""
          }
        }
      },
      "patch": {
        "operationId": "dashboards-partial-update",
        "description": "Manage analytics dashboards for visualizing agent performance.\n\nDashboards contain configurable widgets — line, bar, pie, or stat charts — that\ndisplay call volume, quality scores, metric trends, and other agent KPIs.\n\n**Dashboard filters** scope all widgets on the dashboard. Set a date range here\nso every widget automatically restricts to the same time window. Widget-level filters\nAND-combine with the dashboard filter.\n\n**Filter format** (`filters` field): a JSON condition object.\nSimple condition: `{\"field\": \"agent.id\", \"op\": \"eq\", \"value\": 123}`.\nCompound: `{\"operator\": \"and\", \"conditions\": [{\"field\": \"timestamp\", \"op\": \"gte\", \"value\": \"now-7d\"}, {\"field\": \"timestamp\", \"op\": \"lte\", \"value\": \"now\"}]}`.\nSupported fields: `id`, `success`, `duration`, `customer_number`, `call_ended_reason`,\n`dropoff_point`, `topic`, `timestamp`, `is_reviewed`, `agent.id`, `agent.agent_name`,\n`metadata.<key>`, `metric_evaluations.value`.\nSupported operators: `eq`, `neq`, `gt`, `gte`, `lt`, `lte`, `contains`, `startswith`, `endswith`, `in`, `isnull`, `regex`.\n\nUse `duplicate` to clone an existing dashboard rather than building one from scratch.",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "tags": [
          "dashboards"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchedDashboard"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/PatchedDashboard"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/PatchedDashboard"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "shareable_link": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Dashboard"
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "summary": "Update a dashboard",
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "dashboards-partial-update",
            "description": "Manage analytics dashboards for visualizing agent performance.\n\nDashboards contain configurable widgets — line, bar, pie, or stat charts — that\ndisplay call volume, quality scores, metric trends, and other agent KPIs.\n\n**Dashboard filters** scope all widgets on the dashboard. Set a date range here\nso every widget automatically restricts to the same time window. Widget-level filters\nAND-combine with the dashboard filter.\n\n**Filter format** (`filters` field): a JSON condition object.\nSimple condition: `{\"field\": \"agent.id\", \"op\": \"eq\", \"value\": 123}`.\nCompound: `{\"operator\": \"and\", \"conditions\": [{\"field\": \"timestamp\", \"op\": \"gte\", \"value\": \"now-7d\"}, {\"field\": \"timestamp\", \"op\": \"lte\", \"value\": \"now\"}]}`.\nSupported fields: `id`, `success`, `duration`, `customer_number`, `call_ended_reason`,\n`dropoff_point`, `topic`, `timestamp`, `is_reviewed`, `agent.id`, `agent.agent_name`,\n`metadata.<key>`, `metric_evaluations.value`.\nSupported operators: `eq`, `neq`, `gt`, `gte`, `lt`, `lte`, `contains`, `startswith`, `endswith`, `in`, `isnull`, `regex`.\n\nUse `duplicate` to clone an existing dashboard rather than building one from scratch."
          }
        }
      },
      "delete": {
        "operationId": "dashboards-destroy",
        "description": "⚠ Irreversible. Deletes the dashboard and all of its widgets.",
        "summary": "Delete a dashboard",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "tags": [
          "dashboards"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "shareable_link": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "204": {
            "description": "No response body"
          },
          "404": {
            "description": "No response body"
          }
        },
        "x-mcp-expose": true,
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "dashboards-destroy",
            "description": "⚠ Irreversible. Deletes the dashboard and all of its widgets."
          }
        }
      }
    },
    "/dashboards/dashboards/{id}/bulk_widgets/": {
      "post": {
        "operationId": "dashboards-bulk-widgets",
        "description": "Bulk create, update, and delete widgets for a dashboard.\n\nAll operations are performed in a single transaction.\n\nRequest body:\n{\n    \"create\": [{\"name\": \"Widget 1\", \"field\": \"duration\", \"chart_type\": \"line\"}, ...],\n    \"update\": [{\"id\": 1, \"name\": \"Updated Name\"}, ...],\n    \"delete\": [2, 3, 4]\n}\n\nReturns:\n{\n    \"created\": [...],  # List of created widgets\n    \"updated\": [...],  # List of updated widgets\n    \"deleted\": [...]   # List of deleted widget IDs\n}",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "tags": [
          "dashboards"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BulkWidgetOperationRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/BulkWidgetOperationRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/BulkWidgetOperationRequest"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "shareable_link": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BulkWidgetOperationResponse"
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "summary": "Bulk edit dashboard widgets",
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "dashboards-bulk-widgets",
            "description": "Bulk create, update, and delete widgets for a dashboard.\n\nAll operations are performed in a single transaction.\n\nRequest body:\n{\n    \"create\": [{\"name\": \"Widget 1\", \"field\": \"duration\", \"chart_type\": \"line\"}, ...],\n    \"update\": [{\"id\": 1, \"name\": \"Updated Name\"}, ...],\n    \"delete\": [2, 3, 4]\n}\n\nReturns:\n{\n    \"created\": [...],  # List of created widgets\n    \"updated\": [...],  # List of updated widgets\n    \"deleted\": [...]   # List of deleted widget IDs\n}"
          }
        }
      }
    },
    "/dashboards/dashboards/{id}/duplicate/": {
      "post": {
        "operationId": "dashboards-duplicate",
        "description": "Duplicate a dashboard and all its widgets.",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "tags": [
          "dashboards"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DuplicateDashboardRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/DuplicateDashboardRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/DuplicateDashboardRequest"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "shareable_link": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Dashboard"
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "summary": "Duplicate a dashboard",
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "dashboards-duplicate",
            "description": "Duplicate a dashboard and all its widgets."
          }
        }
      }
    },
    "/dashboards/dashboards/predefined_widgets/": {
      "get": {
        "operationId": "dashboards-predefined-widgets",
        "description": "Return a list of predefined widget configurations for quick-add.\nResolves project-specific details like metric IDs for latency.",
        "tags": [
          "dashboards"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "shareable_link": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Dashboard"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/dashboards/widgets/": {
      "get": {
        "operationId": "dashboards-widgets-list",
        "description": "List dashboard widgets",
        "parameters": [
          {
            "name": "page",
            "required": false,
            "in": "query",
            "description": "A page number within the paginated result set.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "page_size",
            "required": false,
            "in": "query",
            "description": "Number of results to return per page.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "dashboard_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Tenant scope. Supply one of `dashboard_id` when authenticating with a user session or OAuth bearer token; omit when using an API key already scoped to the tenant."
          }
        ],
        "tags": [
          "dashboards"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "shareable_link": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedWidgetList"
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "summary": "List dashboard widgets",
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "dashboards-widgets-list",
            "description": "List dashboard widgets"
          }
        }
      },
      "post": {
        "operationId": "dashboards-widgets-create",
        "description": "Create a dashboard widget",
        "tags": [
          "dashboards"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Widget"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/Widget"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Widget"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "shareable_link": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Widget"
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "summary": "Create a dashboard widget",
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "dashboards-widgets-create",
            "description": "Create a dashboard widget"
          }
        }
      }
    },
    "/dashboards/widgets/{id}/": {
      "get": {
        "operationId": "dashboards-widgets-retrieve",
        "description": "Get a dashboard widget",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "tags": [
          "dashboards"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "shareable_link": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Widget"
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "summary": "Get a dashboard widget",
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "dashboards-widgets-retrieve",
            "description": "Get a dashboard widget"
          }
        }
      },
      "put": {
        "operationId": "dashboards-widgets-update",
        "description": "Update a dashboard widget",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "tags": [
          "dashboards"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Widget"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/Widget"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Widget"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "shareable_link": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Widget"
                }
              }
            },
            "description": ""
          }
        }
      },
      "patch": {
        "operationId": "dashboards-widgets-partial-update",
        "description": "Update a dashboard widget",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "tags": [
          "dashboards"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchedWidget"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/PatchedWidget"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/PatchedWidget"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "shareable_link": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Widget"
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "summary": "Update a dashboard widget",
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "dashboards-widgets-partial-update",
            "description": "Update a dashboard widget"
          }
        }
      },
      "delete": {
        "operationId": "dashboards-widgets-destroy",
        "description": "⚠ Irreversible. Deletes this widget from its dashboard.",
        "summary": "Delete a widget",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "tags": [
          "dashboards"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "shareable_link": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "204": {
            "description": "No response body"
          },
          "404": {
            "description": "No response body"
          }
        },
        "x-mcp-expose": true,
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "dashboards-widgets-destroy",
            "description": "⚠ Irreversible. Deletes this widget from its dashboard."
          }
        }
      }
    },
    "/dashboards/widgets/{id}/data/": {
      "get": {
        "operationId": "dashboards-widgets-data-retrieve",
        "description": "Fetch the computed chart data for a saved widget.\n\n**Timestamp filter required:** a `gt` or `gte` filter on `timestamp` must be present — either set on the dashboard, the widget, or passed here as `filters`. Maximum range: 30 days. Without it the request returns a 400 error.\n\n**Override filters:** pass `filters` as a filter JSON object to temporarily replace the widget's own filters for this request. Example: `{\"operator\": \"and\", \"conditions\": [{\"field\": \"timestamp\", \"op\": \"gte\", \"value\": \"now-7d\"}, {\"field\": \"timestamp\", \"op\": \"lte\", \"value\": \"now\"}]}`\n\n**Response shape by chart type:**\n- `line` — `{data: [{id, timestamp, value}], metadata: {display_name, data_type, filter_value}}`\n- `bar` — `{data: [{time_interval, value, sample_count}], metadata: ...}`\n- `pie` — `{data: [{label, value, percentage}], metadata: ...}`\n- `stat` — `{data: {total_calls, success_rate, avg_duration, p95_latency}, metadata: ...}`",
        "summary": "Get widget chart data",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "in": "query",
            "name": "filters",
            "schema": {
              "type": "object"
            },
            "description": "filter JSON object to override widget filters for this request. Must include a timestamp constraint. Example: `{\"operator\": \"and\", \"conditions\": [{\"field\": \"timestamp\", \"op\": \"gte\", \"value\": \"now-7d\"}]}`"
          }
        ],
        "tags": [
          "dashboards"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "shareable_link": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WidgetDataResponse"
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "dashboards-widgets-data-retrieve",
            "description": "Fetch the computed chart data for a saved widget.\n\n**Timestamp filter required:** a `gt` or `gte` filter on `timestamp` must be present — either set on the dashboard, the widget, or passed here as `filters`. Maximum range: 30 days. Without it the request returns a 400 error.\n\n**Override filters:** pass `filters` as a filter JSON object to temporarily replace the widget's own filters for this request. Example: `{\"operator\": \"and\", \"conditions\": [{\"field\": \"timestamp\", \"op\": \"gte\", \"value\": \"now-7d\"}, {\"field\": \"timestamp\", \"op\": \"lte\", \"value\": \"now\"}]}`\n\n**Response shape by chart type:**\n- `line` — `{data: [{id, timestamp, value}], metadata: {display_name, data_type, filter_value}}`\n- `bar` — `{data: [{time_interval, value, sample_count}], metadata: ...}`\n- `pie` — `{data: [{label, value, percentage}], metadata: ...}`\n- `stat` — `{data: {total_calls, success_rate, avg_duration, p95_latency}, metadata: ...}`"
          }
        }
      }
    },
    "/dashboards/widgets/bulk_data/": {
      "post": {
        "operationId": "dashboards-widgets-bulk-data-create",
        "description": "Get plot data for multiple widgets at once.\n\nAccepts a list of widget IDs and optional override filters.\nReturns data for all specified widgets.\nFilter format follows filter JSON structure.",
        "parameters": [
          {
            "name": "page",
            "required": false,
            "in": "query",
            "description": "A page number within the paginated result set.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "page_size",
            "required": false,
            "in": "query",
            "description": "Number of results to return per page.",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "tags": [
          "dashboards"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BulkWidgetDataRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/BulkWidgetDataRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/BulkWidgetDataRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "shareable_link": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedWidgetDataResponseList"
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "summary": "Get data for multiple widgets",
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "dashboards-widgets-bulk-data-create",
            "description": "Get plot data for multiple widgets at once.\n\nAccepts a list of widget IDs and optional override filters.\nReturns data for all specified widgets.\nFilter format follows filter JSON structure."
          }
        }
      }
    },
    "/dashboards/widgets/preview_data/": {
      "post": {
        "operationId": "dashboards-widgets-preview-data-create",
        "description": "Preview widget data without saving.",
        "tags": [
          "dashboards"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Widget"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/Widget"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Widget"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "shareable_link": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WidgetDataResponse"
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "summary": "Preview widget data",
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "dashboards-widgets-preview-data-create",
            "description": "Preview widget data without saving."
          }
        }
      }
    },
    "/discord/servers/": {
      "get": {
        "operationId": "discord-servers-list",
        "tags": [
          "discord"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/DiscordServer"
                  }
                }
              }
            },
            "description": ""
          }
        },
        "description": "List discord servers"
      },
      "post": {
        "operationId": "discord-servers-create",
        "tags": [
          "discord"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DiscordServer"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/DiscordServer"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/DiscordServer"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DiscordServer"
                }
              }
            },
            "description": ""
          }
        },
        "description": "Create a new discord server"
      }
    },
    "/discord/servers/{id}/": {
      "get": {
        "operationId": "discord-servers-retrieve",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this discord server.",
            "required": true
          }
        ],
        "tags": [
          "discord"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DiscordServer"
                }
              }
            },
            "description": ""
          }
        },
        "description": "Retrieve a discord server by ID"
      },
      "put": {
        "operationId": "discord-servers-update",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this discord server.",
            "required": true
          }
        ],
        "tags": [
          "discord"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DiscordServer"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/DiscordServer"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/DiscordServer"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DiscordServer"
                }
              }
            },
            "description": ""
          }
        },
        "description": "Update a discord server"
      },
      "patch": {
        "operationId": "discord-servers-partial-update",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this discord server.",
            "required": true
          }
        ],
        "tags": [
          "discord"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchedDiscordServer"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/PatchedDiscordServer"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/PatchedDiscordServer"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DiscordServer"
                }
              }
            },
            "description": ""
          }
        },
        "description": "Update a discord server"
      },
      "delete": {
        "operationId": "discord-servers-destroy",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this discord server.",
            "required": true
          }
        ],
        "tags": [
          "discord"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "204": {
            "description": "No response body"
          }
        },
        "description": "Delete a discord server"
      }
    },
    "/discord/servers/{id}/verify/": {
      "get": {
        "operationId": "discord-servers-verify-retrieve",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this discord server.",
            "required": true
          }
        ],
        "tags": [
          "discord"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DiscordServer"
                }
              }
            },
            "description": ""
          }
        },
        "description": "Discord servers verify"
      }
    },
    "/enums/": {
      "get": {
        "operationId": "enums-retrieve",
        "tags": [
          "enums"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "200": {
            "description": "No response body"
          }
        },
        "description": "Enums"
      }
    },
    "/github/checkout-token/": {
      "post": {
        "operationId": "github-checkout-token-create",
        "description": "Create a short-lived, read-only checkout credential for one repository. Requires an authenticated Cekura agent session, and the repository must be available through the organization's active GitHub connection. Repository access is verified for every request.",
        "summary": "Authorize a connected repository checkout",
        "tags": [
          "github"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CheckoutTokenRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/CheckoutTokenRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/CheckoutTokenRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "product_chat_sandbox": []
          }
        ],
        "responses": {
          "200": {
            "description": "Repository checkout details and a short-lived credential."
          },
          "401": {
            "description": "Authentication required."
          },
          "404": {
            "description": "The repository is not available through the active connection."
          }
        }
      }
    },
    "/github/connection/": {
      "get": {
        "operationId": "github-connection-retrieve",
        "description": "GET connection status for the org; DELETE to disconnect (mark inactive).",
        "tags": [
          "github"
        ],
        "security": [
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "200": {
            "description": "No response body"
          }
        }
      },
      "delete": {
        "operationId": "github-connection-destroy",
        "description": "GET connection status for the org; DELETE to disconnect (mark inactive).",
        "tags": [
          "github"
        ],
        "security": [
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "204": {
            "description": "No response body"
          }
        }
      }
    },
    "/github/install-url/": {
      "get": {
        "operationId": "github-install-url-retrieve",
        "description": "Return the GitHub App install URL with a single-use signed state.",
        "tags": [
          "github"
        ],
        "security": [
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "200": {
            "description": "No response body"
          }
        }
      }
    },
    "/github/open-pr/": {
      "post": {
        "operationId": "github-open-pr-create",
        "description": "Create a new branch and open a pull request containing the submitted file changes. Requires an authenticated Cekura agent session, and the repository must be available through the organization's active GitHub connection. Direct writes to the default branch are not permitted, and repository access is verified for every request.",
        "summary": "Open a pull request in a connected repository",
        "tags": [
          "github"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OpenPRRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/OpenPRRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/OpenPRRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "product_chat_sandbox": []
          }
        ],
        "responses": {
          "201": {
            "description": "Pull request created on a new branch."
          },
          "400": {
            "description": "The pull request could not be created."
          },
          "401": {
            "description": "Authentication required."
          },
          "404": {
            "description": "The repository is not available through the active connection."
          }
        }
      }
    },
    "/github/setup/": {
      "post": {
        "operationId": "github-setup-create",
        "description": "Verify the installer with GitHub, then connect the installation.",
        "tags": [
          "github"
        ],
        "security": [
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "200": {
            "description": "No response body"
          }
        }
      }
    },
    "/github/webhook/": {
      "post": {
        "operationId": "github-webhook-create",
        "description": "GitHub App webhook. No auth class — the HMAC signature is the gate.",
        "tags": [
          "github"
        ],
        "responses": {
          "200": {
            "description": "No response body"
          }
        }
      }
    },
    "/notifications/v1/notifications/": {
      "get": {
        "operationId": "notifications-v1-notifications-list",
        "parameters": [
          {
            "name": "page",
            "required": false,
            "in": "query",
            "description": "A page number within the paginated result set.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "page_size",
            "required": false,
            "in": "query",
            "description": "Number of results to return per page.",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "tags": [
          "notifications"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedNotificationList"
                }
              }
            },
            "description": ""
          }
        },
        "description": "List notifications v1 notifications"
      }
    },
    "/notifications/v1/notifications/{id}/": {
      "get": {
        "operationId": "notifications-v1-notifications-retrieve",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "tags": [
          "notifications"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Notification"
                }
              }
            },
            "description": ""
          }
        },
        "description": "Retrieve a notifications v1 notification by ID"
      }
    },
    "/notifications/v1/notifications/{id}/mark_read/": {
      "post": {
        "operationId": "notifications-v1-notifications-mark-read-create",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "tags": [
          "notifications"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Notification"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/Notification"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Notification"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Notification"
                }
              }
            },
            "description": ""
          }
        },
        "description": "Notifications v1 notifications mark read"
      }
    },
    "/notifications/v1/notifications/mark_all_read/": {
      "post": {
        "operationId": "notifications-v1-notifications-mark-all-read-create",
        "tags": [
          "notifications"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Notification"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/Notification"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Notification"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Notification"
                }
              }
            },
            "description": ""
          }
        },
        "description": "Create a new notifications v1 notifications mark all read"
      }
    },
    "/notifications/v1/notifications/unread_count/": {
      "get": {
        "operationId": "notifications-v1-notifications-unread-count-retrieve",
        "tags": [
          "notifications"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Notification"
                }
              }
            },
            "description": ""
          }
        },
        "description": "Notifications v1 notifications unread count"
      }
    },
    "/notifications/v1/push/subscribe/": {
      "post": {
        "operationId": "notifications-v1-push-subscribe-create",
        "tags": [
          "notifications"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "200": {
            "description": "No response body"
          }
        },
        "description": "Notifications v1 push subscribe"
      }
    },
    "/notifications/v1/push/unsubscribe/": {
      "post": {
        "operationId": "notifications-v1-push-unsubscribe-create",
        "tags": [
          "notifications"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "200": {
            "description": "No response body"
          }
        },
        "description": "Notifications v1 push unsubscribe"
      }
    },
    "/notifications/v1/push/vapid_public_key/": {
      "get": {
        "operationId": "notifications-v1-push-vapid-public-key-retrieve",
        "tags": [
          "notifications"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "200": {
            "description": "No response body"
          }
        },
        "description": "Notifications v1 push vapid public key"
      }
    },
    "/observability/v1/agent-improvement-sessions/": {
      "get": {
        "operationId": "agent-improvement-sessions-list",
        "description": "Create + poll \"Improve Agent\" sessions from Insights or evaluators.\n\n``create`` resolves the target agent from Insight call logs, simulation\nruns, or selected evaluator scenarios. It validates a VAPI / ElevenLabs\nprovider key and opens Claude Agent SDK runs in product chat. Call-log\nsessions generate evaluators in one sandbox and self-improve in another;\nrun and scenario sessions reuse existing evaluators directly.\n\n``retrieve`` / ``list`` are read-only poll surfaces. Runtime checkpoints\nadvance the workflow and persist the status returned to the frontend.",
        "tags": [
          "observability"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AgentImprovementSession"
                  }
                }
              }
            },
            "description": ""
          }
        }
      },
      "post": {
        "operationId": "agent-improvement-sessions-create",
        "description": "Create + poll \"Improve Agent\" sessions from Insights or evaluators.\n\n``create`` resolves the target agent from Insight call logs, simulation\nruns, or selected evaluator scenarios. It validates a VAPI / ElevenLabs\nprovider key and opens Claude Agent SDK runs in product chat. Call-log\nsessions generate evaluators in one sandbox and self-improve in another;\nrun and scenario sessions reuse existing evaluators directly.\n\n``retrieve`` / ``list`` are read-only poll surfaces. Runtime checkpoints\nadvance the workflow and persist the status returned to the frontend.",
        "tags": [
          "observability"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentImprovementSession"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/AgentImprovementSession"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/AgentImprovementSession"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentImprovementSession"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/observability/v1/agent-improvement-sessions/{id}/": {
      "get": {
        "operationId": "agent-improvement-sessions-retrieve",
        "description": "Create + poll \"Improve Agent\" sessions from Insights or evaluators.\n\n``create`` resolves the target agent from Insight call logs, simulation\nruns, or selected evaluator scenarios. It validates a VAPI / ElevenLabs\nprovider key and opens Claude Agent SDK runs in product chat. Call-log\nsessions generate evaluators in one sandbox and self-improve in another;\nrun and scenario sessions reuse existing evaluators directly.\n\n``retrieve`` / ``list`` are read-only poll surfaces. Runtime checkpoints\nadvance the workflow and persist the status returned to the frontend.",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this agent improvement session.",
            "required": true
          }
        ],
        "tags": [
          "observability"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentImprovementSession"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/observability/v1/agent-improvement-sessions/{id}/stream-token/": {
      "get": {
        "operationId": "agent-improvement-sessions-stream-token-retrieve",
        "description": "Mint a one-run SSE token for the live Cekura chat handoff.\n\nThe improvement worker remains detached from the browser. This\nendpoint only lets an authorized browser attach to the already-running\nproduct-chat stream; it does not start, stop, or otherwise control the\nsandbox. It uses the same in-memory replay behavior as ordinary chat.",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this agent improvement session.",
            "required": true
          }
        ],
        "tags": [
          "observability"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentImprovementSession"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/observability/v1/alerts/": {
      "get": {
        "operationId": "alerts-list",
        "description": "Return all alerts configured in the project, including their sub_type (`normal` | `significant_change` | `threshold`), source metric, current Slack/notification config, and trigger counters. Use before creating a new alert to check if one already exists on the same metric.",
        "summary": "List alerts in a project",
        "parameters": [
          {
            "in": "query",
            "name": "project_id",
            "schema": {
              "type": "integer"
            },
            "description": "Project this alert belongs to"
          },
          {
            "in": "query",
            "name": "source_type",
            "schema": {
              "type": "string",
              "x-spec-enum-id": "2713692dc60667c9",
              "enum": [
                "metric"
              ]
            },
            "description": "Type of data source: metric, duration, call_volume, etc.\n\n* `metric` - Metric"
          },
          {
            "in": "query",
            "name": "enabled",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "search",
            "required": false,
            "in": "query",
            "description": "A search term.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ordering",
            "required": false,
            "in": "query",
            "description": "Which field to use when ordering the results.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "tags": [
          "observability"
        ],
        "security": [
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AlertList"
                  }
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "alerts-list",
            "description": "Return all alerts configured in the project, including their sub_type (`normal` | `significant_change` | `threshold`), source metric, current Slack/notification config, and trigger counters. Use before creating a new alert to check if one already exists on the same metric."
          }
        }
      },
      "post": {
        "operationId": "alerts-create",
        "description": "Create an alert that fires when a metric crosses a threshold. Three sub_types:\n\n- `normal` — Failure alert. Fires per failing call. Only for binary metrics (eval_type starts with `binary_`) plus the latency / infrastructure / critical-deviation built-ins.\n- `significant_change` — Trend alert. Fires when a numeric/continuous metric's rolling mean deviates from history. Pass `preset: \"balanced\"` (or `\"conservative\"` / `\"aggressive\"`) to skip manual std_multiplier / ewma_alpha / window_size math — the server expands the preset. Balanced is the safe default.\n- `threshold` — Hard ceiling/floor. Fires when ≥ `min_breaches` of the last `window_size` evaluations cross `value`. Use for numeric metrics where the user has a known good range. Operator is `gt` | `lt` | `outside` ({low, high}).\n\n**Slack delivery requires** `notifications.slack.workspace_id` (+ optional `channel_id`). Alerts with empty `notifications` are silent — fire counters still increment but no message is sent. Pick a workspace_id from `slack_workspaces_list`.",
        "summary": "Create an alert on a metric",
        "tags": [
          "observability"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AlertCreate"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/AlertCreate"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/AlertCreate"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AlertCreate"
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "alerts-create",
            "description": "Create an alert that fires when a metric crosses a threshold. Three sub_types:\n\n- `normal` — Failure alert. Fires per failing call. Only for binary metrics (eval_type starts with `binary_`) plus the latency / infrastructure / critical-deviation built-ins.\n- `significant_change` — Trend alert. Fires when a numeric/continuous metric's rolling mean deviates from history. Pass `preset: \"balanced\"` (or `\"conservative\"` / `\"aggressive\"`) to skip manual std_multiplier / ewma_alpha / window_size math — the server expands the preset. Balanced is the safe default.\n- `threshold` — Hard ceiling/floor. Fires when ≥ `min_breaches` of the last `window_size` evaluations cross `value`. Use for numeric metrics where the user has a known good range. Operator is `gt` | `lt` | `outside` ({low, high}).\n\n**Slack delivery requires** `notifications.slack.workspace_id` (+ optional `channel_id`). Alerts with empty `notifications` are silent — fire counters still increment but no message is sent. Pick a workspace_id from `slack_workspaces_list`."
          }
        }
      }
    },
    "/observability/v1/alerts/{id}/": {
      "get": {
        "operationId": "alerts-retrieve",
        "description": "Return one alert with its source / threshold / notifications JSON expanded. Use this before updating to confirm the current shape — `partial_update` merges into existing JSON, so you need to know what's already there.",
        "summary": "Get an alert's full config",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this alert.",
            "required": true
          }
        ],
        "tags": [
          "observability"
        ],
        "security": [
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AlertDetail"
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "alerts-retrieve",
            "description": "Return one alert with its source / threshold / notifications JSON expanded. Use this before updating to confirm the current shape — `partial_update` merges into existing JSON, so you need to know what's already there."
          }
        }
      },
      "put": {
        "operationId": "alerts-update",
        "description": "Manage alerts that fire when metric thresholds are crossed.",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this alert.",
            "required": true
          }
        ],
        "tags": [
          "observability"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AlertUpdate"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/AlertUpdate"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/AlertUpdate"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AlertUpdate"
                }
              }
            },
            "description": ""
          }
        }
      },
      "patch": {
        "operationId": "alerts-partial-update",
        "description": "Update fields on an existing alert. Common uses from chat:\n\n- Tune sensitivity: pass `preset: \"conservative\"` to make a noisy trend alert quieter (or `\"aggressive\"` to catch smaller shifts). Explicit `threshold.std_multiplier` / `ewma_alpha` / `source.window_size` override the preset.\n- Change Slack routing: pass a new `notifications.slack` block.\n- Disable temporarily: pass `enabled: false`.\n\nChanging `sub_type` requires the matching `source` + `threshold` shape — see `alerts_create` for the field matrix per sub_type. Partial updates merge JSON, so omitted nested keys keep their existing values.",
        "summary": "Update an alert (partial)",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this alert.",
            "required": true
          }
        ],
        "tags": [
          "observability"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchedAlertUpdate"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/PatchedAlertUpdate"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/PatchedAlertUpdate"
              }
            }
          }
        },
        "security": [
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AlertUpdate"
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "alerts-partial-update",
            "description": "Update fields on an existing alert. Common uses from chat:\n\n- Tune sensitivity: pass `preset: \"conservative\"` to make a noisy trend alert quieter (or `\"aggressive\"` to catch smaller shifts). Explicit `threshold.std_multiplier` / `ewma_alpha` / `source.window_size` override the preset.\n- Change Slack routing: pass a new `notifications.slack` block.\n- Disable temporarily: pass `enabled: false`.\n\nChanging `sub_type` requires the matching `source` + `threshold` shape — see `alerts_create` for the field matrix per sub_type. Partial updates merge JSON, so omitted nested keys keep their existing values."
          }
        }
      },
      "delete": {
        "operationId": "alerts-destroy",
        "description": "Permanently delete an alert. ⚠ Irreversible. The chat agent refuses this operation at the SDK layer; direct API/SDK callers can still use it.",
        "summary": "Delete an alert",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this alert.",
            "required": true
          }
        ],
        "tags": [
          "observability"
        ],
        "security": [
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "204": {
            "description": "No response body"
          }
        },
        "x-mcp-expose": true,
        "x-mcp-destructive": true,
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "alerts-destroy",
            "description": "Permanently delete an alert. ⚠ Irreversible. The chat agent refuses this operation at the SDK layer; direct API/SDK callers can still use it."
          }
        }
      }
    },
    "/observability/v1/alerts/{id}/review_detail/": {
      "get": {
        "operationId": "alerts-review-detail-retrieve",
        "description": "Per-alert review data — config snapshot, timeline, paginated fires.\n\nPowers the per-alert review page. Single-alert version of the bulk\n`review` action. Timeline is computed with a DB-side GROUP BY so the\nendpoint stays fast for noisy alerts (thousands of fires in 7d).\n\nQuery params:\n    hours: optional, defaults to 24. Capped at 7 days.\n    page: optional, defaults to 1.\n    page_size: optional, defaults to 50, capped at 200.",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this alert.",
            "required": true
          }
        ],
        "tags": [
          "observability"
        ],
        "security": [
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AlertDetail"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/observability/v1/alerts/{id}/summarize/": {
      "post": {
        "operationId": "alerts-summarize-create",
        "description": "Kick off an LLM summary of the last N hours of fires for this alert.\n\nReturns a progress_id. Frontend polls `summarize_progress` until status\nis 'completed' or 'error'. Cached for 1 hour keyed on (alert, hours,\nlatest fire id) — re-invocations within that window return the same\nprogress_id.",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this alert.",
            "required": true
          }
        ],
        "tags": [
          "observability"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AlertDetail"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/AlertDetail"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/AlertDetail"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AlertDetail"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/observability/v1/alerts/review/": {
      "get": {
        "operationId": "alerts-review-retrieve",
        "description": "Aggregate every alert's fire activity over a rolling window. Returns KPI totals (total fires, unique alerts that fired, top firing alert), a time-bucketed timeline (hourly for 24h, 3-hour for 3d, 6-hour for 7d), and a per-alert breakdown with a sparkline of fires-per-bucket. Use to answer 'what alerts fired this week?' or 'is anything noisy right now?'. Pass `hours` (default 24, capped at 168) to widen the window. The response shape lets you compose a written report in a single call.",
        "summary": "Review alert activity in a project",
        "tags": [
          "observability"
        ],
        "security": [
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AlertDetail"
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "alerts-review-retrieve",
            "description": "Aggregate every alert's fire activity over a rolling window. Returns KPI totals (total fires, unique alerts that fired, top firing alert), a time-bucketed timeline (hourly for 24h, 3-hour for 3d, 6-hour for 7d), and a per-alert breakdown with a sparkline of fires-per-bucket. Use to answer 'what alerts fired this week?' or 'is anything noisy right now?'. Pass `hours` (default 24, capped at 168) to widen the window. The response shape lets you compose a written report in a single call."
          }
        },
        "parameters": [
          {
            "name": "project_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Tenant scope. Supply one of `project_id` when authenticating with a user session or OAuth bearer token; omit when using an API key already scoped to the tenant."
          }
        ]
      }
    },
    "/observability/v1/alerts/summarize_progress/": {
      "get": {
        "operationId": "alerts-summarize-progress-retrieve",
        "description": "Manage alerts that fire when metric thresholds are crossed.",
        "tags": [
          "observability"
        ],
        "security": [
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AlertDetail"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/observability/v1/alerts/trigger_summary/": {
      "get": {
        "operationId": "alerts-trigger-summary-retrieve",
        "description": "Return fire counts per alert over a time window.\n\nPowers the \"Last 24h\" status pill on the alerts list. Counts CallLogAlert\nrows linked to each alert in the project, scoped to the window.\n\nQuery params:\n    project_id: required, scopes the result to alerts in this project.\n    hours: optional, defaults to 24. Window size in hours.\n\nReturns: { \"<alert_id>\": <fire_count>, ... }",
        "tags": [
          "observability"
        ],
        "security": [
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AlertDetail"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/observability/v1/call-logs/": {
      "get": {
        "operationId": "call-logs-list",
        "description": "List **production** call logs for an agent or project. Production-only — test/simulation runs triggered via `run_scenarios_*` do NOT create call logs; use `results_list` + `runs_bulk_retrieve` for simulation data instead.\n\nAlways pass `agent_id` or `project_id` to scope results — without one, the response may be very large. **`project_id` is required when using an organization-level API key.**\n\n**Time window:** results default to the **last 30 days** when no timestamp range is given. A supplied range must not exceed **31 days** (wider ranges return `400`); pass `timestamp_from`/`timestamp_to` (ISO 8601) to select a window within that limit.\n\n**Filtering:**\n- `timestamp_from` / `timestamp_to` — ISO 8601 date range filter\n- `call_ids` — comma-separated **CallLog IDs** (integer DB IDs of call logs in this list response), e.g. `\"123,456\"`. Distinct from simulation `run_id`s and from each call log's own `call_id` field (which holds the provider's call identifier string).\n- `filters_v2` — structured JSON filter (same format as dashboard filters). Simple: `{\"field\": \"success\", \"op\": \"eq\", \"value\": true}`. Compound: `{\"operator\": \"and\", \"conditions\": [{...}, {...}]}`. Supported operators: `eq`, `neq`, `gt`, `gte`, `lt`, `lte`, `contains`, `startswith`, `in`, `isnull`.",
        "summary": "List call logs",
        "parameters": [
          {
            "name": "page",
            "required": false,
            "in": "query",
            "description": "A page number within the paginated result set.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "page_size",
            "required": false,
            "in": "query",
            "description": "Number of results to return per page.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "timestamp_from",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "description": "\nFilter results from this timestamp (e.g. 2025-01-01T00:00:00Z)\nExample: `2025-01-01T00:00:00Z`\n"
          },
          {
            "in": "query",
            "name": "timestamp_to",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "description": "\nFilter results to this timestamp (e.g. 2025-01-31T23:59:59Z)\nExample: `2025-01-31T23:59:59Z`\n"
          },
          {
            "in": "query",
            "name": "call_ids",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "Comma-separated list of call log IDs to filter by. Example: `\"5181749,5181752\"`"
          },
          {
            "in": "query",
            "name": "agent_id",
            "schema": {
              "type": "integer"
            },
            "description": "\nFilter by agent ID. Either agent_id or project_id should be provided.\nExample: `2142`\n"
          },
          {
            "in": "query",
            "name": "project_id",
            "schema": {
              "type": "integer"
            },
            "description": "\nFilter by project ID. Either agent_id or project_id should be provided.\n**Required when using an organization-level API key** to scope results to a specific project.\nExample: `1376`\n"
          },
          {
            "in": "query",
            "name": "assistant_id",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "\nFilter by assistant ID\nExample:\n- `\"asst_1234567890\"`\n- `\"agent_xyz789\"`\n"
          },
          {
            "in": "query",
            "name": "filters_v2",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "\nAdvanced JSON filters using CallLogQueryFilter format (same as dashboard filters).\nSupports nested AND/OR conditions, field comparisons, and related field filtering.\n\nExample - Simple filter:\n`{\"field\": \"success\", \"op\": \"eq\", \"value\": true}`\n\nExample - AND conditions:\n`{\"operator\": \"and\", \"conditions\": [{\"field\": \"success\", \"op\": \"eq\", \"value\": true}, {\"field\": \"duration\", \"op\": \"gte\", \"value\": 60}]}`\n\nExample - OR conditions:\n`{\"operator\": \"or\", \"conditions\": [{\"field\": \"call_ended_reason\", \"op\": \"eq\", \"value\": \"completed\"}, {\"field\": \"call_ended_reason\", \"op\": \"eq\", \"value\": \"hangup\"}]}`\n\nSupported fields: success, duration, call_id, timestamp, created_at, call_ended_reason, customer_number, etc.\nSupported operators: eq, neq, gt, gte, lt, lte, contains, startswith, in, isnull\n"
          }
        ],
        "tags": [
          "observability"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedCallLogListList"
                }
              }
            },
            "description": ""
          }
        },
        "deprecated": true
      },
      "post": {
        "operationId": "call-logs-create",
        "description": "Create a new call log",
        "tags": [
          "observability"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CallLogDetail"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/CallLogDetail"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/CallLogDetail"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CallLogDetail"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/observability/v1/call-logs-external/": {
      "get": {
        "operationId": "call-logs-external-list",
        "description": "List **production** call logs for an agent or project. Production-only — test/simulation runs triggered via `run_scenarios_*` do NOT create call logs; use `results_list` + `runs_bulk_retrieve` for simulation data instead.\n\nAlways pass `agent_id` or `project_id` to scope results — without one, the response may be very large. **`project_id` is required when using an organization-level API key.**\n\n**Time window:** results default to the **last 30 days** when no timestamp range is given. A supplied range must not exceed **31 days** (wider ranges return `400`); pass `timestamp_from`/`timestamp_to` (ISO 8601) to select a window within that limit.\n\n**Filtering:**\n- `timestamp_from` / `timestamp_to` — ISO 8601 date range filter\n- `call_ids` — comma-separated **CallLog IDs** (integer DB IDs of call logs in this list response), e.g. `\"123,456\"`. Distinct from simulation `run_id`s and from each call log's own `call_id` field (which holds the provider's call identifier string).\n- `filters_v2` — structured JSON filter (same format as dashboard filters). Simple: `{\"field\": \"success\", \"op\": \"eq\", \"value\": true}`. Compound: `{\"operator\": \"and\", \"conditions\": [{...}, {...}]}`. Supported operators: `eq`, `neq`, `gt`, `gte`, `lt`, `lte`, `contains`, `startswith`, `in`, `isnull`.",
        "summary": "List call logs",
        "parameters": [
          {
            "name": "page",
            "required": false,
            "in": "query",
            "description": "A page number within the paginated result set.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "page_size",
            "required": false,
            "in": "query",
            "description": "Number of results to return per page.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "timestamp_from",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "description": "\nFilter results from this timestamp (e.g. 2025-01-01T00:00:00Z)\nExample: `2025-01-01T00:00:00Z`\n"
          },
          {
            "in": "query",
            "name": "timestamp_to",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "description": "\nFilter results to this timestamp (e.g. 2025-01-31T23:59:59Z)\nExample: `2025-01-31T23:59:59Z`\n"
          },
          {
            "in": "query",
            "name": "call_ids",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "Comma-separated list of call log IDs to filter by. Example: `\"5181749,5181752\"`"
          },
          {
            "in": "query",
            "name": "agent_id",
            "schema": {
              "type": "integer"
            },
            "description": "\nFilter by agent ID. Either agent_id or project_id should be provided.\nExample: `2142`\n"
          },
          {
            "in": "query",
            "name": "project_id",
            "schema": {
              "type": "integer"
            },
            "description": "\nFilter by project ID. Either agent_id or project_id should be provided.\n**Required when using an organization-level API key** to scope results to a specific project.\nExample: `1376`\n"
          },
          {
            "in": "query",
            "name": "assistant_id",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "\nFilter by assistant ID\nExample:\n- `\"asst_1234567890\"`\n- `\"agent_xyz789\"`\n"
          },
          {
            "in": "query",
            "name": "filters_v2",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "\nAdvanced JSON filters using CallLogQueryFilter format (same as dashboard filters).\nSupports nested AND/OR conditions, field comparisons, and related field filtering.\n\nExample - Simple filter:\n`{\"field\": \"success\", \"op\": \"eq\", \"value\": true}`\n\nExample - AND conditions:\n`{\"operator\": \"and\", \"conditions\": [{\"field\": \"success\", \"op\": \"eq\", \"value\": true}, {\"field\": \"duration\", \"op\": \"gte\", \"value\": 60}]}`\n\nExample - OR conditions:\n`{\"operator\": \"or\", \"conditions\": [{\"field\": \"call_ended_reason\", \"op\": \"eq\", \"value\": \"completed\"}, {\"field\": \"call_ended_reason\", \"op\": \"eq\", \"value\": \"hangup\"}]}`\n\nSupported fields: success, duration, call_id, timestamp, created_at, call_ended_reason, customer_number, etc.\nSupported operators: eq, neq, gt, gte, lt, lte, contains, startswith, in, isnull\n"
          }
        ],
        "tags": [
          "observability"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedCallLogListList"
                }
              }
            },
            "description": ""
          }
        },
        "deprecated": true
      },
      "post": {
        "operationId": "call-logs-external-create",
        "description": "Create a new call log",
        "tags": [
          "observability"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CallLogDetail"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/CallLogDetail"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/CallLogDetail"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CallLogDetail"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/observability/v1/call-logs-external/{id}/": {
      "get": {
        "operationId": "call-logs-external-retrieve",
        "description": "Retrieve a production CallLog by its integer **CallLog ID** (path parameter). This is distinct from simulation `run_id` (use `runs_retrieve` for those) and from the call log's own `call_id` string field (the provider's call identifier).",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this call log.",
            "required": true
          }
        ],
        "tags": [
          "observability"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CallLogDetail"
                }
              }
            },
            "description": ""
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                }
              }
            },
            "description": ""
          }
        },
        "deprecated": true
      },
      "patch": {
        "operationId": "observability-v2-call-logs-partial-update",
        "description": "Updates source data for an existing production call log.\n\n**Supported fields**\n- `call_id` — Provider call identifier. Subject to the organization's duplicate-call-ID policy.\n- `transcript_json` — Structured transcript in a supported provider or Cekura format. Use `transcript_type` to specify the format, or omit it for automatic detection. This replaces both transcript representations.\n- `timestamp` — Call start time in ISO 8601 format.\n- `duration` — Call duration in minutes.\n- `call_ended_reason` and `customer_number` — Provider-supplied call attributes.\n- `metadata` and `dynamic_variables` — JSON objects merged at the top level with the existing values. Supplied keys overwrite matching keys; omitted keys are preserved.\n\n**Restrictions**\nOnly the fields listed above are accepted. System-managed fields, including agent and project ownership, metric evaluations, review state, topic, and dropoff point, cannot be updated.\n\n**Metric evaluation**\nThis operation does not recompute metrics. To evaluate the updated call data, invoke `rerun_evaluation` in a separate request.",
        "summary": "Update call log source data",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this call log.",
            "required": true
          }
        ],
        "tags": [
          "observability"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchedUpdateCallLog"
              },
              "examples": {
                "Append-twilio-insights": {
                  "value": {
                    "metadata": {
                      "twilio_insights": {
                        "call_sid": "CA123",
                        "answered_by": "human"
                      }
                    }
                  },
                  "summary": "Append Twilio Insights metadata"
                },
                "Correct-source-call-data": {
                  "value": {
                    "call_id": "provider-call-123",
                    "duration": 1.5,
                    "call_ended_reason": "customer-ended-call"
                  },
                  "summary": "Correct provider-supplied call data"
                },
                "Update-structured-transcript": {
                  "value": {
                    "transcript_type": "cekura",
                    "transcript_json": [
                      {
                        "role": "Testing Agent",
                        "content": "Hello.",
                        "start_time": 0,
                        "end_time": 1
                      },
                      {
                        "role": "Main Agent",
                        "content": "How can I help?",
                        "start_time": 1,
                        "end_time": 2.5
                      }
                    ]
                  },
                  "summary": "Update a structured transcript"
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/PatchedUpdateCallLog"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/PatchedUpdateCallLog"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CallLogDetail"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      },
      "delete": {
        "operationId": "call-logs-external-destroy",
        "description": "⚠ Irreversible. Deletes the call log along with its transcript and voice recording. By default metric evaluations are also deleted; set `retain_evaluations=true` to keep them and leave the call record un-soft-deleted.",
        "summary": "Delete a call log",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this call log.",
            "required": true
          },
          {
            "in": "query",
            "name": "retain_evaluations",
            "schema": {
              "type": "boolean",
              "default": false
            },
            "description": "If true, metric evaluations are retained and the call log is not soft-deleted. Default: false."
          }
        ],
        "tags": [
          "observability"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "204": {
            "description": "No response body"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/observability/v1/call-logs-external/{id}/mark_critical_scenario_wrong/": {
      "post": {
        "operationId": "call-logs-external-mark-critical-scenario-wrong-create",
        "description": "Call logs mark critical scenario wrong",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this call log.",
            "required": true
          }
        ],
        "tags": [
          "observability"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CallLogDetail"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/CallLogDetail"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/CallLogDetail"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CallLogDetail"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/observability/v1/call-logs-external/{id}/mark_metric_vote/": {
      "post": {
        "operationId": "call-logs-external-mark-metric-vote-create",
        "description": "Record a thumbs-up or thumbs-down vote on a specific metric evaluation for this call log and optionally provide an expected value and free-text feedback. Updates the metric evaluation and marks the call log as reviewed.",
        "summary": "Submit a metric vote for a call log",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this call log.",
            "required": true
          }
        ],
        "tags": [
          "Call Logs"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MarkMetricVote"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/MarkMetricVote"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/MarkMetricVote"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MarkMetricVoteCallLogResponse"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/observability/v1/call-logs-external/{id}/unmark_critical_scenario_wrong/": {
      "post": {
        "operationId": "call-logs-external-unmark-critical-scenario-wrong-create",
        "description": "Call logs unmark critical scenario wrong",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this call log.",
            "required": true
          }
        ],
        "tags": [
          "observability"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CallLogDetail"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/CallLogDetail"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/CallLogDetail"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CallLogDetail"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/observability/v1/call-logs-external/analyze_call_logs/": {
      "get": {
        "operationId": "call-logs-external-analyze-call-logs-retrieve",
        "description": "Analyze call logs using Claude Agent SDK.\n\nClaude uses Read/Bash tools to query the CSV file without loading it into context.\nThis allows analyzing large datasets efficiently.",
        "tags": [
          "observability"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CallLogDetail"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/observability/v1/call-logs-external/complete-upload/": {
      "post": {
        "operationId": "call-logs-external-complete-upload-create",
        "description": "Call logs complete upload",
        "tags": [
          "observability"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CallLogDetail"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/CallLogDetail"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/CallLogDetail"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CallLogDetail"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/observability/v1/call-logs-external/create_scenarios/": {
      "post": {
        "operationId": "call-logs-create-scenarios",
        "description": "Generate test scenarios from real production call logs.\n\nReturns a `progress_id` immediately — the actual scenario creation runs in the background.\nPoll `GET /observability/v1/call-logs/create_scenarios_progress?progress_id=<id>` until\n`completed_scenarios + failed_scenarios >= total_scenarios`. The `scenarios_list` field\n(full Scenario objects) is populated only once processing is complete.\n\n**`call_logs` accepts:** a list of IDs `[1, 2, 3]` or `\"all\"` for every call log on the agent.\n\n**`copy_to_agent`:** optionally copy the generated scenarios to a different agent —\nuseful when your observation agent and your test agent are separate.\n\n**Prerequisite:** call logs must have a transcript (uploaded via `transcript_json`).\nAudio-only logs without a transcript cannot produce scenarios.",
        "tags": [
          "observability"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostCreateScenarios"
              },
              "examples": {
                "Create-scenarios-with-agent-id": {
                  "value": {
                    "agent_id": 2142,
                    "call_logs": [
                      1,
                      2,
                      3
                    ],
                    "copy_to_agent": null
                  },
                  "summary": "create-scenarios-with-agent-id"
                },
                "Create-scenarios-with-assistant-id": {
                  "value": {
                    "assistant_id": "asst_1234567890",
                    "call_logs": "all"
                  },
                  "summary": "create-scenarios-with-assistant-id"
                },
                "Create-scenarios-with-copy-to-agent": {
                  "value": {
                    "agent_id": 2142,
                    "call_logs": [
                      1,
                      2,
                      3
                    ],
                    "copy_to_agent": 2143
                  },
                  "summary": "create-scenarios-with-copy-to-agent"
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostCreateScenarios"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostCreateScenarios"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "progress_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Unique identifier for tracking the progress of scenario creation"
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/observability/v1/call-logs-external/create_scenarios_progress/": {
      "get": {
        "operationId": "call-logs-create-scenarios-progress",
        "description": "Call logs create scenarios progress",
        "parameters": [
          {
            "in": "query",
            "name": "progress_id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Progress ID returned from create_scenarios endpoint",
            "required": true
          }
        ],
        "tags": [
          "observability"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SchemaCreateScenariosProgressResponse"
                },
                "examples": {
                  "Progress-in-progress": {
                    "value": {
                      "agent_id": 2142,
                      "completed_scenarios": 2,
                      "failed_scenarios": 0,
                      "total_scenarios": 5,
                      "scenarios_list": [],
                      "errors": []
                    },
                    "summary": "progress-in-progress"
                  },
                  "Progress-completed": {
                    "value": {
                      "agent_id": 2142,
                      "completed_scenarios": 4,
                      "failed_scenarios": 1,
                      "total_scenarios": 5,
                      "scenarios_list": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "description": "Unique identifier for the scenario"
                            },
                            "name": {
                              "type": "string",
                              "description": "Name of the scenario"
                            },
                            "agent": {
                              "type": "integer",
                              "description": "ID of the AI agent this scenario belongs to"
                            },
                            "assistant_id": {
                              "type": "string",
                              "description": "Alternative to agent ID - the assistant ID to use for this scenario"
                            },
                            "personality": {
                              "type": "integer",
                              "description": "ID of the personality used in this scenario"
                            },
                            "personality_name": {
                              "type": "string",
                              "description": "Name of the personality used in this scenario"
                            },
                            "tags": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              },
                              "description": "Tags associated with this scenario."
                            },
                            "runs": {
                              "type": "array",
                              "items": {
                                "type": "integer"
                              },
                              "description": "List of IDs for the last run of this scenario"
                            },
                            "metrics": {
                              "type": "array",
                              "items": {
                                "type": "integer"
                              },
                              "description": "List of metric IDs to associate with this scenario"
                            },
                            "metric_names": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              },
                              "description": "List of metric names associated with this scenario"
                            },
                            "phone_number": {
                              "type": "string",
                              "description": "Phone number used for outbound calls in this scenario"
                            },
                            "phone_number_queue_length": {
                              "type": "integer",
                              "description": "Number of runs in queue for this phone number"
                            },
                            "first_message": {
                              "type": "string",
                              "description": "First message to be sent in the scenario"
                            },
                            "inbound_phone_number": {
                              "type": "integer",
                              "description": "ID of the phone number used for inbound calls"
                            },
                            "inbound_phone_number_data": {
                              "type": "object",
                              "description": "Details of the phone number used for inbound calls",
                              "properties": {
                                "id": {
                                  "type": "integer",
                                  "description": "ID of the inbound phone number"
                                },
                                "number": {
                                  "type": "string",
                                  "description": "The actual phone number"
                                },
                                "phone_number_id": {
                                  "type": "string",
                                  "description": "External ID of the phone number"
                                }
                              }
                            },
                            "instructions": {
                              "type": "string",
                              "description": "Instructions for the AI agent in this scenario"
                            },
                            "simulation_description": {
                              "type": "string",
                              "description": "Description of the simulation if this scenario was created by simulation"
                            },
                            "information_fields": {
                              "type": "object",
                              "description": "Additional information fields for the scenario"
                            },
                            "expected_outcome_prompt": {
                              "type": "string",
                              "description": "Expected outcome prompt for the scenario"
                            },
                            "scenario_language": {
                              "type": "string",
                              "description": "Language of the scenario"
                            },
                            "is_simulating": {
                              "type": "boolean",
                              "description": "Whether this scenario was created by simulation"
                            },
                            "test_profile_data": {
                              "type": "object",
                              "description": "The test profile generated for this scenario, including its sectioned `information` (main_agent_variables / testing_agent_variables)"
                            },
                            "generated_mock_tool_entries": {
                              "type": "array",
                              "description": "Expected mock tool calls generated for this scenario when the agent has mock tools attached. Empty when the agent has no mock tools.",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "tool_id": {
                                    "type": "integer",
                                    "description": "ID of the mock tool on the agent"
                                  },
                                  "tool_name": {
                                    "type": "string",
                                    "description": "Name of the tool being mocked"
                                  },
                                  "new_entry": {
                                    "type": "object",
                                    "description": "The expected tool call for this scenario",
                                    "properties": {
                                      "input": {
                                        "type": "object",
                                        "description": "Input parameters the tool call is expected to receive"
                                      },
                                      "output": {
                                        "type": "object",
                                        "description": "Response the mock tool will return"
                                      }
                                    }
                                  }
                                }
                              }
                            }
                          }
                        }
                      },
                      "errors": [
                        {
                          "call_log_id": 3,
                          "error": {
                            "detail": "Transcript is missing"
                          }
                        }
                      ]
                    },
                    "summary": "progress-completed"
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/observability/v1/call-logs-external/delete_call_logs/": {
      "post": {
        "operationId": "call-logs-bulk-delete",
        "description": "Call logs bulk delete",
        "tags": [
          "observability"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeleteCallLogs"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/DeleteCallLogs"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/DeleteCallLogs"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "204": {
            "description": "No response body"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/observability/v1/call-logs-external/evaluate_metrics/": {
      "post": {
        "operationId": "call-logs-external-evaluate-metrics-create",
        "description": "Evaluate one or more metrics against selected call logs. Unlike `rerun_evaluation` (which re-runs all assigned metrics), this endpoint lets you target specific metrics.\n\n**Scope:** provide either `agent_id` or `project_id` to identify which agent's call logs and metrics to use. Metrics must belong to the specified agent or project.\n\n**Credit check:** cost scales with the number of call logs and metrics selected. The request is rejected if your balance is insufficient — check your balance first via `test_framework_billing_info_retrieve`.\n\n**Async:** evaluation runs in the background. The response returns the call logs in their current state. Retrieve each call log individually to see updated metric results once evaluation completes.\n\n**Rate limited.** Respect 429 responses — wait for the `Retry-After` duration.",
        "summary": "Run specific metrics against call logs",
        "tags": [
          "observability"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EvaluateMetrics"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/EvaluateMetrics"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/EvaluateMetrics"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CallLogList"
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/observability/v1/call-logs-external/export_call_logs/": {
      "get": {
        "operationId": "call-logs-external-export-call-logs-retrieve",
        "description": "Call logs export call logs",
        "tags": [
          "observability"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CallLogDetail"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/observability/v1/call-logs-external/export_call_logs_progress/": {
      "get": {
        "operationId": "call-logs-external-export-call-logs-progress-retrieve",
        "description": "Call logs export call logs progress",
        "tags": [
          "observability"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CallLogDetail"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/observability/v1/call-logs-external/filters/": {
      "get": {
        "operationId": "call-logs-external-filters-retrieve",
        "description": "Call logs filters",
        "tags": [
          "observability"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CallLogDetail"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/observability/v1/call-logs-external/filters_call_id/": {
      "get": {
        "operationId": "call-logs-external-filters-call-id-retrieve",
        "description": "Autocomplete-search the production CallLog `call_id` field (the provider's call identifier string). This is distinct from simulation `run_id` (integer; see `runs_list`) and from CallLog ID (integer DB ID).",
        "tags": [
          "observability"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CallLogDetail"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/observability/v1/call-logs-external/filters_customer_number/": {
      "get": {
        "operationId": "call-logs-external-filters-customer-number-retrieve",
        "description": "Call logs filters customer number",
        "tags": [
          "observability"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CallLogDetail"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/observability/v1/call-logs-external/get-upload-url/": {
      "post": {
        "operationId": "call-logs-external-get-upload-url-create",
        "description": "Call logs get upload url",
        "tags": [
          "observability"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CallLogDetail"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/CallLogDetail"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/CallLogDetail"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CallLogDetail"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/observability/v1/call-logs-external/rerun_evaluation/": {
      "post": {
        "operationId": "call-logs-external-rerun-evaluation-create",
        "description": "Trigger metric re-evaluation on one or more existing call logs. Provide either `agent_id` or `assistant_id` (not both) to identify the agent, then specify which call logs to re-evaluate.\n\n**`call_logs` accepts:**\n- A list of call log IDs: `[1, 2, 3]`\n- The string `\"all\"` to re-evaluate every call log for the agent\n\n**Side effect:** for non-reviewed call logs, `success` is reset to `null` before re-evaluation begins. Reviewed call logs retain their human-approved outcome.\n\n**Rate limited.** If the limit is exceeded you will receive a 429 response — wait for the `Retry-After` duration before retrying.",
        "summary": "Re-run metric evaluation on call logs",
        "tags": [
          "observability"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RerunEvaluation"
              },
              "examples": {
                "Re-evaluate-specific-call-logs": {
                  "value": {
                    "agent_id": 2142,
                    "call_logs": [
                      101,
                      102,
                      103
                    ]
                  },
                  "summary": "re-evaluate-specific-call-logs"
                },
                "Re-evaluate-all-call-logs": {
                  "value": {
                    "agent_id": 2142,
                    "call_logs": "all"
                  },
                  "summary": "re-evaluate-all-call-logs"
                },
                "Re-evaluate-using-assistant-id": {
                  "value": {
                    "assistant_id": 2143,
                    "call_logs": [
                      101,
                      102
                    ]
                  },
                  "summary": "re-evaluate-using-assistant-id"
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/RerunEvaluation"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/RerunEvaluation"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CallLogDetail"
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/observability/v1/call-logs/{id}/": {
      "get": {
        "operationId": "call-logs-retrieve",
        "description": "Retrieve a production CallLog by its integer **CallLog ID** (path parameter). This is distinct from simulation `run_id` (use `runs_retrieve` for those) and from the call log's own `call_id` string field (the provider's call identifier).",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this call log.",
            "required": true
          }
        ],
        "tags": [
          "observability"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CallLogDetail"
                }
              }
            },
            "description": ""
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                }
              }
            },
            "description": ""
          }
        },
        "deprecated": true
      },
      "patch": {
        "operationId": "observability-v2-call-logs-partial-update_2",
        "description": "Updates source data for an existing production call log.\n\n**Supported fields**\n- `call_id` — Provider call identifier. Subject to the organization's duplicate-call-ID policy.\n- `transcript_json` — Structured transcript in a supported provider or Cekura format. Use `transcript_type` to specify the format, or omit it for automatic detection. This replaces both transcript representations.\n- `timestamp` — Call start time in ISO 8601 format.\n- `duration` — Call duration in minutes.\n- `call_ended_reason` and `customer_number` — Provider-supplied call attributes.\n- `metadata` and `dynamic_variables` — JSON objects merged at the top level with the existing values. Supplied keys overwrite matching keys; omitted keys are preserved.\n\n**Restrictions**\nOnly the fields listed above are accepted. System-managed fields, including agent and project ownership, metric evaluations, review state, topic, and dropoff point, cannot be updated.\n\n**Metric evaluation**\nThis operation does not recompute metrics. To evaluate the updated call data, invoke `rerun_evaluation` in a separate request.",
        "summary": "Update call log source data",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this call log.",
            "required": true
          }
        ],
        "tags": [
          "observability"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchedUpdateCallLog"
              },
              "examples": {
                "Append-twilio-insights": {
                  "value": {
                    "metadata": {
                      "twilio_insights": {
                        "call_sid": "CA123",
                        "answered_by": "human"
                      }
                    }
                  },
                  "summary": "Append Twilio Insights metadata"
                },
                "Correct-source-call-data": {
                  "value": {
                    "call_id": "provider-call-123",
                    "duration": 1.5,
                    "call_ended_reason": "customer-ended-call"
                  },
                  "summary": "Correct provider-supplied call data"
                },
                "Update-structured-transcript": {
                  "value": {
                    "transcript_type": "cekura",
                    "transcript_json": [
                      {
                        "role": "Testing Agent",
                        "content": "Hello.",
                        "start_time": 0,
                        "end_time": 1
                      },
                      {
                        "role": "Main Agent",
                        "content": "How can I help?",
                        "start_time": 1,
                        "end_time": 2.5
                      }
                    ]
                  },
                  "summary": "Update a structured transcript"
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/PatchedUpdateCallLog"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/PatchedUpdateCallLog"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CallLogDetail"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      },
      "delete": {
        "operationId": "call-logs-destroy",
        "description": "⚠ Irreversible. Deletes the call log along with its transcript and voice recording. By default metric evaluations are also deleted; set `retain_evaluations=true` to keep them and leave the call record un-soft-deleted.",
        "summary": "Delete a call log",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this call log.",
            "required": true
          },
          {
            "in": "query",
            "name": "retain_evaluations",
            "schema": {
              "type": "boolean",
              "default": false
            },
            "description": "If true, metric evaluations are retained and the call log is not soft-deleted. Default: false."
          }
        ],
        "tags": [
          "observability"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "204": {
            "description": "No response body"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/observability/v1/call-logs/{id}/mark_critical_scenario_wrong/": {
      "post": {
        "operationId": "call-logs-mark-critical-scenario-wrong-create",
        "description": "Call logs mark critical scenario wrong",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this call log.",
            "required": true
          }
        ],
        "tags": [
          "observability"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CallLogDetail"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/CallLogDetail"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/CallLogDetail"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CallLogDetail"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/observability/v1/call-logs/{id}/mark_metric_vote/": {
      "post": {
        "operationId": "call-logs-mark-metric-vote-create",
        "description": "Record a thumbs-up or thumbs-down vote on a specific metric evaluation for this call log and optionally provide an expected value and free-text feedback. Updates the metric evaluation and marks the call log as reviewed.",
        "summary": "Submit a metric vote for a call log",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this call log.",
            "required": true
          }
        ],
        "tags": [
          "Call Logs"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MarkMetricVote"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/MarkMetricVote"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/MarkMetricVote"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MarkMetricVoteCallLogResponse"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/observability/v1/call-logs/{id}/trace/": {
      "get": {
        "operationId": "call-logs-trace-retrieve",
        "description": "Retrieve the raw OpenTelemetry trace associated with a production call log.\n\nBefore calling this tool, retrieve or list the call log and confirm that its `trace_id` is non-empty; an empty `trace_id` means no trace is available. Pass the call log's integer `id`, not its provider `call_id` or its `trace_id`.",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "required": true
          }
        ],
        "tags": [
          "observability"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CallLogTraceResponse"
                }
              }
            },
            "description": ""
          },
          "404": {
            "description": "The call log does not exist, has no trace ID, or its trace was not found."
          }
        },
        "x-mcp-expose": true,
        "summary": "Get a call log's trace",
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "call-logs-trace-retrieve",
            "description": "Retrieve the raw OpenTelemetry trace associated with a production call log.\n\nBefore calling this tool, retrieve or list the call log and confirm that its `trace_id` is non-empty; an empty `trace_id` means no trace is available. Pass the call log's integer `id`, not its provider `call_id` or its `trace_id`."
          }
        }
      }
    },
    "/observability/v1/call-logs/{id}/unmark_critical_scenario_wrong/": {
      "post": {
        "operationId": "call-logs-unmark-critical-scenario-wrong-create",
        "description": "Call logs unmark critical scenario wrong",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this call log.",
            "required": true
          }
        ],
        "tags": [
          "observability"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CallLogDetail"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/CallLogDetail"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/CallLogDetail"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CallLogDetail"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/observability/v1/call-logs/analyze_call_logs/": {
      "get": {
        "operationId": "call-logs-analyze-call-logs-retrieve",
        "description": "Analyze call logs using Claude Agent SDK.\n\nClaude uses Read/Bash tools to query the CSV file without loading it into context.\nThis allows analyzing large datasets efficiently.",
        "tags": [
          "observability"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CallLogDetail"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/observability/v1/call-logs/complete-upload/": {
      "post": {
        "operationId": "call-logs-complete-upload-create",
        "description": "Call logs complete upload",
        "tags": [
          "observability"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CallLogDetail"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/CallLogDetail"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/CallLogDetail"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CallLogDetail"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/observability/v1/call-logs/create_scenarios/": {
      "post": {
        "operationId": "call-logs-create-scenarios_2",
        "description": "Generate test scenarios from real production call logs.\n\nReturns a `progress_id` immediately — the actual scenario creation runs in the background.\nPoll `GET /observability/v1/call-logs/create_scenarios_progress?progress_id=<id>` until\n`completed_scenarios + failed_scenarios >= total_scenarios`. The `scenarios_list` field\n(full Scenario objects) is populated only once processing is complete.\n\n**`call_logs` accepts:** a list of IDs `[1, 2, 3]` or `\"all\"` for every call log on the agent.\n\n**`copy_to_agent`:** optionally copy the generated scenarios to a different agent —\nuseful when your observation agent and your test agent are separate.\n\n**Prerequisite:** call logs must have a transcript (uploaded via `transcript_json`).\nAudio-only logs without a transcript cannot produce scenarios.",
        "tags": [
          "observability"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostCreateScenarios"
              },
              "examples": {
                "Create-scenarios-with-agent-id": {
                  "value": {
                    "agent_id": 2142,
                    "call_logs": [
                      1,
                      2,
                      3
                    ],
                    "copy_to_agent": null
                  },
                  "summary": "create-scenarios-with-agent-id"
                },
                "Create-scenarios-with-assistant-id": {
                  "value": {
                    "assistant_id": "asst_1234567890",
                    "call_logs": "all"
                  },
                  "summary": "create-scenarios-with-assistant-id"
                },
                "Create-scenarios-with-copy-to-agent": {
                  "value": {
                    "agent_id": 2142,
                    "call_logs": [
                      1,
                      2,
                      3
                    ],
                    "copy_to_agent": 2143
                  },
                  "summary": "create-scenarios-with-copy-to-agent"
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostCreateScenarios"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostCreateScenarios"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "progress_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Unique identifier for tracking the progress of scenario creation"
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/observability/v1/call-logs/create_scenarios_progress/": {
      "get": {
        "operationId": "call-logs-create-scenarios-progress_2",
        "description": "Call logs create scenarios progress",
        "parameters": [
          {
            "in": "query",
            "name": "progress_id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Progress ID returned from create_scenarios endpoint",
            "required": true
          }
        ],
        "tags": [
          "observability"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SchemaCreateScenariosProgressResponse"
                },
                "examples": {
                  "Progress-in-progress": {
                    "value": {
                      "agent_id": 2142,
                      "completed_scenarios": 2,
                      "failed_scenarios": 0,
                      "total_scenarios": 5,
                      "scenarios_list": [],
                      "errors": []
                    },
                    "summary": "progress-in-progress"
                  },
                  "Progress-completed": {
                    "value": {
                      "agent_id": 2142,
                      "completed_scenarios": 4,
                      "failed_scenarios": 1,
                      "total_scenarios": 5,
                      "scenarios_list": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "description": "Unique identifier for the scenario"
                            },
                            "name": {
                              "type": "string",
                              "description": "Name of the scenario"
                            },
                            "agent": {
                              "type": "integer",
                              "description": "ID of the AI agent this scenario belongs to"
                            },
                            "assistant_id": {
                              "type": "string",
                              "description": "Alternative to agent ID - the assistant ID to use for this scenario"
                            },
                            "personality": {
                              "type": "integer",
                              "description": "ID of the personality used in this scenario"
                            },
                            "personality_name": {
                              "type": "string",
                              "description": "Name of the personality used in this scenario"
                            },
                            "tags": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              },
                              "description": "Tags associated with this scenario."
                            },
                            "runs": {
                              "type": "array",
                              "items": {
                                "type": "integer"
                              },
                              "description": "List of IDs for the last run of this scenario"
                            },
                            "metrics": {
                              "type": "array",
                              "items": {
                                "type": "integer"
                              },
                              "description": "List of metric IDs to associate with this scenario"
                            },
                            "metric_names": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              },
                              "description": "List of metric names associated with this scenario"
                            },
                            "phone_number": {
                              "type": "string",
                              "description": "Phone number used for outbound calls in this scenario"
                            },
                            "phone_number_queue_length": {
                              "type": "integer",
                              "description": "Number of runs in queue for this phone number"
                            },
                            "first_message": {
                              "type": "string",
                              "description": "First message to be sent in the scenario"
                            },
                            "inbound_phone_number": {
                              "type": "integer",
                              "description": "ID of the phone number used for inbound calls"
                            },
                            "inbound_phone_number_data": {
                              "type": "object",
                              "description": "Details of the phone number used for inbound calls",
                              "properties": {
                                "id": {
                                  "type": "integer",
                                  "description": "ID of the inbound phone number"
                                },
                                "number": {
                                  "type": "string",
                                  "description": "The actual phone number"
                                },
                                "phone_number_id": {
                                  "type": "string",
                                  "description": "External ID of the phone number"
                                }
                              }
                            },
                            "instructions": {
                              "type": "string",
                              "description": "Instructions for the AI agent in this scenario"
                            },
                            "simulation_description": {
                              "type": "string",
                              "description": "Description of the simulation if this scenario was created by simulation"
                            },
                            "information_fields": {
                              "type": "object",
                              "description": "Additional information fields for the scenario"
                            },
                            "expected_outcome_prompt": {
                              "type": "string",
                              "description": "Expected outcome prompt for the scenario"
                            },
                            "scenario_language": {
                              "type": "string",
                              "description": "Language of the scenario"
                            },
                            "is_simulating": {
                              "type": "boolean",
                              "description": "Whether this scenario was created by simulation"
                            },
                            "test_profile_data": {
                              "type": "object",
                              "description": "The test profile generated for this scenario, including its sectioned `information` (main_agent_variables / testing_agent_variables)"
                            },
                            "generated_mock_tool_entries": {
                              "type": "array",
                              "description": "Expected mock tool calls generated for this scenario when the agent has mock tools attached. Empty when the agent has no mock tools.",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "tool_id": {
                                    "type": "integer",
                                    "description": "ID of the mock tool on the agent"
                                  },
                                  "tool_name": {
                                    "type": "string",
                                    "description": "Name of the tool being mocked"
                                  },
                                  "new_entry": {
                                    "type": "object",
                                    "description": "The expected tool call for this scenario",
                                    "properties": {
                                      "input": {
                                        "type": "object",
                                        "description": "Input parameters the tool call is expected to receive"
                                      },
                                      "output": {
                                        "type": "object",
                                        "description": "Response the mock tool will return"
                                      }
                                    }
                                  }
                                }
                              }
                            }
                          }
                        }
                      },
                      "errors": [
                        {
                          "call_log_id": 3,
                          "error": {
                            "detail": "Transcript is missing"
                          }
                        }
                      ]
                    },
                    "summary": "progress-completed"
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/observability/v1/call-logs/delete_call_logs/": {
      "post": {
        "operationId": "call-logs-bulk-delete_2",
        "description": "Call logs bulk delete",
        "tags": [
          "observability"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeleteCallLogs"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/DeleteCallLogs"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/DeleteCallLogs"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "204": {
            "description": "No response body"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/observability/v1/call-logs/evaluate_metrics/": {
      "post": {
        "operationId": "call-logs-evaluate-metrics-create",
        "description": "Evaluate one or more metrics against selected call logs. Unlike `rerun_evaluation` (which re-runs all assigned metrics), this endpoint lets you target specific metrics.\n\n**Scope:** provide either `agent_id` or `project_id` to identify which agent's call logs and metrics to use. Metrics must belong to the specified agent or project.\n\n**Credit check:** cost scales with the number of call logs and metrics selected. The request is rejected if your balance is insufficient — check your balance first via `test_framework_billing_info_retrieve`.\n\n**Async:** evaluation runs in the background. The response returns the call logs in their current state. Retrieve each call log individually to see updated metric results once evaluation completes.\n\n**Rate limited.** Respect 429 responses — wait for the `Retry-After` duration.",
        "summary": "Run specific metrics against call logs",
        "tags": [
          "observability"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EvaluateMetrics"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/EvaluateMetrics"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/EvaluateMetrics"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CallLogList"
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/observability/v1/call-logs/export_call_logs/": {
      "get": {
        "operationId": "call-logs-export-call-logs-retrieve",
        "description": "Call logs export call logs",
        "tags": [
          "observability"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CallLogDetail"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/observability/v1/call-logs/export_call_logs_progress/": {
      "get": {
        "operationId": "call-logs-export-call-logs-progress-retrieve",
        "description": "Call logs export call logs progress",
        "tags": [
          "observability"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CallLogDetail"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/observability/v1/call-logs/filters/": {
      "get": {
        "operationId": "call-logs-filters-retrieve",
        "description": "Call logs filters",
        "tags": [
          "observability"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CallLogDetail"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/observability/v1/call-logs/filters_call_id/": {
      "get": {
        "operationId": "call-logs-filters-call-id-retrieve",
        "description": "Autocomplete-search the production CallLog `call_id` field (the provider's call identifier string). This is distinct from simulation `run_id` (integer; see `runs_list`) and from CallLog ID (integer DB ID).",
        "tags": [
          "observability"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CallLogDetail"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/observability/v1/call-logs/filters_customer_number/": {
      "get": {
        "operationId": "call-logs-filters-customer-number-retrieve",
        "description": "Call logs filters customer number",
        "tags": [
          "observability"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CallLogDetail"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/observability/v1/call-logs/get-upload-url/": {
      "post": {
        "operationId": "call-logs-get-upload-url-create",
        "description": "Call logs get upload url",
        "tags": [
          "observability"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CallLogDetail"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/CallLogDetail"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/CallLogDetail"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CallLogDetail"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/observability/v1/call-logs/rerun_evaluation/": {
      "post": {
        "operationId": "call-logs-rerun-evaluation-create",
        "description": "Trigger metric re-evaluation on one or more existing call logs. Provide either `agent_id` or `assistant_id` (not both) to identify the agent, then specify which call logs to re-evaluate.\n\n**`call_logs` accepts:**\n- A list of call log IDs: `[1, 2, 3]`\n- The string `\"all\"` to re-evaluate every call log for the agent\n\n**Side effect:** for non-reviewed call logs, `success` is reset to `null` before re-evaluation begins. Reviewed call logs retain their human-approved outcome.\n\n**Rate limited.** If the limit is exceeded you will receive a 429 response — wait for the `Retry-After` duration before retrying.",
        "summary": "Re-run metric evaluation on call logs",
        "tags": [
          "observability"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RerunEvaluation"
              },
              "examples": {
                "Re-evaluate-specific-call-logs": {
                  "value": {
                    "agent_id": 2142,
                    "call_logs": [
                      101,
                      102,
                      103
                    ]
                  },
                  "summary": "re-evaluate-specific-call-logs"
                },
                "Re-evaluate-all-call-logs": {
                  "value": {
                    "agent_id": 2142,
                    "call_logs": "all"
                  },
                  "summary": "re-evaluate-all-call-logs"
                },
                "Re-evaluate-using-assistant-id": {
                  "value": {
                    "assistant_id": 2143,
                    "call_logs": [
                      101,
                      102
                    ]
                  },
                  "summary": "re-evaluate-using-assistant-id"
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/RerunEvaluation"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/RerunEvaluation"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CallLogDetail"
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/observability/v1/chat-sessions/": {
      "get": {
        "operationId": "chat-sessions-list",
        "description": "List conversational RAG chat sessions",
        "parameters": [
          {
            "name": "page",
            "required": false,
            "in": "query",
            "description": "A page number within the paginated result set.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "page_size",
            "required": false,
            "in": "query",
            "description": "Number of results to return per page.",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "tags": [
          "observability"
        ],
        "security": [
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedChatSessionListList"
                }
              }
            },
            "description": ""
          }
        }
      },
      "post": {
        "operationId": "chat-sessions-create",
        "description": "Create a new conversational RAG chat session",
        "tags": [
          "observability"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChatSessionCreate"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/ChatSessionCreate"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/ChatSessionCreate"
              }
            }
          }
        },
        "security": [
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChatSessionCreate"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/observability/v1/chat-sessions/{id}/": {
      "get": {
        "operationId": "chat-sessions-retrieve",
        "description": "Retrieve a conversational RAG chat session by ID",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "Unique identifier for the chat session.\nExample: `550e8400-e29b-41d4-a716-446655440000`"
            },
            "required": true
          }
        ],
        "tags": [
          "observability"
        ],
        "security": [
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChatSessionDetail"
                }
              }
            },
            "description": ""
          }
        }
      },
      "put": {
        "operationId": "chat-sessions-update",
        "description": "Update a conversational RAG chat session",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "Unique identifier for the chat session.\nExample: `550e8400-e29b-41d4-a716-446655440000`"
            },
            "required": true
          }
        ],
        "tags": [
          "observability"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChatSessionDetail"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/ChatSessionDetail"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/ChatSessionDetail"
              }
            }
          }
        },
        "security": [
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChatSessionDetail"
                }
              }
            },
            "description": ""
          }
        }
      },
      "patch": {
        "operationId": "chat-sessions-partial-update",
        "description": "Update a conversational RAG chat session",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "Unique identifier for the chat session.\nExample: `550e8400-e29b-41d4-a716-446655440000`"
            },
            "required": true
          }
        ],
        "tags": [
          "observability"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchedChatSessionDetail"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/PatchedChatSessionDetail"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/PatchedChatSessionDetail"
              }
            }
          }
        },
        "security": [
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChatSessionDetail"
                }
              }
            },
            "description": ""
          }
        }
      },
      "delete": {
        "operationId": "chat-sessions-destroy",
        "description": "Delete a conversational RAG chat session",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "Unique identifier for the chat session.\nExample: `550e8400-e29b-41d4-a716-446655440000`"
            },
            "required": true
          }
        ],
        "tags": [
          "observability"
        ],
        "security": [
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "204": {
            "description": "No response body"
          }
        }
      }
    },
    "/observability/v1/chat-sessions/{id}/ask/": {
      "post": {
        "operationId": "chat-sessions-ask-create",
        "description": "Send a message in the chat session with streaming response using Claude Agent SDK.",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "Unique identifier for the chat session.\nExample: `550e8400-e29b-41d4-a716-446655440000`"
            },
            "required": true
          }
        ],
        "tags": [
          "observability"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChatSessionDetail"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/ChatSessionDetail"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/ChatSessionDetail"
              }
            }
          }
        },
        "security": [
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChatSessionDetail"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/observability/v1/deep-research-insights/": {
      "get": {
        "operationId": "deep-research-insights-list",
        "description": "List deep research insights",
        "tags": [
          "observability"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/DeepResearchInsight"
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/observability/v1/deep-research-insights/{id}/": {
      "get": {
        "operationId": "deep-research-insights-retrieve",
        "description": "Retrieve a deep research insight by ID",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this deep research insight.",
            "required": true
          }
        ],
        "tags": [
          "observability"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeepResearchInsight"
                }
              }
            },
            "description": ""
          }
        }
      },
      "delete": {
        "operationId": "deep-research-insights-destroy",
        "description": "Delete a deep research insight",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this deep research insight.",
            "required": true
          }
        ],
        "tags": [
          "observability"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "204": {
            "description": "No response body"
          }
        }
      }
    },
    "/observability/v1/deep-research-insights/dismiss_mode/": {
      "post": {
        "operationId": "deep-research-insights-dismiss-mode-create",
        "description": "Suppress one Deep Research failure mode across the project — matched by `mode_title`, it is hidden from every subsequent render of every insight in the project. Scope with `project`; `note` is optional. ⚠ There is no undo via this API.",
        "summary": "Dismiss a Deep Research failure mode",
        "tags": [
          "observability"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeepResearchModeDismissalCreate"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/DeepResearchModeDismissalCreate"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/DeepResearchModeDismissalCreate"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeepResearchModeDismissalCreate"
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "x-mcp-destructive": true,
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "deep-research-insights-dismiss-mode-create",
            "description": "Suppress one Deep Research failure mode across the project — matched by `mode_title`, it is hidden from every subsequent render of every insight in the project. Scope with `project`; `note` is optional. ⚠ There is no undo via this API."
          }
        }
      }
    },
    "/observability/v1/deep-research-insights/generate/": {
      "post": {
        "operationId": "deep-research-insights-generate-create",
        "description": "Queue a project-level Deep Research audit over recent calls and return the new row in `pending`. Scope with `project`; tune the lookback with `window_days` and the sample ceiling with `max_calls`. Poll the returned row's `status` until it reaches `succeeded`. ⚠ Consumes credits per audit — see the pricing endpoint.",
        "summary": "Generate a Deep Research audit for a project",
        "tags": [
          "observability"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeepResearchInsightGenerate"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/DeepResearchInsightGenerate"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/DeepResearchInsightGenerate"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeepResearchInsightGenerate"
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "x-mcp-destructive": true,
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "deep-research-insights-generate-create",
            "description": "Queue a project-level Deep Research audit over recent calls and return the new row in `pending`. Scope with `project`; tune the lookback with `window_days` and the sample ceiling with `max_calls`. Poll the returned row's `status` until it reaches `succeeded`. ⚠ Consumes credits per audit — see the pricing endpoint."
          }
        }
      }
    },
    "/observability/v1/deep-research-insights/pricing/": {
      "get": {
        "operationId": "deep-research-insights-pricing-retrieve",
        "description": "Return the flat credit cost of generating a Deep Research audit. Scope with `project`. Check this before `generate` to know the charge.",
        "summary": "Get the credit cost of a Deep Research audit",
        "tags": [
          "observability"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeepResearchInsight"
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "deep-research-insights-pricing-retrieve",
            "description": "Return the flat credit cost of generating a Deep Research audit. Scope with `project`. Check this before `generate` to know the charge."
          }
        },
        "parameters": [
          {
            "name": "project",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Tenant scope. Supply one of `project` when authenticating with a user session or OAuth bearer token; omit when using an API key already scoped to the tenant."
          }
        ]
      }
    },
    "/observability/v1/insight-reproduction-sessions/": {
      "get": {
        "operationId": "insight-reproduction-sessions-list",
        "description": "Return reproduction sessions for a project, newest first. Each session tracks the attempt to reproduce a metric failure mode by running a drafted scenario against the agent. Scope with `project`.",
        "summary": "List insight reproduction sessions",
        "tags": [
          "observability"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/InsightReproductionSession"
                  }
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "insight-reproduction-sessions-list",
            "description": "Return reproduction sessions for a project, newest first. Each session tracks the attempt to reproduce a metric failure mode by running a drafted scenario against the agent. Scope with `project`."
          }
        },
        "parameters": [
          {
            "name": "project",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Tenant scope. Supply one of `project` when authenticating with a user session or OAuth bearer token; omit when using an API key already scoped to the tenant."
          }
        ]
      }
    },
    "/observability/v1/insight-reproduction-sessions/{id}/": {
      "get": {
        "operationId": "insight-reproduction-sessions-retrieve",
        "description": "Return a single reproduction session with its `status`, attempts made, and — once reproduced — the run and result that reproduced the failure. Poll this after calling reproduce on an insight.",
        "summary": "Get one insight reproduction session",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this insight reproduction session.",
            "required": true
          }
        ],
        "tags": [
          "observability"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InsightReproductionSession"
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "insight-reproduction-sessions-retrieve",
            "description": "Return a single reproduction session with its `status`, attempts made, and — once reproduced — the run and result that reproduced the failure. Poll this after calling reproduce on an insight."
          }
        }
      }
    },
    "/observability/v1/livekit/observe/": {
      "post": {
        "operationId": "livekit-observe-create",
        "description": "Ingest a LiveKit agent-session webhook.\n\nPoint your LiveKit Agents deployment's post-session webhook at this URL. The raw\nwebhook body (with `agent_id`, `session_id`, `egress_s3_key`, etc.) is stored as a\nCallLog; Cekura then fetches the transcript + recording from your S3 egress and\nschedules metric evaluation asynchronously.\n\n**Use this instead of `POST /observability/v1/observe/`** when your agent runs on\nLiveKit Agents and you'd rather wire up the provider's native webhook than assemble\nthe generic CallLog payload yourself.",
        "tags": [
          "observability"
        ],
        "security": [
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "description": "No response body"
          }
        }
      }
    },
    "/observability/v1/metric-failure-mode-insights/": {
      "get": {
        "operationId": "metric-failure-mode-insights-list",
        "description": "Return generated failure-mode insights for a project, newest first. Each insight groups a metric's failing calls into named failure modes with example call ids. Scope with `project` (required); optionally filter by `metric_name`, a single `date` (YYYY-MM-DD), or pass `latest_only=true` for one row per metric. Use before `generate` to check for an existing insight.",
        "summary": "List metric failure-mode insights",
        "tags": [
          "observability"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/MetricFailureModeInsight"
                  }
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "metric-failure-mode-insights-list",
            "description": "Return generated failure-mode insights for a project, newest first. Each insight groups a metric's failing calls into named failure modes with example call ids. Scope with `project` (required); optionally filter by `metric_name`, a single `date` (YYYY-MM-DD), or pass `latest_only=true` for one row per metric. Use before `generate` to check for an existing insight."
          }
        },
        "parameters": [
          {
            "name": "project",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Tenant scope. Supply one of `project` when authenticating with a user session or OAuth bearer token; omit when using an API key already scoped to the tenant."
          }
        ]
      }
    },
    "/observability/v1/metric-failure-mode-insights/{id}/": {
      "get": {
        "operationId": "metric-failure-mode-insights-retrieve",
        "description": "Return a single failure-mode insight with its full failure_modes list. Read this to pick a `failure_mode_index` before calling generate-scenario, reproduce, or fix-metric.",
        "summary": "Get one metric failure-mode insight",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this metric failure mode insight.",
            "required": true
          }
        ],
        "tags": [
          "observability"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetricFailureModeInsight"
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "metric-failure-mode-insights-retrieve",
            "description": "Return a single failure-mode insight with its full failure_modes list. Read this to pick a `failure_mode_index` before calling generate-scenario, reproduce, or fix-metric."
          }
        }
      },
      "delete": {
        "operationId": "metric-failure-mode-insights-destroy",
        "description": "Permanently delete one failure-mode insight. ⚠ Cannot be undone.",
        "summary": "Delete a metric failure-mode insight",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this metric failure mode insight.",
            "required": true
          }
        ],
        "tags": [
          "observability"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "204": {
            "description": "No response body"
          }
        },
        "x-mcp-expose": true,
        "x-mcp-destructive": true,
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "metric-failure-mode-insights-destroy",
            "description": "Permanently delete one failure-mode insight. ⚠ Cannot be undone."
          }
        }
      }
    },
    "/observability/v1/metric-failure-mode-insights/{id}/failure-mode-agents/": {
      "get": {
        "operationId": "metric-failure-mode-insights-failure-mode-agents-retrieve",
        "description": "Return the agents whose calls appear in one failure mode's example calls, with a per-agent call count. Select the failure mode with the `index` query parameter. Use this to choose the `agent` for generate-scenario or reproduce; falls back to the project's agents when no example call resolves to an agent.",
        "summary": "List agents implicated by a failure mode",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this metric failure mode insight.",
            "required": true
          }
        ],
        "tags": [
          "observability"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetricFailureModeInsight"
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "metric-failure-mode-insights-failure-mode-agents-retrieve",
            "description": "Return the agents whose calls appear in one failure mode's example calls, with a per-agent call count. Select the failure mode with the `index` query parameter. Use this to choose the `agent` for generate-scenario or reproduce; falls back to the project's agents when no example call resolves to an agent."
          }
        }
      }
    },
    "/observability/v1/metric-failure-mode-insights/{id}/fix-metric/": {
      "post": {
        "operationId": "metric-failure-mode-insights-fix-metric-create",
        "description": "Sample a few of one failure mode's example calls and add them to Labs as metric reviews for the insight's metric, with `feedback` as the note and an optional corrected `expected_value` label (defaults to a pass). Select the failure mode with `failure_mode_index`. Overwrites any existing review for the same calls on this metric.",
        "summary": "Add a failure mode's example calls to Labs",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this metric failure mode insight.",
            "required": true
          }
        ],
        "tags": [
          "observability"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MetricFailureModeFixMetric"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/MetricFailureModeFixMetric"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/MetricFailureModeFixMetric"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetricFailureModeFixMetric"
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "x-mcp-destructive": true,
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "metric-failure-mode-insights-fix-metric-create",
            "description": "Sample a few of one failure mode's example calls and add them to Labs as metric reviews for the insight's metric, with `feedback` as the note and an optional corrected `expected_value` label (defaults to a pass). Select the failure mode with `failure_mode_index`. Overwrites any existing review for the same calls on this metric."
          }
        }
      }
    },
    "/observability/v1/metric-failure-mode-insights/{id}/generate-scenario/": {
      "post": {
        "operationId": "metric-failure-mode-insights-generate-scenario-create",
        "description": "Turn one failure mode of a metric failure-mode insight into a test scenario that reproduces the issue against a target agent. Choose the failure mode with `failure_mode_index` and the agent with `agent`. Set `redact_transcripts` to strip personal identifiers from the source call transcripts before they are used to draft the scenario. Runs in the background and returns a `progress_id`; poll scenario generation progress to retrieve the generated scenario id.",
        "summary": "Generate a test scenario from an insight failure mode",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this metric failure mode insight.",
            "required": true
          }
        ],
        "tags": [
          "observability"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MetricFailureModeInsightGenerateScenario"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/MetricFailureModeInsightGenerateScenario"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/MetricFailureModeInsightGenerateScenario"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetricFailureModeInsightGenerateScenario"
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "metric-failure-mode-insights-generate-scenario-create",
            "description": "Turn one failure mode of a metric failure-mode insight into a test scenario that reproduces the issue against a target agent. Choose the failure mode with `failure_mode_index` and the agent with `agent`. Set `redact_transcripts` to strip personal identifiers from the source call transcripts before they are used to draft the scenario. Runs in the background and returns a `progress_id`; poll scenario generation progress to retrieve the generated scenario id."
          }
        }
      }
    },
    "/observability/v1/metric-failure-mode-insights/{id}/reproduce/": {
      "post": {
        "operationId": "metric-failure-mode-insights-reproduce-create",
        "description": "Draft a scenario from one failure mode and run it against the agent on the same channel the cited calls used, retrying until a run reproduces the failure or `max_attempts` is reached. Choose the failure mode with `failure_mode_index` and the target with `agent`. Returns a `reproduction_session_id`; poll the reproduction session for status. ⚠ Executes real evaluator runs against the agent.",
        "summary": "Reproduce a failure mode by running it against an agent",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this metric failure mode insight.",
            "required": true
          }
        ],
        "tags": [
          "observability"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InsightReproductionRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/InsightReproductionRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/InsightReproductionRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InsightReproductionRequest"
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "x-mcp-destructive": true,
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "metric-failure-mode-insights-reproduce-create",
            "description": "Draft a scenario from one failure mode and run it against the agent on the same channel the cited calls used, retrying until a run reproduces the failure or `max_attempts` is reached. Choose the failure mode with `failure_mode_index` and the target with `agent`. Returns a `reproduction_session_id`; poll the reproduction session for status. ⚠ Executes real evaluator runs against the agent."
          }
        }
      }
    },
    "/observability/v1/metric-failure-mode-insights/available_dates/": {
      "get": {
        "operationId": "metric-failure-mode-insights-available-dates-retrieve",
        "description": "Return the distinct calendar dates (newest first) on which the project has a completed failure-mode insight, so you can page back through historical daily insights via the `date` filter on list.",
        "summary": "List dates that have generated insights",
        "tags": [
          "observability"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetricFailureModeInsight"
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "metric-failure-mode-insights-available-dates-retrieve",
            "description": "Return the distinct calendar dates (newest first) on which the project has a completed failure-mode insight, so you can page back through historical daily insights via the `date` filter on list."
          }
        },
        "parameters": [
          {
            "name": "project",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Tenant scope. Supply one of `project` when authenticating with a user session or OAuth bearer token; omit when using an API key already scoped to the tenant."
          }
        ]
      }
    },
    "/observability/v1/metric-failure-mode-insights/bulk_generate/": {
      "post": {
        "operationId": "metric-failure-mode-insights-bulk-generate-create",
        "description": "Queue a failure-mode audit for every eligible metric in the project over the last 24 hours and return the new insight rows to poll. Optionally restrict to specific metrics with `metric_names`. Metrics with no failing calls are skipped and not charged. ⚠ Consumes credits per metric that produces an insight — see the pricing endpoint.",
        "summary": "Generate failure-mode insights for every metric in a project",
        "tags": [
          "observability"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MetricFailureModeInsightBulkGenerate"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/MetricFailureModeInsightBulkGenerate"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/MetricFailureModeInsightBulkGenerate"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetricFailureModeInsightBulkGenerate"
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "x-mcp-destructive": true,
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "metric-failure-mode-insights-bulk-generate-create",
            "description": "Queue a failure-mode audit for every eligible metric in the project over the last 24 hours and return the new insight rows to poll. Optionally restrict to specific metrics with `metric_names`. Metrics with no failing calls are skipped and not charged. ⚠ Consumes credits per metric that produces an insight — see the pricing endpoint."
          }
        }
      }
    },
    "/observability/v1/metric-failure-mode-insights/categories/": {
      "get": {
        "operationId": "metric-failure-mode-insights-categories-retrieve",
        "description": "Return the persistent failure categories for a project (optionally one metric), each with a call count and example call ids. Filter by `date_from` / `date_to` (ISO datetimes for an exact window, or bare dates for whole-day bounds) to count only assignments in that range, and by `agent_ids` (comma-separated agent ids) to count only calls handled by those agents; results are sorted by count descending.",
        "summary": "List accumulating failure categories for a metric",
        "parameters": [
          {
            "in": "query",
            "name": "agent_ids",
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated agent ids; only calls handled by these agents are counted."
          },
          {
            "name": "project",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Tenant scope. Supply one of `project` when authenticating with a user session or OAuth bearer token; omit when using an API key already scoped to the tenant."
          }
        ],
        "tags": [
          "observability"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetricFailureModeInsight"
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "metric-failure-mode-insights-categories-retrieve",
            "description": "Return the persistent failure categories for a project (optionally one metric), each with a call count and example call ids. Filter by `date_from` / `date_to` (ISO datetimes for an exact window, or bare dates for whole-day bounds) to count only assignments in that range, and by `agent_ids` (comma-separated agent ids) to count only calls handled by those agents; results are sorted by count descending."
          }
        }
      }
    },
    "/observability/v1/metric-failure-mode-insights/categories/{category_slug}/calls/": {
      "get": {
        "operationId": "metric-failure-mode-insights-categories-calls-retrieve",
        "description": "Return all call-log ids assigned to one persistent failure category, newest first. Use the same date bounds as the category list to expand the examples shown for the selected range. The accumulator retains at most 500 calls per metric.",
        "summary": "List every call in one failure category",
        "parameters": [
          {
            "in": "path",
            "name": "category_slug",
            "schema": {
              "type": "string",
              "pattern": "^[^/]+$"
            },
            "required": true
          },
          {
            "in": "query",
            "name": "project",
            "schema": {
              "type": "integer"
            },
            "required": true
          },
          {
            "in": "query",
            "name": "metric_id",
            "schema": {
              "type": "integer"
            },
            "required": true
          },
          {
            "in": "query",
            "name": "date_from",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "date_to",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "agent_ids",
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated agent ids; only calls handled by these agents are returned."
          }
        ],
        "tags": [
          "observability"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FailureCategoryCallsResponse"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/observability/v1/metric-failure-mode-insights/categories/{category_slug}/delete/": {
      "delete": {
        "operationId": "metric-failure-mode-insights-categories-delete-destroy",
        "description": "Remove one persistent failure category and all of its stored call assignments. Future calls are classified only against the remaining categories. Scope with `project` and `metric_id`. ⚠ Cannot be undone.",
        "summary": "Delete an accumulating failure category",
        "parameters": [
          {
            "in": "path",
            "name": "category_slug",
            "schema": {
              "type": "string",
              "pattern": "^[^/]+$"
            },
            "required": true
          }
        ],
        "tags": [
          "observability"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "204": {
            "description": "No response body"
          }
        },
        "x-mcp-expose": true,
        "x-mcp-destructive": true,
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "metric-failure-mode-insights-categories-delete-destroy",
            "description": "Remove one persistent failure category and all of its stored call assignments. Future calls are classified only against the remaining categories. Scope with `project` and `metric_id`. ⚠ Cannot be undone."
          }
        }
      }
    },
    "/observability/v1/metric-failure-mode-insights/categories/{category_slug}/fix-metric/": {
      "post": {
        "operationId": "metric-failure-mode-insights-categories-fix-metric-create",
        "description": "Sample the latest calls in one persistent failure category and add them to Labs for its metric, with `feedback` as the note and an optional corrected `expected_value` label (defaults to a pass).",
        "summary": "Add an accumulating failure category's example calls to Labs",
        "parameters": [
          {
            "in": "path",
            "name": "category_slug",
            "schema": {
              "type": "string",
              "pattern": "^[^/]+$"
            },
            "required": true
          }
        ],
        "tags": [
          "observability"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MetricFailureModeFixMetric"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/MetricFailureModeFixMetric"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/MetricFailureModeFixMetric"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetricFailureModeFixMetric"
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "x-mcp-destructive": true,
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "metric-failure-mode-insights-categories-fix-metric-create",
            "description": "Sample the latest calls in one persistent failure category and add them to Labs for its metric, with `feedback` as the note and an optional corrected `expected_value` label (defaults to a pass)."
          }
        }
      }
    },
    "/observability/v1/metric-failure-mode-insights/failure-rates/": {
      "get": {
        "operationId": "metric-failure-mode-insights-failure-rates-retrieve",
        "description": "Return the percentage of evaluated calls that failed each metric during the selected Insights date range. Optionally scope to `agent_ids` (comma-separated agent ids).",
        "summary": "List metric failure rates for the insights window",
        "parameters": [
          {
            "in": "query",
            "name": "agent_ids",
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated agent ids; only calls handled by these agents are counted."
          }
        ],
        "tags": [
          "observability"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetricFailureModeInsight"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/observability/v1/metric-failure-mode-insights/generate/": {
      "post": {
        "operationId": "metric-failure-mode-insights-generate-create",
        "description": "Queue a failure-mode audit of one metric's recent failing calls and return the new insight row in `pending`. Identify the metric with `metric_name` plus either `metric` (custom) or `predefined_metric`. Poll the returned row's `status` until it reaches `succeeded`. ⚠ Consumes credits per generated insight — see the pricing endpoint.",
        "summary": "Generate a failure-mode insight for one metric",
        "tags": [
          "observability"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MetricFailureModeInsightGenerate"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/MetricFailureModeInsightGenerate"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/MetricFailureModeInsightGenerate"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetricFailureModeInsightGenerate"
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "x-mcp-destructive": true,
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "metric-failure-mode-insights-generate-create",
            "description": "Queue a failure-mode audit of one metric's recent failing calls and return the new insight row in `pending`. Identify the metric with `metric_name` plus either `metric` (custom) or `predefined_metric`. Poll the returned row's `status` until it reaches `succeeded`. ⚠ Consumes credits per generated insight — see the pricing endpoint."
          }
        }
      }
    },
    "/observability/v1/metric-failure-mode-insights/pricing/": {
      "get": {
        "operationId": "metric-failure-mode-insights-pricing-retrieve",
        "description": "Return the per-metric credit cost of manually generating a metric failure-mode insight. Scope with `project`. Check this before `generate` or `bulk_generate` to know the charge.",
        "summary": "Get the credit cost of generating an insight",
        "tags": [
          "observability"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetricFailureModeInsight"
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "metric-failure-mode-insights-pricing-retrieve",
            "description": "Return the per-metric credit cost of manually generating a metric failure-mode insight. Scope with `project`. Check this before `generate` or `bulk_generate` to know the charge."
          }
        },
        "parameters": [
          {
            "name": "project",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Tenant scope. Supply one of `project` when authenticating with a user session or OAuth bearer token; omit when using an API key already scoped to the tenant."
          }
        ]
      }
    },
    "/observability/v1/observe/": {
      "post": {
        "operationId": "observe-create",
        "description": "Primary ingestion endpoint for production call logs. Your agent (or its provider's post-call webhook) POSTs here with the transcript, recording URL, and metadata; Cekura stores it as a `CallLog`, schedules metric evaluation, and surfaces it in Observability.\n\n**Identifying the agent (pick one):**\n- `agent` — Cekura agent ID (preferred when you've already registered via `POST /aiagents/`)\n- `assistant_id` — external assistant identifier (VAPI/Retell/OpenAI-style `asst_...`). Cekura resolves it to your agent.\n\n**Transcript formats** (via `transcript_type`):\n- `vapi`, `retell`, `elevenlabs`, `bland`, `livekit`, `pipecat`, `koreai` — provider-native shapes; pass `transcript_json` exactly as the provider emits it.\n- `cekura` (default) — `[{role, content, start_time, end_time}, ...]`. Valid roles: `\"Testing Agent\"` (the caller) and `\"Main Agent\"` (the agent under test). Note: `\"agent\"` and `\"user\"` are **not** valid for this format.\n\n**Provider-specific alternatives:**\n- LiveKit webhooks: `POST /observability/v1/livekit/observe/` (raw LiveKit webhook shape)\n- Pipecat webhooks: `POST /observability/v1/pipecat/observe/` (raw Pipecat webhook shape)\n\n**Fields to know:**\n- `voice_recording_url` — link to the call audio; enables audio-based metrics.\n- `metadata` — freeform tags for filtering in Observability (`customer_id`, `campaign_id`, etc.).\n- `dynamic_variables` — values injected into the agent at runtime; shown alongside the transcript.\n- `customer_number` — caller's number in E.164 format, e.g. `+14155551234`.\n- `call_ended_reason` — reason for call termination (`completed`, `user-hangup`, `agent-hangup`, etc.).\n- `metric_ids` — comma-separated metric IDs to evaluate immediately (e.g. `\"1,2,3\"`).\n\n**Async processing:** metrics are evaluated in the background. The initial response shows `status: \"evaluating\"` with an empty `metrics` list. Retrieve the call log again after 30–60 seconds to see completed metric results.\n\n**Billing:** each ingested call consumes observability credits. Calls with audio cost more than text-only calls. Check your balance via `GET /test_framework/v1/billing_info`.",
        "summary": "Ingest a production call (webhook)",
        "tags": [
          "Observability"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateCallLog"
              },
              "examples": {
                "CreateCallLogWithVoiceRecordingURL": {
                  "value": {
                    "call_id": "call_12345678",
                    "agent": 1,
                    "voice_recording_url": "https://example.com/recordings/call_12345678.mp3",
                    "transcript_type": "vapi",
                    "transcript_json": [
                      {
                        "role": "agent",
                        "message": "Hello, how can I help you today?",
                        "time": 0
                      },
                      {
                        "role": "user",
                        "message": "I need help with my account",
                        "time": 2.5
                      }
                    ],
                    "call_ended_reason": "completed",
                    "customer_number": "+1234567890",
                    "metadata": {
                      "customer_id": "cust_123",
                      "campaign_id": "camp_456"
                    },
                    "timestamp": "2025-10-03T10:30:00Z",
                    "dynamic_variables": {
                      "customer_name": "John Doe",
                      "order_id": "ORD-12345"
                    }
                  },
                  "summary": "Create Call Log with Voice Recording URL"
                },
                "CreateCallLogWithAssistantID": {
                  "value": {
                    "call_id": "call_87654321",
                    "assistant_id": "asst_abc123",
                    "voice_recording_url": "https://example.com/recordings/call_87654321.mp3",
                    "transcript_type": "retell",
                    "transcript_json": [
                      {
                        "role": "agent",
                        "message": "Thank you for calling. How may I assist you?",
                        "time": 0
                      }
                    ],
                    "call_ended_reason": "user-hangup",
                    "customer_number": "+9876543210"
                  },
                  "summary": "Create Call Log with Assistant ID"
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/CreateCallLog"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/CreateCallLog"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CallLogList"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "observe-create",
            "description": "Primary ingestion endpoint for production call logs. Your agent (or its provider's post-call webhook) POSTs here with the transcript, recording URL, and metadata; Cekura stores it as a `CallLog`, schedules metric evaluation, and surfaces it in Observability.\n\n**Identifying the agent (pick one):**\n- `agent` — Cekura agent ID (preferred when you've already registered via `POST /aiagents/`)\n- `assistant_id` — external assistant identifier (VAPI/Retell/OpenAI-style `asst_...`). Cekura resolves it to your agent.\n\n**Transcript formats** (via `transcript_type`):\n- `vapi`, `retell`, `elevenlabs`, `bland`, `livekit`, `pipecat`, `koreai` — provider-native shapes; pass `transcript_json` exactly as the provider emits it.\n- `cekura` (default) — `[{role, content, start_time, end_time}, ...]`. Valid roles: `\"Testing Agent\"` (the caller) and `\"Main Agent\"` (the agent under test). Note: `\"agent\"` and `\"user\"` are **not** valid for this format.\n\n**Provider-specific alternatives:**\n- LiveKit webhooks: `POST /observability/v1/livekit/observe/` (raw LiveKit webhook shape)\n- Pipecat webhooks: `POST /observability/v1/pipecat/observe/` (raw Pipecat webhook shape)\n\n**Fields to know:**\n- `voice_recording_url` — link to the call audio; enables audio-based metrics.\n- `metadata` — freeform tags for filtering in Observability (`customer_id`, `campaign_id`, etc.).\n- `dynamic_variables` — values injected into the agent at runtime; shown alongside the transcript.\n- `customer_number` — caller's number in E.164 format, e.g. `+14155551234`.\n- `call_ended_reason` — reason for call termination (`completed`, `user-hangup`, `agent-hangup`, etc.).\n- `metric_ids` — comma-separated metric IDs to evaluate immediately (e.g. `\"1,2,3\"`).\n\n**Async processing:** metrics are evaluated in the background. The initial response shows `status: \"evaluating\"` with an empty `metrics` list. Retrieve the call log again after 30–60 seconds to see completed metric results.\n\n**Billing:** each ingested call consumes observability credits. Calls with audio cost more than text-only calls. Check your balance via `GET /test_framework/v1/billing_info`."
          }
        }
      }
    },
    "/observability/v1/overall_evaluation/": {
      "get": {
        "operationId": "overall-evaluation-list",
        "description": "List overall evaluations",
        "tags": [
          "observability"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/OverallEvaluation"
                  }
                }
              }
            },
            "description": ""
          }
        }
      },
      "post": {
        "operationId": "overall-evaluation-create",
        "description": "Create a new overall evaluation",
        "tags": [
          "observability"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OverallEvaluation"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/OverallEvaluation"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/OverallEvaluation"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OverallEvaluation"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/observability/v1/overall_evaluation/{id}/": {
      "get": {
        "operationId": "overall-evaluation-retrieve",
        "description": "Retrieve an overall evaluation by ID",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this overall evaluation.",
            "required": true
          }
        ],
        "tags": [
          "observability"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OverallEvaluation"
                }
              }
            },
            "description": ""
          }
        }
      },
      "put": {
        "operationId": "overall-evaluation-update",
        "description": "Update an overall evaluation",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this overall evaluation.",
            "required": true
          }
        ],
        "tags": [
          "observability"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OverallEvaluation"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/OverallEvaluation"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/OverallEvaluation"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OverallEvaluation"
                }
              }
            },
            "description": ""
          }
        }
      },
      "patch": {
        "operationId": "overall-evaluation-partial-update",
        "description": "Update an overall evaluation",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this overall evaluation.",
            "required": true
          }
        ],
        "tags": [
          "observability"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchedOverallEvaluation"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/PatchedOverallEvaluation"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/PatchedOverallEvaluation"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OverallEvaluation"
                }
              }
            },
            "description": ""
          }
        }
      },
      "delete": {
        "operationId": "overall-evaluation-destroy",
        "description": "Delete an overall evaluation",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this overall evaluation.",
            "required": true
          }
        ],
        "tags": [
          "observability"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "204": {
            "description": "No response body"
          }
        }
      }
    },
    "/observability/v1/overall_evaluation/generate_overall_summary/": {
      "get": {
        "operationId": "overall-evaluation-generate-overall-summary-retrieve",
        "description": "Overall evaluation generate overall summary",
        "tags": [
          "observability"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OverallEvaluation"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/observability/v1/overall_evaluation/realtime/": {
      "get": {
        "operationId": "overall-evaluation-realtime-retrieve",
        "description": "Overall evaluation realtime",
        "tags": [
          "observability"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "deprecated": true,
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OverallEvaluation"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/observability/v1/pipecat/observe/": {
      "post": {
        "operationId": "pipecat-observe-create",
        "description": "Ingest a Pipecat post-call webhook.\n\nPoint your Pipecat / Daily.co deployment's post-session webhook at this URL. The raw\nwebhook body is stored as a CallLog and Cekura asynchronously pulls the transcript,\nrecording, and metrics from the configured egress location.\n\n**Use this instead of `POST /observability/v1/observe/`** when your agent runs on\nPipecat / Daily.co — you don't have to reformat the payload.",
        "tags": [
          "observability"
        ],
        "security": [
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "description": "No response body"
          }
        }
      }
    },
    "/observability/v1/retell/observe/": {
      "post": {
        "operationId": "retell-observe-create",
        "description": "Handle incoming Retell webhook requests.\n\nThis endpoint processes webhook requests from the Retell service, validates the request data,\nand creates a call log entry based on the received data. Retell sends webhooks at the end of the call,\nproviding important information about the interaction.",
        "tags": [
          "observability"
        ],
        "responses": {
          "200": {
            "description": "No response body"
          }
        }
      }
    },
    "/observability/v1/vapi/observe/": {
      "post": {
        "operationId": "vapi-observe-create",
        "description": "Handle incoming VAPI webhook requests.\n\nThis endpoint processes webhook requests from the VAPI service, validates the API key,\nand creates a call log entry based on the received data. VAPI sends webhooks at the end of the call,\nproviding important information about the interaction.",
        "tags": [
          "observability"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "200": {
            "description": "No response body"
          }
        }
      }
    },
    "/observability/v2/call-logs/": {
      "get": {
        "operationId": "observability-v2-call-logs-list",
        "description": "List **production** call logs for an agent or project. Production-only — test/simulation runs triggered via `run_scenarios_*` do NOT create call logs; use `results_list` + `runs_bulk_retrieve` for simulation data instead.\n\nAlways pass `agent_id` or `project_id` to scope results — without one, the response may be very large. **`project_id` is required when using an organization-level API key.**\n\n**Time window:** results default to the **last 30 days** when no timestamp range is given. A supplied range must not exceed **31 days** (wider ranges return `400`); pass `timestamp_from`/`timestamp_to` (ISO 8601) to select a window within that limit.\n\n**Filtering:**\n- `timestamp_from` / `timestamp_to` — ISO 8601 date range filter\n- `call_ids` — comma-separated **CallLog IDs** (integer DB IDs of call logs in this list response), e.g. `\"123,456\"`. Distinct from simulation `run_id`s and from each call log's own `call_id` field (which holds the provider's call identifier string).\n- `filters_v2` — structured JSON filter (same format as dashboard filters). Simple: `{\"field\": \"success\", \"op\": \"eq\", \"value\": true}`. Compound: `{\"operator\": \"and\", \"conditions\": [{...}, {...}]}`. Supported operators: `eq`, `neq`, `gt`, `gte`, `lt`, `lte`, `contains`, `startswith`, `in`, `isnull`.",
        "summary": "List call logs",
        "parameters": [
          {
            "name": "page",
            "required": false,
            "in": "query",
            "description": "A page number within the paginated result set.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "page_size",
            "required": false,
            "in": "query",
            "description": "Number of results to return per page.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "timestamp_from",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "description": "\nFilter results from this timestamp (e.g. 2025-01-01T00:00:00Z)\nExample: `2025-01-01T00:00:00Z`\n"
          },
          {
            "in": "query",
            "name": "timestamp_to",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "description": "\nFilter results to this timestamp (e.g. 2025-01-31T23:59:59Z)\nExample: `2025-01-31T23:59:59Z`\n"
          },
          {
            "in": "query",
            "name": "call_ids",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "Comma-separated list of call log IDs to filter by. Example: `\"5181749,5181752\"`"
          },
          {
            "in": "query",
            "name": "agent_id",
            "schema": {
              "type": "integer"
            },
            "description": "\nFilter by agent ID. Either agent_id or project_id should be provided.\nExample: `2142`\n"
          },
          {
            "in": "query",
            "name": "project_id",
            "schema": {
              "type": "integer"
            },
            "description": "\nFilter by project ID. Either agent_id or project_id should be provided.\n**Required when using an organization-level API key** to scope results to a specific project.\nExample: `1376`\n"
          },
          {
            "in": "query",
            "name": "assistant_id",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "\nFilter by assistant ID\nExample:\n- `\"asst_1234567890\"`\n- `\"agent_xyz789\"`\n"
          },
          {
            "in": "query",
            "name": "filters_v2",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "\nAdvanced JSON filters using CallLogQueryFilter format (same as dashboard filters).\nSupports nested AND/OR conditions, field comparisons, and related field filtering.\n\nExample - Simple filter:\n`{\"field\": \"success\", \"op\": \"eq\", \"value\": true}`\n\nExample - AND conditions:\n`{\"operator\": \"and\", \"conditions\": [{\"field\": \"success\", \"op\": \"eq\", \"value\": true}, {\"field\": \"duration\", \"op\": \"gte\", \"value\": 60}]}`\n\nExample - OR conditions:\n`{\"operator\": \"or\", \"conditions\": [{\"field\": \"call_ended_reason\", \"op\": \"eq\", \"value\": \"completed\"}, {\"field\": \"call_ended_reason\", \"op\": \"eq\", \"value\": \"hangup\"}]}`\n\nSupported fields: success, duration, call_id, timestamp, created_at, call_ended_reason, customer_number, etc.\nSupported operators: eq, neq, gt, gte, lt, lte, contains, startswith, in, isnull\n"
          }
        ],
        "tags": [
          "observability"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedCallLogListList"
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "observability-v2-call-logs-list",
            "description": "List **production** call logs for an agent or project. Production-only — test/simulation runs triggered via `run_scenarios_*` do NOT create call logs; use `results_list` + `runs_bulk_retrieve` for simulation data instead.\n\nAlways pass `agent_id` or `project_id` to scope results — without one, the response may be very large. **`project_id` is required when using an organization-level API key.**\n\n**Time window:** results default to the **last 30 days** when no timestamp range is given. A supplied range must not exceed **31 days** (wider ranges return `400`); pass `timestamp_from`/`timestamp_to` (ISO 8601) to select a window within that limit.\n\n**Filtering:**\n- `timestamp_from` / `timestamp_to` — ISO 8601 date range filter\n- `call_ids` — comma-separated **CallLog IDs** (integer DB IDs of call logs in this list response), e.g. `\"123,456\"`. Distinct from simulation `run_id`s and from each call log's own `call_id` field (which holds the provider's call identifier string).\n- `filters_v2` — structured JSON filter (same format as dashboard filters). Simple: `{\"field\": \"success\", \"op\": \"eq\", \"value\": true}`. Compound: `{\"operator\": \"and\", \"conditions\": [{...}, {...}]}`. Supported operators: `eq`, `neq`, `gt`, `gte`, `lt`, `lte`, `contains`, `startswith`, `in`, `isnull`."
          }
        }
      },
      "post": {
        "operationId": "observability-v2-call-logs-create",
        "description": "Create a new Call logs with the canonical binary wire format (eval_type `binary`,",
        "tags": [
          "observability"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CallLogDetail"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/CallLogDetail"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/CallLogDetail"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CallLogDetail"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/observability/v2/call-logs/{id}/": {
      "get": {
        "operationId": "observability-v2-call-logs-retrieve",
        "description": "Retrieve a production CallLog by its integer **CallLog ID** (path parameter). This is distinct from simulation `run_id` (use `runs_retrieve` for those) and from the call log's own `call_id` string field (the provider's call identifier).",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this call log.",
            "required": true
          }
        ],
        "tags": [
          "observability"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CallLogDetail"
                }
              }
            },
            "description": ""
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "summary": "Get a call log",
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "observability-v2-call-logs-retrieve",
            "description": "Retrieve a production CallLog by its integer **CallLog ID** (path parameter). This is distinct from simulation `run_id` (use `runs_retrieve` for those) and from the call log's own `call_id` string field (the provider's call identifier)."
          }
        }
      },
      "patch": {
        "operationId": "observability-v2-call-logs-partial-update_3",
        "description": "Updates source data for an existing production call log.\n\n**Supported fields**\n- `call_id` — Provider call identifier. Subject to the organization's duplicate-call-ID policy.\n- `transcript_json` — Structured transcript in a supported provider or Cekura format. Use `transcript_type` to specify the format, or omit it for automatic detection. This replaces both transcript representations.\n- `timestamp` — Call start time in ISO 8601 format.\n- `duration` — Call duration in minutes.\n- `call_ended_reason` and `customer_number` — Provider-supplied call attributes.\n- `metadata` and `dynamic_variables` — JSON objects merged at the top level with the existing values. Supplied keys overwrite matching keys; omitted keys are preserved.\n\n**Restrictions**\nOnly the fields listed above are accepted. System-managed fields, including agent and project ownership, metric evaluations, review state, topic, and dropoff point, cannot be updated.\n\n**Metric evaluation**\nThis operation does not recompute metrics. To evaluate the updated call data, invoke `rerun_evaluation` in a separate request.",
        "summary": "Update call log source data",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this call log.",
            "required": true
          }
        ],
        "tags": [
          "observability"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchedUpdateCallLog"
              },
              "examples": {
                "Append-twilio-insights": {
                  "value": {
                    "metadata": {
                      "twilio_insights": {
                        "call_sid": "CA123",
                        "answered_by": "human"
                      }
                    }
                  },
                  "summary": "Append Twilio Insights metadata"
                },
                "Correct-source-call-data": {
                  "value": {
                    "call_id": "provider-call-123",
                    "duration": 1.5,
                    "call_ended_reason": "customer-ended-call"
                  },
                  "summary": "Correct provider-supplied call data"
                },
                "Update-structured-transcript": {
                  "value": {
                    "transcript_type": "cekura",
                    "transcript_json": [
                      {
                        "role": "Testing Agent",
                        "content": "Hello.",
                        "start_time": 0,
                        "end_time": 1
                      },
                      {
                        "role": "Main Agent",
                        "content": "How can I help?",
                        "start_time": 1,
                        "end_time": 2.5
                      }
                    ]
                  },
                  "summary": "Update a structured transcript"
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/PatchedUpdateCallLog"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/PatchedUpdateCallLog"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CallLogDetail"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "observability-v2-call-logs-partial-update",
            "description": "Updates source data for an existing production call log.\n\n**Supported fields**\n- `call_id` — Provider call identifier. Subject to the organization's duplicate-call-ID policy.\n- `transcript_json` — Structured transcript in a supported provider or Cekura format. Use `transcript_type` to specify the format, or omit it for automatic detection. This replaces both transcript representations.\n- `timestamp` — Call start time in ISO 8601 format.\n- `duration` — Call duration in minutes.\n- `call_ended_reason` and `customer_number` — Provider-supplied call attributes.\n- `metadata` and `dynamic_variables` — JSON objects merged at the top level with the existing values. Supplied keys overwrite matching keys; omitted keys are preserved.\n\n**Restrictions**\nOnly the fields listed above are accepted. System-managed fields, including agent and project ownership, metric evaluations, review state, topic, and dropoff point, cannot be updated.\n\n**Metric evaluation**\nThis operation does not recompute metrics. To evaluate the updated call data, invoke `rerun_evaluation` in a separate request."
          }
        }
      },
      "delete": {
        "operationId": "observability-v2-call-logs-destroy",
        "description": "⚠ Irreversible. Deletes the call log along with its transcript and voice recording. By default metric evaluations are also deleted; set `retain_evaluations=true` to keep them and leave the call record un-soft-deleted.",
        "summary": "Delete a call log",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this call log.",
            "required": true
          },
          {
            "in": "query",
            "name": "retain_evaluations",
            "schema": {
              "type": "boolean",
              "default": false
            },
            "description": "If true, metric evaluations are retained and the call log is not soft-deleted. Default: false."
          }
        ],
        "tags": [
          "observability"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "204": {
            "description": "No response body"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "observability-v2-call-logs-destroy",
            "description": "⚠ Irreversible. Deletes the call log along with its transcript and voice recording. By default metric evaluations are also deleted; set `retain_evaluations=true` to keep them and leave the call record un-soft-deleted."
          }
        }
      }
    },
    "/observability/v2/call-logs/{id}/mark_critical_scenario_wrong/": {
      "post": {
        "operationId": "observability-v2-call-logs-mark-critical-scenario-wrong-create",
        "description": "Observability v2 call logs mark critical scenario wrong",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this call log.",
            "required": true
          }
        ],
        "tags": [
          "observability"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CallLogDetail"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/CallLogDetail"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/CallLogDetail"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CallLogDetail"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/observability/v2/call-logs/{id}/mark_metric_vote/": {
      "post": {
        "operationId": "observability-v2-call-logs-mark-metric-vote-create",
        "description": "Record a thumbs-up or thumbs-down vote on a specific metric evaluation for this call log and optionally provide an expected value and free-text feedback. Updates the metric evaluation and marks the call log as reviewed.",
        "summary": "Submit a metric vote for a call log",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this call log.",
            "required": true
          }
        ],
        "tags": [
          "Call Logs"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MarkMetricVote"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/MarkMetricVote"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/MarkMetricVote"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MarkMetricVoteCallLogResponse"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "observability-v2-call-logs-mark-metric-vote-create",
            "description": "Record a thumbs-up or thumbs-down vote on a specific metric evaluation for this call log and optionally provide an expected value and free-text feedback. Updates the metric evaluation and marks the call log as reviewed."
          }
        }
      }
    },
    "/observability/v2/call-logs/{id}/unmark_critical_scenario_wrong/": {
      "post": {
        "operationId": "observability-v2-call-logs-unmark-critical-scenario-wrong-create",
        "description": "Observability v2 call logs unmark critical scenario wrong",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this call log.",
            "required": true
          }
        ],
        "tags": [
          "observability"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CallLogDetail"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/CallLogDetail"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/CallLogDetail"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CallLogDetail"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/observability/v2/call-logs/analyze_call_logs/": {
      "get": {
        "operationId": "observability-v2-call-logs-analyze-call-logs-retrieve",
        "description": "Analyze call logs using Claude Agent SDK.\n\nClaude uses Read/Bash tools to query the CSV file without loading it into context.\nThis allows analyzing large datasets efficiently.",
        "tags": [
          "observability"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CallLogDetail"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/observability/v2/call-logs/complete-upload/": {
      "post": {
        "operationId": "observability-v2-call-logs-complete-upload-create",
        "description": "Observability v2 call logs complete upload",
        "tags": [
          "observability"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CallLogDetail"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/CallLogDetail"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/CallLogDetail"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CallLogDetail"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/observability/v2/call-logs/create_scenarios/": {
      "post": {
        "operationId": "call-logs-create-scenarios_3",
        "description": "Generate test scenarios from real production call logs.\n\nReturns a `progress_id` immediately — the actual scenario creation runs in the background.\nPoll `GET /observability/v1/call-logs/create_scenarios_progress?progress_id=<id>` until\n`completed_scenarios + failed_scenarios >= total_scenarios`. The `scenarios_list` field\n(full Scenario objects) is populated only once processing is complete.\n\n**`call_logs` accepts:** a list of IDs `[1, 2, 3]` or `\"all\"` for every call log on the agent.\n\n**`copy_to_agent`:** optionally copy the generated scenarios to a different agent —\nuseful when your observation agent and your test agent are separate.\n\n**Prerequisite:** call logs must have a transcript (uploaded via `transcript_json`).\nAudio-only logs without a transcript cannot produce scenarios.",
        "tags": [
          "observability"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostCreateScenarios"
              },
              "examples": {
                "Create-scenarios-with-agent-id": {
                  "value": {
                    "agent_id": 2142,
                    "call_logs": [
                      1,
                      2,
                      3
                    ],
                    "copy_to_agent": null
                  },
                  "summary": "create-scenarios-with-agent-id"
                },
                "Create-scenarios-with-assistant-id": {
                  "value": {
                    "assistant_id": "asst_1234567890",
                    "call_logs": "all"
                  },
                  "summary": "create-scenarios-with-assistant-id"
                },
                "Create-scenarios-with-copy-to-agent": {
                  "value": {
                    "agent_id": 2142,
                    "call_logs": [
                      1,
                      2,
                      3
                    ],
                    "copy_to_agent": 2143
                  },
                  "summary": "create-scenarios-with-copy-to-agent"
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostCreateScenarios"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostCreateScenarios"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "progress_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Unique identifier for tracking the progress of scenario creation"
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "summary": "Create scenarios from call logs",
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "call-logs-create-scenarios",
            "description": "Generate test scenarios from real production call logs.\n\nReturns a `progress_id` immediately — the actual scenario creation runs in the background.\nPoll `GET /observability/v1/call-logs/create_scenarios_progress?progress_id=<id>` until\n`completed_scenarios + failed_scenarios >= total_scenarios`. The `scenarios_list` field\n(full Scenario objects) is populated only once processing is complete.\n\n**`call_logs` accepts:** a list of IDs `[1, 2, 3]` or `\"all\"` for every call log on the agent.\n\n**`copy_to_agent`:** optionally copy the generated scenarios to a different agent —\nuseful when your observation agent and your test agent are separate.\n\n**Prerequisite:** call logs must have a transcript (uploaded via `transcript_json`).\nAudio-only logs without a transcript cannot produce scenarios."
          }
        }
      }
    },
    "/observability/v2/call-logs/create_scenarios_progress/": {
      "get": {
        "operationId": "call-logs-create-scenarios-progress_3",
        "description": "Get scenarios-from-call-logs progress",
        "parameters": [
          {
            "in": "query",
            "name": "progress_id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Progress ID returned from create_scenarios endpoint",
            "required": true
          },
          {
            "name": "agent_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Tenant scope. Supply one of `agent_id`, `project_id` when authenticating with a user session or OAuth bearer token; omit when using an API key already scoped to the tenant."
          },
          {
            "name": "project_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Tenant scope. Supply one of `agent_id`, `project_id` when authenticating with a user session or OAuth bearer token; omit when using an API key already scoped to the tenant."
          }
        ],
        "tags": [
          "observability"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SchemaCreateScenariosProgressResponse"
                },
                "examples": {
                  "Progress-in-progress": {
                    "value": {
                      "agent_id": 2142,
                      "completed_scenarios": 2,
                      "failed_scenarios": 0,
                      "total_scenarios": 5,
                      "scenarios_list": [],
                      "errors": []
                    },
                    "summary": "progress-in-progress"
                  },
                  "Progress-completed": {
                    "value": {
                      "agent_id": 2142,
                      "completed_scenarios": 4,
                      "failed_scenarios": 1,
                      "total_scenarios": 5,
                      "scenarios_list": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "description": "Unique identifier for the scenario"
                            },
                            "name": {
                              "type": "string",
                              "description": "Name of the scenario"
                            },
                            "agent": {
                              "type": "integer",
                              "description": "ID of the AI agent this scenario belongs to"
                            },
                            "assistant_id": {
                              "type": "string",
                              "description": "Alternative to agent ID - the assistant ID to use for this scenario"
                            },
                            "personality": {
                              "type": "integer",
                              "description": "ID of the personality used in this scenario"
                            },
                            "personality_name": {
                              "type": "string",
                              "description": "Name of the personality used in this scenario"
                            },
                            "tags": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              },
                              "description": "Tags associated with this scenario."
                            },
                            "runs": {
                              "type": "array",
                              "items": {
                                "type": "integer"
                              },
                              "description": "List of IDs for the last run of this scenario"
                            },
                            "metrics": {
                              "type": "array",
                              "items": {
                                "type": "integer"
                              },
                              "description": "List of metric IDs to associate with this scenario"
                            },
                            "metric_names": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              },
                              "description": "List of metric names associated with this scenario"
                            },
                            "phone_number": {
                              "type": "string",
                              "description": "Phone number used for outbound calls in this scenario"
                            },
                            "phone_number_queue_length": {
                              "type": "integer",
                              "description": "Number of runs in queue for this phone number"
                            },
                            "first_message": {
                              "type": "string",
                              "description": "First message to be sent in the scenario"
                            },
                            "inbound_phone_number": {
                              "type": "integer",
                              "description": "ID of the phone number used for inbound calls"
                            },
                            "inbound_phone_number_data": {
                              "type": "object",
                              "description": "Details of the phone number used for inbound calls",
                              "properties": {
                                "id": {
                                  "type": "integer",
                                  "description": "ID of the inbound phone number"
                                },
                                "number": {
                                  "type": "string",
                                  "description": "The actual phone number"
                                },
                                "phone_number_id": {
                                  "type": "string",
                                  "description": "External ID of the phone number"
                                }
                              }
                            },
                            "instructions": {
                              "type": "string",
                              "description": "Instructions for the AI agent in this scenario"
                            },
                            "simulation_description": {
                              "type": "string",
                              "description": "Description of the simulation if this scenario was created by simulation"
                            },
                            "information_fields": {
                              "type": "object",
                              "description": "Additional information fields for the scenario"
                            },
                            "expected_outcome_prompt": {
                              "type": "string",
                              "description": "Expected outcome prompt for the scenario"
                            },
                            "scenario_language": {
                              "type": "string",
                              "description": "Language of the scenario"
                            },
                            "is_simulating": {
                              "type": "boolean",
                              "description": "Whether this scenario was created by simulation"
                            },
                            "test_profile_data": {
                              "type": "object",
                              "description": "The test profile generated for this scenario, including its sectioned `information` (main_agent_variables / testing_agent_variables)"
                            },
                            "generated_mock_tool_entries": {
                              "type": "array",
                              "description": "Expected mock tool calls generated for this scenario when the agent has mock tools attached. Empty when the agent has no mock tools.",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "tool_id": {
                                    "type": "integer",
                                    "description": "ID of the mock tool on the agent"
                                  },
                                  "tool_name": {
                                    "type": "string",
                                    "description": "Name of the tool being mocked"
                                  },
                                  "new_entry": {
                                    "type": "object",
                                    "description": "The expected tool call for this scenario",
                                    "properties": {
                                      "input": {
                                        "type": "object",
                                        "description": "Input parameters the tool call is expected to receive"
                                      },
                                      "output": {
                                        "type": "object",
                                        "description": "Response the mock tool will return"
                                      }
                                    }
                                  }
                                }
                              }
                            }
                          }
                        }
                      },
                      "errors": [
                        {
                          "call_log_id": 3,
                          "error": {
                            "detail": "Transcript is missing"
                          }
                        }
                      ]
                    },
                    "summary": "progress-completed"
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "summary": "Get scenarios-from-call-logs progress",
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "call-logs-create-scenarios-progress",
            "description": "Get scenarios-from-call-logs progress"
          }
        }
      }
    },
    "/observability/v2/call-logs/delete_call_logs/": {
      "post": {
        "operationId": "call-logs-bulk-delete_3",
        "description": "Call logs bulk delete",
        "tags": [
          "observability"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeleteCallLogs"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/DeleteCallLogs"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/DeleteCallLogs"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "204": {
            "description": "No response body"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/observability/v2/call-logs/evaluate_metrics/": {
      "post": {
        "operationId": "observability-v2-call-logs-evaluate-metrics-create",
        "description": "Evaluate one or more metrics against selected call logs. Unlike `rerun_evaluation` (which re-runs all assigned metrics), this endpoint lets you target specific metrics.\n\n**Scope:** provide either `agent_id` or `project_id` to identify which agent's call logs and metrics to use. Metrics must belong to the specified agent or project.\n\n**Credit check:** cost scales with the number of call logs and metrics selected. The request is rejected if your balance is insufficient — check your balance first via `test_framework_billing_info_retrieve`.\n\n**Async:** evaluation runs in the background. The response returns the call logs in their current state. Retrieve each call log individually to see updated metric results once evaluation completes.\n\n**Rate limited.** Respect 429 responses — wait for the `Retry-After` duration.",
        "summary": "Run specific metrics against call logs",
        "tags": [
          "observability"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EvaluateMetrics"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/EvaluateMetrics"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/EvaluateMetrics"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CallLogList"
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "observability-v2-call-logs-evaluate-metrics-create",
            "description": "Evaluate one or more metrics against selected call logs. Unlike `rerun_evaluation` (which re-runs all assigned metrics), this endpoint lets you target specific metrics.\n\n**Scope:** provide either `agent_id` or `project_id` to identify which agent's call logs and metrics to use. Metrics must belong to the specified agent or project.\n\n**Credit check:** cost scales with the number of call logs and metrics selected. The request is rejected if your balance is insufficient — check your balance first via `test_framework_billing_info_retrieve`.\n\n**Async:** evaluation runs in the background. The response returns the call logs in their current state. Retrieve each call log individually to see updated metric results once evaluation completes.\n\n**Rate limited.** Respect 429 responses — wait for the `Retry-After` duration."
          }
        }
      }
    },
    "/observability/v2/call-logs/export_call_logs/": {
      "get": {
        "operationId": "observability-v2-call-logs-export-call-logs-retrieve",
        "description": "Observability v2 call logs export call logs",
        "tags": [
          "observability"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CallLogDetail"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/observability/v2/call-logs/export_call_logs_progress/": {
      "get": {
        "operationId": "observability-v2-call-logs-export-call-logs-progress-retrieve",
        "description": "Observability v2 call logs export call logs progress",
        "tags": [
          "observability"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CallLogDetail"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/observability/v2/call-logs/filters/": {
      "get": {
        "operationId": "observability-v2-call-logs-filters-retrieve",
        "description": "Observability v2 call logs filters",
        "tags": [
          "observability"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CallLogDetail"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/observability/v2/call-logs/filters_call_id/": {
      "get": {
        "operationId": "observability-v2-call-logs-filters-call-id-retrieve",
        "description": "Autocomplete-search the production CallLog `call_id` field (the provider's call identifier string). This is distinct from simulation `run_id` (integer; see `runs_list`) and from CallLog ID (integer DB ID).",
        "tags": [
          "observability"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CallLogDetail"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/observability/v2/call-logs/filters_customer_number/": {
      "get": {
        "operationId": "observability-v2-call-logs-filters-customer-number-retrieve",
        "description": "Observability v2 call logs filters customer number",
        "tags": [
          "observability"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CallLogDetail"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/observability/v2/call-logs/get-upload-url/": {
      "post": {
        "operationId": "observability-v2-call-logs-get-upload-url-create",
        "description": "Observability v2 call logs get upload url",
        "tags": [
          "observability"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CallLogDetail"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/CallLogDetail"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/CallLogDetail"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CallLogDetail"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/observability/v2/call-logs/rerun_evaluation/": {
      "post": {
        "operationId": "observability-v2-call-logs-rerun-evaluation-create",
        "description": "Trigger metric re-evaluation on one or more existing call logs. Provide either `agent_id` or `assistant_id` (not both) to identify the agent, then specify which call logs to re-evaluate.\n\n**`call_logs` accepts:**\n- A list of call log IDs: `[1, 2, 3]`\n- The string `\"all\"` to re-evaluate every call log for the agent\n\n**Side effect:** for non-reviewed call logs, `success` is reset to `null` before re-evaluation begins. Reviewed call logs retain their human-approved outcome.\n\n**Rate limited.** If the limit is exceeded you will receive a 429 response — wait for the `Retry-After` duration before retrying.",
        "summary": "Re-run metric evaluation on call logs",
        "tags": [
          "observability"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RerunEvaluation"
              },
              "examples": {
                "Re-evaluate-specific-call-logs": {
                  "value": {
                    "agent_id": 2142,
                    "call_logs": [
                      101,
                      102,
                      103
                    ]
                  },
                  "summary": "re-evaluate-specific-call-logs"
                },
                "Re-evaluate-all-call-logs": {
                  "value": {
                    "agent_id": 2142,
                    "call_logs": "all"
                  },
                  "summary": "re-evaluate-all-call-logs"
                },
                "Re-evaluate-using-assistant-id": {
                  "value": {
                    "assistant_id": 2143,
                    "call_logs": [
                      101,
                      102
                    ]
                  },
                  "summary": "re-evaluate-using-assistant-id"
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/RerunEvaluation"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/RerunEvaluation"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CallLogDetail"
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "observability-v2-call-logs-rerun-evaluation-create",
            "description": "Trigger metric re-evaluation on one or more existing call logs. Provide either `agent_id` or `assistant_id` (not both) to identify the agent, then specify which call logs to re-evaluate.\n\n**`call_logs` accepts:**\n- A list of call log IDs: `[1, 2, 3]`\n- The string `\"all\"` to re-evaluate every call log for the agent\n\n**Side effect:** for non-reviewed call logs, `success` is reset to `null` before re-evaluation begins. Reviewed call logs retain their human-approved outcome.\n\n**Rate limited.** If the limit is exceeded you will receive a 429 response — wait for the `Retry-After` duration before retrying."
          }
        }
      }
    },
    "/schedules/v1/cron-jobs/": {
      "get": {
        "operationId": "cron-jobs-list",
        "description": "List all scheduled jobs",
        "parameters": [
          {
            "in": "query",
            "name": "agent_id",
            "schema": {
              "type": "string"
            },
            "description": "\nFilter by agent id\nExample: `123`\n"
          },
          {
            "in": "query",
            "name": "project_id",
            "schema": {
              "type": "string"
            },
            "description": "\nFilter by project id\nExample: `123`\n"
          },
          {
            "name": "organization_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Tenant scope. Supply one of `agent_id`, `project_id`, `organization_id` when authenticating with a user session or OAuth bearer token; omit when using an API key already scoped to the tenant."
          }
        ],
        "tags": [
          "schedules"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CronJob"
                  }
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "summary": "List scheduled jobs",
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "cron-jobs-list",
            "description": "List all scheduled jobs"
          }
        }
      },
      "post": {
        "operationId": "cron-jobs-create",
        "description": "Create a cron job that runs evaluators against your agent on a recurring schedule (daily regression tests, hourly smoke tests, weekly rollups, etc.). The job invokes the same logic as `run_scenarios` but on a timer.\n\n**Scenario selection (pick one):**\n- `scenarios` — explicit list of evaluator IDs\n- `tags` — run every evaluator matching these tags\n\n**Execution mode** (`execution_mode`) — defaults to voice; also supports `text`, `sip`, etc. Matches the corresponding `run_scenarios` / `run_scenarios_text` endpoint.\n\n**Schedule:** `crontab_expression` uses standard cron syntax (`minute hour day month day-of-week`). Combine with `timezone` (IANA name, e.g. `America/New_York`) to control when the job fires.\n\n**Run size:** `frequency` multiplies each scenario. Personality / test-profile overrides behave identically to `run_scenarios` — same billing rules apply.",
        "summary": "Schedule a recurring evaluator run",
        "tags": [
          "Schedules"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostCronJob"
              },
              "examples": {
                "CreateScheduledJobWithScenarios": {
                  "value": {
                    "name": "Daily Agent Test",
                    "scenarios": [
                      1,
                      2,
                      3
                    ],
                    "agent": 1,
                    "crontab_expression": "0 9 * * 1-5",
                    "timezone": "America/New_York"
                  },
                  "summary": "Create Scheduled Job with Scenarios"
                },
                "CreateScheduledJobWithTags": {
                  "value": {
                    "name": "Weekly Regression Test",
                    "tags": [
                      "regression",
                      "high-priority"
                    ],
                    "agent": 1,
                    "crontab_expression": "0 0 * * 0",
                    "timezone": "UTC"
                  },
                  "summary": "Create Scheduled Job with Tags"
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostCronJob"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostCronJob"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CronJob"
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "cron-jobs-create",
            "description": "Create a cron job that runs evaluators against your agent on a recurring schedule (daily regression tests, hourly smoke tests, weekly rollups, etc.). The job invokes the same logic as `run_scenarios` but on a timer.\n\n**Scenario selection (pick one):**\n- `scenarios` — explicit list of evaluator IDs\n- `tags` — run every evaluator matching these tags\n\n**Execution mode** (`execution_mode`) — defaults to voice; also supports `text`, `sip`, etc. Matches the corresponding `run_scenarios` / `run_scenarios_text` endpoint.\n\n**Schedule:** `crontab_expression` uses standard cron syntax (`minute hour day month day-of-week`). Combine with `timezone` (IANA name, e.g. `America/New_York`) to control when the job fires.\n\n**Run size:** `frequency` multiplies each scenario. Personality / test-profile overrides behave identically to `run_scenarios` — same billing rules apply."
          }
        }
      }
    },
    "/schedules/v1/cron-jobs-external/": {
      "get": {
        "operationId": "cron-jobs-external-list",
        "description": "List all scheduled jobs",
        "parameters": [
          {
            "in": "query",
            "name": "agent_id",
            "schema": {
              "type": "string"
            },
            "description": "\nFilter by agent id\nExample: `123`\n"
          },
          {
            "in": "query",
            "name": "project_id",
            "schema": {
              "type": "string"
            },
            "description": "\nFilter by project id\nExample: `123`\n"
          }
        ],
        "tags": [
          "schedules"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CronJob"
                  }
                }
              }
            },
            "description": ""
          }
        }
      },
      "post": {
        "operationId": "cron-jobs-external-create",
        "description": "Create a cron job that runs evaluators against your agent on a recurring schedule (daily regression tests, hourly smoke tests, weekly rollups, etc.). The job invokes the same logic as `run_scenarios` but on a timer.\n\n**Scenario selection (pick one):**\n- `scenarios` — explicit list of evaluator IDs\n- `tags` — run every evaluator matching these tags\n\n**Execution mode** (`execution_mode`) — defaults to voice; also supports `text`, `sip`, etc. Matches the corresponding `run_scenarios` / `run_scenarios_text` endpoint.\n\n**Schedule:** `crontab_expression` uses standard cron syntax (`minute hour day month day-of-week`). Combine with `timezone` (IANA name, e.g. `America/New_York`) to control when the job fires.\n\n**Run size:** `frequency` multiplies each scenario. Personality / test-profile overrides behave identically to `run_scenarios` — same billing rules apply.",
        "summary": "Schedule a recurring evaluator run",
        "tags": [
          "Schedules"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostCronJob"
              },
              "examples": {
                "CreateScheduledJobWithScenarios": {
                  "value": {
                    "name": "Daily Agent Test",
                    "scenarios": [
                      1,
                      2,
                      3
                    ],
                    "agent": 1,
                    "crontab_expression": "0 9 * * 1-5",
                    "timezone": "America/New_York"
                  },
                  "summary": "Create Scheduled Job with Scenarios"
                },
                "CreateScheduledJobWithTags": {
                  "value": {
                    "name": "Weekly Regression Test",
                    "tags": [
                      "regression",
                      "high-priority"
                    ],
                    "agent": 1,
                    "crontab_expression": "0 0 * * 0",
                    "timezone": "UTC"
                  },
                  "summary": "Create Scheduled Job with Tags"
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostCronJob"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostCronJob"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CronJob"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/schedules/v1/cron-jobs-external/{id}/": {
      "get": {
        "operationId": "cron-jobs-external-retrieve",
        "description": "Retrieve a scheduled job by id",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this cron job.",
            "required": true
          }
        ],
        "tags": [
          "schedules"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CronJob"
                }
              }
            },
            "description": ""
          }
        }
      },
      "put": {
        "operationId": "cron-jobs-external-update",
        "description": "Update an existing scheduled job",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this cron job.",
            "required": true
          }
        ],
        "tags": [
          "schedules"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostCronJob"
              },
              "examples": {
                "UpdateScheduledJob": {
                  "value": {
                    "name": "Updated Daily Agent Test",
                    "scenarios": [
                      1,
                      2,
                      3,
                      4
                    ],
                    "agent": 1,
                    "crontab_expression": "0 10 * * 1-5",
                    "timezone": "America/Los_Angeles"
                  },
                  "summary": "Update Scheduled Job"
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostCronJob"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostCronJob"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CronJob"
                }
              }
            },
            "description": ""
          }
        }
      },
      "patch": {
        "operationId": "cron-jobs-external-partial-update",
        "description": "Partially update an existing scheduled job",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this cron job.",
            "required": true
          }
        ],
        "tags": [
          "schedules"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchedSchemaPostCronJob"
              },
              "examples": {
                "UpdateScheduleTimeOnly": {
                  "value": {
                    "crontab_expression": "0 8 * * 1-5"
                  },
                  "summary": "Update Schedule Time Only"
                },
                "UpdateScenariosOnly": {
                  "value": {
                    "scenarios": [
                      5,
                      6,
                      7
                    ]
                  },
                  "summary": "Update Scenarios Only"
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/PatchedSchemaPostCronJob"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/PatchedSchemaPostCronJob"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CronJob"
                }
              }
            },
            "description": ""
          }
        }
      },
      "delete": {
        "operationId": "cron-jobs-external-destroy",
        "description": "⚠ Irreversible. Deletes the cron job and stops it from scheduling new runs. Past results from previous runs are retained.",
        "summary": "Delete a scheduled job",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this cron job.",
            "required": true
          }
        ],
        "tags": [
          "schedules"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "204": {
            "description": "No response body"
          },
          "404": {
            "description": "No response body"
          }
        }
      }
    },
    "/schedules/v1/cron-jobs/{id}/": {
      "get": {
        "operationId": "cron-jobs-retrieve",
        "description": "Retrieve a scheduled job by id",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this cron job.",
            "required": true
          }
        ],
        "tags": [
          "schedules"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CronJob"
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "summary": "Get a scheduled job",
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "cron-jobs-retrieve",
            "description": "Retrieve a scheduled job by id"
          }
        }
      },
      "put": {
        "operationId": "cron-jobs-update",
        "description": "Update an existing scheduled job",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this cron job.",
            "required": true
          }
        ],
        "tags": [
          "schedules"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostCronJob"
              },
              "examples": {
                "UpdateScheduledJob": {
                  "value": {
                    "name": "Updated Daily Agent Test",
                    "scenarios": [
                      1,
                      2,
                      3,
                      4
                    ],
                    "agent": 1,
                    "crontab_expression": "0 10 * * 1-5",
                    "timezone": "America/Los_Angeles"
                  },
                  "summary": "Update Scheduled Job"
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostCronJob"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostCronJob"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CronJob"
                }
              }
            },
            "description": ""
          }
        }
      },
      "patch": {
        "operationId": "cron-jobs-partial-update",
        "description": "Partially update an existing scheduled job",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this cron job.",
            "required": true
          }
        ],
        "tags": [
          "schedules"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchedSchemaPostCronJob"
              },
              "examples": {
                "UpdateScheduleTimeOnly": {
                  "value": {
                    "crontab_expression": "0 8 * * 1-5"
                  },
                  "summary": "Update Schedule Time Only"
                },
                "UpdateScenariosOnly": {
                  "value": {
                    "scenarios": [
                      5,
                      6,
                      7
                    ]
                  },
                  "summary": "Update Scenarios Only"
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/PatchedSchemaPostCronJob"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/PatchedSchemaPostCronJob"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CronJob"
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "summary": "Update a scheduled job",
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "cron-jobs-partial-update",
            "description": "Partially update an existing scheduled job"
          }
        }
      },
      "delete": {
        "operationId": "cron-jobs-destroy",
        "description": "⚠ Irreversible. Deletes the cron job and stops it from scheduling new runs. Past results from previous runs are retained.",
        "summary": "Delete a scheduled job",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this cron job.",
            "required": true
          }
        ],
        "tags": [
          "schedules"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "204": {
            "description": "No response body"
          },
          "404": {
            "description": "No response body"
          }
        },
        "x-mcp-expose": true,
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "cron-jobs-destroy",
            "description": "⚠ Irreversible. Deletes the cron job and stops it from scheduling new runs. Past results from previous runs are retained."
          }
        }
      }
    },
    "/schedules/v1/metric-optimiser-cron-jobs/": {
      "get": {
        "operationId": "metric-optimiser-cron-jobs-list",
        "description": "List all scheduled metric-optimiser jobs.",
        "parameters": [
          {
            "in": "query",
            "name": "project_id",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "organization_id",
            "schema": {
              "type": "string"
            }
          }
        ],
        "tags": [
          "schedules"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/MetricOptimiserCronJob"
                  }
                }
              }
            },
            "description": ""
          }
        }
      },
      "post": {
        "operationId": "metric-optimiser-cron-jobs-create",
        "description": "Create a cron job that runs the Metric Lab optimiser against one or more metrics on a recurring schedule. The optimiser uses every test set already in each metric's Lab (every MetricReview row). Set `auto_apply` to overwrite the live metric prompt when the optimised score is at least as good as the baseline on the labelled set — otherwise the run is read-only and emails a diff summary.",
        "summary": "Schedule a recurring metric optimiser run",
        "tags": [
          "schedules"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MetricOptimiserCronJob"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/MetricOptimiserCronJob"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/MetricOptimiserCronJob"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetricOptimiserCronJob"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/schedules/v1/metric-optimiser-cron-jobs/{id}/": {
      "get": {
        "operationId": "metric-optimiser-cron-jobs-retrieve",
        "description": "Retrieve a scheduled metric-optimiser job by id.",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this metric optimiser cron job.",
            "required": true
          }
        ],
        "tags": [
          "schedules"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetricOptimiserCronJob"
                }
              }
            },
            "description": ""
          }
        }
      },
      "put": {
        "operationId": "metric-optimiser-cron-jobs-update",
        "description": "Update an existing scheduled metric-optimiser job.",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this metric optimiser cron job.",
            "required": true
          }
        ],
        "tags": [
          "schedules"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MetricOptimiserCronJob"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/MetricOptimiserCronJob"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/MetricOptimiserCronJob"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetricOptimiserCronJob"
                }
              }
            },
            "description": ""
          }
        }
      },
      "patch": {
        "operationId": "metric-optimiser-cron-jobs-partial-update",
        "description": "Partially update an existing scheduled metric-optimiser job.",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this metric optimiser cron job.",
            "required": true
          }
        ],
        "tags": [
          "schedules"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchedMetricOptimiserCronJob"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/PatchedMetricOptimiserCronJob"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/PatchedMetricOptimiserCronJob"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetricOptimiserCronJob"
                }
              }
            },
            "description": ""
          }
        }
      },
      "delete": {
        "operationId": "metric-optimiser-cron-jobs-destroy",
        "description": "Irreversible. Deletes the cron job and stops it from firing. Past optimiser runs are retained.",
        "summary": "Delete a scheduled metric-optimiser job",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this metric optimiser cron job.",
            "required": true
          }
        ],
        "tags": [
          "schedules"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "204": {
            "description": "No response body"
          },
          "404": {
            "description": "No response body"
          }
        }
      }
    },
    "/slack/events/": {
      "post": {
        "operationId": "slack-events-create",
        "description": "Handle Slack interactive component callbacks",
        "tags": [
          "slack"
        ],
        "responses": {
          "200": {
            "description": "No response body"
          }
        }
      }
    },
    "/slack/interact/": {
      "post": {
        "operationId": "slack-interact-create",
        "description": "Handle Slack interactive component callbacks",
        "tags": [
          "slack"
        ],
        "responses": {
          "200": {
            "description": "No response body"
          }
        }
      }
    },
    "/slack/oauth/": {
      "post": {
        "operationId": "slack-oauth-create",
        "tags": [
          "slack"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "200": {
            "description": "No response body"
          }
        },
        "description": "Create a new slack oauth"
      }
    },
    "/slack/slack-workspaces/": {
      "get": {
        "operationId": "slack-slack-workspaces-list",
        "description": "Return every Slack workspace connected to the project, with the bot's default `channel_id`, `team_name`, and verification status. Use to pick a `workspace_id` (and optionally a different `channel_id`) for the `notifications.slack` block on `alerts_create`. Access tokens and bot IDs are not returned.",
        "summary": "List Slack workspaces configured for a project",
        "tags": [
          "slack"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SlackWorkspace"
                  }
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "slack-slack-workspaces-list",
            "description": "Return every Slack workspace connected to the project, with the bot's default `channel_id`, `team_name`, and verification status. Use to pick a `workspace_id` (and optionally a different `channel_id`) for the `notifications.slack` block on `alerts_create`. Access tokens and bot IDs are not returned."
          }
        },
        "parameters": [
          {
            "name": "project_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Tenant scope. Supply one of `project_id` when authenticating with a user session or OAuth bearer token; omit when using an API key already scoped to the tenant."
          }
        ]
      }
    },
    "/slack/slack-workspaces/{id}/": {
      "get": {
        "operationId": "slack-slack-workspaces-retrieve",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this slack workspace.",
            "required": true
          }
        ],
        "tags": [
          "slack"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SlackWorkspace"
                }
              }
            },
            "description": ""
          }
        },
        "description": "Retrieve a slack slack workspace by ID"
      },
      "put": {
        "operationId": "slack-slack-workspaces-update",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this slack workspace.",
            "required": true
          }
        ],
        "tags": [
          "slack"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SlackWorkspace"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/SlackWorkspace"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/SlackWorkspace"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SlackWorkspace"
                }
              }
            },
            "description": ""
          }
        },
        "description": "Update a slack slack workspace"
      },
      "patch": {
        "operationId": "slack-slack-workspaces-partial-update",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this slack workspace.",
            "required": true
          }
        ],
        "tags": [
          "slack"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchedSlackWorkspace"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/PatchedSlackWorkspace"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/PatchedSlackWorkspace"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SlackWorkspace"
                }
              }
            },
            "description": ""
          }
        },
        "description": "Update a slack slack workspace"
      },
      "delete": {
        "operationId": "slack-slack-workspaces-destroy",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this slack workspace.",
            "required": true
          }
        ],
        "tags": [
          "slack"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "204": {
            "description": "No response body"
          }
        },
        "description": "Delete a slack slack workspace"
      }
    },
    "/slack/slack-workspaces/{id}/get_channels/": {
      "get": {
        "operationId": "slack-slack-workspaces-get-channels-retrieve",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this slack workspace.",
            "required": true
          }
        ],
        "tags": [
          "slack"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SlackWorkspace"
                }
              }
            },
            "description": ""
          }
        },
        "description": "Slack slack workspaces get channels"
      }
    },
    "/slack/slack-workspaces/{id}/members/": {
      "get": {
        "operationId": "slack-slack-workspaces-members-retrieve",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this slack workspace.",
            "required": true
          }
        ],
        "tags": [
          "slack"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SlackWorkspace"
                }
              }
            },
            "description": ""
          }
        },
        "description": "Slack slack workspaces members"
      }
    },
    "/slack/slack-workspaces/{id}/verify/": {
      "get": {
        "operationId": "slack-slack-workspaces-verify-retrieve",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this slack workspace.",
            "required": true
          }
        ],
        "tags": [
          "slack"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SlackWorkspace"
                }
              }
            },
            "description": ""
          }
        },
        "description": "Slack slack workspaces verify"
      }
    },
    "/subscriptions/create-checkout-session/": {
      "post": {
        "operationId": "subscriptions-create-checkout-session-create",
        "tags": [
          "subscriptions"
        ],
        "security": [
          {
            "supabase_session_inactive_allowed": []
          }
        ],
        "responses": {
          "200": {
            "description": "No response body"
          }
        },
        "description": "Create a new subscriptions create checkout session"
      }
    },
    "/subscriptions/hackathon-pack/": {
      "post": {
        "operationId": "subscriptions-hackathon-pack-create",
        "description": "Grant hackathon pack access to organization.",
        "tags": [
          "subscriptions"
        ],
        "security": [
          {
            "supabase_session_inactive_allowed": []
          }
        ],
        "responses": {
          "200": {
            "description": "No response body"
          }
        }
      }
    },
    "/subscriptions/pack-access-requests/": {
      "post": {
        "operationId": "subscriptions-pack-access-requests-create",
        "description": "Create new pack access request",
        "tags": [
          "subscriptions"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PackAccessRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/PackAccessRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/PackAccessRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "supabase_session_inactive_allowed": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PackAccessRequest"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/subscriptions/packs/": {
      "get": {
        "operationId": "subscriptions-packs-list",
        "tags": [
          "subscriptions"
        ],
        "security": [
          {
            "supabase_session_inactive_allowed": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Pack"
                  }
                }
              }
            },
            "description": ""
          }
        },
        "description": "List subscriptions packs"
      }
    },
    "/subscriptions/packs/{id}/": {
      "get": {
        "operationId": "subscriptions-packs-retrieve",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this pack.",
            "required": true
          }
        ],
        "tags": [
          "subscriptions"
        ],
        "security": [
          {
            "supabase_session_inactive_allowed": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Pack"
                }
              }
            },
            "description": ""
          }
        },
        "description": "Retrieve a subscriptions pack by ID"
      }
    },
    "/subscriptions/packs/add_developer_pack/": {
      "post": {
        "operationId": "subscriptions-packs-add-developer-pack-create",
        "description": "Add developer pack to organization.\nPhone verification is not required here — it is only enforced\nfor the developer trial pack (add_developer_trial_pack).\nThrottled to 1 request per 30 seconds per user.",
        "tags": [
          "subscriptions"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Pack"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/Pack"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Pack"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "supabase_session_inactive_allowed": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Pack"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/subscriptions/packs/add_developer_trial_pack/": {
      "post": {
        "operationId": "subscriptions-packs-add-developer-trial-pack-create",
        "description": "Add self-serve trial pack to organization after verifying phone number.",
        "tags": [
          "subscriptions"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Pack"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/Pack"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Pack"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "supabase_session_inactive_allowed": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Pack"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/subscriptions/packs/add_pack/": {
      "post": {
        "operationId": "subscriptions-packs-add-pack-create",
        "tags": [
          "subscriptions"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Pack"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/Pack"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Pack"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "supabase_session_inactive_allowed": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Pack"
                }
              }
            },
            "description": ""
          }
        },
        "description": "Subscriptions packs add pack"
      }
    },
    "/subscriptions/packs/add_payg_pack/": {
      "post": {
        "operationId": "subscriptions-packs-add-payg-pack-create",
        "description": "Start the free pay-as-you-go plan for an organization.\n\nThe plan never expires: the first pack.free_members_count member(s) are free\nand only additional members are billed through Stripe. Eligible signups\n(business email whose domain hasn't used a plan before, org's first plan)\nalso receive the pack's one-time complimentary credits in the never-expiring\nbalance. Orgs whose previous plan expired or was cancelled can activate too,\nwith 0 complimentary credits. Phone verification is required only when\ncomplimentary credits will be granted.",
        "tags": [
          "subscriptions"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Pack"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/Pack"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Pack"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "supabase_session_inactive_allowed": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Pack"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/subscriptions/packs/check-trial-eligibility/": {
      "get": {
        "operationId": "subscriptions-packs-check-trial-eligibility-retrieve",
        "description": "Check if user's domain is eligible for free developer trial.\n\nReturns:\n    - eligible: Boolean indicating if trial can be activated\n    - reason: Code indicating why trial is not available (if applicable)\n    - message: Human-readable message for frontend display",
        "tags": [
          "subscriptions"
        ],
        "security": [
          {
            "supabase_session_inactive_allowed": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Pack"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/subscriptions/packs/switch_to_payg/": {
      "post": {
        "operationId": "subscriptions-packs-switch-to-payg-create",
        "description": "Switch an active legacy Stripe-managed self-serve plan, an inactive\nplan, or any other plan whose grace period has elapsed onto the free\nfirst-user-free pay-as-you-go plan. Admin-only, opt-in from billing.\n\nWhat it does: cancels the old Stripe subscription immediately (unpaid\ninvoices voided), moves the Stripe customer/card to the org, clears\nrecurring plan credits, and creates a seat subscription for members\nbeyond the free seats that starts billing only when the already-paid\nperiod ends. Purchased extra credits carry over only from an active,\nnon-overdue plan. No complimentary credits.",
        "tags": [
          "subscriptions"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Pack"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/Pack"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Pack"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "supabase_session_inactive_allowed": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Pack"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/subscriptions/stripe/webhook/": {
      "post": {
        "operationId": "subscriptions-stripe-webhook-create",
        "tags": [
          "subscriptions"
        ],
        "responses": {
          "200": {
            "description": "No response body"
          }
        },
        "description": "Subscriptions stripe webhook"
      }
    },
    "/subscriptions/subscriptions/": {
      "get": {
        "operationId": "subscriptions-subscriptions-list",
        "tags": [
          "subscriptions"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Subscription"
                  }
                }
              }
            },
            "description": ""
          }
        },
        "description": "List subscriptions subscriptions"
      }
    },
    "/subscriptions/subscriptions/{id}/": {
      "get": {
        "operationId": "subscriptions-subscriptions-retrieve",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "tags": [
          "subscriptions"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Subscription"
                }
              }
            },
            "description": ""
          }
        },
        "description": "Retrieve a subscriptions subscription by ID"
      }
    },
    "/subscriptions/subscriptions/{id}/cancel/": {
      "post": {
        "operationId": "subscriptions-subscriptions-cancel-create",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "tags": [
          "subscriptions"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Subscription"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/Subscription"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Subscription"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Subscription"
                }
              }
            },
            "description": ""
          }
        },
        "description": "Subscriptions subscriptions cancel"
      }
    },
    "/subscriptions/subscriptions/{id}/mandate-setup-intent/": {
      "post": {
        "operationId": "subscriptions-subscriptions-mandate-setup-intent-create",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "tags": [
          "subscriptions"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Subscription"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/Subscription"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Subscription"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Subscription"
                }
              }
            },
            "description": ""
          }
        },
        "description": "Subscriptions subscriptions mandate setup intent"
      }
    },
    "/subscriptions/subscriptions/{id}/reactivate/": {
      "post": {
        "operationId": "subscriptions-subscriptions-reactivate-create",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "tags": [
          "subscriptions"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Subscription"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/Subscription"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Subscription"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Subscription"
                }
              }
            },
            "description": ""
          }
        },
        "description": "Subscriptions subscriptions reactivate"
      }
    },
    "/subscriptions/subscriptions/{id}/renew/": {
      "post": {
        "operationId": "subscriptions-subscriptions-renew-create",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "tags": [
          "subscriptions"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Subscription"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/Subscription"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Subscription"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Subscription"
                }
              }
            },
            "description": ""
          }
        },
        "description": "Subscriptions subscriptions renew"
      }
    },
    "/subscriptions/subscriptions/{id}/restart-seat-billing/": {
      "post": {
        "operationId": "subscriptions-subscriptions-restart-seat-billing-create",
        "description": "Recreate the seat subscription of a perpetual (free base) plan after its\npaid seats ended (voluntary cancellation completed, or payment failure\nafter dunning). One click when a card is on file: charges immediately\nfor the current billable seats and lifts the overdue member block —\nno dependency on the setup-checkout webhook.",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "tags": [
          "subscriptions"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Subscription"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/Subscription"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Subscription"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Subscription"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/subscriptions/subscriptions/{id}/select-first-paid-seat-plan/": {
      "post": {
        "operationId": "subscriptions-subscriptions-select-first-paid-seat-plan-create",
        "description": "Resolve a one-time paid-plan choice.\n\nPAYG organizations see it before their first paid seat; developer-trial\norganizations can use it from Manage Plan. Sending the current pack code\nkeeps pay-as-you-go. Sending the configured ``allow_switch_to_plan`` code\ncreates and charges that monthly subscription immediately. Pricing, Stripe\nIDs, and the customer are always server-owned.",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "tags": [
          "subscriptions"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Subscription"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/Subscription"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Subscription"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Subscription"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/subscriptions/subscriptions/{id}/setup-payment-method/": {
      "post": {
        "operationId": "subscriptions-subscriptions-setup-payment-method-create",
        "description": "Start a Stripe setup-mode checkout to save a payment method for the\norganization. Used by plans without a Stripe subscription (e.g. the free\npay-as-you-go plan) before top-ups, auto-refill, or adding paid members.\nThe checkout.session.completed webhook makes the card the customer default.\n\nOptional body field `return_path` (relative path, e.g. \"/onboarding/ui\")\nsends the user back to the page they started from after Stripe; invalid\nor missing paths fall back to the global STRIPE_SUCCESS_URL/CANCEL_URL.",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "tags": [
          "subscriptions"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Subscription"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/Subscription"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Subscription"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Subscription"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/subscriptions/subscriptions/{id}/update_payment_method/": {
      "post": {
        "operationId": "subscriptions-subscriptions-update-payment-method-create",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "tags": [
          "subscriptions"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Subscription"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/Subscription"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Subscription"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Subscription"
                }
              }
            },
            "description": ""
          }
        },
        "description": "Subscriptions subscriptions update payment method"
      }
    },
    "/subscriptions/subscriptions/create_portal_session/": {
      "post": {
        "operationId": "subscriptions-subscriptions-create-portal-session-create",
        "tags": [
          "subscriptions"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Subscription"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/Subscription"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Subscription"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Subscription"
                }
              }
            },
            "description": ""
          }
        },
        "description": "Create a new subscriptions subscriptions create portal session"
      }
    },
    "/test_framework/billing/": {
      "get": {
        "operationId": "test-framework-billing-list",
        "description": "List billing information",
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Billing"
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/billing/{id}/add-credits/": {
      "post": {
        "operationId": "test-framework-billing-add-credits-create",
        "description": "Process a one-time payment to add credits to organization balance.\nAlternative to auto-refill for manual credit purchases.",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this billing.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Billing"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/Billing"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Billing"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Billing"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/billing/{id}/credits-usage/": {
      "get": {
        "operationId": "test-framework-billing-credits-usage-retrieve",
        "description": "Get credits usagesummary for the current billing cycle.\n\nReturns:\n- billing_cycle: start_date and end_date of current billing period\n- credits:\n  - pack_balance: credits from subscription pack\n  - balance: current main balance\n  - extra_balance: never-expiry balance\n  - total_balance: total balance (balance + extra_balance)\n  - used_by_simulation: credits used by Run (testing/simulation)\n  - used_by_observability: credits used by CallLog (observability)\n  - total_used_credits: total credits consumed",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this billing.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Billing"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/billing/{id}/usage-chart/": {
      "get": {
        "operationId": "test-framework-billing-usage-chart-retrieve",
        "description": "Returns transaction usage data split by testing (Run) and call evaluations (CallLog) aggregated by day. Shows net usage (deducted - refunded). By default, shows data for the last 30 days. Supports flexible filtering using JSON filter format.",
        "summary": "Get usage chart data",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this billing.",
            "required": true
          },
          {
            "in": "query",
            "name": "time_period",
            "schema": {
              "type": "string",
              "enum": [
                "day",
                "hour",
                "month",
                "week"
              ]
            },
            "description": "Time period for aggregation (hour, day, week, month). Default: day"
          },
          {
            "in": "query",
            "name": "split_by_type",
            "schema": {
              "type": "boolean"
            },
            "description": "Split data by source type (Run vs CallLog). Default: true"
          },
          {
            "in": "query",
            "name": "filters",
            "schema": {
              "type": "object"
            },
            "description": "Optional JSON filters using TransactionQueryFilter format. If not provided, defaults to last 30 days. Example: {\"operator\": \"and\", \"conditions\": [{\"field\": \"created_at\", \"op\": \"gte\", \"value\": \"2025-11-01T00:00:00Z\"}]}"
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UsageChartResponse"
                }
              }
            },
            "description": ""
          },
          "400": {
            "description": "Invalid parameters"
          },
          "404": {
            "description": "Billing not found"
          }
        }
      }
    },
    "/test_framework/billing/info/": {
      "get": {
        "operationId": "billing-info-retrieve",
        "description": "Returns credits remaining, current billing-cycle credits used, balance expiry, and subscription status for an organization. Credits used comes from the current billing-cycle aggregate and may lag usage by up to 30 minutes. When called with an organization-scoped API key, the org is taken from the key. When called with a user session or OAuth bearer, pass `organization_id` as a query parameter — the caller must be an admin of that organization.",
        "summary": "Get billing information",
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BillingInfo"
                }
              }
            },
            "description": ""
          },
          "403": {
            "description": "Project-scoped API keys are not allowed"
          },
          "404": {
            "description": "Billing information not found"
          }
        },
        "x-mcp-expose": true,
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "billing-info-retrieve",
            "description": "Returns credits remaining, current billing-cycle credits used, balance expiry, and subscription status for an organization. Credits used comes from the current billing-cycle aggregate and may lag usage by up to 30 minutes. When called with an organization-scoped API key, the org is taken from the key. When called with a user session or OAuth bearer, pass `organization_id` as a query parameter — the caller must be an admin of that organization."
          }
        },
        "parameters": [
          {
            "name": "organization_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Tenant scope. Supply one of `organization_id` when authenticating with a user session or OAuth bearer token; omit when using an API key already scoped to the tenant."
          }
        ]
      }
    },
    "/test_framework/billing/metric-usage/": {
      "get": {
        "operationId": "test-framework-billing-metric-usage-retrieve",
        "description": "Billing metric usage",
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Billing"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/billing/payment-history/": {
      "get": {
        "operationId": "billing-payment-history",
        "description": "Returns a paginated list of all payments (auto-pay, one-time, subscription) made by the organization.",
        "summary": "Get payment history",
        "parameters": [
          {
            "in": "query",
            "name": "organization_id",
            "schema": {
              "type": "integer"
            },
            "description": "Organization ID",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PaymentHistory"
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "description": "organization_id is required"
          },
          "404": {
            "description": "Organization not found"
          }
        }
      }
    },
    "/test_framework/billing/runs/": {
      "get": {
        "operationId": "test-framework-billing-runs-retrieve",
        "description": "Billing runs",
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Billing"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/billing/status/": {
      "get": {
        "operationId": "test-framework-billing-status-retrieve",
        "description": "Billing status",
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Billing"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/billing/usage-history/": {
      "get": {
        "operationId": "test-framework-billing-usage-history-retrieve",
        "description": "Billing usage history",
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Billing"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/critical-categories/{id}/": {
      "put": {
        "operationId": "test-framework-critical-categories-update",
        "description": "Update critical metric categories for organizing flagged conversation patterns.\n\nCategories group critical metric scenarios by theme (e.g., compliance violations,\nsafety issues) to help prioritize agent improvements.",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CriticalMetricCategory"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/CriticalMetricCategory"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/CriticalMetricCategory"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CriticalMetricCategory"
                }
              }
            },
            "description": ""
          }
        }
      },
      "patch": {
        "operationId": "test-framework-critical-categories-partial-update",
        "description": "Update critical metric categories for organizing flagged conversation patterns.\n\nCategories group critical metric scenarios by theme (e.g., compliance violations,\nsafety issues) to help prioritize agent improvements.",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchedCriticalMetricCategory"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/PatchedCriticalMetricCategory"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/PatchedCriticalMetricCategory"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CriticalMetricCategory"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/custom-provider-transcript-webhook/": {
      "post": {
        "operationId": "test-framework-custom-provider-transcript-webhook-create",
        "description": "Handle incoming webhook POST requests.",
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "description": "No response body"
          }
        }
      }
    },
    "/test_framework/metric-reviews/{id}/": {
      "put": {
        "operationId": "metric-reviews-update",
        "description": "Manage metric reviews in the Labs improvement workflow.\n\nMetric reviews capture human feedback (agree/disagree) on metric evaluation results.\nThis feedback is used to iteratively improve metric prompts and scoring accuracy\nthrough the Labs pipeline.",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this metric review.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MetricReviewInline"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/MetricReviewInline"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/MetricReviewInline"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetricReviewInline"
                }
              }
            },
            "description": ""
          }
        }
      },
      "patch": {
        "operationId": "metric-reviews-partial-update",
        "description": "Update a metric review in Labs. Typically used to add or update feedback notes for test sets.",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this metric review.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchedMetricReviewInline"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/PatchedMetricReviewInline"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/PatchedMetricReviewInline"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetricReviewInline"
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "summary": "Update a metric review",
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "metric-reviews-partial-update",
            "description": "Update a metric review in Labs. Typically used to add or update feedback notes for test sets."
          }
        }
      },
      "delete": {
        "operationId": "metric-reviews-destroy",
        "description": "Manage metric reviews in the Labs improvement workflow.\n\nMetric reviews capture human feedback (agree/disagree) on metric evaluation results.\nThis feedback is used to iteratively improve metric prompts and scoring accuracy\nthrough the Labs pipeline.",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this metric review.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "204": {
            "description": "No response body"
          }
        }
      }
    },
    "/test_framework/metric-reviews/{id}/process_feedback/": {
      "post": {
        "operationId": "test-framework-metric-reviews-process-feedback-create",
        "description": "Process feedback for a metric description and evaluation trigger.\n\nThis endpoint takes agent description, transcript, current metric description,\ncurrent evaluation trigger, and feedback to generate improved versions.",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MetricReviewInline"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/MetricReviewInline"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/MetricReviewInline"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetricReviewInline"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/metric-reviews/delete_reviews/": {
      "post": {
        "operationId": "test-framework-metric-reviews-delete-reviews-create",
        "description": "Manage metric reviews in the Labs improvement workflow.\n\nMetric reviews capture human feedback (agree/disagree) on metric evaluation results.\nThis feedback is used to iteratively improve metric prompts and scoring accuracy\nthrough the Labs pipeline.",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MetricReviewInline"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/MetricReviewInline"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/MetricReviewInline"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetricReviewInline"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/metric-reviews/optimizer_chat_cancel/": {
      "post": {
        "operationId": "metric-reviews-optimizer-chat-cancel",
        "description": "Cancel a post-optimization chat session (stops any in-flight agent turn / regression check), or mark it completed with reason='applied' after the proposal has been applied.",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MetricReviewInline"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/MetricReviewInline"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/MetricReviewInline"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "description": "Session cancelled or completed"
          }
        }
      }
    },
    "/test_framework/metric-reviews/optimizer_chat_confirm_samples/": {
      "post": {
        "operationId": "metric-reviews-optimizer-chat-confirm-samples",
        "description": "Confirm which of the agent's proposed regression samples to add to the eval set, and whether to re-optimize afterwards. The chat agent only proposes — this endpoint is what actually writes the eval set.",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MetricReviewInline"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/MetricReviewInline"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/MetricReviewInline"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Samples added; progress_id when re-optimizing"
          }
        }
      }
    },
    "/test_framework/metric-reviews/optimizer_chat_message/": {
      "post": {
        "operationId": "metric-reviews-optimizer-chat-message",
        "description": "Send a message (and/or structured regression-review verdicts) to the post-optimization review agent. Poll optimizer_chat_progress with the returned progress_id.",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OptimizerChatMessageRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/OptimizerChatMessageRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/OptimizerChatMessageRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "description": "Returns progress_id for the agent turn"
          }
        }
      }
    },
    "/test_framework/metric-reviews/optimizer_chat_progress/": {
      "get": {
        "operationId": "metric-reviews-optimizer-chat-progress",
        "description": "Poll a post-optimization chat turn.",
        "parameters": [
          {
            "in": "query",
            "name": "progress_id",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "description": "Chat turn progress state"
          }
        }
      }
    },
    "/test_framework/metric-reviews/optimizer_chat_regression/": {
      "post": {
        "operationId": "metric-reviews-optimizer-chat-regression",
        "description": "Run the optimized proposal on the most recent calls/runs this metric previously evaluated (outside the eval set) and diff the labels. Evaluations are billed like production metric runs.",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MetricReviewInline"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/MetricReviewInline"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/MetricReviewInline"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "description": "Returns progress_id for the regression check"
          }
        }
      }
    },
    "/test_framework/metric-reviews/optimizer_chat_regression_progress/": {
      "get": {
        "operationId": "metric-reviews-optimizer-chat-regression-progress",
        "description": "Poll a regression check.",
        "parameters": [
          {
            "in": "query",
            "name": "progress_id",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "description": "Regression check progress state"
          }
        }
      }
    },
    "/test_framework/metric-reviews/optimizer_chat_reoptimize/": {
      "post": {
        "operationId": "metric-reviews-optimizer-chat-reoptimize",
        "description": "Re-run the optimizer using this review session's current eval set.",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OptimizerChatReoptimizeRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/OptimizerChatReoptimizeRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/OptimizerChatReoptimizeRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "description": "Returns progress_id for the re-optimization"
          }
        }
      }
    },
    "/test_framework/metric-reviews/optimizer_chat_session/": {
      "get": {
        "operationId": "metric-reviews-optimizer-chat-session",
        "description": "Rehydrate a post-optimization review chat session.",
        "parameters": [
          {
            "in": "query",
            "name": "session_id",
            "schema": {
              "type": "integer"
            },
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetricOptimizerChatSession"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/metric-reviews/optimizer_chat_start/": {
      "post": {
        "operationId": "metric-reviews-optimizer-chat-start",
        "description": "Open (or resume) the post-optimization review chat for a metric. Seeds the session from a completed process_feedbacks run (progress_id) or from the metric's pending optimisation proposal.",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OptimizerChatStartRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/OptimizerChatStartRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/OptimizerChatStartRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetricOptimizerChatSession"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/metric-reviews/process_feedbacks/": {
      "post": {
        "operationId": "metric-reviews-process-feedbacks",
        "description": "Improve a metric using feedback from test sets. Returns improved metric configuration. Use the Update Metric endpoint to save changes.",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProcessFeedbacksRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/ProcessFeedbacksRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/ProcessFeedbacksRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "description": "Returns progress_id for tracking progress"
          }
        },
        "x-mcp-expose": true,
        "summary": "Improve a metric from feedback",
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "metric-reviews-process-feedbacks",
            "description": "Improve a metric using feedback from test sets. Returns improved metric configuration. Use the Update Metric endpoint to save changes."
          }
        }
      }
    },
    "/test_framework/metric-reviews/process_feedbacks_answer/": {
      "post": {
        "operationId": "metric-reviews-process-feedbacks-answer",
        "description": "Answer the questions a running metric optimization is paused on. Answers are keyed by question id; use {\"action\": \"skip\"} to skip one.",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MetricReviewInline"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/MetricReviewInline"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/MetricReviewInline"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "description": "Answers recorded; the paused optimization resumes"
          }
        }
      }
    },
    "/test_framework/metric-reviews/process_feedbacks_cancel/": {
      "post": {
        "operationId": "test-framework-metric-reviews-process-feedbacks-cancel-create",
        "description": "Cancel a running optimization. Used after the user edits a flagged\nannotation so the run can be restarted with the corrected dataset\ninstead of finishing with the old labels.\n\nPOST { progress_id }",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MetricReviewInline"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/MetricReviewInline"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/MetricReviewInline"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetricReviewInline"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/metric-reviews/process_feedbacks_progress/": {
      "get": {
        "operationId": "metric-reviews-process-feedbacks-progress",
        "description": "Poll the progress of metric optimization from feedback processing. Returns the improved metric description and evaluation trigger when complete.",
        "parameters": [
          {
            "in": "query",
            "name": "progress_id",
            "schema": {
              "type": "string"
            },
            "description": "Progress ID returned from the process_feedbacks endpoint",
            "required": true
          },
          {
            "in": "query",
            "name": "agent_id",
            "schema": {
              "type": "integer"
            },
            "description": "Agent ID for permission validation"
          },
          {
            "in": "query",
            "name": "project_id",
            "schema": {
              "type": "integer"
            },
            "description": "Project ID for permission validation"
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProcessFeedbacksResponse"
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "summary": "Get metric improvement progress",
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "metric-reviews-process-feedbacks-progress",
            "description": "Poll the progress of metric optimization from feedback processing. Returns the improved metric description and evaluation trigger when complete."
          }
        }
      }
    },
    "/test_framework/metric-rolling-stats/": {
      "get": {
        "operationId": "test-framework-metric-rolling-stats-list",
        "description": "List rolling statistics",
        "parameters": [
          {
            "name": "page",
            "required": false,
            "in": "query",
            "description": "A page number within the paginated result set.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "page_size",
            "required": false,
            "in": "query",
            "description": "Number of results to return per page.",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedMetricRollingStatsList"
                }
              }
            },
            "description": ""
          }
        }
      },
      "post": {
        "operationId": "test-framework-metric-rolling-stats-create",
        "description": "Create a new rolling statistic",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MetricRollingStats"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/MetricRollingStats"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/MetricRollingStats"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetricRollingStats"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/metric-rolling-stats/{id}/": {
      "get": {
        "operationId": "test-framework-metric-rolling-stats-retrieve",
        "description": "Retrieve a rolling statistic by ID",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this metric rolling stats.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetricRollingStats"
                }
              }
            },
            "description": ""
          }
        }
      },
      "put": {
        "operationId": "test-framework-metric-rolling-stats-update",
        "description": "Update a rolling statistic",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this metric rolling stats.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MetricRollingStatsPatch"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/MetricRollingStatsPatch"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/MetricRollingStatsPatch"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetricRollingStatsPatch"
                }
              }
            },
            "description": ""
          }
        }
      },
      "patch": {
        "operationId": "test-framework-metric-rolling-stats-partial-update",
        "description": "Enhanced partial_update with automatic project-level bulk updates.\nIf the metric is project-level, updates all MetricRollingStats for that metric.\nOtherwise, performs a single update.",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this metric rolling stats.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchedMetricRollingStatsPatch"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/PatchedMetricRollingStatsPatch"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/PatchedMetricRollingStatsPatch"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetricRollingStatsPatch"
                }
              }
            },
            "description": ""
          }
        }
      },
      "delete": {
        "operationId": "test-framework-metric-rolling-stats-destroy",
        "description": "Delete a rolling statistic",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this metric rolling stats.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "204": {
            "description": "No response body"
          }
        }
      }
    },
    "/test_framework/process-message-response/": {
      "post": {
        "operationId": "test-framework-process-message-response-create",
        "description": "API view to process incoming message responses from VAPI.\nThis view handles the storage of incoming webhook data and updates\nthe status of runs based on the call status received in the payload.",
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "200": {
            "description": "No response body"
          }
        }
      }
    },
    "/test_framework/process-patronus-message-response/": {
      "post": {
        "operationId": "test-framework-process-patronus-message-response-create",
        "description": "API view to process incoming message responses from the voice service.\nThis view handles the storage of incoming webhook data and updates\nthe status of runs based on the call status received in the payload.",
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "200": {
            "description": "No response body"
          }
        }
      }
    },
    "/test_framework/test-sets/create_from_call_log/": {
      "post": {
        "operationId": "test-sets-create-from-call-log",
        "description": "Promote a real production call into a labeled test set by attaching the specified metrics. The call's transcript, recording, and any existing metric evaluations are copied into the new test set so they can be reviewed and used as labeled ground truth. Returns the created or existing test set.",
        "summary": "Create a test set from a production call log",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostCreateFromCallLogRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostCreateFromCallLogRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostCreateFromCallLogRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TestSetDetail"
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "test-sets-create-from-call-log",
            "description": "Promote a real production call into a labeled test set by attaching the specified metrics. The call's transcript, recording, and any existing metric evaluations are copied into the new test set so they can be reviewed and used as labeled ground truth. Returns the created or existing test set."
          }
        }
      }
    },
    "/test_framework/test-sets/create_from_call_logs/": {
      "post": {
        "operationId": "test-framework-test-sets-create-from-call-logs-create",
        "description": "Manage test sets for organizing and curating evaluation data.\n\nTest sets are collections of call transcripts or run data used for metric\nreview and improvement via the Labs workflow. Create test sets from call logs\nor previous runs to build a curated evaluation dataset.",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostCreateFromCallLogsRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostCreateFromCallLogsRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostCreateFromCallLogsRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TestSetDetail"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/test-sets/create_from_run/": {
      "post": {
        "operationId": "test-sets-create-from-run",
        "description": "Promote a completed test run into a labeled test set by attaching the specified metrics. Existing metric scores from the run are copied as the initial 'actual' values; the caller provides 'expected' values for review. Returns the created or existing test set.",
        "summary": "Create a test set from a previous test run",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostCreateFromRunRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostCreateFromRunRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostCreateFromRunRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TestSetDetail"
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "test-sets-create-from-run",
            "description": "Promote a completed test run into a labeled test set by attaching the specified metrics. Existing metric scores from the run are copied as the initial 'actual' values; the caller provides 'expected' values for review. Returns the created or existing test set."
          }
        }
      }
    },
    "/test_framework/test-sets/create_from_runs/": {
      "post": {
        "operationId": "test-framework-test-sets-create-from-runs-create",
        "description": "Manage test sets for organizing and curating evaluation data.\n\nTest sets are collections of call transcripts or run data used for metric\nreview and improvement via the Labs workflow. Create test sets from call logs\nor previous runs to build a curated evaluation dataset.",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateFromRunsRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/CreateFromRunsRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/CreateFromRunsRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TestSetDetail"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/aiagents/": {
      "get": {
        "operationId": "aiagents-v1-list",
        "description": "aiagents_list: List AI voice agents in your account. Filter by `project_id` to scope to one project, or omit to list every agent the caller can access. Returns a paginated list of agent summaries (id, name, provider, contact number, created/updated timestamps).\n\nPerformance tip: passing `project_id` from your workspace context narrows the result. Try `page_size=20` first — you can paginate or raise the page size if you actually need more.",
        "summary": "List AI voice agents",
        "parameters": [
          {
            "name": "page",
            "required": false,
            "in": "query",
            "description": "A page number within the paginated result set.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "page_size",
            "required": false,
            "in": "query",
            "description": "Number of results to return per page.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "project_id",
            "schema": {
              "type": "integer"
            },
            "description": "Filter by project ID"
          },
          {
            "in": "query",
            "name": "q",
            "schema": {
              "type": "string"
            },
            "description": "Search agents by name. A numeric value also matches the agent id."
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedAIAgentList"
                }
              }
            },
            "description": ""
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      },
      "post": {
        "operationId": "aiagents-v1-create",
        "description": "aiagents_create: Register a new AI voice agent with Cekura for testing / observability. Required: `agent_name`, `project` (project ID), `assistant_provider`. Other fields depend on the provider (see below).\n\n**Most common case:** you already have an agent running on your own provider stack with a dedicated phone number. Pass `agent_name`, `description`, `inbound`, `project`, `contact_number` (E.164 format, e.g. `+14155551234`), and `language` — Cekura observes that number without needing provider credentials. Set `assistant_provider=\"self_hosted\"` (optionally `websocket_url` for text-mode runs).\n\n**Provider integrations:** set `assistant_provider` to one of the valid values below and pass the matching credentials. `assistant_id` alone does NOT substitute for provider credentials — providers like VAPI, Retell, and Bland validate their api_key on create.\n\n**Valid `assistant_provider` values** (live enum — superset of prose docs you may see elsewhere):\n- `self_hosted` — websocket or observation-only; no api_key needed. Use `websocket_url` + `websocket_headers` for text-mode runs.\n- `vapi` — requires `vapi_api_key`; optional `assistant_id`, `vapi_data.public_key`.\n- `retell` — requires `retell_api_key` AND `chat_assistant_id` (yes — Retell uses this field even for voice).\n- `bland` — requires `bland_api_key` AND `chat_assistant_id` (Bland internally calls this `pathway_id`); `bland_data.encrypted_key` for Twilio.\n- `livekit` — requires `livekit_api_key` + `livekit_data.url`; `livekit_data.api_secret` is needed at run time for WebRTC.\n- `elevenlabs` — requires `elevenlabs_api_key`.\n- `agentforce` — Salesforce Agentforce; needs `agentforce_client_secret` + `agentforce_data` (client_id, domain, agent_id).\n- `cisco` — Cisco Webex.\n- `vocera` — Cekura-hosted agent.\n- `sms` — text-only SMS channel; use `chat_assistant_id`.\n- `whatsapp` — text-only WhatsApp channel; use `chat_assistant_id`.\n- `\"\"` (empty string) — unset; agent is not runnable until a provider is configured.\n\n**Note:** the serializer exposes fields for some providers (`pipecat_*`, `synthflow_*`, `koreai_*`, `genesys_*`, `custom_provider_*`) that are NOT currently in the `assistant_provider` enum. Those fields exist for response/config purposes but the matching provider value cannot be selected today.\n\n**Outbound agents:** set `inbound=false`. Actual call placement uses the scenario's configured phone number or a number from the org's provisioned pool — `outbound_numbers` is not required for calls to be placed (it is used for webhook validation only).\n\n**Other fields to know:**\n- `language` — BCP-47 locale (`en`, `es`, `fr`, …). Must match the personalities used for evaluators.\n- `transcript_provider` — STT vendor (`vapi | retell | synthflow | elevenlabs | bland | livekit | pipecat | koreai | custom | cisco | genesys`). Does NOT auto-pair with `assistant_provider`; set both independently when needed.\n- `llm_model`, `llm_temperature`, `llm_max_tokens`, `llm_system_prompt` — simulation LLM settings (used by Cekura when simulating callers in test runs; NOT your agent's own LLM).\n- `auto_fetch_calls_enabled` — auto-import calls from the provider every 30s (VAPI/Retell/ElevenLabs/Bland).\n- `auto_sync_prompt_enabled` — one-way prompt sync from the provider to Cekura on a schedule; Cekura updates its agent description and does not push changes back to the provider. Supported for VAPI, Retell, ElevenLabs, Synthflow, Telnyx, and Bland.\n\n**Read-only status fields** like `vapi_api_key_configured`, `retell_api_key_configured` appear in the response to indicate which provider credentials are stored (credentials themselves are masked).",
        "summary": "Create an AI voice agent",
        "tags": [
          "AI Agents"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AIAgent"
              },
              "examples": {
                "Self-hosted(contactNumberOnly—MostCommon)": {
                  "value": {
                    "agent_name": "Support Bot",
                    "description": "Handles inbound support calls for ACME Inc.",
                    "inbound": true,
                    "project": 1376,
                    "contact_number": "+14155551234",
                    "language": "en",
                    "assistant_provider": "self_hosted"
                  },
                  "summary": "Self-hosted (contact number only — most common)",
                  "description": "Typical onboarding: your agent is already deployed on your own stack with a phone number. Cekura just observes and evaluates; no provider credentials needed."
                },
                "VAPIAgent": {
                  "value": {
                    "agent_name": "VAPI Sales Agent",
                    "description": "Outbound sales qualification calls",
                    "inbound": false,
                    "project": 1376,
                    "contact_number": "+14155551234",
                    "language": "en",
                    "assistant_provider": "vapi",
                    "vapi_api_key": "vapi_sk_xxx",
                    "vapi_data": {
                      "public_key": "vapi_pk_xxx"
                    },
                    "assistant_id": "asst_abc123"
                  },
                  "summary": "VAPI agent"
                },
                "RetellAgent": {
                  "value": {
                    "agent_name": "Retell Booking Agent",
                    "description": "Schedules dental appointments",
                    "inbound": true,
                    "project": 1376,
                    "contact_number": "+14155551234",
                    "language": "en",
                    "assistant_provider": "retell",
                    "retell_api_key": "key_xxx",
                    "chat_assistant_id": "retell_agent_abc123",
                    "retell_data": {
                      "trigger_url": "https://api.retellai.com/create-phone-call"
                    }
                  },
                  "summary": "Retell agent",
                  "description": "Retell requires BOTH retell_api_key AND chat_assistant_id (used for voice too, despite the field's name)."
                },
                "BlandAgent": {
                  "value": {
                    "agent_name": "Bland Support Agent",
                    "description": "Handles tier-1 billing questions",
                    "inbound": true,
                    "project": 1376,
                    "contact_number": "+14155551234",
                    "language": "en",
                    "assistant_provider": "bland",
                    "bland_api_key": "bland_xxx",
                    "chat_assistant_id": "bland_pathway_xyz",
                    "bland_data": {
                      "encrypted_key": "twilio_encrypted_key_xxx"
                    }
                  },
                  "summary": "Bland agent",
                  "description": "Bland requires bland_api_key AND chat_assistant_id (Bland calls this field pathway_id internally). bland_data.encrypted_key is the Twilio credential bundle."
                },
                "LiveKitAgent": {
                  "value": {
                    "agent_name": "LiveKit Concierge",
                    "description": "Multi-modal front-desk agent",
                    "inbound": true,
                    "project": 1376,
                    "language": "en",
                    "assistant_provider": "livekit",
                    "livekit_api_key": "APIxxx",
                    "livekit_data": {
                      "api_secret": "secret_xxx",
                      "url": "wss://acme.livekit.cloud"
                    }
                  },
                  "summary": "LiveKit agent"
                },
                "Self-hostedViaWebsocketURL": {
                  "value": {
                    "agent_name": "Internal Test Agent",
                    "description": "Staging build of the support flow",
                    "inbound": false,
                    "project": 1376,
                    "assistant_provider": "self_hosted",
                    "websocket_url": "wss://staging.example.com/agent",
                    "websocket_headers": {
                      "Authorization": "Bearer token_xxx"
                    },
                    "language": "en"
                  },
                  "summary": "Self-hosted via websocket URL",
                  "description": "Your agent exposes a websocket endpoint for text-mode testing."
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/AIAgent"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/AIAgent"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AIAgent"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/aiagents/{agent_id}/dynamic-variable/{id}/": {
      "patch": {
        "operationId": "dynamic-variables-partial-update",
        "description": "Partially updates a single dynamic variable definition by ID.",
        "summary": "Update a dynamic variable definition",
        "parameters": [
          {
            "in": "path",
            "name": "agent_id",
            "schema": {
              "type": "string",
              "pattern": "^\\d+$"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^\\d+$"
            },
            "required": true
          }
        ],
        "tags": [
          "Dynamic Variables"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchedAIAgentDynamicVariable"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/PatchedAIAgentDynamicVariable"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/PatchedAIAgentDynamicVariable"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AIAgentDynamicVariable"
                }
              }
            },
            "description": ""
          }
        }
      },
      "delete": {
        "operationId": "dynamic-variables-destroy",
        "description": "Soft-deletes a single dynamic variable definition by ID.",
        "summary": "Delete a dynamic variable definition",
        "parameters": [
          {
            "in": "path",
            "name": "agent_id",
            "schema": {
              "type": "string",
              "pattern": "^\\d+$"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^\\d+$"
            },
            "required": true
          }
        ],
        "tags": [
          "Dynamic Variables"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "204": {
            "description": "No response body"
          }
        }
      }
    },
    "/test_framework/v1/aiagents/{agent_id}/dynamic-variables/": {
      "get": {
        "operationId": "dynamic-variables-list",
        "description": "Returns all user-defined dynamic variable definitions for the agent, ordered by name.",
        "summary": "List dynamic variable definitions for an agent",
        "parameters": [
          {
            "in": "path",
            "name": "agent_id",
            "schema": {
              "type": "string",
              "pattern": "^\\d+$"
            },
            "required": true
          }
        ],
        "tags": [
          "Dynamic Variables"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AIAgentDynamicVariable"
                  }
                }
              }
            },
            "description": ""
          }
        }
      },
      "post": {
        "operationId": "dynamic-variables-create",
        "description": "Upserts a list of dynamic variable definitions for the agent. Each entry is matched by `name` — existing variables are updated, new ones are created. Pass a JSON array of `{name, description}` objects. Returns the complete list of definitions after the operation.",
        "summary": "Upsert dynamic variable definitions (bulk, by name)",
        "parameters": [
          {
            "in": "path",
            "name": "agent_id",
            "schema": {
              "type": "string",
              "pattern": "^\\d+$"
            },
            "required": true
          }
        ],
        "tags": [
          "Dynamic Variables"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/AIAgentDynamicVariable"
                }
              },
              "examples": {
                "UpsertTwoVariables": {
                  "value": [
                    [
                      {
                        "name": "prompt",
                        "description": "Full system prompt for this call"
                      },
                      {
                        "name": "agent_type",
                        "description": "Role of the agent (sales, support, ...)"
                      }
                    ]
                  ],
                  "summary": "Upsert two variables"
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/AIAgentDynamicVariable"
                }
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/AIAgentDynamicVariable"
                }
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AIAgentDynamicVariable"
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/aiagents/{agent_id}/mcp/{mock_index}/": {
      "post": {
        "operationId": "aiagents-mcp-create",
        "description": "Mock MCP server endpoint.\n\nImplements the MCP JSON-RPC 2.0 protocol so VAPI can use a Cekura-hosted\nmock in place of a real MCP server.  Handles three methods:\n\n  initialize   — standard MCP handshake\n  tools/list   — returns Tool records for this specific MCP endpoint only\n  tools/call   — looks up the named Tool and returns its mock output\n\nURL: /v1/aiagents/{agent_id}/mcp/{mock_index}/\nEach original VAPI MCP tool gets its own sequential index (1, 2, 3 ...) so\nthat different MCP tools on the same assistant each serve only their own\nsub-tools and never mix with each other.\n\nNo authentication is required — this endpoint must be reachable by VAPI.",
        "parameters": [
          {
            "in": "path",
            "name": "agent_id",
            "schema": {
              "type": "string",
              "pattern": "^\\d+$"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "mock_index",
            "schema": {
              "type": "string",
              "pattern": "^\\d+$"
            },
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "responses": {
          "200": {
            "description": "No response body"
          }
        }
      }
    },
    "/test_framework/v1/aiagents/{agent_id}/tool/{tool_name}/": {
      "get": {
        "operationId": "aiagents-tool-retrieve",
        "description": "Return a single tool's full definition, including the input/output pairs that define its mock responses. Use it to inspect what a tool returns before updating it or enabling mock mode.",
        "summary": "Get an agent's tool by name",
        "parameters": [
          {
            "in": "path",
            "name": "agent_id",
            "schema": {
              "type": "string",
              "pattern": "^\\d+$"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "tool_name",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "deprecated": true,
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Tool"
                },
                "examples": {
                  "GetToolResponse": {
                    "value": {
                      "id": 1,
                      "name": "tool_user_data",
                      "description": "This tool retrieves user data from the database based on user ID",
                      "information": [
                        {
                          "input": {
                            "user_id": 1
                          },
                          "output": {
                            "name": "John Doe",
                            "age": 30,
                            "email": "john@example.com"
                          }
                        },
                        {
                          "input": {
                            "user_id": 2
                          },
                          "output": {
                            "name": "Jane Smith",
                            "age": 25,
                            "email": "jane@example.com"
                          }
                        }
                      ]
                    },
                    "summary": "Get Tool Response"
                  }
                }
              }
            },
            "description": ""
          }
        }
      },
      "post": {
        "operationId": "aiagents-tool-create",
        "description": "Execute tool by matching input and returning corresponding output.\n\nSupports two payload formats:\n1. Flat input (default): {\"param1\": \"value1\", \"param2\": \"value2\"}\n2. VAPI function format: {\"message\": {\"type\": \"tool-calls\", \"toolCallList\": [{\"id\": \"...\", \"arguments\": {...}}]}}",
        "summary": "Execute a mock tool (provider webhook)",
        "parameters": [
          {
            "in": "path",
            "name": "agent_id",
            "schema": {
              "type": "string",
              "pattern": "^\\d+$"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "tool_name",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "deprecated": true,
        "responses": {
          "201": {
            "description": "No response body"
          }
        }
      },
      "patch": {
        "operationId": "aiagents-tool-partial-update",
        "description": "Patch a tool's fields — its `name`, `description`, or `information` (the list of input/output pairs that define its mock responses). Only the fields you send are changed.",
        "summary": "Update an agent's tool by name",
        "parameters": [
          {
            "in": "path",
            "name": "agent_id",
            "schema": {
              "type": "string",
              "pattern": "^\\d+$"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "tool_name",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchedTool"
              },
              "examples": {
                "UpdateToolRequest": {
                  "value": {
                    "name": "tool_user_data",
                    "description": "This tool retrieves user data from the database based on user ID",
                    "information": [
                      {
                        "input": {
                          "user_id": 1
                        },
                        "output": {
                          "name": "John Doe",
                          "age": 30,
                          "email": "john@example.com"
                        }
                      },
                      {
                        "input": {
                          "user_id": 2
                        },
                        "output": {
                          "name": "Jane Smith",
                          "age": 25,
                          "email": "jane@example.com"
                        }
                      }
                    ]
                  },
                  "summary": "Update Tool Request"
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/PatchedTool"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/PatchedTool"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "deprecated": true,
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Tool"
                },
                "examples": {
                  "UpdateToolResponse": {
                    "value": {
                      "id": 1,
                      "agent": 123,
                      "name": "tool_user_data",
                      "description": "This tool retrieves user data from the database based on user ID",
                      "information": [
                        {
                          "input": {
                            "user_id": 1
                          },
                          "output": {
                            "name": "John Doe",
                            "age": 30,
                            "email": "john@example.com"
                          }
                        },
                        {
                          "input": {
                            "user_id": 2
                          },
                          "output": {
                            "name": "Jane Smith",
                            "age": 25,
                            "email": "jane@example.com"
                          }
                        }
                      ]
                    },
                    "summary": "Update Tool Response"
                  }
                }
              }
            },
            "description": ""
          }
        }
      },
      "delete": {
        "operationId": "aiagents-tool-destroy",
        "description": "Detaches the named tool from this agent by marking it deleted. The tool definition is not deleted — other agents referencing the same tool_name are unaffected.",
        "summary": "Remove a tool from an agent",
        "parameters": [
          {
            "in": "path",
            "name": "agent_id",
            "schema": {
              "type": "string",
              "pattern": "^\\d+$"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "tool_name",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "deprecated": true,
        "responses": {
          "204": {
            "description": "No response body"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/aiagents/{agent_id}/tools/": {
      "get": {
        "operationId": "aiagents-tools-list",
        "description": "Return every tool configured on the agent, including mock tools and the input/output pairs that define their mock responses. Use this to see what's set up before enabling or disabling mock mode or updating a specific tool.",
        "summary": "List an agent's tools",
        "parameters": [
          {
            "in": "path",
            "name": "agent_id",
            "schema": {
              "type": "string",
              "pattern": "^\\d+$"
            },
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "deprecated": true,
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Tool"
                  }
                },
                "examples": {
                  "ListToolsResponse": {
                    "value": [
                      {
                        "id": 1,
                        "name": "tool_user_data",
                        "description": "This tool retrieves user data from the database based on user ID",
                        "information": [
                          {
                            "input": {
                              "user_id": 1
                            },
                            "output": {
                              "name": "John Doe",
                              "age": 30,
                              "email": "john@example.com"
                            }
                          },
                          {
                            "input": {
                              "user_id": 2
                            },
                            "output": {
                              "name": "Jane Smith",
                              "age": 25,
                              "email": "jane@example.com"
                            }
                          }
                        ]
                      }
                    ],
                    "summary": "List Tools Response"
                  }
                }
              }
            },
            "description": ""
          }
        }
      },
      "post": {
        "operationId": "aiagents-tools-create",
        "description": "Register a tool on the agent, including its mock input/output pairs in `information`. For agents on a managed provider, prefer auto-fetch to import tools automatically; use this to add a custom or hand-authored tool.",
        "summary": "Add a tool to an agent",
        "parameters": [
          {
            "in": "path",
            "name": "agent_id",
            "schema": {
              "type": "string",
              "pattern": "^\\d+$"
            },
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Tool"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/Tool"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Tool"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "deprecated": true,
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Tool"
                },
                "examples": {
                  "CreateToolResponse": {
                    "value": {
                      "name": "tool_user_data",
                      "description": "This tool retrieves user data from the database based on user ID",
                      "information": [
                        {
                          "input": {
                            "user_id": 1
                          },
                          "output": {
                            "name": "John Doe",
                            "age": 30,
                            "email": "john@example.com"
                          }
                        },
                        {
                          "input": {
                            "user_id": 2
                          },
                          "output": {
                            "name": "Jane Smith",
                            "age": 25,
                            "email": "jane@example.com"
                          }
                        }
                      ]
                    },
                    "summary": "Create Tool Response"
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/aiagents/{agent_id}/tools/auto-fetch/": {
      "post": {
        "operationId": "aiagents-tools-auto-fetch-create",
        "description": "Discover the agent's tools (from a managed provider or a customer-hosted MCP server) and LLM-generate mock input/output data for each. Persists Tool rows and records the provider configuration on the agent. ⚠ Overwrites empty Tool rows; existing rows with mock data are kept. For provider=\"custom\", supply `mcp_server_url`; the URL is SSRF-validated (no private/loopback targets).",
        "summary": "Auto-fetch mock tools for an agent",
        "parameters": [
          {
            "in": "path",
            "name": "agent_id",
            "schema": {
              "type": "string",
              "pattern": "^\\d+$"
            },
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AutoFetchToolsRequest"
              },
              "examples": {
                "Auto-FetchToolsRequest(managedProvider)": {
                  "value": {
                    "provider": "retell",
                    "assistant_id": "agent_abc123"
                  },
                  "summary": "Auto-Fetch Tools Request (managed provider)"
                },
                "Auto-FetchToolsRequest(customMCPServer)": {
                  "value": {
                    "provider": "custom",
                    "mcp_server_url": "https://customer.example.com/mcp",
                    "mcp_server_headers": {
                      "Authorization": "Bearer ..."
                    }
                  },
                  "summary": "Auto-Fetch Tools Request (custom MCP server)"
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/AutoFetchToolsRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/AutoFetchToolsRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "deprecated": true,
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AutoFetchToolsResponse"
                },
                "examples": {
                  "Auto-FetchToolsSuccessResponse": {
                    "value": {
                      "progress_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
                    },
                    "summary": "Auto-Fetch Tools Success Response"
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AutoFetchErrorResponse"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/aiagents/{agent_id}/tools/auto-fetch-progress/": {
      "get": {
        "operationId": "aiagents-tools-auto-fetch-progress-retrieve",
        "description": "Poll the status of a background auto-fetch tools task.\n\nReturns the current state: in_progress, completed (with counts), or failed (with error).",
        "summary": "Poll auto-fetch tool import progress",
        "parameters": [
          {
            "in": "path",
            "name": "agent_id",
            "schema": {
              "type": "string",
              "pattern": "^\\d+$"
            },
            "required": true
          },
          {
            "in": "query",
            "name": "progress_id",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "deprecated": true,
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AutoFetchProgressResponse"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AutoFetchProgressErrorResponse"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/aiagents/{agent_id}/tools/mock-status/": {
      "get": {
        "operationId": "aiagents-tools-mock-status-retrieve",
        "description": "Single source of truth for \"what mock-tool runtime URLs do I have, and what are they configured for?\". `mcp_endpoints[]` lists each Cekura-hosted MCP JSON-RPC endpoint with the sub-tools it serves; `tool_endpoints[]` lists standalone (non-MCP) per-tool webhook URLs. URLs are computed from `settings.CEKURA_BASE_URL`, so each environment renders the correct host.",
        "summary": "Current mock-tools state for an agent",
        "parameters": [
          {
            "in": "path",
            "name": "agent_id",
            "schema": {
              "type": "string",
              "pattern": "^\\d+$"
            },
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "deprecated": true,
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MockStatusResponse"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/aiagents/{id}/": {
      "get": {
        "operationId": "aiagents-v1-retrieve",
        "description": "Retrieve an AI voice agent by ID",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this ai agent.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AIAgent"
                }
              }
            },
            "description": ""
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      },
      "put": {
        "operationId": "aiagents-v1-update",
        "description": "Fully replace an AI agent's fields. Prefer `PATCH` (partial_update) unless you need full-replacement semantics. See `aiagents_create` for the field shape and per-provider examples.",
        "summary": "Replace an AI voice agent (full update)",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this ai agent.",
            "required": true
          }
        ],
        "tags": [
          "AI Agents"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SchemaUpdateAIAgentExternal"
              },
              "examples": {
                "ReplaceAgent(fullPayload)": {
                  "value": {
                    "agent_name": "Support Bot v2",
                    "description": "Handles inbound support calls for ACME Inc.",
                    "inbound": true,
                    "project": 1376,
                    "contact_number": "+14155551234",
                    "language": "en",
                    "assistant_provider": "self_hosted"
                  },
                  "summary": "Replace agent (full payload)"
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/SchemaUpdateAIAgentExternal"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/SchemaUpdateAIAgentExternal"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AIAgent"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      },
      "patch": {
        "operationId": "aiagents-v1-partial-update",
        "description": "Partially update an AI agent. Same field shape as create — see `aiagents_create` for details and per-provider examples.",
        "summary": "Update an AI voice agent (partial)",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this ai agent.",
            "required": true
          }
        ],
        "tags": [
          "AI Agents"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchedSchemaUpdateAIAgentExternal"
              },
              "examples": {
                "Rename+UpdateDescription": {
                  "value": {
                    "agent_name": "Support Bot v2",
                    "description": "Updated description"
                  },
                  "summary": "Rename + update description"
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/PatchedSchemaUpdateAIAgentExternal"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/PatchedSchemaUpdateAIAgentExternal"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AIAgent"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      },
      "delete": {
        "operationId": "aiagents-v1-destroy",
        "description": "⚠ Irreversible. Deletes the agent.\n\n**Cascade behaviour (controlled by `delete_related` query param):**\n- `delete_related=true` (default) — also deletes the agent's call logs, evaluators, results, and runs.\n- `delete_related=false` — detaches scenario evaluators (sets agent=null), and leaves call logs, metric evaluations, results, and runs untouched.",
        "summary": "Delete an AI voice agent",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this ai agent.",
            "required": true
          },
          {
            "in": "query",
            "name": "delete_related",
            "schema": {
              "type": "boolean"
            },
            "description": "If true (default), delete associated call logs, scenario evaluators, results and runs. If false, detach scenario evaluators and leave call logs, metric evaluations, results and runs as-is."
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "204": {
            "description": "No response body"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/aiagents/{id}/delete_knowledge_base/": {
      "delete": {
        "operationId": "aiagents-v1-delete-knowledge-base-destroy",
        "description": "Aiagents v1 delete knowledge base",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this ai agent.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "deleted_count": {
                      "type": "integer"
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/aiagents/{id}/disable_personalities/": {
      "post": {
        "operationId": "aiagents-v1-disable-personalities-create",
        "description": "Aiagents v1 disable personalities",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this ai agent.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AIAgent"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/AIAgent"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/AIAgent"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AIAgent"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/aiagents/{id}/duplicate/": {
      "post": {
        "operationId": "aiagents-v1-duplicate-create",
        "description": "Aiagents v1 duplicate",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this ai agent.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostCopyAgent"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostCopyAgent"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostCopyAgent"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AIAgent"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/aiagents/{id}/enable_personalities/": {
      "post": {
        "operationId": "aiagents-v1-enable-personalities-create",
        "description": "Aiagents v1 enable personalities",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this ai agent.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AIAgent"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/AIAgent"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/AIAgent"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AIAgent"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/aiagents/{id}/history/": {
      "get": {
        "operationId": "aiagents-v1-history-list",
        "description": "Paginated version history for an agent: name/language/description plus the mock\ntools, dynamic variables, and knowledge base files active at each version.",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this ai agent.",
            "required": true
          },
          {
            "in": "query",
            "name": "page",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "page_size",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedAIAgentHistoryList"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/aiagents/{id}/history/edit/": {
      "patch": {
        "operationId": "aiagents-v1-history-edit-partial-update",
        "description": "Edit metadata (e.g. version name) on a specific agent version.",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this ai agent.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchedAIAgentEditHistoryRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/PatchedAIAgentEditHistoryRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/PatchedAIAgentEditHistoryRequest"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AIAgentHistory"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/aiagents/{id}/knowledge_base/": {
      "get": {
        "operationId": "aiagents-v1-knowledge-base-list",
        "description": "Aiagents v1 knowledge base",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this ai agent.",
            "required": true
          },
          {
            "name": "page",
            "required": false,
            "in": "query",
            "description": "A page number within the paginated result set.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "page_size",
            "required": false,
            "in": "query",
            "description": "Number of results to return per page.",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedKnowledgeBaseFileList"
                }
              }
            },
            "description": ""
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/aiagents/{id}/personalities/": {
      "get": {
        "operationId": "aiagents-v1-personalities-retrieve",
        "description": "Aiagents v1 personalities",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this ai agent.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AIAgent"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/aiagents/{id}/restore/": {
      "post": {
        "operationId": "aiagents-v1-restore-create",
        "description": "Restore an agent to a previous version, creating a new version for the restore.\n\nRestores the versioned concrete fields (name, language, description) and the related\ncollections: tools and dynamic variables are reverted in place to their\nlinked versions (ids preserved) and any not in the version are soft-deleted; knowledge\nbase files referenced by the version are reactivated and the rest soft-deleted.",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this ai agent.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AIAgentRestoreRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/AIAgentRestoreRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/AIAgentRestoreRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AIAgentV2"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/aiagents/{id}/runs_overview/": {
      "get": {
        "operationId": "aiagents-v1-runs-overview-retrieve",
        "description": "Aiagents v1 runs overview",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this ai agent.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AIAgent"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/aiagents/{id}/upload_knowledge_base/": {
      "post": {
        "operationId": "aiagents-upload-knowledge-base",
        "description": "Upload one or more files to the agent's knowledge base. Accepts either a `multipart/form-data` body (used by the web dashboard) or an `application/json` body where each entry carries base64-encoded file content.",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this ai agent.",
            "required": true
          },
          {
            "name": "page",
            "required": false,
            "in": "query",
            "description": "A page number within the paginated result set.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "page_size",
            "required": false,
            "in": "query",
            "description": "Number of results to return per page.",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary"
                    },
                    "description": "List of files to upload to the knowledge base"
                  }
                },
                "required": [
                  "files"
                ]
              }
            },
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "files": {
                    "type": "array",
                    "description": "List of files to upload, each provided as base64-encoded content.",
                    "items": {
                      "type": "object",
                      "required": [
                        "name",
                        "content_base64"
                      ],
                      "properties": {
                        "name": {
                          "type": "string",
                          "description": "Filename including extension (e.g. `manual.pdf`)."
                        },
                        "content_base64": {
                          "type": "string",
                          "contentEncoding": "base64",
                          "description": "Base64-encoded file content. Accepts a raw base64 string or a `data:<mime>;base64,...` data URI."
                        }
                      }
                    }
                  }
                },
                "required": [
                  "files"
                ]
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedKnowledgeBaseFileList"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/aiagents/runs_overview_project/": {
      "get": {
        "operationId": "aiagents-v1-runs-overview-project-retrieve",
        "description": "Aiagents v1 runs overview project",
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AIAgent"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/aiagents/short_list/": {
      "get": {
        "operationId": "aiagents-v1-short-list-list",
        "description": "Aiagents v1 short list",
        "parameters": [
          {
            "name": "page",
            "required": false,
            "in": "query",
            "description": "A page number within the paginated result set.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "page_size",
            "required": false,
            "in": "query",
            "description": "Number of results to return per page.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "project_id",
            "schema": {
              "type": "integer"
            },
            "description": "Filter agents by project ID"
          },
          {
            "in": "query",
            "name": "organization_id",
            "schema": {
              "type": "integer"
            },
            "description": "Filter agents by organization ID"
          },
          {
            "in": "query",
            "name": "q",
            "schema": {
              "type": "string"
            },
            "description": "Search agents by name. A numeric value also matches the agent id."
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedAIAgentListList"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/configurations/": {
      "get": {
        "operationId": "configurations-list",
        "description": "List per-user configurations",
        "parameters": [
          {
            "name": "page",
            "required": false,
            "in": "query",
            "description": "A page number within the paginated result set.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "page_size",
            "required": false,
            "in": "query",
            "description": "Number of results to return per page.",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedUserConfigurationList"
                }
              }
            },
            "description": ""
          }
        }
      },
      "post": {
        "operationId": "configurations-create",
        "description": "Create a new per-user configuration",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UserConfiguration"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/UserConfiguration"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/UserConfiguration"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserConfiguration"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/configurations/{id}/": {
      "get": {
        "operationId": "configurations-retrieve",
        "description": "Retrieve a per-user configuration by ID",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this user configuration.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserConfiguration"
                }
              }
            },
            "description": ""
          }
        }
      },
      "put": {
        "operationId": "configurations-update",
        "description": "Update a per-user configuration",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this user configuration.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UserConfiguration"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/UserConfiguration"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/UserConfiguration"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserConfiguration"
                }
              }
            },
            "description": ""
          }
        }
      },
      "patch": {
        "operationId": "configurations-partial-update",
        "description": "Update a per-user configuration",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this user configuration.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchedUserConfiguration"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/PatchedUserConfiguration"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/PatchedUserConfiguration"
              }
            }
          }
        },
        "security": [
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserConfiguration"
                }
              }
            },
            "description": ""
          }
        }
      },
      "delete": {
        "operationId": "configurations-destroy",
        "description": "Delete a per-user configuration",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this user configuration.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "204": {
            "description": "No response body"
          }
        }
      }
    },
    "/test_framework/v1/critical-metric-categories-external/": {
      "get": {
        "operationId": "critical-metric-categories-external-list",
        "description": "List External API view set",
        "parameters": [
          {
            "name": "page",
            "required": false,
            "in": "query",
            "description": "A page number within the paginated result set.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "page_size",
            "required": false,
            "in": "query",
            "description": "Number of results to return per page.",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedCriticalMetricCategoryList"
                }
              }
            },
            "description": ""
          }
        }
      },
      "post": {
        "operationId": "critical-metric-categories-external-create",
        "description": "Create a new External API view set",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CriticalMetricCategory"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/CriticalMetricCategory"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/CriticalMetricCategory"
              }
            }
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CriticalMetricCategory"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/critical-metric-categories-external/{id}/": {
      "get": {
        "operationId": "critical-metric-categories-external-retrieve",
        "description": "Retrieve an External API view set by ID",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CriticalMetricCategory"
                }
              }
            },
            "description": ""
          }
        }
      },
      "put": {
        "operationId": "critical-metric-categories-external-update",
        "description": "Update an External API view set",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CriticalMetricCategory"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/CriticalMetricCategory"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/CriticalMetricCategory"
              }
            }
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CriticalMetricCategory"
                }
              }
            },
            "description": ""
          }
        }
      },
      "patch": {
        "operationId": "critical-metric-categories-external-partial-update",
        "description": "Update an External API view set",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchedCriticalMetricCategory"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/PatchedCriticalMetricCategory"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/PatchedCriticalMetricCategory"
              }
            }
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CriticalMetricCategory"
                }
              }
            },
            "description": ""
          }
        }
      },
      "delete": {
        "operationId": "critical-metric-categories-external-destroy",
        "description": "Delete an External API view set",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "api_key": []
          }
        ],
        "responses": {
          "204": {
            "description": "No response body"
          }
        }
      }
    },
    "/test_framework/v1/critical-metric-scenarios/": {
      "get": {
        "operationId": "critical-metric-scenarios-list",
        "description": "List critical metric scenarios",
        "parameters": [
          {
            "name": "page",
            "required": false,
            "in": "query",
            "description": "A page number within the paginated result set.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "page_size",
            "required": false,
            "in": "query",
            "description": "Number of results to return per page.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "agent_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Tenant scope. Supply one of `agent_id`, `category_id`, `metric_id` when authenticating with a user session or OAuth bearer token; omit when using an API key already scoped to the tenant."
          },
          {
            "name": "category_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Tenant scope. Supply one of `agent_id`, `category_id`, `metric_id` when authenticating with a user session or OAuth bearer token; omit when using an API key already scoped to the tenant."
          },
          {
            "name": "metric_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Tenant scope. Supply one of `agent_id`, `category_id`, `metric_id` when authenticating with a user session or OAuth bearer token; omit when using an API key already scoped to the tenant."
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedCriticalMetricScenarioList"
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "summary": "List critical metric scenarios",
        "x-mcp-summary-derived": true,
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "critical-metric-scenarios-list",
            "description": "List critical metric scenarios"
          }
        }
      }
    },
    "/test_framework/v1/critical-metric-scenarios-external/": {
      "get": {
        "operationId": "critical-metric-scenarios-external-list",
        "description": "List scenarios flagged by critical metrics",
        "parameters": [
          {
            "name": "page",
            "required": false,
            "in": "query",
            "description": "A page number within the paginated result set.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "page_size",
            "required": false,
            "in": "query",
            "description": "Number of results to return per page.",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedCriticalMetricScenarioList"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/critical-metric-scenarios-external/{id}/": {
      "get": {
        "operationId": "critical-metric-scenarios-external-retrieve",
        "description": "Retrieve a critical metric scenario by ID",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this critical metric scenario.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CriticalMetricScenario"
                }
              }
            },
            "description": ""
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      },
      "put": {
        "operationId": "critical-metric-scenarios-external-update",
        "description": "Update a critical metric scenario",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this critical metric scenario.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CriticalMetricScenario"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/CriticalMetricScenario"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/CriticalMetricScenario"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CriticalMetricScenario"
                }
              }
            },
            "description": ""
          }
        }
      },
      "patch": {
        "operationId": "critical-metric-scenarios-external-partial-update",
        "description": "Update a critical metric scenario flag",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this critical metric scenario.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchedRequestCriticalMetricScenario"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/PatchedRequestCriticalMetricScenario"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/PatchedRequestCriticalMetricScenario"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CriticalMetricScenario"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/critical-metric-scenarios/{id}/": {
      "get": {
        "operationId": "critical-metric-scenarios-retrieve",
        "description": "Retrieve a critical metric scenario by ID",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this critical metric scenario.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CriticalMetricScenario"
                }
              }
            },
            "description": ""
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      },
      "put": {
        "operationId": "critical-metric-scenarios-update",
        "description": "Update a critical metric scenario",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this critical metric scenario.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CriticalMetricScenario"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/CriticalMetricScenario"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/CriticalMetricScenario"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CriticalMetricScenario"
                }
              }
            },
            "description": ""
          }
        }
      },
      "patch": {
        "operationId": "critical-metric-scenarios-partial-update",
        "description": "Update a critical metric scenario",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this critical metric scenario.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchedRequestCriticalMetricScenario"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/PatchedRequestCriticalMetricScenario"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/PatchedRequestCriticalMetricScenario"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CriticalMetricScenario"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "summary": "Update a critical metric scenario",
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "critical-metric-scenarios-partial-update",
            "description": "Update a critical metric scenario"
          }
        }
      }
    },
    "/test_framework/v1/email-inbound/": {
      "post": {
        "operationId": "email-inbound-create",
        "tags": [
          "test_framework"
        ],
        "responses": {
          "200": {
            "description": "No response body"
          }
        },
        "description": "Create a new email inbound"
      }
    },
    "/test_framework/v1/knowledge-base-connectors/": {
      "get": {
        "operationId": "knowledge-base-connectors-list",
        "description": "List BigQuery knowledge base connectors attached to AI agents",
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/KnowledgeBaseConnectorList"
                  }
                }
              }
            },
            "description": ""
          }
        }
      },
      "post": {
        "operationId": "knowledge-base-connectors-create",
        "description": "Create a new BigQuery knowledge base connectors attached to AI agent",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/KnowledgeBaseConnector"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/KnowledgeBaseConnector"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/KnowledgeBaseConnector"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KnowledgeBaseConnector"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/knowledge-base-connectors/{id}/": {
      "get": {
        "operationId": "knowledge-base-connectors-retrieve",
        "description": "Retrieve a BigQuery knowledge base connectors attached to AI agent by ID",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this knowledge base connector.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KnowledgeBaseConnector"
                }
              }
            },
            "description": ""
          }
        }
      },
      "put": {
        "operationId": "knowledge-base-connectors-update",
        "description": "Update a BigQuery knowledge base connectors attached to AI agent",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this knowledge base connector.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/KnowledgeBaseConnector"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/KnowledgeBaseConnector"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/KnowledgeBaseConnector"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KnowledgeBaseConnector"
                }
              }
            },
            "description": ""
          }
        }
      },
      "patch": {
        "operationId": "knowledge-base-connectors-partial-update",
        "description": "Update a BigQuery knowledge base connectors attached to AI agent",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this knowledge base connector.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchedKnowledgeBaseConnector"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/PatchedKnowledgeBaseConnector"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/PatchedKnowledgeBaseConnector"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KnowledgeBaseConnector"
                }
              }
            },
            "description": ""
          }
        }
      },
      "delete": {
        "operationId": "knowledge-base-connectors-destroy",
        "description": "Delete a BigQuery knowledge base connectors attached to AI agent",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this knowledge base connector.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "204": {
            "description": "No response body"
          }
        }
      }
    },
    "/test_framework/v1/knowledge-base-connectors/{id}/sync/": {
      "post": {
        "operationId": "knowledge-base-connectors-sync-create",
        "description": "Trigger an immediate sync for this connector.",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this knowledge base connector.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/KnowledgeBaseConnector"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/KnowledgeBaseConnector"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/KnowledgeBaseConnector"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KnowledgeBaseConnector"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/livekit-webhook/": {
      "post": {
        "operationId": "livekit-webhook-create",
        "description": "Handle incoming LiveKit webhook POST requests.",
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "description": "No response body"
          }
        }
      }
    },
    "/test_framework/v1/metrics/": {
      "get": {
        "operationId": "metrics-v1-list",
        "description": "\nmetrics_list: List quality metrics (LLM-judge prompts, custom code, or predefined metrics) used to evaluate AI voice agents. Filter by `agent_id` or `project_id` to scope results.\n\nFiltering behavior:\n- If only agent_id is provided: Returns metrics associated with that agent only\n- If only project_id is provided: Returns metrics associated with that project only\n- If both agent_id and project_id are provided: Returns metrics from both the agent and the project\n- If agents is provided: Returns metrics where any of the specified agents are in the M2M agents field\n- If slug is provided: Returns the metric with that specific slug\n\nPerformance tip: `agent_id` (when a specific agent is in context) or `project_id` will narrow the result. Orgs can accumulate hundreds of metrics so a filter usually helps.\n        ",
        "summary": "List metrics",
        "parameters": [
          {
            "in": "query",
            "name": "agent_id",
            "schema": {
              "type": "integer"
            },
            "description": "\nFilter by agent ID\nExample: `123`\n"
          },
          {
            "in": "query",
            "name": "project_id",
            "schema": {
              "type": "integer"
            },
            "description": "\nFilter by project ID\nExample: `456`\n"
          },
          {
            "in": "query",
            "name": "assistant_id",
            "schema": {
              "type": "string"
            },
            "description": "\nFilter by assistant ID\nExample: `asst_1234567890`\n"
          },
          {
            "in": "query",
            "name": "agents",
            "schema": {
              "type": "string"
            },
            "description": "\nFilter metrics by agent IDs. Supports comma-separated list.\nExample: `1,2,3` to filter metrics associated with any of these agents\n"
          },
          {
            "in": "query",
            "name": "slug",
            "schema": {
              "type": "string"
            },
            "description": "\nFilter by metric slug\nExample: `latency_metric` or `customer_satisfaction`\n"
          },
          {
            "in": "query",
            "name": "filters",
            "schema": {
              "type": "object"
            },
            "description": "JSON filter parameter for advanced filtering.\n\nExample:\n```json\n{\"operator\":\"and\",\"conditions\":[{\"field\":\"agents__id\",\"op\":\"in\",\"value\":[1,2,3]}]}\n```\n\nSupported fields: agents__id, eval_type, type, name\nSupported operators: in, eq, contains"
          },
          {
            "in": "query",
            "name": "include_scores",
            "schema": {
              "type": "boolean"
            },
            "description": "\nInclude Overall and Total scores in Metric List\nExample: `true` or `false`\n                "
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/MetricList"
                  }
                },
                "examples": {
                  "MetricList": {
                    "value": [
                      {
                        "id": 123,
                        "name": "<string>",
                        "description": "<string>",
                        "function_name": "<string>",
                        "type": "basic",
                        "eval_type": "binary",
                        "enum_values": [
                          "<string>"
                        ],
                        "audio_enabled": true,
                        "observability_enabled": true,
                        "simulation_enabled": true,
                        "prompt": "<string>",
                        "evaluation_trigger": "always",
                        "evaluation_trigger_prompt": "<string>",
                        "priority_assignment_prompt": "<string>",
                        "vocera_defined_metric_code": "<string>",
                        "configuration": {
                          "infra_issues_timeout": "<integer>",
                          "key": "value"
                        },
                        "kb_file_ids": [
                          "<integer>"
                        ],
                        "knowledge_base_files": [
                          {
                            "id": "<integer>",
                            "agent": "<integer>",
                            "file_url": "<string>",
                            "file_name": "<string>",
                            "file_type": "<string>",
                            "file_size": "<integer>",
                            "created_at": "<datetime>",
                            "updated_at": "<datetime>"
                          }
                        ],
                        "metric_cost": "<float>"
                      }
                    ]
                  },
                  "MetricListWithOverallScore": {
                    "value": [
                      {
                        "id": "<integer>",
                        "name": "<string>",
                        "description": "<string>",
                        "function_name": "<string>",
                        "type": "basic",
                        "eval_type": "binary",
                        "enum_values": [
                          "<string>"
                        ],
                        "audio_enabled": true,
                        "observability_enabled": true,
                        "simulation_enabled": true,
                        "prompt": "<string>",
                        "evaluation_trigger": "always",
                        "evaluation_trigger_prompt": "<string>",
                        "priority_assignment_prompt": "<string>",
                        "vocera_defined_metric_code": "<string>",
                        "configuration": {
                          "infra_issues_timeout": "<integer>",
                          "key": "value"
                        },
                        "kb_file_ids": [
                          "<integer>"
                        ],
                        "knowledge_base_files": [
                          {
                            "id": "<integer>",
                            "agent": "<int>",
                            "file_url": "<string>",
                            "file_name": "<string>",
                            "file_type": "<string>",
                            "file_size": "<integer>",
                            "created_at": "<datetime>",
                            "updated_at": "<datetime>"
                          }
                        ],
                        "metric_cost": "<float>",
                        "overall_score": "<integer>",
                        "total_score": "<integer>"
                      }
                    ]
                  }
                }
              }
            },
            "description": ""
          }
        }
      },
      "post": {
        "operationId": "metrics-v1-create",
        "description": "Create a quality metric for evaluating agent conversations.\n\n**Two supported types on create** (the `BASIC` and `CUSTOM_PROMPT` values are deprecated and rejected on create):\n\n- `llm_judge` — an LLM-as-judge metric. Put the evaluation criterion in `description`. Most common choice for qualitative scoring (politeness, compliance, resolution quality, etc.).\n\n- `custom_code` — Python code that receives the transcript and returns a score. Put the code in `custom_code`. Use for deterministic checks (regex matches, tool-call ordering, structured-field extraction, etc.).\n\n**Scope:** metrics must be created at the project level — pass `project` (project ID). Agent-level metrics are deprecated; if you pass `agent`, the server silently creates a project-level metric and returns a deprecation warning.\n\n**Evaluation control:** `observability_enabled` runs the metric on production calls (via CallLog); `simulation_enabled` runs it on test runs; `sampling_enabled` enables statistical sampling. `eval_type` picks the output shape (`bool`, `int`, `float`, `enum`, `string`); when `eval_type=\"enum\"`, also pass `enum_values`.\n\n**Triggering:** pass `trigger_type` + `evaluation_trigger_prompt` to gate the metric to only fire on specific call patterns (see the metric-triggers guide).",
        "summary": "Create a metric",
        "tags": [
          "Metrics"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostMetricEdit"
              },
              "examples": {
                "LLMJudgeMetric(simplest—MostCommon)": {
                  "value": {
                    "project": 1376,
                    "name": "Was the caller greeted by name",
                    "description": "Score TRUE if the agent addressed the caller by their name within the first 3 turns, FALSE otherwise.",
                    "type": "llm_judge",
                    "eval_type": "bool",
                    "simulation_enabled": true,
                    "observability_enabled": true
                  },
                  "summary": "LLM judge metric (simplest — most common)"
                },
                "LLMJudge—EnumOutput": {
                  "value": {
                    "project": 1376,
                    "name": "Call resolution outcome",
                    "description": "Classify how the call ended: `resolved` (caller's issue was fully addressed), `transferred` (caller was handed off to a human), `dropped` (caller hung up without resolution).",
                    "type": "llm_judge",
                    "eval_type": "enum",
                    "enum_values": [
                      "resolved",
                      "transferred",
                      "dropped"
                    ],
                    "observability_enabled": true
                  },
                  "summary": "LLM judge — enum output"
                },
                "CustomCodeMetric(deterministicCheck)": {
                  "value": {
                    "project": 1376,
                    "name": "Agent asked for order ID before refund",
                    "type": "custom_code",
                    "eval_type": "bool",
                    "custom_code": "def score(transcript, context):\n    text = transcript.lower()\n    return 'order id' in text[:text.find('refund')] if 'refund' in text else True\n",
                    "simulation_enabled": true
                  },
                  "summary": "Custom code metric (deterministic check)"
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostMetricEdit"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostMetricEdit"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SchemaPostMetricEdit"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/metrics-external/": {
      "get": {
        "operationId": "metrics-v1-external-list",
        "description": "\nmetrics_list: List quality metrics (LLM-judge prompts, custom code, or predefined metrics) used to evaluate AI voice agents. Filter by `agent_id` or `project_id` to scope results.\n\nFiltering behavior:\n- If only agent_id is provided: Returns metrics associated with that agent only\n- If only project_id is provided: Returns metrics associated with that project only\n- If both agent_id and project_id are provided: Returns metrics from both the agent and the project\n- If agents is provided: Returns metrics where any of the specified agents are in the M2M agents field\n- If slug is provided: Returns the metric with that specific slug\n\nPerformance tip: `agent_id` (when a specific agent is in context) or `project_id` will narrow the result. Orgs can accumulate hundreds of metrics so a filter usually helps.\n        ",
        "summary": "List metrics",
        "parameters": [
          {
            "in": "query",
            "name": "agent_id",
            "schema": {
              "type": "integer"
            },
            "description": "\nFilter by agent ID\nExample: `123`\n"
          },
          {
            "in": "query",
            "name": "project_id",
            "schema": {
              "type": "integer"
            },
            "description": "\nFilter by project ID\nExample: `456`\n"
          },
          {
            "in": "query",
            "name": "assistant_id",
            "schema": {
              "type": "string"
            },
            "description": "\nFilter by assistant ID\nExample: `asst_1234567890`\n"
          },
          {
            "in": "query",
            "name": "agents",
            "schema": {
              "type": "string"
            },
            "description": "\nFilter metrics by agent IDs. Supports comma-separated list.\nExample: `1,2,3` to filter metrics associated with any of these agents\n"
          },
          {
            "in": "query",
            "name": "slug",
            "schema": {
              "type": "string"
            },
            "description": "\nFilter by metric slug\nExample: `latency_metric` or `customer_satisfaction`\n"
          },
          {
            "in": "query",
            "name": "filters",
            "schema": {
              "type": "object"
            },
            "description": "JSON filter parameter for advanced filtering.\n\nExample:\n```json\n{\"operator\":\"and\",\"conditions\":[{\"field\":\"agents__id\",\"op\":\"in\",\"value\":[1,2,3]}]}\n```\n\nSupported fields: agents__id, eval_type, type, name\nSupported operators: in, eq, contains"
          },
          {
            "in": "query",
            "name": "include_scores",
            "schema": {
              "type": "boolean"
            },
            "description": "\nInclude Overall and Total scores in Metric List\nExample: `true` or `false`\n                "
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/MetricList"
                  }
                },
                "examples": {
                  "MetricList": {
                    "value": [
                      {
                        "id": 123,
                        "name": "<string>",
                        "description": "<string>",
                        "function_name": "<string>",
                        "type": "basic",
                        "eval_type": "binary",
                        "enum_values": [
                          "<string>"
                        ],
                        "audio_enabled": true,
                        "observability_enabled": true,
                        "simulation_enabled": true,
                        "prompt": "<string>",
                        "evaluation_trigger": "always",
                        "evaluation_trigger_prompt": "<string>",
                        "priority_assignment_prompt": "<string>",
                        "vocera_defined_metric_code": "<string>",
                        "configuration": {
                          "infra_issues_timeout": "<integer>",
                          "key": "value"
                        },
                        "kb_file_ids": [
                          "<integer>"
                        ],
                        "knowledge_base_files": [
                          {
                            "id": "<integer>",
                            "agent": "<integer>",
                            "file_url": "<string>",
                            "file_name": "<string>",
                            "file_type": "<string>",
                            "file_size": "<integer>",
                            "created_at": "<datetime>",
                            "updated_at": "<datetime>"
                          }
                        ],
                        "metric_cost": "<float>"
                      }
                    ]
                  },
                  "MetricListWithOverallScore": {
                    "value": [
                      {
                        "id": "<integer>",
                        "name": "<string>",
                        "description": "<string>",
                        "function_name": "<string>",
                        "type": "basic",
                        "eval_type": "binary",
                        "enum_values": [
                          "<string>"
                        ],
                        "audio_enabled": true,
                        "observability_enabled": true,
                        "simulation_enabled": true,
                        "prompt": "<string>",
                        "evaluation_trigger": "always",
                        "evaluation_trigger_prompt": "<string>",
                        "priority_assignment_prompt": "<string>",
                        "vocera_defined_metric_code": "<string>",
                        "configuration": {
                          "infra_issues_timeout": "<integer>",
                          "key": "value"
                        },
                        "kb_file_ids": [
                          "<integer>"
                        ],
                        "knowledge_base_files": [
                          {
                            "id": "<integer>",
                            "agent": "<int>",
                            "file_url": "<string>",
                            "file_name": "<string>",
                            "file_type": "<string>",
                            "file_size": "<integer>",
                            "created_at": "<datetime>",
                            "updated_at": "<datetime>"
                          }
                        ],
                        "metric_cost": "<float>",
                        "overall_score": "<integer>",
                        "total_score": "<integer>"
                      }
                    ]
                  }
                }
              }
            },
            "description": ""
          }
        }
      },
      "post": {
        "operationId": "metrics-v1-external-create",
        "description": "Create a quality metric for evaluating agent conversations.\n\n**Two supported types on create** (the `BASIC` and `CUSTOM_PROMPT` values are deprecated and rejected on create):\n\n- `llm_judge` — an LLM-as-judge metric. Put the evaluation criterion in `description`. Most common choice for qualitative scoring (politeness, compliance, resolution quality, etc.).\n\n- `custom_code` — Python code that receives the transcript and returns a score. Put the code in `custom_code`. Use for deterministic checks (regex matches, tool-call ordering, structured-field extraction, etc.).\n\n**Scope:** metrics must be created at the project level — pass `project` (project ID). Agent-level metrics are deprecated; if you pass `agent`, the server silently creates a project-level metric and returns a deprecation warning.\n\n**Evaluation control:** `observability_enabled` runs the metric on production calls (via CallLog); `simulation_enabled` runs it on test runs; `sampling_enabled` enables statistical sampling. `eval_type` picks the output shape (`bool`, `int`, `float`, `enum`, `string`); when `eval_type=\"enum\"`, also pass `enum_values`.\n\n**Triggering:** pass `trigger_type` + `evaluation_trigger_prompt` to gate the metric to only fire on specific call patterns (see the metric-triggers guide).",
        "summary": "Create a metric",
        "tags": [
          "Metrics"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostMetricEdit"
              },
              "examples": {
                "LLMJudgeMetric(simplest—MostCommon)": {
                  "value": {
                    "project": 1376,
                    "name": "Was the caller greeted by name",
                    "description": "Score TRUE if the agent addressed the caller by their name within the first 3 turns, FALSE otherwise.",
                    "type": "llm_judge",
                    "eval_type": "bool",
                    "simulation_enabled": true,
                    "observability_enabled": true
                  },
                  "summary": "LLM judge metric (simplest — most common)"
                },
                "LLMJudge—EnumOutput": {
                  "value": {
                    "project": 1376,
                    "name": "Call resolution outcome",
                    "description": "Classify how the call ended: `resolved` (caller's issue was fully addressed), `transferred` (caller was handed off to a human), `dropped` (caller hung up without resolution).",
                    "type": "llm_judge",
                    "eval_type": "enum",
                    "enum_values": [
                      "resolved",
                      "transferred",
                      "dropped"
                    ],
                    "observability_enabled": true
                  },
                  "summary": "LLM judge — enum output"
                },
                "CustomCodeMetric(deterministicCheck)": {
                  "value": {
                    "project": 1376,
                    "name": "Agent asked for order ID before refund",
                    "type": "custom_code",
                    "eval_type": "bool",
                    "custom_code": "def score(transcript, context):\n    text = transcript.lower()\n    return 'order id' in text[:text.find('refund')] if 'refund' in text else True\n",
                    "simulation_enabled": true
                  },
                  "summary": "Custom code metric (deterministic check)"
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostMetricEdit"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostMetricEdit"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SchemaPostMetricEdit"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/metrics-external/{id}/": {
      "get": {
        "operationId": "metrics-v1-external-retrieve",
        "description": "Retrieve a specific metric by ID or slug.",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string"
            },
            "description": "**ID or Slug** - Metric identifier. Can be either:\n- Numeric ID (e.g., `123`)\n- Slug (e.g., `latency_metric`, `customer_satisfaction`)",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetricDetailV2"
                }
              }
            },
            "description": ""
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      },
      "put": {
        "operationId": "metrics-v1-external-update",
        "description": "Update a metric (full)",
        "summary": "Update a metric (full)",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this metric.",
            "required": true
          }
        ],
        "tags": [
          "Metrics"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostMetricEdit"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostMetricEdit"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostMetricEdit"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SchemaPostMetricEdit"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      },
      "patch": {
        "operationId": "metrics-v1-external-partial-update",
        "description": "Partially update a metric. Same field shape as create — see `metrics_create` for details.\n\n**Note:** `project`, `agent`, and `audio_enabled` are read-only once set. To change `audio_enabled` on an existing metric, create a new metric with the desired setting and delete the old one.",
        "summary": "Update a metric (partial)",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this metric.",
            "required": true
          }
        ],
        "tags": [
          "Metrics"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchedSchemaPostMetricEdit"
              },
              "examples": {
                "UpdatePrompt+CriticalFlag": {
                  "value": {
                    "description": "Updated rubric",
                    "is_critical": true
                  },
                  "summary": "Update prompt + critical flag"
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/PatchedSchemaPostMetricEdit"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/PatchedSchemaPostMetricEdit"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SchemaPostMetricEdit"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      },
      "delete": {
        "operationId": "metrics-v1-external-destroy",
        "description": "⚠ Irreversible. Deletes the metric and detaches it from all agents and evaluators. Dashboard widgets that displayed this metric are also removed.",
        "summary": "Delete a metric",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this metric.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "204": {
            "description": "No response body"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/metrics-external/{id}/add_to_predefined_metrics/": {
      "post": {
        "operationId": "metrics-v1-external-add-to-predefined-metrics-create",
        "description": "Metrics v1 add to predefined metrics",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this metric.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MetricDetailV2"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/MetricDetailV2"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/MetricDetailV2"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetricDetailV2"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/metrics-external/{id}/apply_optimisation_proposal/": {
      "post": {
        "operationId": "metrics-v1-external-apply-optimisation-proposal-create",
        "description": "Apply a pending optimisation proposal",
        "summary": "Apply a pending optimisation proposal",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this metric.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "description": "Metric updated; pending proposal cleared."
          }
        }
      }
    },
    "/test_framework/v1/metrics-external/{id}/dismiss_optimisation_proposal/": {
      "post": {
        "operationId": "metrics-v1-external-dismiss-optimisation-proposal-create",
        "description": "Dismiss a pending optimisation proposal",
        "summary": "Dismiss a pending optimisation proposal",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this metric.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "description": "Proposal cleared."
          }
        }
      }
    },
    "/test_framework/v1/metrics-external/{id}/evaluate_advance_metric/": {
      "post": {
        "operationId": "metrics-v1-external-evaluate-advance-metric-create",
        "description": "Evaluate an advance metric in the background.\n\nReturns a progress_id to poll for results.",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this metric.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MetricDetailV2"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/MetricDetailV2"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/MetricDetailV2"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "lambda_token": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetricDetailV2"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/metrics-external/{id}/evaluate_basic_metric/": {
      "post": {
        "operationId": "metrics-v1-external-evaluate-basic-metric-create",
        "description": "Evaluate a basic metric in the background.\n\nReturns a progress_id to poll for results.",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this metric.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MetricDetailV2"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/MetricDetailV2"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/MetricDetailV2"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "lambda_token": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetricDetailV2"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/metrics-external/{id}/evaluate_llm_judge_metric/": {
      "post": {
        "operationId": "metrics-v1-external-evaluate-llm-judge-metric-create",
        "description": "Evaluate a metric using LLM Judge (DSPy) in the background.\n\nReturns a progress_id to poll for results.",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this metric.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EvaluateLlmJudgeMetricRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/EvaluateLlmJudgeMetricRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/EvaluateLlmJudgeMetricRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "lambda_token": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EvaluateLlmJudgeMetricResponse"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/metrics-external/{id}/history/": {
      "get": {
        "operationId": "metrics-v1-external-history-list",
        "description": "Metrics v1 history",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this metric.",
            "required": true
          },
          {
            "in": "query",
            "name": "page",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "page_size",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedMetricHistoryList"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/metrics-external/{id}/history/edit/": {
      "patch": {
        "operationId": "metrics-v1-external-history-edit-partial-update",
        "description": "Metrics v1 history edit",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this metric.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchedMetricEditHistoryRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/PatchedMetricEditHistoryRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/PatchedMetricEditHistoryRequest"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetricHistory"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/metrics-external/{id}/restore/": {
      "post": {
        "operationId": "metrics-v1-external-restore-create",
        "description": "Metrics v1 restore",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this metric.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MetricRestoreRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/MetricRestoreRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/MetricRestoreRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetricDetailV2"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/metrics-external/{id}/run_reviews/": {
      "post": {
        "operationId": "metrics-v1-external-run-reviews-create",
        "description": "Metrics v1 run reviews",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this metric.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RunReviewsRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/RunReviewsRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/RunReviewsRequest"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "description": "Returns progress_id for tracking progress"
          }
        }
      }
    },
    "/test_framework/v1/metrics-external/{id}/variables/": {
      "post": {
        "operationId": "metrics-v1-external-variables-create",
        "description": "Get all variables and their values for a specific test_set and metric combination.\n\nURL Parameter:\n- pk: The metric_id\n\nRequest Body:\n- test_set_id (required): The ID of the test_set (datapoint)\n- metric_description_variables (required/optional): Array of variable names for description.\n  At least one of metric_description_variables or evaluation_trigger_variables must be provided.\n- evaluation_trigger_variables (required/optional): Array of variable names for trigger.\n  At least one of metric_description_variables or evaluation_trigger_variables must be provided.\n\nThis endpoint retrieves the variables and populates them with values from the test_set (datapoint).",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this metric.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MetricDetailV2"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/MetricDetailV2"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/MetricDetailV2"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetricDetailV2"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/metrics-external/basic_list/": {
      "get": {
        "operationId": "metrics-v1-external-basic-list-retrieve",
        "description": "Metrics v1 basic list",
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetricBasicList"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/metrics-external/build-agent/": {
      "post": {
        "operationId": "metrics-v1-external-build-agent-create",
        "description": "Start (or continue) an agentic metric-building session. On the first call, pass `agent_id` and `description` (the natural-language metric intent); the agent cleans up the definition, runs it against a sample of the agent's calls and runs, and either asks a clarifying question or returns a refined definition. To answer a question, pass `session_id` and `user_message`. Poll build-agent-progress with the returned `progress_id`.",
        "summary": "Build or refine a metric via the agent chatbot",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MetricDetailV2"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/MetricDetailV2"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/MetricDetailV2"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetricDetailV2"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/metrics-external/build-agent-cancel/": {
      "post": {
        "operationId": "metrics-v1-external-build-agent-cancel-create",
        "description": "Metrics v1 build agent cancel",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MetricDetailV2"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/MetricDetailV2"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/MetricDetailV2"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetricDetailV2"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/metrics-external/build-agent-progress/": {
      "get": {
        "operationId": "metrics-v1-external-build-agent-progress-retrieve",
        "description": "Metrics v1 build agent progress",
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetricDetailV2"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/metrics-external/bulk-toggle-settings/": {
      "post": {
        "operationId": "metrics-v1-external-bulk-toggle-settings-create",
        "description": "Metrics v1 bulk toggle settings",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MetricDetailV2"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/MetricDetailV2"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/MetricDetailV2"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetricDetailV2"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/metrics-external/bulk_create/": {
      "post": {
        "operationId": "metrics-bulk-create",
        "description": "Create multiple metrics in a single request",
        "summary": "Create multiple metrics in a single request",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/SchemaPostMetricEdit"
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/SchemaPostMetricEdit"
                }
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/SchemaPostMetricEdit"
                }
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SchemaPostMetricEdit"
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/metrics-external/bulk_manage_agents/": {
      "post": {
        "operationId": "metrics-v1-external-bulk-manage-agents-create",
        "description": "Metrics v1 bulk manage agents",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BulkAgentAssignment"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/BulkAgentAssignment"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/BulkAgentAssignment"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BulkAgentAssignmentResponse"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/metrics-external/delete_metrics/": {
      "post": {
        "operationId": "metrics-v1-external-delete-metrics-create",
        "description": "Metrics v1 delete metrics",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MetricDetailV2"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/MetricDetailV2"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/MetricDetailV2"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetricDetailV2"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/metrics-external/evaluate_metric_progress/": {
      "get": {
        "operationId": "metrics-v1-external-evaluate-metric-progress-retrieve",
        "description": "Poll for metric evaluation progress.\n\nQuery params:\n    progress_id: The progress_id returned from evaluate_basic_metric or evaluate_advance_metric\n\nReturns:\n    State object with status, output, error, etc.",
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "lambda_token": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetricDetailV2"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/metrics-external/fetch_call_details/": {
      "get": {
        "operationId": "metrics-v1-external-fetch-call-details-retrieve",
        "description": "Metrics v1 fetch call details",
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "lambda_token": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetricDetailV2"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/metrics-external/generate_clean_description/": {
      "post": {
        "operationId": "metrics-v1-external-generate-clean-description-create",
        "description": "Metrics v1 generate clean description",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MetricDetailV2"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/MetricDetailV2"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/MetricDetailV2"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetricDetailV2"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/metrics-external/generate_clean_description_bg/": {
      "post": {
        "operationId": "metrics-v1-external-generate-clean-description-bg-create",
        "description": "Start async clean description generation",
        "summary": "Start async clean description generation",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CleanMetricDescriptionRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/CleanMetricDescriptionRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/CleanMetricDescriptionRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenerateCleanDescriptionBgResponse"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/metrics-external/generate_clean_description_progress/": {
      "get": {
        "operationId": "metrics-v1-external-generate-clean-description-progress-retrieve",
        "description": "Poll async clean description generation",
        "summary": "Poll async clean description generation",
        "parameters": [
          {
            "in": "query",
            "name": "progress_id",
            "schema": {
              "type": "string"
            },
            "description": "progress_id returned from generate_clean_description_bg",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenerateCleanDescriptionProgressResponse"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/metrics-external/generate_evaluation_trigger/": {
      "post": {
        "operationId": "metrics-v1-external-generate-evaluation-trigger-create",
        "description": "Metrics v1 generate evaluation trigger",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MetricDetailV2"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/MetricDetailV2"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/MetricDetailV2"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetricDetailV2"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/metrics-external/generate_metrics/": {
      "post": {
        "operationId": "metrics-generate",
        "description": "Generates suggested metrics for an AI agent. Returns a `progress_id` to poll via `generate_metrics_progress`. Results appear in the progress response but are not saved automatically — pass them to the metrics bulk create endpoint to persist. The agent must have a description of at least 100 characters.",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SchemaGenerateMetricsMetricCreate"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/SchemaGenerateMetricsMetricCreate"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/SchemaGenerateMetricsMetricCreate"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SchemaGenerateMetricsResponse"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/metrics-external/generate_metrics_progress/": {
      "get": {
        "operationId": "metrics-v1-external-generate-metrics-progress-retrieve",
        "description": "Metrics v1 generate metrics progress",
        "parameters": [
          {
            "in": "query",
            "name": "progress_id",
            "schema": {
              "type": "string"
            },
            "description": "Progress ID returned from the generate_metrics endpoint",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "description": "Returns generation state with status and generated metrics"
          }
        }
      }
    },
    "/test_framework/v1/metrics-external/preview/": {
      "post": {
        "operationId": "metrics-v1-external-preview-create",
        "description": "Metrics v1 preview",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MetricPreview"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/MetricPreview"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/MetricPreview"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "description": "Returns progress_id for tracking progress"
          }
        }
      }
    },
    "/test_framework/v1/metrics-external/preview-progress/": {
      "get": {
        "operationId": "metrics-preview-progress",
        "description": "Metrics preview progress",
        "parameters": [
          {
            "in": "query",
            "name": "progress_id",
            "schema": {
              "type": "string"
            },
            "description": "Progress ID returned from the preview endpoint",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "description": "Returns preview state with status and results"
          }
        }
      }
    },
    "/test_framework/v1/metrics-external/run_reviews_progress/": {
      "get": {
        "operationId": "metrics-run-reviews-progress",
        "description": "Metrics run reviews progress",
        "parameters": [
          {
            "in": "query",
            "name": "progress_id",
            "schema": {
              "type": "string"
            },
            "description": "Progress ID returned from the run_reviews endpoint",
            "required": true
          },
          {
            "in": "query",
            "name": "agent_id",
            "schema": {
              "type": "integer"
            },
            "description": "Agent ID for permission validation"
          },
          {
            "in": "query",
            "name": "project_id",
            "schema": {
              "type": "integer"
            },
            "description": "Project ID for permission validation"
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "description": "Returns progress state with completed/failed counts and metric data when finished"
          }
        }
      }
    },
    "/test_framework/v1/metrics-external/save_result/": {
      "post": {
        "operationId": "metrics-v1-external-save-result-create",
        "description": "Metrics v1 save result",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MetricDetailV2"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/MetricDetailV2"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/MetricDetailV2"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "lambda_token": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetricDetailV2"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/metrics-external/simplify_prompt/": {
      "post": {
        "operationId": "metrics-v1-external-simplify-prompt-create",
        "description": "Metrics v1 simplify prompt",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SimplifyPromptRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/SimplifyPromptRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/SimplifyPromptRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SimplifyPromptResponse"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/metrics-external/simplify_prompt_progress/": {
      "get": {
        "operationId": "metrics-v1-external-simplify-prompt-progress-retrieve",
        "description": "Metrics v1 simplify prompt progress",
        "parameters": [
          {
            "in": "query",
            "name": "progress_id",
            "schema": {
              "type": "string"
            },
            "description": "Progress ID returned from simplify_prompt endpoint",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SimplifyPromptProgressResponse"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/metrics/{id}/": {
      "get": {
        "operationId": "metrics-v1-retrieve",
        "description": "Retrieve a specific metric by ID or slug.",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string"
            },
            "description": "**ID or Slug** - Metric identifier. Can be either:\n- Numeric ID (e.g., `123`)\n- Slug (e.g., `latency_metric`, `customer_satisfaction`)",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetricDetailV2"
                }
              }
            },
            "description": ""
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      },
      "put": {
        "operationId": "metrics-v1-update",
        "description": "Update a metric (full)",
        "summary": "Update a metric (full)",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this metric.",
            "required": true
          }
        ],
        "tags": [
          "Metrics"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostMetricEdit"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostMetricEdit"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostMetricEdit"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SchemaPostMetricEdit"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      },
      "patch": {
        "operationId": "metrics-v1-partial-update",
        "description": "Partially update a metric. Same field shape as create — see `metrics_create` for details.\n\n**Note:** `project`, `agent`, and `audio_enabled` are read-only once set. To change `audio_enabled` on an existing metric, create a new metric with the desired setting and delete the old one.",
        "summary": "Update a metric (partial)",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this metric.",
            "required": true
          }
        ],
        "tags": [
          "Metrics"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchedSchemaPostMetricEdit"
              },
              "examples": {
                "UpdatePrompt+CriticalFlag": {
                  "value": {
                    "description": "Updated rubric",
                    "is_critical": true
                  },
                  "summary": "Update prompt + critical flag"
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/PatchedSchemaPostMetricEdit"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/PatchedSchemaPostMetricEdit"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SchemaPostMetricEdit"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      },
      "delete": {
        "operationId": "metrics-v1-destroy",
        "description": "⚠ Irreversible. Deletes the metric and detaches it from all agents and evaluators. Dashboard widgets that displayed this metric are also removed.",
        "summary": "Delete a metric",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this metric.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "204": {
            "description": "No response body"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/metrics/{id}/add_to_predefined_metrics/": {
      "post": {
        "operationId": "metrics-v1-add-to-predefined-metrics-create",
        "description": "Metrics v1 add to predefined metrics",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this metric.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MetricDetailV2"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/MetricDetailV2"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/MetricDetailV2"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetricDetailV2"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/metrics/{id}/apply_optimisation_proposal/": {
      "post": {
        "operationId": "metrics-v1-apply-optimisation-proposal-create",
        "description": "Apply a pending optimisation proposal",
        "summary": "Apply a pending optimisation proposal",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this metric.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "description": "Metric updated; pending proposal cleared."
          }
        }
      }
    },
    "/test_framework/v1/metrics/{id}/dismiss_optimisation_proposal/": {
      "post": {
        "operationId": "metrics-v1-dismiss-optimisation-proposal-create",
        "description": "Dismiss a pending optimisation proposal",
        "summary": "Dismiss a pending optimisation proposal",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this metric.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "description": "Proposal cleared."
          }
        }
      }
    },
    "/test_framework/v1/metrics/{id}/evaluate_advance_metric/": {
      "post": {
        "operationId": "metrics-v1-evaluate-advance-metric-create",
        "description": "Evaluate an advance metric in the background.\n\nReturns a progress_id to poll for results.",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this metric.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MetricDetailV2"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/MetricDetailV2"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/MetricDetailV2"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "lambda_token": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetricDetailV2"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/metrics/{id}/evaluate_basic_metric/": {
      "post": {
        "operationId": "metrics-v1-evaluate-basic-metric-create",
        "description": "Evaluate a basic metric in the background.\n\nReturns a progress_id to poll for results.",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this metric.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MetricDetailV2"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/MetricDetailV2"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/MetricDetailV2"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "lambda_token": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetricDetailV2"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/metrics/{id}/evaluate_llm_judge_metric/": {
      "post": {
        "operationId": "metrics-v1-evaluate-llm-judge-metric-create",
        "description": "Evaluate a metric using LLM Judge (DSPy) in the background.\n\nReturns a progress_id to poll for results.",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this metric.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EvaluateLlmJudgeMetricRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/EvaluateLlmJudgeMetricRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/EvaluateLlmJudgeMetricRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "lambda_token": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EvaluateLlmJudgeMetricResponse"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/metrics/{id}/history/": {
      "get": {
        "operationId": "metrics-v1-history-list",
        "description": "Metrics v1 history",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this metric.",
            "required": true
          },
          {
            "in": "query",
            "name": "page",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "page_size",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedMetricHistoryList"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/metrics/{id}/history/edit/": {
      "patch": {
        "operationId": "metrics-v1-history-edit-partial-update",
        "description": "Metrics v1 history edit",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this metric.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchedMetricEditHistoryRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/PatchedMetricEditHistoryRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/PatchedMetricEditHistoryRequest"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetricHistory"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/metrics/{id}/restore/": {
      "post": {
        "operationId": "metrics-v1-restore-create",
        "description": "Metrics v1 restore",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this metric.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MetricRestoreRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/MetricRestoreRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/MetricRestoreRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetricDetailV2"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/metrics/{id}/run_reviews/": {
      "post": {
        "operationId": "metrics-v1-run-reviews-create",
        "description": "Metrics v1 run reviews",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this metric.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RunReviewsRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/RunReviewsRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/RunReviewsRequest"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "description": "Returns progress_id for tracking progress"
          }
        }
      }
    },
    "/test_framework/v1/metrics/{id}/variables/": {
      "post": {
        "operationId": "metrics-v1-variables-create",
        "description": "Get all variables and their values for a specific test_set and metric combination.\n\nURL Parameter:\n- pk: The metric_id\n\nRequest Body:\n- test_set_id (required): The ID of the test_set (datapoint)\n- metric_description_variables (required/optional): Array of variable names for description.\n  At least one of metric_description_variables or evaluation_trigger_variables must be provided.\n- evaluation_trigger_variables (required/optional): Array of variable names for trigger.\n  At least one of metric_description_variables or evaluation_trigger_variables must be provided.\n\nThis endpoint retrieves the variables and populates them with values from the test_set (datapoint).",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this metric.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MetricDetailV2"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/MetricDetailV2"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/MetricDetailV2"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetricDetailV2"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/metrics/basic_list/": {
      "get": {
        "operationId": "metrics-v1-basic-list-retrieve",
        "description": "Metrics v1 basic list",
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetricBasicList"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/metrics/build-agent/": {
      "post": {
        "operationId": "metrics-v1-build-agent-create",
        "description": "Start (or continue) an agentic metric-building session. On the first call, pass `agent_id` and `description` (the natural-language metric intent); the agent cleans up the definition, runs it against a sample of the agent's calls and runs, and either asks a clarifying question or returns a refined definition. To answer a question, pass `session_id` and `user_message`. Poll build-agent-progress with the returned `progress_id`.",
        "summary": "Build or refine a metric via the agent chatbot",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MetricDetailV2"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/MetricDetailV2"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/MetricDetailV2"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetricDetailV2"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/metrics/build-agent-cancel/": {
      "post": {
        "operationId": "metrics-v1-build-agent-cancel-create",
        "description": "Metrics v1 build agent cancel",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MetricDetailV2"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/MetricDetailV2"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/MetricDetailV2"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetricDetailV2"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/metrics/build-agent-progress/": {
      "get": {
        "operationId": "metrics-v1-build-agent-progress-retrieve",
        "description": "Metrics v1 build agent progress",
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetricDetailV2"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/metrics/bulk-toggle-settings/": {
      "post": {
        "operationId": "metrics-v1-bulk-toggle-settings-create",
        "description": "Metrics v1 bulk toggle settings",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MetricDetailV2"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/MetricDetailV2"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/MetricDetailV2"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetricDetailV2"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/metrics/bulk_create/": {
      "post": {
        "operationId": "metrics-bulk-create_2",
        "description": "Create multiple metrics in a single request",
        "summary": "Create multiple metrics in a single request",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/SchemaPostMetricEdit"
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/SchemaPostMetricEdit"
                }
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/SchemaPostMetricEdit"
                }
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SchemaPostMetricEdit"
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/metrics/bulk_manage_agents/": {
      "post": {
        "operationId": "metrics-v1-bulk-manage-agents-create",
        "description": "Metrics v1 bulk manage agents",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BulkAgentAssignment"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/BulkAgentAssignment"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/BulkAgentAssignment"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BulkAgentAssignmentResponse"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/metrics/delete_metrics/": {
      "post": {
        "operationId": "metrics-v1-delete-metrics-create",
        "description": "Metrics v1 delete metrics",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MetricDetailV2"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/MetricDetailV2"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/MetricDetailV2"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetricDetailV2"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/metrics/evaluate_metric_progress/": {
      "get": {
        "operationId": "metrics-v1-evaluate-metric-progress-retrieve",
        "description": "Poll for metric evaluation progress.\n\nQuery params:\n    progress_id: The progress_id returned from evaluate_basic_metric or evaluate_advance_metric\n\nReturns:\n    State object with status, output, error, etc.",
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "lambda_token": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetricDetailV2"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/metrics/fetch_call_details/": {
      "get": {
        "operationId": "metrics-v1-fetch-call-details-retrieve",
        "description": "Metrics v1 fetch call details",
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "lambda_token": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetricDetailV2"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/metrics/generate_clean_description/": {
      "post": {
        "operationId": "metrics-v1-generate-clean-description-create",
        "description": "Metrics v1 generate clean description",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MetricDetailV2"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/MetricDetailV2"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/MetricDetailV2"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetricDetailV2"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/metrics/generate_clean_description_bg/": {
      "post": {
        "operationId": "metrics-v1-generate-clean-description-bg-create",
        "description": "Start async clean description generation",
        "summary": "Start async clean description generation",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CleanMetricDescriptionRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/CleanMetricDescriptionRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/CleanMetricDescriptionRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenerateCleanDescriptionBgResponse"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/metrics/generate_clean_description_progress/": {
      "get": {
        "operationId": "metrics-v1-generate-clean-description-progress-retrieve",
        "description": "Poll async clean description generation",
        "summary": "Poll async clean description generation",
        "parameters": [
          {
            "in": "query",
            "name": "progress_id",
            "schema": {
              "type": "string"
            },
            "description": "progress_id returned from generate_clean_description_bg",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenerateCleanDescriptionProgressResponse"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/metrics/generate_evaluation_trigger/": {
      "post": {
        "operationId": "metrics-v1-generate-evaluation-trigger-create",
        "description": "Metrics v1 generate evaluation trigger",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MetricDetailV2"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/MetricDetailV2"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/MetricDetailV2"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetricDetailV2"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/metrics/generate_metrics/": {
      "post": {
        "operationId": "metrics-generate_2",
        "description": "Generates suggested metrics for an AI agent. Returns a `progress_id` to poll via `generate_metrics_progress`. Results appear in the progress response but are not saved automatically — pass them to the metrics bulk create endpoint to persist. The agent must have a description of at least 100 characters.",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SchemaGenerateMetricsMetricCreate"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/SchemaGenerateMetricsMetricCreate"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/SchemaGenerateMetricsMetricCreate"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SchemaGenerateMetricsResponse"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/metrics/generate_metrics_progress/": {
      "get": {
        "operationId": "metrics-v1-generate-metrics-progress-retrieve",
        "description": "Metrics v1 generate metrics progress",
        "parameters": [
          {
            "in": "query",
            "name": "progress_id",
            "schema": {
              "type": "string"
            },
            "description": "Progress ID returned from the generate_metrics endpoint",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "description": "Returns generation state with status and generated metrics"
          }
        }
      }
    },
    "/test_framework/v1/metrics/preview/": {
      "post": {
        "operationId": "metrics-v1-preview-create",
        "description": "Metrics v1 preview",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MetricPreview"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/MetricPreview"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/MetricPreview"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "description": "Returns progress_id for tracking progress"
          }
        }
      }
    },
    "/test_framework/v1/metrics/preview-progress/": {
      "get": {
        "operationId": "metrics-preview-progress_2",
        "description": "Metrics preview progress",
        "parameters": [
          {
            "in": "query",
            "name": "progress_id",
            "schema": {
              "type": "string"
            },
            "description": "Progress ID returned from the preview endpoint",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "description": "Returns preview state with status and results"
          }
        }
      }
    },
    "/test_framework/v1/metrics/run_reviews_progress/": {
      "get": {
        "operationId": "metrics-run-reviews-progress_2",
        "description": "Metrics run reviews progress",
        "parameters": [
          {
            "in": "query",
            "name": "progress_id",
            "schema": {
              "type": "string"
            },
            "description": "Progress ID returned from the run_reviews endpoint",
            "required": true
          },
          {
            "in": "query",
            "name": "agent_id",
            "schema": {
              "type": "integer"
            },
            "description": "Agent ID for permission validation"
          },
          {
            "in": "query",
            "name": "project_id",
            "schema": {
              "type": "integer"
            },
            "description": "Project ID for permission validation"
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "description": "Returns progress state with completed/failed counts and metric data when finished"
          }
        }
      }
    },
    "/test_framework/v1/metrics/save_result/": {
      "post": {
        "operationId": "metrics-v1-save-result-create",
        "description": "Metrics v1 save result",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MetricDetailV2"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/MetricDetailV2"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/MetricDetailV2"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "lambda_token": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetricDetailV2"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/metrics/simplify_prompt/": {
      "post": {
        "operationId": "metrics-v1-simplify-prompt-create",
        "description": "Metrics v1 simplify prompt",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SimplifyPromptRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/SimplifyPromptRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/SimplifyPromptRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SimplifyPromptResponse"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/metrics/simplify_prompt_progress/": {
      "get": {
        "operationId": "metrics-v1-simplify-prompt-progress-retrieve",
        "description": "Metrics v1 simplify prompt progress",
        "parameters": [
          {
            "in": "query",
            "name": "progress_id",
            "schema": {
              "type": "string"
            },
            "description": "Progress ID returned from simplify_prompt endpoint",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SimplifyPromptProgressResponse"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/personalities/": {
      "get": {
        "operationId": "personalities-list",
        "description": "List personalities available for use in your evaluators.\n\nReturns personalities owned by your organization plus globally available personalities.\n\n**Filters:**\n- `language` — filter by language code (e.g. `en`, `es`)\n- `project_id` — filter to personalities owned by a specific project\n\n**Using personality IDs in evaluators:** globally available personalities (those with no project or organization owner) work across all projects. Organization-specific personalities are only usable within their own organization.\n\nPerformance tip: this endpoint can return large payloads. When you know the language of the agent in scope, try passing `language` (e.g. `en`, `es`) to narrow the result. Passing `project_id` from your workspace context also helps when you only need scoped personalities. If you genuinely need every personality, you can omit filters.",
        "parameters": [
          {
            "in": "query",
            "name": "language",
            "schema": {
              "type": "string"
            },
            "description": "Filter by language code (e.g. `en`, `es`, `fr`)."
          },
          {
            "in": "query",
            "name": "project_id",
            "schema": {
              "type": "integer"
            },
            "description": "Filter by project ID"
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CreatePersonality"
                  }
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "summary": "List personalities",
        "x-mcp-summary-derived": true,
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "personalities-list",
            "description": "List personalities available for use in your evaluators.\n\nReturns personalities owned by your organization plus globally available personalities.\n\n**Filters:**\n- `language` — filter by language code (e.g. `en`, `es`)\n- `project_id` — filter to personalities owned by a specific project\n\n**Using personality IDs in evaluators:** globally available personalities (those with no project or organization owner) work across all projects. Organization-specific personalities are only usable within their own organization.\n\nPerformance tip: this endpoint can return large payloads. When you know the language of the agent in scope, try passing `language` (e.g. `en`, `es`) to narrow the result. Passing `project_id` from your workspace context also helps when you only need scoped personalities. If you genuinely need every personality, you can omit filters."
          }
        }
      },
      "post": {
        "operationId": "personalities-create",
        "description": "Create a personality",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePersonality"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/CreatePersonality"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/CreatePersonality"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreatePersonality"
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "summary": "Create a personality",
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "personalities-create",
            "description": "Create a personality"
          }
        }
      }
    },
    "/test_framework/v1/personalities-external/": {
      "get": {
        "operationId": "personalities-external-list",
        "description": "List personalities available for use in your evaluators.\n\nReturns personalities owned by your organization plus globally available personalities.\n\n**Filters:**\n- `language` — filter by language code (e.g. `en`, `es`)\n- `project_id` — filter to personalities owned by a specific project\n\n**Using personality IDs in evaluators:** globally available personalities (those with no project or organization owner) work across all projects. Organization-specific personalities are only usable within their own organization.\n\nPerformance tip: this endpoint can return large payloads. When you know the language of the agent in scope, try passing `language` (e.g. `en`, `es`) to narrow the result. Passing `project_id` from your workspace context also helps when you only need scoped personalities. If you genuinely need every personality, you can omit filters.",
        "parameters": [
          {
            "in": "query",
            "name": "language",
            "schema": {
              "type": "string"
            },
            "description": "Filter by language code (e.g. `en`, `es`, `fr`)."
          },
          {
            "in": "query",
            "name": "project_id",
            "schema": {
              "type": "integer"
            },
            "description": "Filter by project ID"
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CreatePersonality"
                  }
                }
              }
            },
            "description": ""
          }
        }
      },
      "post": {
        "operationId": "personalities-external-create",
        "description": "Create a new caller personality",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePersonality"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/CreatePersonality"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/CreatePersonality"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreatePersonality"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/personalities-external/{id}/": {
      "get": {
        "operationId": "personalities-external-retrieve",
        "description": "Retrieve a caller personality by ID",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this personality.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreatePersonality"
                }
              }
            },
            "description": ""
          }
        }
      },
      "put": {
        "operationId": "personalities-external-update",
        "description": "Update a caller personality",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this personality.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePersonality"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/CreatePersonality"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/CreatePersonality"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreatePersonality"
                }
              }
            },
            "description": ""
          }
        }
      },
      "patch": {
        "operationId": "personalities-external-partial-update",
        "description": "Update a caller personality",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this personality.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchedCreatePersonality"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/PatchedCreatePersonality"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/PatchedCreatePersonality"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreatePersonality"
                }
              }
            },
            "description": ""
          }
        }
      },
      "delete": {
        "operationId": "personalities-external-destroy",
        "description": "Delete a caller personality",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this personality.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "204": {
            "description": "No response body"
          }
        }
      }
    },
    "/test_framework/v1/personalities-external/{id}/call/": {
      "post": {
        "operationId": "personalities-external-call-create",
        "description": "Initiate a WebRTC call to talk to a personality directly from the browser.\nOnly callable via Bearer token (Supabase) authentication - not API keys.\nInitiates a WebRTC call via Cekura's voice service and returns Daily.co credentials.",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this personality.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePersonality"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/CreatePersonality"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/CreatePersonality"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreatePersonality"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/personalities-external/{id}/duplicate/": {
      "post": {
        "operationId": "personalities-external-duplicate-create",
        "description": "Personalities duplicate",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this personality.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePersonality"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/CreatePersonality"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/CreatePersonality"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreatePersonality"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/personalities-external/{id}/fork/": {
      "post": {
        "operationId": "personalities-external-fork-create",
        "description": "Personalities fork",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this personality.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePersonality"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/CreatePersonality"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/CreatePersonality"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreatePersonality"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/personalities-external/cartesia_voice_preview/": {
      "get": {
        "operationId": "personalities-external-cartesia-voice-preview-retrieve",
        "description": "Stream a Cartesia voice's preview audio file.\n\nCartesia preview URLs require an API key; we proxy them so the browser\nnever sees the key. Bytes are cached server-side per voice_id so repeat\nplays don't re-hit Cartesia.",
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreatePersonality"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/personalities-external/cartesia_voices/": {
      "get": {
        "operationId": "personalities-external-cartesia-voices-retrieve",
        "description": "Get the public Cartesia voice catalog with preview audio URLs.\nOptionally filter by language.",
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreatePersonality"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/personalities-external/elevenlabs_voices/": {
      "get": {
        "operationId": "personalities-external-elevenlabs-voices-retrieve",
        "description": "Get available voices from ElevenLabs.\nOptionally filter by language.",
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreatePersonality"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/personalities/{id}/": {
      "get": {
        "operationId": "personalities-retrieve",
        "description": "Retrieve a caller personality by ID",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this personality.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreatePersonality"
                }
              }
            },
            "description": ""
          }
        }
      },
      "put": {
        "operationId": "personalities-update",
        "description": "Update a caller personality",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this personality.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePersonality"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/CreatePersonality"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/CreatePersonality"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreatePersonality"
                }
              }
            },
            "description": ""
          }
        }
      },
      "patch": {
        "operationId": "personalities-partial-update",
        "description": "Update a caller personality",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this personality.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchedCreatePersonality"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/PatchedCreatePersonality"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/PatchedCreatePersonality"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreatePersonality"
                }
              }
            },
            "description": ""
          }
        }
      },
      "delete": {
        "operationId": "personalities-destroy",
        "description": "Delete a caller personality",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this personality.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "204": {
            "description": "No response body"
          }
        }
      }
    },
    "/test_framework/v1/personalities/{id}/call/": {
      "post": {
        "operationId": "personalities-call-create",
        "description": "Initiate a WebRTC call to talk to a personality directly from the browser.\nOnly callable via Bearer token (Supabase) authentication - not API keys.\nInitiates a WebRTC call via Cekura's voice service and returns Daily.co credentials.",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this personality.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePersonality"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/CreatePersonality"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/CreatePersonality"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreatePersonality"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/personalities/{id}/duplicate/": {
      "post": {
        "operationId": "personalities-duplicate-create",
        "description": "Personalities duplicate",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this personality.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePersonality"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/CreatePersonality"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/CreatePersonality"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreatePersonality"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/personalities/{id}/fork/": {
      "post": {
        "operationId": "personalities-fork-create",
        "description": "Personalities fork",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this personality.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePersonality"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/CreatePersonality"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/CreatePersonality"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreatePersonality"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/personalities/cartesia_voice_preview/": {
      "get": {
        "operationId": "personalities-cartesia-voice-preview-retrieve",
        "description": "Stream a Cartesia voice's preview audio file.\n\nCartesia preview URLs require an API key; we proxy them so the browser\nnever sees the key. Bytes are cached server-side per voice_id so repeat\nplays don't re-hit Cartesia.",
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreatePersonality"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/personalities/cartesia_voices/": {
      "get": {
        "operationId": "personalities-cartesia-voices-retrieve",
        "description": "Get the public Cartesia voice catalog with preview audio URLs.\nOptionally filter by language.",
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreatePersonality"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/personalities/elevenlabs_voices/": {
      "get": {
        "operationId": "personalities-elevenlabs-voices-retrieve",
        "description": "Get available voices from ElevenLabs.\nOptionally filter by language.",
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreatePersonality"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/phone-numbers/": {
      "get": {
        "operationId": "phone-numbers-list",
        "description": "List phone numbers",
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PhoneNumber"
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/phone-numbers-external/": {
      "get": {
        "operationId": "phone-numbers-external-list",
        "description": "List phone numbers",
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PhoneNumber"
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/phone-numbers-external/{id}/": {
      "get": {
        "operationId": "phone-numbers-external-retrieve",
        "description": "Retrieve a phone number by ID",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this phone number.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PhoneNumber"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/phone-numbers-external/check_occupancy/": {
      "get": {
        "operationId": "phone-numbers-external-check-occupancy-retrieve",
        "description": "Check if a phone number is currently occupied by pending runs.\n\nA phone number is considered occupied when there are runs with PENDING status\nusing that phone number. This typically happens during outbound calls when\nthe phone is being configured or a call is being initiated.\n\nQuery Parameters:\n    phone_number (str): The phone number to check (e.g., +1234567890)\n\nReturns:\n    200: {\n        'phone_number': str,\n        'is_occupied': bool,\n        'message': str,\n        'pending_runs_count': int (optional, only if occupied)\n    }\n    400: {'detail': str} - If phone_number parameter is missing",
        "parameters": [
          {
            "in": "query",
            "name": "phone_number",
            "schema": {
              "type": "string"
            },
            "description": "Phone number to check (e.g., +1234567890)",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {}
                },
                "examples": {
                  "Success-PhoneAvailable": {
                    "value": {
                      "phone_number": "+1234567890",
                      "is_occupied": false,
                      "message": "Phone number is available"
                    },
                    "summary": "Success - Phone Available"
                  },
                  "Success-PhoneOccupied": {
                    "value": {
                      "phone_number": "+1234567890",
                      "is_occupied": true,
                      "message": "Phone number is currently occupied by another run",
                      "pending_runs_count": 3
                    },
                    "summary": "Success - Phone Occupied"
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {}
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/phone-numbers-external/inbound/": {
      "get": {
        "operationId": "phone-numbers-external-inbound-list",
        "description": "Phone numbers inbound",
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PhoneNumberInbound"
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/phone-numbers/{id}/": {
      "get": {
        "operationId": "phone-numbers-retrieve",
        "description": "Retrieve a phone number by ID",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this phone number.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PhoneNumber"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/phone-numbers/check_occupancy/": {
      "get": {
        "operationId": "phone-numbers-check-occupancy-retrieve",
        "description": "Check if a phone number is currently occupied by pending runs.\n\nA phone number is considered occupied when there are runs with PENDING status\nusing that phone number. This typically happens during outbound calls when\nthe phone is being configured or a call is being initiated.\n\nQuery Parameters:\n    phone_number (str): The phone number to check (e.g., +1234567890)\n\nReturns:\n    200: {\n        'phone_number': str,\n        'is_occupied': bool,\n        'message': str,\n        'pending_runs_count': int (optional, only if occupied)\n    }\n    400: {'detail': str} - If phone_number parameter is missing",
        "parameters": [
          {
            "in": "query",
            "name": "phone_number",
            "schema": {
              "type": "string"
            },
            "description": "Phone number to check (e.g., +1234567890)",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {}
                },
                "examples": {
                  "Success-PhoneAvailable": {
                    "value": {
                      "phone_number": "+1234567890",
                      "is_occupied": false,
                      "message": "Phone number is available"
                    },
                    "summary": "Success - Phone Available"
                  },
                  "Success-PhoneOccupied": {
                    "value": {
                      "phone_number": "+1234567890",
                      "is_occupied": true,
                      "message": "Phone number is currently occupied by another run",
                      "pending_runs_count": 3
                    },
                    "summary": "Success - Phone Occupied"
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {}
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/phone-numbers/inbound/": {
      "get": {
        "operationId": "phone-numbers-inbound-list",
        "description": "List inbound phone numbers",
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PhoneNumberInbound"
                  }
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "summary": "List inbound phone numbers",
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "phone-numbers-inbound-list",
            "description": "List inbound phone numbers"
          }
        },
        "parameters": [
          {
            "name": "organization_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Tenant scope. Supply one of `organization_id` when authenticating with a user session or OAuth bearer token; omit when using an API key already scoped to the tenant."
          }
        ]
      }
    },
    "/test_framework/v1/phone-numbers/providers/{id}/": {
      "delete": {
        "operationId": "phone-numbers-providers-destroy",
        "description": "Unified API viewset for BYOP (Bring Your Own Telephony Provider).\n\nHandles importing and managing phone numbers from various providers:\n- Twilio\n- Future: Vonage, Bandwidth, Telnyx, etc.\n\nURL Structure: /v1/phone-numbers/providers/{provider}/{action}\n\nHow to add a new provider:\n1. Add provider to PhoneNumberProviderChoices enum\n2. Create {Provider}Service class (e.g., VonageService)\n3. Create Import{Provider}NumberSerializer\n4. Add action method with @action(url_path=\"{provider}/import\")\n5. Update get_serializer_class() mapping",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "204": {
            "description": "No response body"
          }
        }
      }
    },
    "/test_framework/v1/phone-numbers/providers/list/": {
      "get": {
        "operationId": "phone-numbers-providers-list-list",
        "description": "List all phone numbers for the organization.\n\nReturns all phone numbers from all providers (Cekura, Twilio, etc.)\navailable for the current organization with decrypted metadata.",
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PhoneNumberDetail"
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/phone-numbers/providers/metadata/": {
      "get": {
        "operationId": "phone-numbers-providers-metadata-retrieve",
        "description": "Fetches decrypted metadata for a phone number by phone_number or id. Called by Cekura's internal voice services.",
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "patronus_agent_token": []
          },
          {
            "pipecat_agent_token": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PhoneNumberDetail"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/phone-numbers/providers/plivo/bulk-import/": {
      "post": {
        "operationId": "phone-numbers-providers-plivo-bulk-import-create",
        "description": "Unified API viewset for BYOP (Bring Your Own Telephony Provider).\n\nHandles importing and managing phone numbers from various providers:\n- Twilio\n- Future: Vonage, Bandwidth, Telnyx, etc.\n\nURL Structure: /v1/phone-numbers/providers/{provider}/{action}\n\nHow to add a new provider:\n1. Add provider to PhoneNumberProviderChoices enum\n2. Create {Provider}Service class (e.g., VonageService)\n3. Create Import{Provider}NumberSerializer\n4. Add action method with @action(url_path=\"{provider}/import\")\n5. Update get_serializer_class() mapping",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BulkImportPlivoNumber"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/BulkImportPlivoNumber"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/BulkImportPlivoNumber"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BulkImportPlivoResponse"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/phone-numbers/providers/plivo/import/": {
      "post": {
        "operationId": "phone-numbers-providers-plivo-import-create",
        "description": "Unified API viewset for BYOP (Bring Your Own Telephony Provider).\n\nHandles importing and managing phone numbers from various providers:\n- Twilio\n- Future: Vonage, Bandwidth, Telnyx, etc.\n\nURL Structure: /v1/phone-numbers/providers/{provider}/{action}\n\nHow to add a new provider:\n1. Add provider to PhoneNumberProviderChoices enum\n2. Create {Provider}Service class (e.g., VonageService)\n3. Create Import{Provider}NumberSerializer\n4. Add action method with @action(url_path=\"{provider}/import\")\n5. Update get_serializer_class() mapping",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ImportPlivoNumber"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/ImportPlivoNumber"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/ImportPlivoNumber"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PhoneNumberDetail"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/phone-numbers/providers/telnyx/bulk-import/": {
      "post": {
        "operationId": "phone-numbers-providers-telnyx-bulk-import-create",
        "description": "Bulk import multiple Telnyx phone numbers.\n\nImports up to 50 phone numbers at once. Returns detailed results.",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BulkImportTelnyxNumber"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/BulkImportTelnyxNumber"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/BulkImportTelnyxNumber"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BulkImportTelnyxResponse"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/phone-numbers/providers/telnyx/import/": {
      "post": {
        "operationId": "phone-numbers-providers-telnyx-import-create",
        "description": "Import a Telnyx phone number to the organization.\n\nValidates Telnyx credentials, sets up webhooks, and creates PhoneNumber record.",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ImportTelnyxNumber"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/ImportTelnyxNumber"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/ImportTelnyxNumber"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PhoneNumberDetail"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/phone-numbers/providers/twilio/bulk-import/": {
      "post": {
        "operationId": "phone-numbers-providers-twilio-bulk-import-create",
        "description": "Bulk import multiple Twilio phone numbers.\n\nImports up to 50 phone numbers at once. Returns detailed results\nshowing which numbers succeeded and which failed.",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BulkImportTwilioNumber"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/BulkImportTwilioNumber"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/BulkImportTwilioNumber"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BulkImportResponse"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/phone-numbers/providers/twilio/import/": {
      "post": {
        "operationId": "phone-numbers-providers-twilio-import-create",
        "description": "Import a Twilio phone number to the organization.\n\nThis endpoint:\n1. Validates Twilio credentials\n2. Sets up webhooks on Twilio\n3. Creates PhoneNumber record with encrypted credentials",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ImportTwilioNumber"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/ImportTwilioNumber"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/ImportTwilioNumber"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PhoneNumberDetail"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/pipecat/webhook/": {
      "post": {
        "operationId": "pipecat-webhook-create",
        "description": "Handle incoming Pipecat webhook POST requests.",
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "description": "No response body"
          }
        }
      }
    },
    "/test_framework/v1/predefined-metrics/": {
      "get": {
        "operationId": "predefined-metrics-list",
        "description": "List predefined metrics",
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PredefinedMetric"
                  }
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "summary": "List predefined metrics",
        "x-mcp-summary-derived": true,
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "predefined-metrics-list",
            "description": "List predefined metrics"
          }
        }
      },
      "post": {
        "operationId": "predefined-metrics-create",
        "description": "Create a new predefined metric",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PredefinedMetric"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/PredefinedMetric"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/PredefinedMetric"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PredefinedMetric"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/predefined-metrics-external/": {
      "get": {
        "operationId": "predefined-metrics-external-list",
        "description": "List predefined metrics",
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PredefinedMetric"
                  }
                }
              }
            },
            "description": ""
          }
        }
      },
      "post": {
        "operationId": "predefined-metrics-external-create",
        "description": "Create a new predefined metric",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PredefinedMetric"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/PredefinedMetric"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/PredefinedMetric"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PredefinedMetric"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/predefined-metrics-external/{id}/": {
      "get": {
        "operationId": "predefined-metrics-external-retrieve",
        "description": "Retrieve a predefined metric by ID",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this predefined metric.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PredefinedMetric"
                }
              }
            },
            "description": ""
          }
        }
      },
      "put": {
        "operationId": "predefined-metrics-external-update",
        "description": "Update a predefined metric.\nOnly allowed if the metric has no organization (organization is None).",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this predefined metric.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PredefinedMetric"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/PredefinedMetric"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/PredefinedMetric"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PredefinedMetric"
                }
              }
            },
            "description": ""
          }
        }
      },
      "patch": {
        "operationId": "predefined-metrics-external-partial-update",
        "description": "Partially update a predefined metric.\nOnly allowed if the metric has no organization (organization is None).",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this predefined metric.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchedPredefinedMetric"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/PatchedPredefinedMetric"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/PatchedPredefinedMetric"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PredefinedMetric"
                }
              }
            },
            "description": ""
          }
        }
      },
      "delete": {
        "operationId": "predefined-metrics-external-destroy",
        "description": "Delete a predefined metric",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this predefined metric.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "204": {
            "description": "No response body"
          }
        }
      }
    },
    "/test_framework/v1/predefined-metrics-external/copy/": {
      "post": {
        "operationId": "predefined-metrics-external-copy-create",
        "description": "Copy one or more predefined metrics (e.g. Voice Tone + Clarity, Latency, CSAT) into a project so they evaluate its calls. Pass `project_id` and either `predefined_metric_ids` or `metric_codes` from the predefined metrics list. Use this to add these built-in metrics — they cannot be created through the metrics create endpoint.",
        "summary": "Attach predefined metrics to a project",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PredefinedMetricCopyRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/PredefinedMetricCopyRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/PredefinedMetricCopyRequest"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/MetricList"
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/predefined-metrics/{id}/": {
      "get": {
        "operationId": "predefined-metrics-retrieve",
        "description": "Retrieve a predefined metric by ID",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this predefined metric.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PredefinedMetric"
                }
              }
            },
            "description": ""
          }
        }
      },
      "put": {
        "operationId": "predefined-metrics-update",
        "description": "Update a predefined metric.\nOnly allowed if the metric has no organization (organization is None).",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this predefined metric.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PredefinedMetric"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/PredefinedMetric"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/PredefinedMetric"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PredefinedMetric"
                }
              }
            },
            "description": ""
          }
        }
      },
      "patch": {
        "operationId": "predefined-metrics-partial-update",
        "description": "Partially update a predefined metric.\nOnly allowed if the metric has no organization (organization is None).",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this predefined metric.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchedPredefinedMetric"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/PatchedPredefinedMetric"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/PatchedPredefinedMetric"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PredefinedMetric"
                }
              }
            },
            "description": ""
          }
        }
      },
      "delete": {
        "operationId": "predefined-metrics-destroy",
        "description": "Delete a predefined metric",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this predefined metric.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "204": {
            "description": "No response body"
          }
        }
      }
    },
    "/test_framework/v1/predefined-metrics/copy/": {
      "post": {
        "operationId": "predefined-metrics-copy-create",
        "description": "Copy one or more predefined metrics (e.g. Voice Tone + Clarity, Latency, CSAT) into a project so they evaluate its calls. Pass `project_id` and either `predefined_metric_ids` or `metric_codes` from the predefined metrics list. Use this to add these built-in metrics — they cannot be created through the metrics create endpoint.",
        "summary": "Attach predefined metrics to a project",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PredefinedMetricCopyRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/PredefinedMetricCopyRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/PredefinedMetricCopyRequest"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/MetricList"
                  }
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "x-mcp-destructive": true,
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "predefined-metrics-copy-create",
            "description": "Copy one or more predefined metrics (e.g. Voice Tone + Clarity, Latency, CSAT) into a project so they evaluate its calls. Pass `project_id` and either `predefined_metric_ids` or `metric_codes` from the predefined metrics list. Use this to add these built-in metrics — they cannot be created through the metrics create endpoint."
          }
        }
      }
    },
    "/test_framework/v1/results/": {
      "get": {
        "operationId": "results-v1-list",
        "description": "List test results.\n\nTo filter by status, use `results_retrieve(id=result_id)` and inspect `status` directly ('running', 'completed', 'failed') — there is no list-level status filter.\n\n**Result status:** a result marked `failed` indicates infrastructure failures (e.g. connection errors, websocket handshake failures), not metric evaluation failures. `success_runs_count` counts runs that reached terminal state regardless of connection errors. See `results_retrieve().failed_reasons` for the breakdown.\n\n**Scenarios filter note:** filtering by `scenarios` may return duplicate result rows when a result contains multiple runs of the same scenario — deduplicate by `result.id` if needed.\n\nAfter triggering a run, poll `results_retrieve(id=result_id)` until `status` is 'completed' or 'failed'. For outbound runs, each run's `outbound_dial_window_closes_at` shows the deadline by which your agent must dial in.",
        "parameters": [
          {
            "name": "page",
            "required": false,
            "in": "query",
            "description": "A page number within the paginated result set.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "page_size",
            "required": false,
            "in": "query",
            "description": "Number of results to return per page.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "agent_id",
            "schema": {
              "type": "integer"
            },
            "description": "Filter by agent ID"
          },
          {
            "in": "query",
            "name": "project_id",
            "schema": {
              "type": "integer"
            },
            "description": "Filter by project ID"
          },
          {
            "in": "query",
            "name": "search",
            "schema": {
              "type": "string"
            },
            "description": "Filter by Result name"
          },
          {
            "in": "query",
            "name": "scenarios",
            "schema": {
              "type": "string"
            },
            "description": "Filter by scenario IDs — comma-separated string (e.g. '24270,24271'), not a JSON array."
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "shareable_link": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedResultList"
                }
              }
            },
            "description": ""
          }
        },
        "deprecated": true
      },
      "post": {
        "operationId": "results-v1-create",
        "description": "Create a new test result",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Result"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/Result"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Result"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "shareable_link": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/results-external/": {
      "get": {
        "operationId": "results-v1-external-list",
        "description": "List test results.\n\nTo filter by status, use `results_retrieve(id=result_id)` and inspect `status` directly ('running', 'completed', 'failed') — there is no list-level status filter.\n\n**Result status:** a result marked `failed` indicates infrastructure failures (e.g. connection errors, websocket handshake failures), not metric evaluation failures. `success_runs_count` counts runs that reached terminal state regardless of connection errors. See `results_retrieve().failed_reasons` for the breakdown.\n\n**Scenarios filter note:** filtering by `scenarios` may return duplicate result rows when a result contains multiple runs of the same scenario — deduplicate by `result.id` if needed.\n\nAfter triggering a run, poll `results_retrieve(id=result_id)` until `status` is 'completed' or 'failed'. For outbound runs, each run's `outbound_dial_window_closes_at` shows the deadline by which your agent must dial in.",
        "parameters": [
          {
            "name": "page",
            "required": false,
            "in": "query",
            "description": "A page number within the paginated result set.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "page_size",
            "required": false,
            "in": "query",
            "description": "Number of results to return per page.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "agent_id",
            "schema": {
              "type": "integer"
            },
            "description": "Filter by agent ID"
          },
          {
            "in": "query",
            "name": "project_id",
            "schema": {
              "type": "integer"
            },
            "description": "Filter by project ID"
          },
          {
            "in": "query",
            "name": "search",
            "schema": {
              "type": "string"
            },
            "description": "Filter by Result name"
          },
          {
            "in": "query",
            "name": "scenarios",
            "schema": {
              "type": "string"
            },
            "description": "Filter by scenario IDs — comma-separated string (e.g. '24270,24271'), not a JSON array."
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "shareable_link": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedResultList"
                }
              }
            },
            "description": ""
          }
        },
        "deprecated": true
      },
      "post": {
        "operationId": "results-v1-external-create",
        "description": "Create a new test result",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Result"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/Result"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Result"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "shareable_link": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/results-external/{id}/": {
      "get": {
        "operationId": "results-v1-external-retrieve",
        "description": "`success` indicates whether the run passed its quality evaluation. A run with `success=false` either failed to connect (check `error_message`) or failed an evaluation check (check `evaluation`). `success_rate` is the percentage of runs with `success=true`.\n\nThe `runs` field is a dict keyed by run ID string (e.g. `{\"86368\": {...}, \"86367\": {...}}`), not an array — unlike the list endpoint. Each run also has a `call_id` STRING field (the provider's call identifier) — that is a data field, NOT an endpoint ID; do not pass it where `run_id` is expected.",
        "summary": "Retrieve a test result",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this result.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "shareable_link": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultDetailV2"
                },
                "examples": {
                  "Success": {
                    "value": {
                      "id": "integer",
                      "name": "string",
                      "agent": "integer",
                      "status": "string",
                      "met_expected_outcome_count": "integer",
                      "total_expected_outcome_count": "integer",
                      "success_rate": "float",
                      "run_as_text": "boolean",
                      "is_cronjob": "boolean",
                      "runs": {
                        "run_id": {
                          "id": "integer",
                          "scenario": "integer",
                          "outbound_number": "string",
                          "expected_outcome": {
                            "score": 100,
                            "explanation": [
                              "✅ Positive outcome explanation with checkmark emoji",
                              "❌ Negative outcome explanation with X emoji"
                            ],
                            "outcome_alignments": [
                              {
                                "outcome": "string",
                                "prompt_part": "string",
                                "aligned": "boolean"
                              }
                            ]
                          },
                          "success": "boolean",
                          "evaluation": {
                            "metrics": [
                              {
                                "id": "integer",
                                "name": "string",
                                "type": "binary | continuous_qualitative | numeric | enum",
                                "score": "number",
                                "explanation": "string | array",
                                "function_name": "string (optional)",
                                "extra": {
                                  "categories": [
                                    {
                                      "category": "string",
                                      "deviation": "string (optional)",
                                      "priority": "string (optional)"
                                    }
                                  ],
                                  "percentiles": {
                                    "p50": "number"
                                  }
                                },
                                "enum": "string (for enum type metrics only)"
                              }
                            ]
                          },
                          "timestamp": "datetime",
                          "executed_at": "datetime",
                          "error_message": "string",
                          "status": "string",
                          "duration": "string (MM:SS format)",
                          "scenario_name": "string",
                          "personality_name": "string",
                          "metadata": "object",
                          "inbound_number": "string"
                        }
                      },
                      "overall_evaluation": {
                        "success_rate": "number",
                        "metric_summary": {
                          "metric_id": {
                            "id": "integer",
                            "name": "string",
                            "type": "string",
                            "score": "number",
                            "explanation": "string (optional)",
                            "function_name": "string",
                            "vocera_defined_metric_code": "string (optional)",
                            "p50": "number (for numeric metrics)"
                          }
                        },
                        "worst_performing_metrics": {
                          "binary_adherence": [
                            "array of metric_ids"
                          ]
                        },
                        "numeric_metrics": [
                          {
                            "name": "string",
                            "type": "numeric",
                            "value": "number",
                            "percentiles": {
                              "p50": "number"
                            }
                          }
                        ],
                        "enum_metrics": [
                          "array of metric_ids"
                        ],
                        "extra_metrics": [
                          {
                            "name": "string (e.g., 'Expected Outcome', 'Average Ringing Duration')",
                            "type": "string",
                            "value": "number",
                            "percentiles": {
                              "p50": "number (optional)"
                            }
                          }
                        ]
                      },
                      "total_duration": "string (MM:SS format)",
                      "total_runs_count": "integer",
                      "completed_runs_count": "integer",
                      "success_runs_count": "integer",
                      "failed_runs_count": "integer",
                      "scenarios": [
                        {
                          "id": "integer",
                          "name": "string"
                        }
                      ],
                      "critical_categories": "array",
                      "metrics": "array",
                      "domain": "string (nullable)",
                      "domain_logo": "string (nullable)",
                      "runs_by_tags": "object",
                      "latency_data": "object",
                      "failed_reasons": "array",
                      "run_settings": {
                        "override_value": 10,
                        "frequency": 2,
                        "concurrency_limit": 5,
                        "personality_ids": [
                          3,
                          7
                        ],
                        "test_profile_ids": [
                          20
                        ],
                        "mode": "same_number",
                        "livekit_data": {
                          "agent_name": "kit",
                          "config": {},
                          "url": "wss://example"
                        }
                      },
                      "created_at": "datetime",
                      "updated_at": "datetime"
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                }
              }
            },
            "description": ""
          }
        },
        "deprecated": true
      },
      "put": {
        "operationId": "results-v1-external-update",
        "description": "Update a test result",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this result.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ResultDetailV2"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/ResultDetailV2"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/ResultDetailV2"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "shareable_link": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultDetailV2"
                }
              }
            },
            "description": ""
          }
        }
      },
      "patch": {
        "operationId": "results-v1-external-partial-update",
        "description": "Update a test result",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this result.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchedResultDetailV2"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/PatchedResultDetailV2"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/PatchedResultDetailV2"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "shareable_link": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultDetailV2"
                }
              }
            },
            "description": ""
          }
        }
      },
      "delete": {
        "operationId": "results-v1-external-destroy",
        "description": "Delete a test result",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this result.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "shareable_link": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "204": {
            "description": "No response body"
          }
        }
      }
    },
    "/test_framework/v1/results-external/{id}/ask_about_failures/": {
      "post": {
        "operationId": "results-v1-external-ask-about-failures-create",
        "description": "Query failed runs chatbot",
        "summary": "Query failed runs chatbot",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this result.",
            "required": true
          }
        ],
        "tags": [
          "Results"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AskAboutFailuresRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/AskAboutFailuresRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/AskAboutFailuresRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "shareable_link": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "description": "Streaming AI-generated analysis of test failures"
          },
          "400": {
            "description": "Invalid request (missing or invalid question)"
          },
          "404": {
            "description": "Result not found"
          },
          "429": {
            "description": "Rate limit exceeded"
          }
        }
      }
    },
    "/test_framework/v1/results-external/{id}/create_shareable_link_token/": {
      "post": {
        "operationId": "create-shareable-link-token",
        "description": "Generate shareable link for result",
        "summary": "Generate shareable link for result",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this result.",
            "required": true
          }
        ],
        "tags": [
          "Results"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostCreateShareableLinkToken"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostCreateShareableLinkToken"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostCreateShareableLinkToken"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "shareable_link": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SchemaCreateShareableLinkTokenResponse"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/results-external/{id}/delete_runs/": {
      "post": {
        "operationId": "delete-runs",
        "description": "⚠ Irreversible. Removes the specified runs from a result, then triggers re-evaluation so aggregate metrics recompute without them. Maximum 100 run IDs per request.",
        "summary": "Delete runs from result",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this result.",
            "required": true
          }
        ],
        "tags": [
          "Results"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostDeleteRuns"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostDeleteRuns"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostDeleteRuns"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "shareable_link": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "204": {
            "description": "No response body"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/results-external/{id}/end_calls/": {
      "post": {
        "operationId": "end-calls",
        "description": "End all calls in result",
        "summary": "End all calls in result",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this result.",
            "required": true
          }
        ],
        "tags": [
          "Results"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "shareable_link": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "description": "No response body"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/results-external/{id}/evaluate_metrics/": {
      "post": {
        "operationId": "results-v1-external-evaluate-metrics-create",
        "description": "Results v1 evaluate metrics",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this result.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostReRunResultDetail"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostReRunResultDetail"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostReRunResultDetail"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "shareable_link": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/results-external/{id}/regenerate_ai_summary/": {
      "post": {
        "operationId": "results-v1-external-regenerate-ai-summary-create",
        "description": "Queue a background job that regenerates the structured AI summary (what_happened / why_it_happened / how_to_fix), recommended next steps, and the workflow coverage for this result, based on its current runs. The new values appear on the next `results_retrieve` call once the job finishes.",
        "summary": "Regenerate the AI summary for a result",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this result.",
            "required": true
          }
        ],
        "tags": [
          "Results"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "shareable_link": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "202": {
            "description": "Regeneration queued; poll results_retrieve to see the new ai_summary / next_steps."
          },
          "404": {
            "description": "Result not found"
          }
        }
      }
    },
    "/test_framework/v1/results-external/{id}/rerun/": {
      "post": {
        "operationId": "results-v1-external-rerun-create",
        "description": "Re-execute every scenario from a completed result against the same agent, creating a new result with a fresh set of runs. The connection mode (voice or text) and provider are inherited from the original runs. Consumes simulation credits (one run per scenario) and launches live calls, so the new result populates asynchronously.",
        "summary": "Re-run the scenarios from a completed test result",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this result.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "shareable_link": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/results-external/bulk_delete/": {
      "post": {
        "operationId": "bulk-delete-results",
        "description": "⚠ Irreversible. Soft-deletes each result (and its non-deleted runs) with the same side-effects as deleting a single result: outbound phone numbers are released when no queued runs remain, capacity-manager slots are freed, and active_sessions / pending_demand counters are decremented in aggregate. Maximum 100 result IDs per request. Results that are already deleted or that the caller cannot access are silently skipped — the response is 204 even when no results are deleted.",
        "summary": "Soft-delete multiple results",
        "tags": [
          "Results"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostBulkDeleteResults"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostBulkDeleteResults"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostBulkDeleteResults"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "shareable_link": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "204": {
            "description": "No response body"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/results-external/bulk_evaluate_metrics/": {
      "post": {
        "operationId": "bulk-evaluate-result-metrics",
        "description": "Schedules re-evaluation of the given metrics against every completed/failed, non-deleted run of every selected result. Metrics are validated against each agent's metric scope; balance is checked for the full batch up front before any work is dispatched. Each affected result's status is flipped to RUNNING. Maximum 100 result IDs per request.",
        "summary": "Re-evaluate metrics across multiple results",
        "tags": [
          "Results"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostBulkEvaluateResultMetrics"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostBulkEvaluateResultMetrics"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostBulkEvaluateResultMetrics"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "shareable_link": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "description": "No response body"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/results-external/bulk_export_progress/": {
      "get": {
        "operationId": "results-v1-external-bulk-export-progress-retrieve",
        "description": "Results v1 bulk export progress",
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "shareable_link": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/results-external/bulk_export_result_runs/": {
      "get": {
        "operationId": "results-v1-external-bulk-export-result-runs-retrieve",
        "description": "Bulk export results with progress tracking and file URL response.\nAccepts export_type in query params and applies the same filters as the queryset.",
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "shareable_link": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/results-external/export_result_runs/": {
      "get": {
        "operationId": "results-v1-external-export-result-runs-retrieve",
        "description": "Results v1 export result runs",
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "shareable_link": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/results-external/reports/": {
      "get": {
        "operationId": "results-v1-external-reports-retrieve",
        "description": "Results v1 reports",
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "shareable_link": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/results-external/reports/ask-about-failures/": {
      "post": {
        "operationId": "results-v1-external-reports-ask-about-failures-create",
        "description": "Query failed runs chatbot for combined reports",
        "summary": "Query failed runs chatbot for combined reports",
        "tags": [
          "Results"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AskAboutFailuresReportsRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/AskAboutFailuresReportsRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/AskAboutFailuresReportsRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "shareable_link": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "description": "Streaming AI-generated analysis of test failures across combined results"
          },
          "400": {
            "description": "Invalid request (missing result_ids or question)"
          },
          "404": {
            "description": "No results found"
          },
          "429": {
            "description": "Rate limit exceeded"
          }
        }
      }
    },
    "/test_framework/v1/results-external/reports/share/": {
      "post": {
        "operationId": "results-v1-external-reports-share-create",
        "description": "Results v1 reports share",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Result"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/Result"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Result"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "shareable_link": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/results-external/result_ids/": {
      "get": {
        "operationId": "results-v1-external-result-ids-retrieve",
        "description": "Results v1 result ids",
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "shareable_link": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/results/{id}/": {
      "get": {
        "operationId": "results-v1-retrieve",
        "description": "`success` indicates whether the run passed its quality evaluation. A run with `success=false` either failed to connect (check `error_message`) or failed an evaluation check (check `evaluation`). `success_rate` is the percentage of runs with `success=true`.\n\nThe `runs` field is a dict keyed by run ID string (e.g. `{\"86368\": {...}, \"86367\": {...}}`), not an array — unlike the list endpoint. Each run also has a `call_id` STRING field (the provider's call identifier) — that is a data field, NOT an endpoint ID; do not pass it where `run_id` is expected.",
        "summary": "Retrieve a test result",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this result.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "shareable_link": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultDetailV2"
                },
                "examples": {
                  "Success": {
                    "value": {
                      "id": "integer",
                      "name": "string",
                      "agent": "integer",
                      "status": "string",
                      "met_expected_outcome_count": "integer",
                      "total_expected_outcome_count": "integer",
                      "success_rate": "float",
                      "run_as_text": "boolean",
                      "is_cronjob": "boolean",
                      "runs": {
                        "run_id": {
                          "id": "integer",
                          "scenario": "integer",
                          "outbound_number": "string",
                          "expected_outcome": {
                            "score": 100,
                            "explanation": [
                              "✅ Positive outcome explanation with checkmark emoji",
                              "❌ Negative outcome explanation with X emoji"
                            ],
                            "outcome_alignments": [
                              {
                                "outcome": "string",
                                "prompt_part": "string",
                                "aligned": "boolean"
                              }
                            ]
                          },
                          "success": "boolean",
                          "evaluation": {
                            "metrics": [
                              {
                                "id": "integer",
                                "name": "string",
                                "type": "binary | continuous_qualitative | numeric | enum",
                                "score": "number",
                                "explanation": "string | array",
                                "function_name": "string (optional)",
                                "extra": {
                                  "categories": [
                                    {
                                      "category": "string",
                                      "deviation": "string (optional)",
                                      "priority": "string (optional)"
                                    }
                                  ],
                                  "percentiles": {
                                    "p50": "number"
                                  }
                                },
                                "enum": "string (for enum type metrics only)"
                              }
                            ]
                          },
                          "timestamp": "datetime",
                          "executed_at": "datetime",
                          "error_message": "string",
                          "status": "string",
                          "duration": "string (MM:SS format)",
                          "scenario_name": "string",
                          "personality_name": "string",
                          "metadata": "object",
                          "inbound_number": "string"
                        }
                      },
                      "overall_evaluation": {
                        "success_rate": "number",
                        "metric_summary": {
                          "metric_id": {
                            "id": "integer",
                            "name": "string",
                            "type": "string",
                            "score": "number",
                            "explanation": "string (optional)",
                            "function_name": "string",
                            "vocera_defined_metric_code": "string (optional)",
                            "p50": "number (for numeric metrics)"
                          }
                        },
                        "worst_performing_metrics": {
                          "binary_adherence": [
                            "array of metric_ids"
                          ]
                        },
                        "numeric_metrics": [
                          {
                            "name": "string",
                            "type": "numeric",
                            "value": "number",
                            "percentiles": {
                              "p50": "number"
                            }
                          }
                        ],
                        "enum_metrics": [
                          "array of metric_ids"
                        ],
                        "extra_metrics": [
                          {
                            "name": "string (e.g., 'Expected Outcome', 'Average Ringing Duration')",
                            "type": "string",
                            "value": "number",
                            "percentiles": {
                              "p50": "number (optional)"
                            }
                          }
                        ]
                      },
                      "total_duration": "string (MM:SS format)",
                      "total_runs_count": "integer",
                      "completed_runs_count": "integer",
                      "success_runs_count": "integer",
                      "failed_runs_count": "integer",
                      "scenarios": [
                        {
                          "id": "integer",
                          "name": "string"
                        }
                      ],
                      "critical_categories": "array",
                      "metrics": "array",
                      "domain": "string (nullable)",
                      "domain_logo": "string (nullable)",
                      "runs_by_tags": "object",
                      "latency_data": "object",
                      "failed_reasons": "array",
                      "run_settings": {
                        "override_value": 10,
                        "frequency": 2,
                        "concurrency_limit": 5,
                        "personality_ids": [
                          3,
                          7
                        ],
                        "test_profile_ids": [
                          20
                        ],
                        "mode": "same_number",
                        "livekit_data": {
                          "agent_name": "kit",
                          "config": {},
                          "url": "wss://example"
                        }
                      },
                      "created_at": "datetime",
                      "updated_at": "datetime"
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                }
              }
            },
            "description": ""
          }
        },
        "deprecated": true
      },
      "put": {
        "operationId": "results-v1-update",
        "description": "Update a test result",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this result.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ResultDetailV2"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/ResultDetailV2"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/ResultDetailV2"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "shareable_link": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultDetailV2"
                }
              }
            },
            "description": ""
          }
        }
      },
      "patch": {
        "operationId": "results-v1-partial-update",
        "description": "Update a test result",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this result.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchedResultDetailV2"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/PatchedResultDetailV2"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/PatchedResultDetailV2"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "shareable_link": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultDetailV2"
                }
              }
            },
            "description": ""
          }
        }
      },
      "delete": {
        "operationId": "results-v1-destroy",
        "description": "Delete a test result",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this result.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "shareable_link": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "204": {
            "description": "No response body"
          }
        }
      }
    },
    "/test_framework/v1/results/{id}/ask_about_failures/": {
      "post": {
        "operationId": "results-v1-ask-about-failures-create",
        "description": "Query failed runs chatbot",
        "summary": "Query failed runs chatbot",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this result.",
            "required": true
          }
        ],
        "tags": [
          "Results"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AskAboutFailuresRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/AskAboutFailuresRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/AskAboutFailuresRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "shareable_link": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "description": "Streaming AI-generated analysis of test failures"
          },
          "400": {
            "description": "Invalid request (missing or invalid question)"
          },
          "404": {
            "description": "Result not found"
          },
          "429": {
            "description": "Rate limit exceeded"
          }
        }
      }
    },
    "/test_framework/v1/results/{id}/create_shareable_link_token/": {
      "post": {
        "operationId": "create-shareable-link-token_2",
        "description": "Generate shareable link for result",
        "summary": "Generate shareable link for result",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this result.",
            "required": true
          }
        ],
        "tags": [
          "Results"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostCreateShareableLinkToken"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostCreateShareableLinkToken"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostCreateShareableLinkToken"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "shareable_link": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SchemaCreateShareableLinkTokenResponse"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/results/{id}/delete_runs/": {
      "post": {
        "operationId": "delete-runs_2",
        "description": "⚠ Irreversible. Removes the specified runs from a result, then triggers re-evaluation so aggregate metrics recompute without them. Maximum 100 run IDs per request.",
        "summary": "Delete runs from result",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this result.",
            "required": true
          }
        ],
        "tags": [
          "Results"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostDeleteRuns"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostDeleteRuns"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostDeleteRuns"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "shareable_link": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "204": {
            "description": "No response body"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/results/{id}/end_calls/": {
      "post": {
        "operationId": "end-calls_2",
        "description": "End all calls in result",
        "summary": "End all calls in result",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this result.",
            "required": true
          }
        ],
        "tags": [
          "Results"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "shareable_link": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "description": "No response body"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/results/{id}/evaluate_metrics/": {
      "post": {
        "operationId": "results-v1-evaluate-metrics-create",
        "description": "Results v1 evaluate metrics",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this result.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostReRunResultDetail"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostReRunResultDetail"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostReRunResultDetail"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "shareable_link": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/results/{id}/regenerate_ai_summary/": {
      "post": {
        "operationId": "results-v1-regenerate-ai-summary-create",
        "description": "Queue a background job that regenerates the structured AI summary (what_happened / why_it_happened / how_to_fix), recommended next steps, and the workflow coverage for this result, based on its current runs. The new values appear on the next `results_retrieve` call once the job finishes.",
        "summary": "Regenerate the AI summary for a result",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this result.",
            "required": true
          }
        ],
        "tags": [
          "Results"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "shareable_link": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "202": {
            "description": "Regeneration queued; poll results_retrieve to see the new ai_summary / next_steps."
          },
          "404": {
            "description": "Result not found"
          }
        }
      }
    },
    "/test_framework/v1/results/{id}/rerun/": {
      "post": {
        "operationId": "results-v1-rerun-create",
        "description": "Re-execute every scenario from a completed result against the same agent, creating a new result with a fresh set of runs. The connection mode (voice or text) and provider are inherited from the original runs. Consumes simulation credits (one run per scenario) and launches live calls, so the new result populates asynchronously.",
        "summary": "Re-run the scenarios from a completed test result",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this result.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "shareable_link": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/results/bulk_delete/": {
      "post": {
        "operationId": "bulk-delete-results_2",
        "description": "⚠ Irreversible. Soft-deletes each result (and its non-deleted runs) with the same side-effects as deleting a single result: outbound phone numbers are released when no queued runs remain, capacity-manager slots are freed, and active_sessions / pending_demand counters are decremented in aggregate. Maximum 100 result IDs per request. Results that are already deleted or that the caller cannot access are silently skipped — the response is 204 even when no results are deleted.",
        "summary": "Soft-delete multiple results",
        "tags": [
          "Results"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostBulkDeleteResults"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostBulkDeleteResults"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostBulkDeleteResults"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "shareable_link": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "204": {
            "description": "No response body"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/results/bulk_evaluate_metrics/": {
      "post": {
        "operationId": "bulk-evaluate-result-metrics_2",
        "description": "Schedules re-evaluation of the given metrics against every completed/failed, non-deleted run of every selected result. Metrics are validated against each agent's metric scope; balance is checked for the full batch up front before any work is dispatched. Each affected result's status is flipped to RUNNING. Maximum 100 result IDs per request.",
        "summary": "Re-evaluate metrics across multiple results",
        "tags": [
          "Results"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostBulkEvaluateResultMetrics"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostBulkEvaluateResultMetrics"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostBulkEvaluateResultMetrics"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "shareable_link": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "description": "No response body"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/results/bulk_export_progress/": {
      "get": {
        "operationId": "results-v1-bulk-export-progress-retrieve",
        "description": "Results v1 bulk export progress",
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "shareable_link": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/results/bulk_export_result_runs/": {
      "get": {
        "operationId": "results-v1-bulk-export-result-runs-retrieve",
        "description": "Bulk export results with progress tracking and file URL response.\nAccepts export_type in query params and applies the same filters as the queryset.",
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "shareable_link": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/results/export_result_runs/": {
      "get": {
        "operationId": "results-v1-export-result-runs-retrieve",
        "description": "Results v1 export result runs",
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "shareable_link": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/results/reports/": {
      "get": {
        "operationId": "results-v1-reports-retrieve",
        "description": "Results v1 reports",
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "shareable_link": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/results/reports/ask-about-failures/": {
      "post": {
        "operationId": "results-v1-reports-ask-about-failures-create",
        "description": "Query failed runs chatbot for combined reports",
        "summary": "Query failed runs chatbot for combined reports",
        "tags": [
          "Results"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AskAboutFailuresReportsRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/AskAboutFailuresReportsRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/AskAboutFailuresReportsRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "shareable_link": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "description": "Streaming AI-generated analysis of test failures across combined results"
          },
          "400": {
            "description": "Invalid request (missing result_ids or question)"
          },
          "404": {
            "description": "No results found"
          },
          "429": {
            "description": "Rate limit exceeded"
          }
        }
      }
    },
    "/test_framework/v1/results/reports/share/": {
      "post": {
        "operationId": "results-v1-reports-share-create",
        "description": "Results v1 reports share",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Result"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/Result"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Result"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "shareable_link": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/results/result_ids/": {
      "get": {
        "operationId": "results-v1-result-ids-retrieve",
        "description": "Results v1 result ids",
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "shareable_link": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/runs/": {
      "get": {
        "operationId": "runs-v1-list",
        "description": "List test runs",
        "parameters": [
          {
            "in": "query",
            "name": "id__in",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer"
              }
            },
            "description": "Multiple values may be separated by commas.",
            "explode": false,
            "style": "form"
          },
          {
            "in": "query",
            "name": "id",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "id__contains",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "timestamp__gte",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "timestamp__lte",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "result__agent_id",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "result__agent_id__in",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer"
              }
            },
            "description": "Multiple values may be separated by commas.",
            "explode": false,
            "style": "form"
          },
          {
            "in": "query",
            "name": "status__in",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Multiple values may be separated by commas.",
            "explode": false,
            "style": "form"
          },
          {
            "in": "query",
            "name": "status",
            "schema": {
              "type": "string",
              "x-spec-enum-id": "623e22fc1eb17833",
              "enum": [
                "cancelled",
                "completed",
                "evaluating",
                "failed",
                "in_progress",
                "in_queue",
                "pending",
                "running",
                "scaling_up",
                "timeout"
              ]
            },
            "description": "* `running` - Running\n* `completed` - Completed\n* `failed` - Failed\n* `pending` - Pending\n* `in_progress` - In Progress\n* `evaluating` - Evaluating\n* `in_queue` - In Queue\n* `timeout` - Timeout\n* `cancelled` - Cancelled\n* `scaling_up` - Scaling Up"
          },
          {
            "in": "query",
            "name": "success",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "duration__gte",
            "schema": {
              "type": "number",
              "format": "float"
            }
          },
          {
            "in": "query",
            "name": "duration__lte",
            "schema": {
              "type": "number",
              "format": "float"
            }
          },
          {
            "in": "query",
            "name": "call_id__icontains",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "call_id",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "provider_call_id__icontains",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "provider_call_id",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "scenario__id__in",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer"
              }
            },
            "description": "Multiple values may be separated by commas.",
            "explode": false,
            "style": "form"
          },
          {
            "in": "query",
            "name": "scenario__id",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "personality__id__in",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer"
              }
            },
            "description": "Multiple values may be separated by commas.",
            "explode": false,
            "style": "form"
          },
          {
            "in": "query",
            "name": "personality__id",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "result__id",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "result__run_as_text",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "created_at_from",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "created_at_to",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "agent_id",
            "schema": {
              "type": "integer"
            },
            "description": "Filter runs by agent ID"
          },
          {
            "in": "query",
            "name": "assistant_id",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "scenarios",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "tags",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "personalities",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "success_rate",
            "schema": {
              "type": "number"
            }
          },
          {
            "in": "query",
            "name": "search",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "call_ended_reason",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "call_ended_reason__icontains",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "call_ended_reason__in",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "created_at_range",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "duration_range",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "required": false,
            "in": "query",
            "description": "A page number within the paginated result set.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "page_size",
            "required": false,
            "in": "query",
            "description": "Number of results to return per page.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "project_id",
            "schema": {
              "type": "integer"
            },
            "description": "Filter runs by project ID"
          },
          {
            "in": "query",
            "name": "result_id",
            "schema": {
              "type": "integer"
            },
            "description": "Filter runs by result ID"
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "shareable_link": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedRunListList"
                }
              }
            },
            "description": ""
          }
        },
        "deprecated": true
      }
    },
    "/test_framework/v1/runs-external/": {
      "get": {
        "operationId": "runs-v1-external-list",
        "description": "List test runs",
        "parameters": [
          {
            "in": "query",
            "name": "id__in",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer"
              }
            },
            "description": "Multiple values may be separated by commas.",
            "explode": false,
            "style": "form"
          },
          {
            "in": "query",
            "name": "id",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "id__contains",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "timestamp__gte",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "timestamp__lte",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "result__agent_id",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "result__agent_id__in",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer"
              }
            },
            "description": "Multiple values may be separated by commas.",
            "explode": false,
            "style": "form"
          },
          {
            "in": "query",
            "name": "status__in",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Multiple values may be separated by commas.",
            "explode": false,
            "style": "form"
          },
          {
            "in": "query",
            "name": "status",
            "schema": {
              "type": "string",
              "x-spec-enum-id": "623e22fc1eb17833",
              "enum": [
                "cancelled",
                "completed",
                "evaluating",
                "failed",
                "in_progress",
                "in_queue",
                "pending",
                "running",
                "scaling_up",
                "timeout"
              ]
            },
            "description": "* `running` - Running\n* `completed` - Completed\n* `failed` - Failed\n* `pending` - Pending\n* `in_progress` - In Progress\n* `evaluating` - Evaluating\n* `in_queue` - In Queue\n* `timeout` - Timeout\n* `cancelled` - Cancelled\n* `scaling_up` - Scaling Up"
          },
          {
            "in": "query",
            "name": "success",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "duration__gte",
            "schema": {
              "type": "number",
              "format": "float"
            }
          },
          {
            "in": "query",
            "name": "duration__lte",
            "schema": {
              "type": "number",
              "format": "float"
            }
          },
          {
            "in": "query",
            "name": "call_id__icontains",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "call_id",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "provider_call_id__icontains",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "provider_call_id",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "scenario__id__in",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer"
              }
            },
            "description": "Multiple values may be separated by commas.",
            "explode": false,
            "style": "form"
          },
          {
            "in": "query",
            "name": "scenario__id",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "personality__id__in",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer"
              }
            },
            "description": "Multiple values may be separated by commas.",
            "explode": false,
            "style": "form"
          },
          {
            "in": "query",
            "name": "personality__id",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "result__id",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "result__run_as_text",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "created_at_from",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "created_at_to",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "agent_id",
            "schema": {
              "type": "integer"
            },
            "description": "Filter runs by agent ID"
          },
          {
            "in": "query",
            "name": "assistant_id",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "scenarios",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "tags",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "personalities",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "success_rate",
            "schema": {
              "type": "number"
            }
          },
          {
            "in": "query",
            "name": "search",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "call_ended_reason",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "call_ended_reason__icontains",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "call_ended_reason__in",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "created_at_range",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "duration_range",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "required": false,
            "in": "query",
            "description": "A page number within the paginated result set.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "page_size",
            "required": false,
            "in": "query",
            "description": "Number of results to return per page.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "project_id",
            "schema": {
              "type": "integer"
            },
            "description": "Filter runs by project ID"
          },
          {
            "in": "query",
            "name": "result_id",
            "schema": {
              "type": "integer"
            },
            "description": "Filter runs by result ID"
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "shareable_link": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedRunListList"
                }
              }
            },
            "description": ""
          }
        },
        "deprecated": true
      }
    },
    "/test_framework/v1/runs-external/{id}/": {
      "get": {
        "operationId": "runs-v1-external-retrieve",
        "description": "Retrieve a test run by ID",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this run.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "shareable_link": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Run"
                }
              }
            },
            "description": ""
          }
        },
        "deprecated": true
      },
      "put": {
        "operationId": "runs-v1-external-update",
        "description": "Update a test run",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this run.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Run"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/Run"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Run"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "shareable_link": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Run"
                }
              }
            },
            "description": ""
          }
        }
      },
      "patch": {
        "operationId": "runs-v1-external-partial-update",
        "description": "Update a test run",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this run.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchedRun"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/PatchedRun"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/PatchedRun"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "shareable_link": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Run"
                }
              }
            },
            "description": ""
          }
        }
      },
      "delete": {
        "operationId": "runs-v1-external-destroy",
        "description": "Delete a test run",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this run.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "shareable_link": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "204": {
            "description": "No response body"
          }
        }
      }
    },
    "/test_framework/v1/runs-external/{id}/chat/": {
      "post": {
        "operationId": "runs-api-chat",
        "description": "Submit your agent-under-test's latest message on a customer-driven (API chat) run. The simulated user's reply is generated in the background — the response returns a `turn_id` immediately; poll GET /runs/{run_id}/chat/{turn_id}/ until its `status` is `ready` to read the reply, then submit the next turn. Submitting a new turn while one is still generating interrupts it: the older turn is marked `dropped` but its message is kept, and the newest turn's reply answers all messages received since the last reply. Repeat until `ended` is true (or call end-chat).",
        "summary": "Submit a turn to an API-chat run",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this run.",
            "required": true
          }
        ],
        "tags": [
          "Runs"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiChatTurn"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/ApiChatTurn"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/ApiChatTurn"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "shareable_link": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiChatTurnSubmitResponse"
                }
              }
            },
            "description": ""
          },
          "409": {
            "description": "Run is still starting, or has already ended."
          }
        }
      }
    },
    "/test_framework/v1/runs-external/{id}/chat/{turn_id}/": {
      "get": {
        "operationId": "runs-api-chat-turn",
        "description": "Poll for the simulated user's reply to a turn submitted via POST /runs/{run_id}/chat/. `status` is `generating` until the reply is ready, then `ready` (with `message` and `ended`). `dropped` means the turn was superseded by a newer submission — its message is kept and the newer turn's reply answers both; `error` means generation failed. Turn 0 is the run's opening: `message` is the evaluator's first message, or null when your agent speaks first. Any turn stays pollable until the run's turn history expires, so the last reply is still retrievable after the run finishes.",
        "summary": "Poll a submitted API-chat turn",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this run.",
            "required": true
          },
          {
            "in": "path",
            "name": "turn_id",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "required": true
          }
        ],
        "tags": [
          "Runs"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "shareable_link": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiChatTurnPollResponse"
                }
              }
            },
            "description": ""
          },
          "404": {
            "description": "Unknown turn."
          }
        }
      }
    },
    "/test_framework/v1/runs-external/{id}/end-chat/": {
      "post": {
        "operationId": "runs-api-chat-end",
        "description": "Finish an API-chat run",
        "summary": "Finish an API-chat run",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this run.",
            "required": true
          }
        ],
        "tags": [
          "Runs"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiChatFinish"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/ApiChatFinish"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/ApiChatFinish"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "shareable_link": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiChatFinishResponse"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/runs-external/{id}/end_call/": {
      "post": {
        "operationId": "end-call",
        "description": "End a single call",
        "summary": "End a single call",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this run.",
            "required": true
          }
        ],
        "tags": [
          "Runs"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "shareable_link": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "description": "No response body"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/runs-external/{id}/get_listen_url/": {
      "get": {
        "operationId": "runs-v1-external-get-listen-url-retrieve",
        "description": "Runs v1 get listen url",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this run.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "shareable_link": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Run"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/runs-external/{id}/mark_critical_scenario_wrong/": {
      "post": {
        "operationId": "runs-v1-external-mark-critical-scenario-wrong-create",
        "description": "Runs v1 mark critical scenario wrong",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this run.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Run"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/Run"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Run"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "shareable_link": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Run"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/runs-external/{id}/mark_expected_outcome_vote/": {
      "post": {
        "operationId": "runs-v1-external-mark-expected-outcome-vote-create",
        "description": "Runs v1 mark expected outcome vote",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this run.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Run"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/Run"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Run"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "shareable_link": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Run"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/runs-external/{id}/mark_metric_vote/": {
      "post": {
        "operationId": "runs-v1-external-mark-metric-vote-create",
        "description": "Record a thumbs-up or thumbs-down vote on a specific metric evaluation for this run and optionally provide an expected value and free-text feedback. Updates the metric evaluation and marks the run as reviewed.",
        "summary": "Submit a metric vote for a run",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this run.",
            "required": true
          }
        ],
        "tags": [
          "Runs"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MarkMetricVote"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/MarkMetricVote"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/MarkMetricVote"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "shareable_link": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MarkMetricVoteRunResponse"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/runs-external/{id}/run_expected_outcome_bg/": {
      "post": {
        "operationId": "runs-v1-external-run-expected-outcome-bg-create",
        "description": "Runs v1 run expected outcome bg",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this run.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Run"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/Run"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Run"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "shareable_link": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Run"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/runs-external/{id}/unmark_critical_scenario_wrong/": {
      "post": {
        "operationId": "runs-v1-external-unmark-critical-scenario-wrong-create",
        "description": "Runs v1 unmark critical scenario wrong",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this run.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Run"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/Run"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Run"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "shareable_link": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Run"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/runs-external/bulk/": {
      "get": {
        "operationId": "runs-v1-external-bulk-retrieve",
        "description": "Retrieve multiple runs in a single request.\n\n`success: true` indicates the run passed its quality evaluation. A run with `success=false` either failed to connect (check `error_message`) or failed an evaluation check. For detailed outcomes check: `error_message`, `metadata.ended_reason`, and `evaluation.metrics[].result`.",
        "parameters": [
          {
            "in": "query",
            "name": "run_ids",
            "schema": {
              "type": "string"
            },
            "description": "\nComma-separated list of run IDs.\nExample: `1,2,3`\n\nMust be a plain comma-separated string, not a JSON array — passing a JSON array returns a 400 error.\n",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "shareable_link": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Run"
                  }
                }
              }
            },
            "description": ""
          }
        },
        "deprecated": true
      }
    },
    "/test_framework/v1/runs-external/run_expected_outcome_progress/": {
      "get": {
        "operationId": "runs-v1-external-run-expected-outcome-progress-retrieve",
        "description": "Runs v1 run expected outcome progress",
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "shareable_link": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Run"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/runs/{id}/": {
      "get": {
        "operationId": "runs-v1-retrieve",
        "description": "Retrieve a test run by ID",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this run.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "shareable_link": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Run"
                }
              }
            },
            "description": ""
          }
        },
        "deprecated": true
      },
      "put": {
        "operationId": "runs-v1-update",
        "description": "Update a test run",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this run.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Run"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/Run"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Run"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "shareable_link": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Run"
                }
              }
            },
            "description": ""
          }
        }
      },
      "patch": {
        "operationId": "runs-v1-partial-update",
        "description": "Update a test run",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this run.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchedRun"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/PatchedRun"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/PatchedRun"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "shareable_link": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Run"
                }
              }
            },
            "description": ""
          }
        }
      },
      "delete": {
        "operationId": "runs-v1-destroy",
        "description": "Delete a test run",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this run.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "shareable_link": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "204": {
            "description": "No response body"
          }
        }
      }
    },
    "/test_framework/v1/runs/{id}/chat/": {
      "post": {
        "operationId": "runs-api-chat_2",
        "description": "Submit your agent-under-test's latest message on a customer-driven (API chat) run. The simulated user's reply is generated in the background — the response returns a `turn_id` immediately; poll GET /runs/{run_id}/chat/{turn_id}/ until its `status` is `ready` to read the reply, then submit the next turn. Submitting a new turn while one is still generating interrupts it: the older turn is marked `dropped` but its message is kept, and the newest turn's reply answers all messages received since the last reply. Repeat until `ended` is true (or call end-chat).",
        "summary": "Submit a turn to an API-chat run",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this run.",
            "required": true
          }
        ],
        "tags": [
          "Runs"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiChatTurn"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/ApiChatTurn"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/ApiChatTurn"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "shareable_link": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiChatTurnSubmitResponse"
                }
              }
            },
            "description": ""
          },
          "409": {
            "description": "Run is still starting, or has already ended."
          }
        }
      }
    },
    "/test_framework/v1/runs/{id}/chat/{turn_id}/": {
      "get": {
        "operationId": "runs-api-chat-turn_2",
        "description": "Poll for the simulated user's reply to a turn submitted via POST /runs/{run_id}/chat/. `status` is `generating` until the reply is ready, then `ready` (with `message` and `ended`). `dropped` means the turn was superseded by a newer submission — its message is kept and the newer turn's reply answers both; `error` means generation failed. Turn 0 is the run's opening: `message` is the evaluator's first message, or null when your agent speaks first. Any turn stays pollable until the run's turn history expires, so the last reply is still retrievable after the run finishes.",
        "summary": "Poll a submitted API-chat turn",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this run.",
            "required": true
          },
          {
            "in": "path",
            "name": "turn_id",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "required": true
          }
        ],
        "tags": [
          "Runs"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "shareable_link": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiChatTurnPollResponse"
                }
              }
            },
            "description": ""
          },
          "404": {
            "description": "Unknown turn."
          }
        }
      }
    },
    "/test_framework/v1/runs/{id}/end-chat/": {
      "post": {
        "operationId": "runs-api-chat-end_2",
        "description": "Finish an API-chat run",
        "summary": "Finish an API-chat run",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this run.",
            "required": true
          }
        ],
        "tags": [
          "Runs"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiChatFinish"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/ApiChatFinish"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/ApiChatFinish"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "shareable_link": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiChatFinishResponse"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/runs/{id}/end_call/": {
      "post": {
        "operationId": "end-call_2",
        "description": "End a single call",
        "summary": "End a single call",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this run.",
            "required": true
          }
        ],
        "tags": [
          "Runs"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "shareable_link": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "description": "No response body"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/runs/{id}/get_listen_url/": {
      "get": {
        "operationId": "runs-v1-get-listen-url-retrieve",
        "description": "Runs v1 get listen url",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this run.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "shareable_link": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Run"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/runs/{id}/mark_critical_scenario_wrong/": {
      "post": {
        "operationId": "runs-v1-mark-critical-scenario-wrong-create",
        "description": "Runs v1 mark critical scenario wrong",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this run.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Run"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/Run"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Run"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "shareable_link": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Run"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/runs/{id}/mark_expected_outcome_vote/": {
      "post": {
        "operationId": "runs-v1-mark-expected-outcome-vote-create",
        "description": "Runs v1 mark expected outcome vote",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this run.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Run"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/Run"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Run"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "shareable_link": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Run"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/runs/{id}/mark_metric_vote/": {
      "post": {
        "operationId": "runs-v1-mark-metric-vote-create",
        "description": "Record a thumbs-up or thumbs-down vote on a specific metric evaluation for this run and optionally provide an expected value and free-text feedback. Updates the metric evaluation and marks the run as reviewed.",
        "summary": "Submit a metric vote for a run",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this run.",
            "required": true
          }
        ],
        "tags": [
          "Runs"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MarkMetricVote"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/MarkMetricVote"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/MarkMetricVote"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "shareable_link": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MarkMetricVoteRunResponse"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/runs/{id}/run_expected_outcome_bg/": {
      "post": {
        "operationId": "runs-v1-run-expected-outcome-bg-create",
        "description": "Runs v1 run expected outcome bg",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this run.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Run"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/Run"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Run"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "shareable_link": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Run"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/runs/{id}/trace/": {
      "get": {
        "operationId": "runs-trace-retrieve",
        "description": "Retrieve the raw OpenTelemetry trace associated with a simulation run.\n\nBefore calling this tool, retrieve the run with `runs_bulk_retrieve` and confirm that its `trace_id` is non-empty; an empty `trace_id` means no trace is available. Pass the run's integer `id`, not its provider call identifier or its `trace_id`.",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RunTraceResponse"
                }
              }
            },
            "description": ""
          },
          "404": {
            "description": "The run does not exist, has no trace ID, or its trace was not found."
          }
        },
        "x-mcp-expose": true,
        "summary": "Get a run's trace",
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "runs-trace-retrieve",
            "description": "Retrieve the raw OpenTelemetry trace associated with a simulation run.\n\nBefore calling this tool, retrieve the run with `runs_bulk_retrieve` and confirm that its `trace_id` is non-empty; an empty `trace_id` means no trace is available. Pass the run's integer `id`, not its provider call identifier or its `trace_id`."
          }
        }
      }
    },
    "/test_framework/v1/runs/{id}/unmark_critical_scenario_wrong/": {
      "post": {
        "operationId": "runs-v1-unmark-critical-scenario-wrong-create",
        "description": "Runs v1 unmark critical scenario wrong",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this run.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Run"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/Run"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Run"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "shareable_link": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Run"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/runs/bulk/": {
      "get": {
        "operationId": "runs-v1-bulk-retrieve",
        "description": "Retrieve multiple runs in a single request.\n\n`success: true` indicates the run passed its quality evaluation. A run with `success=false` either failed to connect (check `error_message`) or failed an evaluation check. For detailed outcomes check: `error_message`, `metadata.ended_reason`, and `evaluation.metrics[].result`.",
        "parameters": [
          {
            "in": "query",
            "name": "run_ids",
            "schema": {
              "type": "string"
            },
            "description": "\nComma-separated list of run IDs.\nExample: `1,2,3`\n\nMust be a plain comma-separated string, not a JSON array — passing a JSON array returns a 400 error.\n",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "shareable_link": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Run"
                  }
                }
              }
            },
            "description": ""
          }
        },
        "deprecated": true
      }
    },
    "/test_framework/v1/runs/run_expected_outcome_progress/": {
      "get": {
        "operationId": "runs-v1-run-expected-outcome-progress-retrieve",
        "description": "Runs v1 run expected outcome progress",
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "shareable_link": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Run"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/scenario-improvement-sessions/": {
      "get": {
        "operationId": "scenario-improvement-sessions-list",
        "description": "List scenario-improvement sessions for a project. Each session tracks an AI-assisted refinement run over the project's scenarios. Requires `project_id`.",
        "summary": "List scenario improvement sessions",
        "tags": [
          "Scenarios"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ScenarioImprovementSessionList"
                  }
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "scenario-improvement-sessions-list",
            "description": "List scenario-improvement sessions for a project. Each session tracks an AI-assisted refinement run over the project's scenarios. Requires `project_id`."
          }
        },
        "parameters": [
          {
            "name": "project_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Tenant scope. Supply one of `project_id` when authenticating with a user session or OAuth bearer token; omit when using an API key already scoped to the tenant."
          }
        ]
      },
      "post": {
        "operationId": "scenario-improvement-sessions-create",
        "description": "Create a scenario improvement session",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ScenarioImprovementSessionCreate"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/ScenarioImprovementSessionCreate"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/ScenarioImprovementSessionCreate"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScenarioImprovementSessionCreate"
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "summary": "Create a scenario improvement session",
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "scenario-improvement-sessions-create",
            "description": "Create a scenario improvement session"
          }
        }
      }
    },
    "/test_framework/v1/scenario-improvement-sessions/{id}/": {
      "get": {
        "operationId": "scenario-improvement-sessions-retrieve",
        "description": "Get a scenario improvement session",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this scenario improvement session.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScenarioImprovementSessionDetail"
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "summary": "Get a scenario improvement session",
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "scenario-improvement-sessions-retrieve",
            "description": "Get a scenario improvement session"
          }
        }
      },
      "put": {
        "operationId": "scenario-improvement-sessions-update",
        "description": "Update a ViewSet",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this scenario improvement session.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ScenarioImprovementSessionDetail"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/ScenarioImprovementSessionDetail"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/ScenarioImprovementSessionDetail"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScenarioImprovementSessionDetail"
                }
              }
            },
            "description": ""
          }
        }
      },
      "patch": {
        "operationId": "scenario-improvement-sessions-partial-update",
        "description": "Update a scenario improvement session",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this scenario improvement session.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchedScenarioImprovementSessionDetail"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/PatchedScenarioImprovementSessionDetail"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/PatchedScenarioImprovementSessionDetail"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScenarioImprovementSessionDetail"
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "summary": "Update a scenario improvement session",
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "scenario-improvement-sessions-partial-update",
            "description": "Update a scenario improvement session"
          }
        }
      },
      "delete": {
        "operationId": "scenario-improvement-sessions-destroy",
        "description": "Delete a ViewSet",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this scenario improvement session.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "204": {
            "description": "No response body"
          }
        }
      }
    },
    "/test_framework/v1/scenarios/": {
      "get": {
        "operationId": "scenarios-list",
        "description": "scenarios_list: List evaluators (test scenarios) that simulate callers interacting with your agent. Filter by `agent_id`, `project_id`, `tags`, `folder_path`, or other params (see Schema). Returns paginated scenarios with their instructions, type, personalities, and metrics.\n\nPerformance tip: pass the most specific filter you have. `agent_id` if a specific agent is in context, `folder_path` if you're discussing a specific folder, or `project_id` for a workspace-level view. `page_size=20` is a reasonable starting size if you want to peek at recent ones first.",
        "summary": "List evaluators (scenarios)",
        "parameters": [
          {
            "name": "page",
            "required": false,
            "in": "query",
            "description": "A page number within the paginated result set.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "page_size",
            "required": false,
            "in": "query",
            "description": "Number of results to return per page.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "agent_id",
            "schema": {
              "type": "integer"
            },
            "description": "\nFilter evaluators by agent ID\nExample: `2142`\n"
          },
          {
            "in": "query",
            "name": "project_id",
            "schema": {
              "type": "integer"
            },
            "description": "\nFilter evaluators by project ID\nExample: `1`\n"
          },
          {
            "in": "query",
            "name": "assistant_id",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "\nFilter evaluators by assistant ID\nExample: `asst_1234567890`\n"
          },
          {
            "in": "query",
            "name": "tags",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "\nComma-separated list of tags to filter evaluators by\nExample: `tag1,tag2,tag3`\n"
          },
          {
            "in": "query",
            "name": "tag_filter_type",
            "schema": {
              "enum": [
                "and",
                "or",
                "not"
              ],
              "type": "string",
              "x-spec-enum-id": "b8b9507605e7dc0e",
              "default": "or",
              "minLength": 1
            },
            "description": "\nFilter operation type for tags\n\n\n* `and` - and\n* `or` - or\n* `not` - not"
          },
          {
            "in": "query",
            "name": "folder_path",
            "schema": {
              "type": "string"
            },
            "description": "\nFilter evaluators by folder path. Use empty string to get evaluators without a folder.\nExample: `Sales.Inbound`\n"
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedScenarioListList"
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "scenarios-list",
            "description": "scenarios_list: List evaluators (test scenarios) that simulate callers interacting with your agent. Filter by `agent_id`, `project_id`, `tags`, `folder_path`, or other params (see Schema). Returns paginated scenarios with their instructions, type, personalities, and metrics.\n\nPerformance tip: pass the most specific filter you have. `agent_id` if a specific agent is in context, `folder_path` if you're discussing a specific folder, or `project_id` for a workspace-level view. `page_size=20` is a reasonable starting size if you want to peek at recent ones first."
          }
        }
      },
      "post": {
        "operationId": "scenarios-create",
        "description": "scenarios_create: Create a test scenario (evaluator) that simulates a caller interacting with your agent. Required: `name`, `instructions` or program (see modes), and an `agent` or `project` to attach to.\n\n**Two modes — pick one via `scenario_type`:**\n\n- `instruction` (default, simplest) — put plain-text caller instructions in the `instructions` field. The simulated caller uses an LLM to paraphrase your instructions during the call.\n\n- `conditional_actions` — deterministic, rule-based caller. Provide the structured `conditional_actions` object. Use either `conditional_actions` or `instructions` — not both.\n\n**Common companion fields:**\n- `personality` (required) — caller voice/personality ID. Browse via `GET /personalities/`.\n- `metrics` — list of metric IDs to evaluate after each run.\n- `tags` — for grouping and later selection via `run_scenarios?tags=[...]`.\n- `folder_path` — e.g. `\"Sales.Inbound\"` for folder organization.\n- `test_profile` — a test profile ID providing caller metadata (order_id, user_email, etc.).\n\n**To run evaluators after creating:** call `run_scenarios` (voice), `run_scenarios_text`, `run_scenarios_with_websockets`, or `run_scenarios_pipecat` with the scenario ID(s) returned here.",
        "summary": "Create an evaluator (scenario)",
        "tags": [
          "Scenarios"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostScenario"
              },
              "examples": {
                "InstructionScenario(simplest—MostCommon)": {
                  "value": {
                    "agent": 12,
                    "name": "Frustrated patient asking about billing",
                    "scenario_type": "instruction",
                    "instructions": "You are a patient who just got a surprise bill. Call the clinic, ask for the billing department, and refuse to pay until they explain each line item.",
                    "personality": 3,
                    "metrics": [
                      5,
                      8
                    ],
                    "tags": [
                      "billing",
                      "angry-caller"
                    ]
                  },
                  "summary": "Instruction scenario (simplest — most common)"
                },
                "ConditionalActions(structured,DeterministicFlow)": {
                  "value": {
                    "agent": 12,
                    "name": "Happy path booking",
                    "scenario_type": "conditional_actions",
                    "conditional_actions": {
                      "role": "You are a patient booking a dental appointment",
                      "conditions": [
                        {
                          "id": 0,
                          "condition": "FIRST_MESSAGE",
                          "action": "Hi, I'd like to book a dental cleaning.",
                          "type": "standard",
                          "fixed_message": true
                        },
                        {
                          "id": 1,
                          "condition": "The agent asks when you'd like to come in",
                          "action": "Next Tuesday afternoon works.",
                          "type": "standard",
                          "fixed_message": false
                        },
                        {
                          "id": 2,
                          "condition": "The agent confirms the appointment is booked",
                          "action": "Great, thanks! <endcall />",
                          "type": "standard",
                          "fixed_message": true
                        }
                      ]
                    },
                    "personality": 3,
                    "metrics": [
                      5
                    ],
                    "folder_path": "Booking.Happy path"
                  },
                  "summary": "Conditional actions (structured, deterministic flow)"
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostScenario"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostScenario"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SchemaScenario"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "scenarios-create",
            "description": "scenarios_create: Create a test scenario (evaluator) that simulates a caller interacting with your agent. Required: `name`, `instructions` or program (see modes), and an `agent` or `project` to attach to.\n\n**Two modes — pick one via `scenario_type`:**\n\n- `instruction` (default, simplest) — put plain-text caller instructions in the `instructions` field. The simulated caller uses an LLM to paraphrase your instructions during the call.\n\n- `conditional_actions` — deterministic, rule-based caller. Provide the structured `conditional_actions` object. Use either `conditional_actions` or `instructions` — not both.\n\n**Common companion fields:**\n- `personality` (required) — caller voice/personality ID. Browse via `GET /personalities/`.\n- `metrics` — list of metric IDs to evaluate after each run.\n- `tags` — for grouping and later selection via `run_scenarios?tags=[...]`.\n- `folder_path` — e.g. `\"Sales.Inbound\"` for folder organization.\n- `test_profile` — a test profile ID providing caller metadata (order_id, user_email, etc.).\n\n**To run evaluators after creating:** call `run_scenarios` (voice), `run_scenarios_text`, `run_scenarios_with_websockets`, or `run_scenarios_pipecat` with the scenario ID(s) returned here."
          }
        }
      }
    },
    "/test_framework/v1/scenarios-external/": {
      "get": {
        "operationId": "scenarios-external-list",
        "description": "scenarios_list: List evaluators (test scenarios) that simulate callers interacting with your agent. Filter by `agent_id`, `project_id`, `tags`, `folder_path`, or other params (see Schema). Returns paginated scenarios with their instructions, type, personalities, and metrics.\n\nPerformance tip: pass the most specific filter you have. `agent_id` if a specific agent is in context, `folder_path` if you're discussing a specific folder, or `project_id` for a workspace-level view. `page_size=20` is a reasonable starting size if you want to peek at recent ones first.",
        "summary": "List evaluators (scenarios)",
        "parameters": [
          {
            "name": "page",
            "required": false,
            "in": "query",
            "description": "A page number within the paginated result set.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "page_size",
            "required": false,
            "in": "query",
            "description": "Number of results to return per page.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "agent_id",
            "schema": {
              "type": "integer"
            },
            "description": "\nFilter evaluators by agent ID\nExample: `2142`\n"
          },
          {
            "in": "query",
            "name": "project_id",
            "schema": {
              "type": "integer"
            },
            "description": "\nFilter evaluators by project ID\nExample: `1`\n"
          },
          {
            "in": "query",
            "name": "assistant_id",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "\nFilter evaluators by assistant ID\nExample: `asst_1234567890`\n"
          },
          {
            "in": "query",
            "name": "tags",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "\nComma-separated list of tags to filter evaluators by\nExample: `tag1,tag2,tag3`\n"
          },
          {
            "in": "query",
            "name": "tag_filter_type",
            "schema": {
              "enum": [
                "and",
                "or",
                "not"
              ],
              "type": "string",
              "x-spec-enum-id": "b8b9507605e7dc0e",
              "default": "or",
              "minLength": 1
            },
            "description": "\nFilter operation type for tags\n\n\n* `and` - and\n* `or` - or\n* `not` - not"
          },
          {
            "in": "query",
            "name": "folder_path",
            "schema": {
              "type": "string"
            },
            "description": "\nFilter evaluators by folder path. Use empty string to get evaluators without a folder.\nExample: `Sales.Inbound`\n"
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedScenarioListList"
                }
              }
            },
            "description": ""
          }
        }
      },
      "post": {
        "operationId": "scenarios-external-create",
        "description": "scenarios_create: Create a test scenario (evaluator) that simulates a caller interacting with your agent. Required: `name`, `instructions` or program (see modes), and an `agent` or `project` to attach to.\n\n**Two modes — pick one via `scenario_type`:**\n\n- `instruction` (default, simplest) — put plain-text caller instructions in the `instructions` field. The simulated caller uses an LLM to paraphrase your instructions during the call.\n\n- `conditional_actions` — deterministic, rule-based caller. Provide the structured `conditional_actions` object. Use either `conditional_actions` or `instructions` — not both.\n\n**Common companion fields:**\n- `personality` (required) — caller voice/personality ID. Browse via `GET /personalities/`.\n- `metrics` — list of metric IDs to evaluate after each run.\n- `tags` — for grouping and later selection via `run_scenarios?tags=[...]`.\n- `folder_path` — e.g. `\"Sales.Inbound\"` for folder organization.\n- `test_profile` — a test profile ID providing caller metadata (order_id, user_email, etc.).\n\n**To run evaluators after creating:** call `run_scenarios` (voice), `run_scenarios_text`, `run_scenarios_with_websockets`, or `run_scenarios_pipecat` with the scenario ID(s) returned here.",
        "summary": "Create an evaluator (scenario)",
        "tags": [
          "Scenarios"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostScenario"
              },
              "examples": {
                "InstructionScenario(simplest—MostCommon)": {
                  "value": {
                    "agent": 12,
                    "name": "Frustrated patient asking about billing",
                    "scenario_type": "instruction",
                    "instructions": "You are a patient who just got a surprise bill. Call the clinic, ask for the billing department, and refuse to pay until they explain each line item.",
                    "personality": 3,
                    "metrics": [
                      5,
                      8
                    ],
                    "tags": [
                      "billing",
                      "angry-caller"
                    ]
                  },
                  "summary": "Instruction scenario (simplest — most common)"
                },
                "ConditionalActions(structured,DeterministicFlow)": {
                  "value": {
                    "agent": 12,
                    "name": "Happy path booking",
                    "scenario_type": "conditional_actions",
                    "conditional_actions": {
                      "role": "You are a patient booking a dental appointment",
                      "conditions": [
                        {
                          "id": 0,
                          "condition": "FIRST_MESSAGE",
                          "action": "Hi, I'd like to book a dental cleaning.",
                          "type": "standard",
                          "fixed_message": true
                        },
                        {
                          "id": 1,
                          "condition": "The agent asks when you'd like to come in",
                          "action": "Next Tuesday afternoon works.",
                          "type": "standard",
                          "fixed_message": false
                        },
                        {
                          "id": 2,
                          "condition": "The agent confirms the appointment is booked",
                          "action": "Great, thanks! <endcall />",
                          "type": "standard",
                          "fixed_message": true
                        }
                      ]
                    },
                    "personality": 3,
                    "metrics": [
                      5
                    ],
                    "folder_path": "Booking.Happy path"
                  },
                  "summary": "Conditional actions (structured, deterministic flow)"
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostScenario"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostScenario"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SchemaScenario"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/scenarios-external/{id}/": {
      "get": {
        "operationId": "scenarios-external-retrieve",
        "description": "Fetch a single evaluator by id. Returns full configuration including instructions, expected outcome, metrics, test profile, and — when the agent has mock tools attached and the scenario was auto-generated — the expected mock tool calls (`generated_mock_tool_entries`) with their inputs and outputs.",
        "summary": "Retrieve an evaluator (scenario)",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this scenario.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SchemaScenario"
                }
              }
            },
            "description": ""
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      },
      "put": {
        "operationId": "scenarios-external-update",
        "description": "Update a test scenario",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this scenario.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Scenario"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/Scenario"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Scenario"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Scenario"
                }
              }
            },
            "description": ""
          }
        }
      },
      "patch": {
        "operationId": "scenarios-external-partial-update",
        "description": "Partially update an evaluator. Same field shape as create — see `scenarios_create` for details.\n\n**Tip:** to add or modify a single condition inside a `conditional_actions` scenario, fetch the scenario with GET, mutate its `conditional_actions` object, and PATCH the full object back. The server replaces all conditions atomically.",
        "summary": "Update an evaluator (scenario)",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this scenario.",
            "required": true
          }
        ],
        "tags": [
          "Scenarios"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchedSchemaPostScenario"
              },
              "examples": {
                "Rename+TweakInstructions": {
                  "value": {
                    "name": "Refund flow v2",
                    "instructions": "Ask for the order ID before refunding."
                  },
                  "summary": "Rename + tweak instructions"
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/PatchedSchemaPostScenario"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/PatchedSchemaPostScenario"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SchemaScenario"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      },
      "delete": {
        "operationId": "scenarios-external-destroy",
        "description": "⚠ Irreversible. Deletes the evaluator. Past runs remain in the result history but become orphaned in the UI.",
        "summary": "Delete an evaluator",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this scenario.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "204": {
            "description": "No response body"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/scenarios-external/{id}/condition-audio/": {
      "get": {
        "operationId": "scenarios-external-condition-audio-list",
        "description": "Scenarios condition audio",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this scenario.",
            "required": true
          },
          {
            "name": "page",
            "required": false,
            "in": "query",
            "description": "A page number within the paginated result set.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "page_size",
            "required": false,
            "in": "query",
            "description": "Number of results to return per page.",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedConditionAudioEntryList"
                }
              }
            },
            "description": ""
          }
        }
      },
      "post": {
        "operationId": "scenarios-external-condition-audio-create",
        "description": "Attach an audio clip to a fixed-message conditional action. The clip is transcoded to 24kHz mono PCM WAV, stored in S3, and transcribed asynchronously. Pass action_template with one `<audio />` marker to insert the managed tag inline; omit it for legacy whole-action replacement. Shares the condition-audio URL with the list endpoint (GET lists, POST uploads).",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this scenario.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "condition_id": {
                    "type": "integer"
                  },
                  "file": {
                    "type": "string",
                    "format": "binary"
                  },
                  "action_template": {
                    "type": "string"
                  },
                  "replace_audio_id": {
                    "type": "string"
                  }
                },
                "required": [
                  "condition_id",
                  "file"
                ]
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConditionAudioEntry"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/scenarios-external/{id}/condition-audio/{audio_id}/": {
      "delete": {
        "operationId": "scenarios-external-condition-audio-destroy",
        "description": "Delete a Detach and delete an audio clip from this scenario's conditional action",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this scenario.",
            "required": true
          },
          {
            "in": "path",
            "name": "audio_id",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "deleted": {
                      "type": "boolean"
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/scenarios-external/{id}/edit/": {
      "post": {
        "operationId": "scenarios-external-edit-create",
        "description": "Scenarios edit",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this scenario.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Scenario"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/Scenario"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Scenario"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Scenario"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/scenarios-external/{id}/history/": {
      "get": {
        "operationId": "scenarios-external-history-list",
        "description": "Scenarios history",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this scenario.",
            "required": true
          },
          {
            "in": "query",
            "name": "page",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "page_size",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedScenarioHistoryList"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/scenarios-external/{id}/history/edit/": {
      "patch": {
        "operationId": "scenarios-external-history-edit-partial-update",
        "description": "Scenarios history edit",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this scenario.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchedScenarioEditHistoryRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/PatchedScenarioEditHistoryRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/PatchedScenarioEditHistoryRequest"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScenarioHistory"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/scenarios-external/{id}/restore/": {
      "post": {
        "operationId": "scenarios-external-restore-create",
        "description": "Scenarios restore",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this scenario.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ScenarioRestoreRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/ScenarioRestoreRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/ScenarioRestoreRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScenarioSerializerV2"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/scenarios-external/{id}/transcript_embeddings/": {
      "get": {
        "operationId": "scenarios-external-transcript-embeddings-retrieve",
        "description": "Fetches the pre-calculated transcript embeddings for a specific scenario.\nCalled by Pipecat service.\nIncludes audio sample metadata if available.\nApplies test_profile variable substitution to transcript messages.",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this scenario.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "pipecat_agent_token": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Scenario"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/scenarios-external/{id}/update_conditional_actions/": {
      "post": {
        "operationId": "scenarios-external-update-conditional-actions-create",
        "description": "DEPRECATED: Use PATCH /v1/scenarios/{id}/ with conditional_actions field instead.\n\nThis endpoint is deprecated and will be removed in a future version.\nPlease use the standard scenario update endpoint (PATCH /v1/scenarios/{id}/)\nwith the 'conditional_actions' field in the request body.\n\nExample:\nPATCH /v1/scenarios/{id}/\n{\n    \"conditional_actions\": {\n        \"role\": \"optional role description\",\n        \"conditions\": [...]\n    }\n}\n\n---\n\nUpdate a scenario with conditional actions data.\nTakes conditional actions in JSON format and saves it to the scenario's instructions field.\n\nURL parameter:\n    - pk: ID of the scenario to update (from URL)\n\nRequest body:\n    - conditional_actions: Object with format:\n        {\n            \"role\": \"optional role description\",\n            \"conditions\": [\n                {\n                    \"condition\": \"when text\",\n                    \"action\": \"action text\",\n                    \"type\": \"standard\" or \"fixed_message\" (optional, defaults to \"standard\")\n                },\n                ...\n            ]\n        }\n\nReturns:\n    - Success message\n\nUpdates:\n    - instructions: JSON string of conditional actions data",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this scenario.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Scenario"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/Scenario"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Scenario"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Scenario"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/scenarios-external/{id}/update_scenario_with_transcript/": {
      "post": {
        "operationId": "scenarios-external-update-scenario-with-transcript-create",
        "description": "Update a scenario with transcript-based simulation data.\nTakes a transcript in JSON format and processes it for simulation testing,\nsaving the processed data to the specified scenario including embeddings and\nformatted simulation description.\n\nURL parameter:\n    - pk: ID of the scenario to update (from URL)\n\nRequest body:\n    - transcript_json: List of transcript message objects with format:\n        [\n            {\"role\": \"Main Agent\", \"content\": \"Hello\"},\n            {\"role\": \"Testing Agent\", \"content\": \"Hi\"},\n            ...\n        ]\n\nReturns:\n    - Scenario data with updated transcript simulation data\n\nUpdates:\n    - transcript_embeddings: Embeddings for Main Agent responses\n    - simulation_description: Formatted transcript description",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this scenario.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Scenario"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/Scenario"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Scenario"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Scenario"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/scenarios-external/add_infrastructure_suite/": {
      "post": {
        "operationId": "scenarios-external-add-infrastructure-suite-create",
        "description": "Scenarios add infrastructure suite",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Scenario"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/Scenario"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Scenario"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Scenario"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/scenarios-external/add_tags/": {
      "post": {
        "operationId": "scenarios-external-add-tags-create",
        "description": "Scenarios add tags",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Scenario"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/Scenario"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Scenario"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Scenario"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/scenarios-external/adv_update/": {
      "post": {
        "operationId": "scenarios-bulk-update",
        "description": "Update many evaluators in a single call. Useful for attaching/detaching metrics, switching personality, appending instructions, or moving a batch between folders.\n\n**Non-idempotent fields:** `append_instruction` concatenates — calling twice with the same string adds it twice. `metric_ids_to_add`/`metric_ids_to_remove` and `tool_ids_to_add`/`tool_ids_to_remove` are set-mutating and shouldn't be replayed blindly.\n\n**Affects every ID in `scenarios`.** For modifying a single evaluator, prefer `scenarios_partial_update`. Confirm the `scenarios` list with the user before calling — the change is applied across the whole list in one transaction.\n\n**Required:** `scenarios` (list of evaluator IDs). One of `agent` or `project` is also required to scope the permission check. All other fields are optional and are applied only when present.",
        "summary": "Bulk update evaluators",
        "tags": [
          "Evaluators"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ScenariosBulkUpdateRequest"
              },
              "examples": {
                "AttachTwoMetricsToABatchOfScenarios": {
                  "value": {
                    "agent": 12,
                    "scenarios": [
                      101,
                      102,
                      103
                    ],
                    "metric_ids_to_add": [
                      501,
                      502
                    ]
                  },
                  "summary": "Attach two metrics to a batch of scenarios"
                },
                "MoveScenariosIntoAFolderAndSwitchPersonality": {
                  "value": {
                    "agent": 12,
                    "scenarios": [
                      101,
                      102
                    ],
                    "folder_path": "Sales.Inbound",
                    "personality": 7
                  },
                  "summary": "Move scenarios into a folder and switch personality"
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/ScenariosBulkUpdateRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/ScenariosBulkUpdateRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScenarioList"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/scenarios-external/cancel-agent/": {
      "post": {
        "operationId": "scenarios-external-cancel-agent-create",
        "description": "Scenarios cancel agent",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "type": {
              "schema": {
                "type": "object",
                "additionalProperties": {},
                "description": "Unspecified request body"
              }
            },
            "properties": {
              "schema": {
                "session_id": {
                  "type": "integer"
                }
              }
            },
            "required": {
              "schema": {
                "type": "object",
                "additionalProperties": {},
                "description": "Unspecified request body"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "session_id": {
                      "type": "integer"
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/scenarios-external/create-from-transcript-bg/": {
      "post": {
        "operationId": "scenarios-create-from-transcript-bg",
        "description": "Create a new evaluator from a call transcript. Analyzes the transcript to extract caller behavior, expected outcomes, and conversation flow.\n\n**`transcript_json` format:** array of message objects. Each object requires:\n- `role` — must be one of: `\"Main Agent\"`, `\"Testing Agent\"`, `\"Function Call\"`, `\"Function Call Result\"`\n- `content` — the message text\n- `start_time` (optional) — seconds from call start as a float\n\nNote: this endpoint accepts only the above role names. The role names used in the observability transcript ingestion API (\"agent\", \"user\", etc.) are not valid here.\n\nExample `transcript_json`:\n```json\n[\n  {\"role\": \"Main Agent\", \"content\": \"Hello, how can I help?\", \"start_time\": 0.0},\n  {\"role\": \"Testing Agent\", \"content\": \"I need to reschedule.\", \"start_time\": 2.1},\n  {\"role\": \"Main Agent\", \"content\": \"Sure, what date works?\", \"start_time\": 3.5}\n]\n```\n\n**Agent lookup:** the `agent` field looks up agents scoped to the project associated with your API key. If the agent belongs to a different project, use `assistant_id` instead, Returns a `progress_id`immediately; poll GET /scenarios/create-from-transcript-progress/?progress_id={id} until",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostSimulateScenario"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostSimulateScenario"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostSimulateScenario"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "progress_id": {
                      "type": "string"
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/scenarios-external/create-from-transcript-progress/": {
      "get": {
        "operationId": "scenarios-create-from-transcript-progress",
        "description": "Scenarios create from transcript progress",
        "parameters": [
          {
            "in": "query",
            "name": "progress_id",
            "schema": {
              "type": "string"
            },
            "description": "UUID progress identifier returned from create-from-transcript-bg endpoint",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "agent_id": {
                      "type": "integer"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "in_progress",
                        "completed",
                        "failed"
                      ]
                    },
                    "scenario_id": {
                      "type": "integer",
                      "nullable": true
                    },
                    "error": {
                      "type": "string",
                      "nullable": true
                    },
                    "scenario": {
                      "type": "object",
                      "nullable": true
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/scenarios-external/create_folder/": {
      "post": {
        "operationId": "scenarios-folder-create",
        "description": "Scenarios folder",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ScenarioFolderCreate"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/ScenarioFolderCreate"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/ScenarioFolderCreate"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScenarioFolder"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/scenarios-external/delete_folder/": {
      "post": {
        "operationId": "scenarios-folder-delete",
        "description": "Scenarios folder delete",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeleteFolderRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/DeleteFolderRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/DeleteFolderRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "204": {
            "description": "No response body"
          }
        }
      }
    },
    "/test_framework/v1/scenarios-external/delete_scenarios/": {
      "post": {
        "operationId": "scenarios-bulk-delete",
        "description": "⚠ Cannot be undone from the UI. Bulk-deletes the listed evaluators — they disappear from `scenarios_list` and from any future evaluator runs.\n\n**Always confirm the exact list of `scenarios` IDs with the user before calling.** For deleting a single evaluator prefer `scenarios_destroy`.\n\n**Required:** `scenarios` (list of evaluator IDs). One of `agent_id` or `project_id` is also required to scope the permission check.",
        "summary": "Bulk delete evaluators",
        "tags": [
          "Evaluators"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ScenariosBulkDeleteRequest"
              },
              "examples": {
                "BulkDeleteByAgent": {
                  "value": {
                    "agent_id": 12,
                    "scenarios": [
                      101,
                      102,
                      103
                    ]
                  },
                  "summary": "Bulk delete by agent"
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/ScenariosBulkDeleteRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/ScenariosBulkDeleteRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "204": {
            "description": "No response body"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/scenarios-external/discard-changes/": {
      "post": {
        "operationId": "scenarios-external-discard-changes-create",
        "description": "Mark the last preview message in a session as discarded. Called when the user clicks Discard on proposed changes so that the next LLM call receives the correct [STATUS: DISCARDED BY USER] annotation in its conversation context.",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "type": {
              "schema": {
                "type": "object",
                "additionalProperties": {},
                "description": "Unspecified request body"
              }
            },
            "properties": {
              "schema": {
                "session_id": {
                  "type": "integer"
                }
              }
            },
            "required": {
              "schema": {
                "type": "object",
                "additionalProperties": {},
                "description": "Unspecified request body"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "session_id": {
                      "type": "integer"
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/scenarios-external/duplicate/": {
      "post": {
        "operationId": "scenarios-external-duplicate-create",
        "description": "Create copies of existing evaluators in this project or another project in the same organization. Use this instead of recreating evaluators with `scenarios_create`; same-project copies retain their metrics and test profiles, while cross-project copies use the destination project's predefined metrics. Set `copy_to_project` to the source project for a folder-only copy; `folder_path` is created when needed, and copied evaluators are named `Copy of <original name>`.",
        "summary": "Duplicate evaluators into a folder",
        "parameters": [
          {
            "name": "page",
            "required": false,
            "in": "query",
            "description": "A page number within the paginated result set.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "page_size",
            "required": false,
            "in": "query",
            "description": "Number of results to return per page.",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "tags": [
          "Scenarios"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DuplicateScenariosRequest"
              },
              "examples": {
                "CopyEvaluatorsToANewFolder": {
                  "value": {
                    "project": 123,
                    "copy_to_project": 123,
                    "scenario_agent": 456,
                    "scenarios": [
                      101,
                      102
                    ],
                    "folder_path": "SMS agent - Papi Cleaning"
                  },
                  "summary": "Copy evaluators to a new folder"
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/DuplicateScenariosRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/DuplicateScenariosRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedScenarioList"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/scenarios-external/export_scenarios/": {
      "get": {
        "operationId": "export-scenarios",
        "description": "Export scenarios to CSV/Excel",
        "summary": "Export scenarios to CSV/Excel",
        "parameters": [
          {
            "in": "query",
            "name": "scenario_ids",
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated list of scenario IDs to export. Example: '1,2,3'",
            "required": true
          },
          {
            "in": "query",
            "name": "agent_id",
            "schema": {
              "type": "integer"
            },
            "description": "Filter scenarios by agent ID (either agent_id or project_id is required)"
          },
          {
            "in": "query",
            "name": "project_id",
            "schema": {
              "type": "integer"
            },
            "description": "Filter scenarios by project ID (either agent_id or project_id is required)"
          },
          {
            "in": "query",
            "name": "export_type",
            "schema": {
              "type": "string",
              "enum": [
                "csv",
                "xlsx"
              ]
            },
            "description": "Export format: 'csv' or 'xlsx'. Default: 'csv'"
          }
        ],
        "tags": [
          "Scenarios"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/scenarios-external/folders/": {
      "get": {
        "operationId": "scenarios-external-folders-list",
        "description": "List scenario folders for a project",
        "parameters": [
          {
            "name": "page",
            "required": false,
            "in": "query",
            "description": "A page number within the paginated result set.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "page_size",
            "required": false,
            "in": "query",
            "description": "Number of results to return per page.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "project_id",
            "schema": {
              "type": "integer"
            },
            "description": "Project ID to list folders for",
            "required": true
          },
          {
            "in": "query",
            "name": "parent_path",
            "schema": {
              "type": "string"
            },
            "description": "Parent folder path to get direct children only. Example: \"Sales.Inbound\""
          },
          {
            "in": "query",
            "name": "search",
            "schema": {
              "type": "string"
            },
            "description": "Search folders by name (case-insensitive)"
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedScenarioFolderList"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/scenarios-external/generate-bg/": {
      "post": {
        "operationId": "scenarios-generate-bg",
        "description": "Generate scenarios for a given agent in the background. Returns a `progress_id` immediately; poll GET /scenarios/generate-progress/?progress_id={id} until `total_scenarios == completed_scenarios`.\n\n**What happens automatically on generation:**\n- A scenario-specific test profile is created and its `information` is populated using the sectioned shape: `main_agent_variables` (dynamic-variable values that reach the agent under test at call time — e.g. `user_id`, `account_id`) and `testing_agent_variables` (persona/context used by the simulated caller — e.g. `customer_name`, `date_of_birth`). Section values are kept consistent with any generated mock-tool data.\n- When the agent has mock tools attached, each generated scenario also gets `generated_mock_tool_entries` — the expected mock tool calls for that scenario, shaped `[{tool_id, tool_name, new_entry: {input, output}}]`. These are returned on scenario reads and can be edited later via `scenarios_partial_update`.\n- 10 project-level evaluation metrics are attached to every generated scenario automatically (e.g. Latency, Pitch, Interruption Score). Scenarios created manually via `scenarios_create` start with no metrics attached.\n\n**Response fields:** `progress_id` (UUID string) for polling; `session_id` is always null.",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SchemaGenerateScenarios"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/SchemaGenerateScenarios"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/SchemaGenerateScenarios"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "progress_id": {
                      "type": "string"
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/scenarios-external/generate-clarify-answer/": {
      "post": {
        "operationId": "scenarios-generate-clarify-answer",
        "description": "When GET /scenarios/generate-progress/ returns status='pending_clarification', the agentic generation agent has asked one or more clarifying questions. Submit the user's answer here to resume generation. Continue polling /scenarios/generate-progress/ after calling this endpoint.",
        "summary": "Answer a clarification question during agentic scenario generation",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GenerateClarifyAnswer"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/GenerateClarifyAnswer"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/GenerateClarifyAnswer"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "progress_id": {
                      "type": "string"
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/scenarios-external/generate-instructions/": {
      "post": {
        "operationId": "scenarios-external-generate-instructions-create",
        "description": "Scenarios generate instructions",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Scenario"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/Scenario"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Scenario"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Scenario"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/scenarios-external/generate-progress/": {
      "get": {
        "operationId": "scenarios-generate-progress",
        "description": "Scenarios generate progress",
        "parameters": [
          {
            "in": "query",
            "name": "progress_id",
            "schema": {
              "type": "string"
            },
            "description": "UUID progress identifier returned from generate-bg endpoint",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "total_scenarios": {
                      "type": "integer",
                      "description": "Total number of scenarios"
                    },
                    "completed_scenarios": {
                      "type": "integer",
                      "description": "Number of completed scenarios"
                    },
                    "failed_scenarios": {
                      "type": "integer",
                      "description": "Number of failed scenarios"
                    },
                    "scenarios_list": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "description": "Unique identifier for the scenario"
                          },
                          "name": {
                            "type": "string",
                            "description": "Name of the scenario"
                          },
                          "agent": {
                            "type": "integer",
                            "description": "ID of the AI agent this scenario belongs to"
                          },
                          "assistant_id": {
                            "type": "string",
                            "description": "Alternative to agent ID - the assistant ID to use for this scenario"
                          },
                          "personality": {
                            "type": "integer",
                            "description": "ID of the personality used in this scenario"
                          },
                          "personality_name": {
                            "type": "string",
                            "description": "Name of the personality used in this scenario"
                          },
                          "tags": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "Tags associated with this scenario."
                          },
                          "runs": {
                            "type": "array",
                            "items": {
                              "type": "integer"
                            },
                            "description": "List of IDs for the last run of this scenario"
                          },
                          "metrics": {
                            "type": "array",
                            "items": {
                              "type": "integer"
                            },
                            "description": "List of metric IDs to associate with this scenario"
                          },
                          "metric_names": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "List of metric names associated with this scenario"
                          },
                          "phone_number": {
                            "type": "string",
                            "description": "Phone number used for outbound calls in this scenario"
                          },
                          "phone_number_queue_length": {
                            "type": "integer",
                            "description": "Number of runs in queue for this phone number"
                          },
                          "first_message": {
                            "type": "string",
                            "description": "First message to be sent in the scenario"
                          },
                          "inbound_phone_number": {
                            "type": "integer",
                            "description": "ID of the phone number used for inbound calls"
                          },
                          "inbound_phone_number_data": {
                            "type": "object",
                            "description": "Details of the phone number used for inbound calls",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "description": "ID of the inbound phone number"
                              },
                              "number": {
                                "type": "string",
                                "description": "The actual phone number"
                              },
                              "phone_number_id": {
                                "type": "string",
                                "description": "External ID of the phone number"
                              }
                            }
                          },
                          "instructions": {
                            "type": "string",
                            "description": "Instructions for the AI agent in this scenario"
                          },
                          "simulation_description": {
                            "type": "string",
                            "description": "Description of the simulation if this scenario was created by simulation"
                          },
                          "information_fields": {
                            "type": "object",
                            "description": "Additional information fields for the scenario"
                          },
                          "expected_outcome_prompt": {
                            "type": "string",
                            "description": "Expected outcome prompt for the scenario"
                          },
                          "scenario_language": {
                            "type": "string",
                            "description": "Language of the scenario"
                          },
                          "is_simulating": {
                            "type": "boolean",
                            "description": "Whether this scenario was created by simulation"
                          },
                          "test_profile_data": {
                            "type": "object",
                            "description": "The test profile generated for this scenario, including its sectioned `information` (main_agent_variables / testing_agent_variables)"
                          },
                          "generated_mock_tool_entries": {
                            "type": "array",
                            "description": "Expected mock tool calls generated for this scenario when the agent has mock tools attached. Empty when the agent has no mock tools.",
                            "items": {
                              "type": "object",
                              "properties": {
                                "tool_id": {
                                  "type": "integer",
                                  "description": "ID of the mock tool on the agent"
                                },
                                "tool_name": {
                                  "type": "string",
                                  "description": "Name of the tool being mocked"
                                },
                                "new_entry": {
                                  "type": "object",
                                  "description": "The expected tool call for this scenario",
                                  "properties": {
                                    "input": {
                                      "type": "object",
                                      "description": "Input parameters the tool call is expected to receive"
                                    },
                                    "output": {
                                      "type": "object",
                                      "description": "Response the mock tool will return"
                                    }
                                  }
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/scenarios-external/has_infrastructure_suite/": {
      "get": {
        "operationId": "scenarios-external-has-infrastructure-suite-retrieve",
        "description": "Scenarios has infrastructure suite",
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Scenario"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/scenarios-external/improve_instructions/": {
      "post": {
        "operationId": "scenarios-external-improve-instructions-create",
        "description": "Scenarios improve instructions",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ScenarioInstructionsRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/ScenarioInstructionsRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/ScenarioInstructionsRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ImproveInstructionsResponse"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/scenarios-external/infrastructure_suite_preview/": {
      "get": {
        "operationId": "scenarios-external-infrastructure-suite-preview-retrieve",
        "description": "Scenarios infrastructure suite preview",
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Scenario"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/scenarios-external/instructions-progress/": {
      "get": {
        "operationId": "scenarios-external-instructions-progress-retrieve",
        "description": "Scenarios instructions progress",
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Scenario"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/scenarios-external/json_schema/": {
      "get": {
        "operationId": "scenarios-json-schema",
        "description": "Fetch the JSON Schema for test-suite spec files",
        "summary": "Fetch the JSON Schema for test-suite spec files",
        "parameters": [
          {
            "in": "query",
            "name": "version",
            "schema": {
              "type": "string"
            },
            "description": "Spec version to fetch. Defaults to the current version."
          }
        ],
        "tags": [
          "Evaluators"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Scenario"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/scenarios-external/move_folder/": {
      "post": {
        "operationId": "scenarios-folder-move",
        "description": "Scenarios folder move",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MoveFolderRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/MoveFolderRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/MoveFolderRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScenarioFolder"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/scenarios-external/rename_folder/": {
      "post": {
        "operationId": "scenarios-folder-rename",
        "description": "Scenarios folder rename",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RenameFolderRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/RenameFolderRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/RenameFolderRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScenarioFolder"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/scenarios-external/run_scenarios/": {
      "post": {
        "operationId": "scenarios-run-voice",
        "description": "VOICE RUN: Execute evaluators against your agent using a real voice / phone / SIP call. This is the primary 'run your evaluators' endpoint for voice-mode testing. Requires `telephony.phone_number` configured on the agent (any provider).\n\n**Run-count math:** total calls = `len(scenarios) × frequency × max(1, len(personality_ids)) × max(1, len(test_profile_ids))`. Each call is billed at the voice-simulation rate — check `frequency` carefully.\n\n**Concurrency:** use `concurrency_limit` to cap parallel calls. Default: unbounded (subject to provider rate limits).\n\n**Scenario selection (pick one):**\n- `scenarios` — list of integer evaluator IDs (e.g. `[101, 102]`)\n- `tags` — select by tag\n- `folder_path` — select by folder path (e.g. `\"Sales.Inbound\"`); requires `project_id`\n\n**Phone-number overrides:**\n- `outbound_phone_number` — override the number dialed\n- `agent_number` — override the contact number the inbound agent receives calls on\n- `mode` — `same_number` (all runs use one pair) vs `different_numbers`\n\n**When to use this vs others** (pick the endpoint matching the agent's configured connection — check `aiagents_retrieve`):\n- `run_scenarios_text` — text / SMS / chat mode; cheaper, no voice cost\n- `run_scenarios_with_websockets` — each scenario carries its own websocket URL\n- `run_scenarios_pipecat` — Pipecat/Daily.co WebRTC deployment\n\n**Personality override:** `personality_ids` must be IDs that are already enabled for the agent's project. Check which are enabled via `aiagents_retrieve` → `enabled_personalities` field. To enable a new personality, call `aiagents_partial_update` with the updated `enabled_personalities` list before using it here. Note: enabling a personality applies project-wide, not just to one agent. Passing an ID that is not enabled returns `[\"Invalid personalities provided.\"]`.\n\n**Scheduled runs:** to run on a recurring cron schedule, create a CronJob via `POST /test_framework/v1/cron_jobs/` with `execution_mode=\"voice\"` instead of looping this endpoint.\n\n**Polling for completion:** the response contains a `result.id` with `status: 'running'`. Poll `GET /test_framework/v1/results/{result_id}/` until `status` is 'completed' or 'failed'. There is no separate progress endpoint for runs. Check `failed_reasons` for infrastructure errors; check `runs[run_id].error_message` for per-run errors.\n\n**Outbound dial window:** for outbound runs (agent `inbound=false`), your agent must dial the run's `outbound_number` before `outbound_dial_window_closes_at` (default 300s after the run reaches `waiting_for_call` / pending state). Dials received after that deadline are dropped and the run returns `status: timeout`.",
        "summary": "Run evaluators over a voice call",
        "tags": [
          "Evaluators"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostRunScenarios"
              },
              "examples": {
                "RunSelectedScenarios(simplest)": {
                  "value": {
                    "agent_id": 12,
                    "scenarios": [
                      101,
                      102,
                      103
                    ],
                    "frequency": 1
                  },
                  "summary": "Run selected scenarios (simplest)"
                },
                "RunAnEntireFolder,3×Each,5InParallel": {
                  "value": {
                    "agent_id": 12,
                    "folder_path": "Sales.Inbound",
                    "project_id": 1376,
                    "frequency": 3,
                    "concurrency_limit": 5,
                    "name": "Nightly Sales.Inbound regression"
                  },
                  "summary": "Run an entire folder, 3× each, 5 in parallel"
                },
                "OverridePersonalities+TestProfiles(multipliesRunCount)": {
                  "value": {
                    "agent_id": 12,
                    "scenarios": [
                      101
                    ],
                    "frequency": 2,
                    "personality_ids": [
                      3,
                      7
                    ],
                    "test_profile_ids": [
                      20,
                      21
                    ]
                  },
                  "summary": "Override personalities + test profiles (multiplies run count)"
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostRunScenarios"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostRunScenarios"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "ID of the result"
                    },
                    "agent": {
                      "type": "integer",
                      "description": "ID of the agent"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "running",
                        "completed",
                        "failed"
                      ],
                      "description": "Status of the result"
                    },
                    "run_as_text": {
                      "type": "boolean",
                      "description": "Whether the scenario ran as text or not",
                      "example": false
                    },
                    "runs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "description": "ID of the run"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "pending",
                              "running",
                              "completed",
                              "failed"
                            ],
                            "description": "Status of the run"
                          },
                          "scenario": {
                            "type": "integer",
                            "description": "ID of the scenario"
                          },
                          "number": {
                            "type": "string",
                            "description": "For outbound runs (agent.inbound=False). The given number that must be called from the phone number configured in the cekura agent.",
                            "example": "+11234567890"
                          },
                          "inbound_number": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "For inbound runs (agent.inbound=True). The agent's configured phone number will receive calls from this number.",
                            "example": "+11234567890"
                          },
                          "scenario_name": {
                            "type": "string",
                            "description": "Name of the scenario"
                          },
                          "test_profile_data": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "description": "Details of the test profile associated with this run scenario"
                          },
                          "outbound_dial_window_opens_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "When the outbound dial window opened (run transitioned to pending/waiting-for-call). Null until dispatched."
                          },
                          "outbound_dial_window_seconds": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "description": "Duration of the outbound dial window in seconds."
                          },
                          "outbound_dial_window_closes_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "Deadline by which your agent must dial the outbound number (opens_at + outbound_dial_window_seconds). Dials after this are dropped and the run returns status: timeout."
                          }
                        }
                      },
                      "examples": [
                        {
                          "id": 274,
                          "status": "pending",
                          "scenario": 1,
                          "number": null,
                          "inbound_number": "+11234567890",
                          "scenario_name": "Customer Support Call (Agent Inbound = True)",
                          "test_profile_data": null,
                          "outbound_dial_window_opens_at": null,
                          "outbound_dial_window_seconds": null,
                          "outbound_dial_window_closes_at": null
                        },
                        {
                          "id": 275,
                          "status": "pending",
                          "scenario": 2,
                          "number": "+11234567890",
                          "inbound_number": null,
                          "scenario_name": "Outbound Sales Call (Agent Inbound = False)",
                          "test_profile_data": null,
                          "outbound_dial_window_opens_at": "2026-06-24T10:47:30Z",
                          "outbound_dial_window_seconds": 300,
                          "outbound_dial_window_closes_at": "2026-06-24T10:52:30Z"
                        }
                      ]
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time",
                      "example": "2025-02-25T21:00:01.990052Z"
                    }
                  }
                },
                "examples": {
                  "InboundScenario": {
                    "value": {
                      "id": 167,
                      "agent": 1,
                      "status": "pending",
                      "success_rate": 0,
                      "run_as_text": false,
                      "runs": [
                        {
                          "id": 274,
                          "scenario": 1,
                          "number": null,
                          "inbound_number": "+11234567890",
                          "outbound_dial_window_opens_at": null,
                          "outbound_dial_window_seconds": null,
                          "outbound_dial_window_closes_at": null
                        },
                        {
                          "id": 273,
                          "scenario": 2,
                          "number": null,
                          "inbound_number": "+11234567891",
                          "outbound_dial_window_opens_at": null,
                          "outbound_dial_window_seconds": null,
                          "outbound_dial_window_closes_at": null
                        }
                      ],
                      "created_at": "2025-02-25T21:00:01.990052Z"
                    },
                    "summary": "Inbound Scenario"
                  },
                  "OutboundScenario": {
                    "value": {
                      "id": 167,
                      "agent": 1,
                      "status": "pending",
                      "success_rate": 0,
                      "run_as_text": false,
                      "runs": [
                        {
                          "id": 274,
                          "scenario": 1,
                          "number": "+11234567890",
                          "inbound_number": null,
                          "outbound_dial_window_opens_at": "2026-06-24T10:47:30Z",
                          "outbound_dial_window_seconds": 300,
                          "outbound_dial_window_closes_at": "2026-06-24T10:52:30Z"
                        },
                        {
                          "id": 273,
                          "scenario": 2,
                          "number": "+11234567891",
                          "inbound_number": null,
                          "outbound_dial_window_opens_at": "2026-06-24T10:47:30Z",
                          "outbound_dial_window_seconds": 300,
                          "outbound_dial_window_closes_at": "2026-06-24T10:52:30Z"
                        }
                      ],
                      "created_at": "2025-02-25T21:00:01.990052Z"
                    },
                    "summary": "Outbound Scenario"
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/scenarios-external/run_scenarios_agora/": {
      "post": {
        "operationId": "scenarios-run-agora",
        "description": "AGORA RTC VOICE RUN: Execute evaluators against an agent reachable in an Agora RTC channel. Cekura joins the channel as a participant and converses. The agent must have `agora_data.session_endpoint_url` configured — an endpoint that mints the per-call channel and token; Cekura calls it at run time and never stores the join details.\n\n**Cost:** voice-simulation rate per run.\n**Run-count math:** total runs = `len(scenarios) × frequency × max(1, len(personality_ids)) × max(1, len(test_profile_ids))`.\n\n**When to use this vs others** (pick the endpoint matching the agent's configured connection — check `aiagents_retrieve`):\n- `scenarios_run_voice` — phone / SIP voice run\n- `scenarios_run_livekit_v2` — LiveKit (project credentials, v2)\n- `scenarios_run_pipecat_v2` — Pipecat Cloud WebRTC",
        "summary": "Run evaluators against an agent in an Agora RTC channel",
        "tags": [
          "Evaluators"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostRunScenarios"
              },
              "examples": {
                "AgoraRun": {
                  "value": {
                    "agent_id": 12,
                    "scenarios": [
                      101
                    ],
                    "frequency": 1
                  },
                  "summary": "Agora run"
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostRunScenarios"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostRunScenarios"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "ID of the result"
                    },
                    "agent": {
                      "type": "integer",
                      "description": "ID of the agent"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "running",
                        "completed",
                        "failed"
                      ],
                      "description": "Status of the result"
                    },
                    "run_as_text": {
                      "type": "boolean",
                      "description": "Whether the scenario ran as text or not",
                      "example": false
                    },
                    "runs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "description": "ID of the run"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "pending",
                              "running",
                              "completed",
                              "failed"
                            ],
                            "description": "Status of the run"
                          },
                          "scenario": {
                            "type": "integer",
                            "description": "ID of the scenario"
                          },
                          "number": {
                            "type": "string",
                            "description": "For outbound runs (agent.inbound=False). The given number that must be called from the phone number configured in the cekura agent.",
                            "example": "+11234567890"
                          },
                          "inbound_number": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "For inbound runs (agent.inbound=True). The agent's configured phone number will receive calls from this number.",
                            "example": "+11234567890"
                          },
                          "scenario_name": {
                            "type": "string",
                            "description": "Name of the scenario"
                          },
                          "test_profile_data": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "description": "Details of the test profile associated with this run scenario"
                          },
                          "outbound_dial_window_opens_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "When the outbound dial window opened (run transitioned to pending/waiting-for-call). Null until dispatched."
                          },
                          "outbound_dial_window_seconds": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "description": "Duration of the outbound dial window in seconds."
                          },
                          "outbound_dial_window_closes_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "Deadline by which your agent must dial the outbound number (opens_at + outbound_dial_window_seconds). Dials after this are dropped and the run returns status: timeout."
                          }
                        }
                      },
                      "examples": [
                        {
                          "id": 274,
                          "status": "pending",
                          "scenario": 1,
                          "number": null,
                          "inbound_number": "+11234567890",
                          "scenario_name": "Customer Support Call (Agent Inbound = True)",
                          "test_profile_data": null,
                          "outbound_dial_window_opens_at": null,
                          "outbound_dial_window_seconds": null,
                          "outbound_dial_window_closes_at": null
                        },
                        {
                          "id": 275,
                          "status": "pending",
                          "scenario": 2,
                          "number": "+11234567890",
                          "inbound_number": null,
                          "scenario_name": "Outbound Sales Call (Agent Inbound = False)",
                          "test_profile_data": null,
                          "outbound_dial_window_opens_at": "2026-06-24T10:47:30Z",
                          "outbound_dial_window_seconds": 300,
                          "outbound_dial_window_closes_at": "2026-06-24T10:52:30Z"
                        }
                      ]
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time",
                      "example": "2025-02-25T21:00:01.990052Z"
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/scenarios-external/run_scenarios_api_chat/": {
      "post": {
        "operationId": "scenarios-run-api-chat",
        "description": "API CHAT RUN (pull mode): open one or more chat conversations that YOU drive turn-by-turn over REST — Cekura plays the simulated user, you play the agent under test. No agent connection is dialed; there is no server-side conversation loop, so a conversation can span minutes or up to an hour with turns arbitrarily far apart.\n\n**Run-count:** total conversations = `len(scenarios) × frequency`.\n\n**Driving each run** (the response `result.runs[].id` are the run IDs):\n1. If the scenario has a first message, the simulated user speaks first — read it from the run transcript. Otherwise you speak first.\n2. `POST /runs/{run_id}/chat/` with your agent's message → returns a `turn_id`.\n3. Poll `GET /runs/{run_id}/chat/{turn_id}/` until `status` is `ready` to read the reply.\n4. Repeat until `ended` is true, or call `POST /runs/{run_id}/end-chat/`.\n\n`timeout` is the overall run timeout: each conversation is finalized and scored automatically once it elapses (defaults to the project's duration, capped at 1 hour).",
        "summary": "Start customer-driven (API chat) evaluator runs",
        "tags": [
          "Evaluators"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostRunScenariosApiChat"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostRunScenariosApiChat"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostRunScenariosApiChat"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RunScenarioResult"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/scenarios-external/run_scenarios_chirp/": {
      "post": {
        "operationId": "scenarios-run-chirp",
        "description": "RAW-PCM WEBSOCKET VOICE RUN: Execute evaluators against an agent that exposes a raw-PCM WebSocket endpoint (16 kHz, 16-bit mono, binary frames). The agent must have a websocket endpoint configured (`telephony.websocket_url`); optional Basic Auth lives in `telephony.websocket_auth`. Pass `websocket_url` to override the agent's stored endpoint for this run.\n\n**Cost:** voice-simulation rate per run.\n**Run-count math:** total runs = `len(scenarios) × frequency × max(1, len(personality_ids)) × max(1, len(test_profile_ids))`.\n\n**When to use this vs others** (pick the endpoint matching the agent's configured connection — check `aiagents_retrieve`):\n- `scenarios_run_websocket` — JSON/text WebSocket protocol (per-scenario URLs)\n- `scenarios_run_voice` — phone / SIP voice run\n- `scenarios_run_pipecat_v2` — Pipecat Cloud WebRTC",
        "summary": "Run evaluators against a raw-PCM WebSocket voice endpoint",
        "tags": [
          "Evaluators"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostRunScenariosChirp"
              },
              "examples": {
                "WebsocketVoiceRun": {
                  "value": {
                    "agent_id": 12,
                    "scenarios": [
                      101
                    ],
                    "frequency": 1
                  },
                  "summary": "Websocket voice run"
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostRunScenariosChirp"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostRunScenariosChirp"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "ID of the result"
                    },
                    "agent": {
                      "type": "integer",
                      "description": "ID of the agent"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "running",
                        "completed",
                        "failed"
                      ],
                      "description": "Status of the result"
                    },
                    "run_as_text": {
                      "type": "boolean",
                      "description": "Whether the scenario ran as text or not",
                      "example": false
                    },
                    "runs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "description": "ID of the run"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "pending",
                              "running",
                              "completed",
                              "failed"
                            ],
                            "description": "Status of the run"
                          },
                          "scenario": {
                            "type": "integer",
                            "description": "ID of the scenario"
                          },
                          "number": {
                            "type": "string",
                            "description": "For outbound runs (agent.inbound=False). The given number that must be called from the phone number configured in the cekura agent.",
                            "example": "+11234567890"
                          },
                          "inbound_number": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "For inbound runs (agent.inbound=True). The agent's configured phone number will receive calls from this number.",
                            "example": "+11234567890"
                          },
                          "scenario_name": {
                            "type": "string",
                            "description": "Name of the scenario"
                          },
                          "test_profile_data": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "description": "Details of the test profile associated with this run scenario"
                          },
                          "outbound_dial_window_opens_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "When the outbound dial window opened (run transitioned to pending/waiting-for-call). Null until dispatched."
                          },
                          "outbound_dial_window_seconds": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "description": "Duration of the outbound dial window in seconds."
                          },
                          "outbound_dial_window_closes_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "Deadline by which your agent must dial the outbound number (opens_at + outbound_dial_window_seconds). Dials after this are dropped and the run returns status: timeout."
                          }
                        }
                      },
                      "examples": [
                        {
                          "id": 274,
                          "status": "pending",
                          "scenario": 1,
                          "number": null,
                          "inbound_number": "+11234567890",
                          "scenario_name": "Customer Support Call (Agent Inbound = True)",
                          "test_profile_data": null,
                          "outbound_dial_window_opens_at": null,
                          "outbound_dial_window_seconds": null,
                          "outbound_dial_window_closes_at": null
                        },
                        {
                          "id": 275,
                          "status": "pending",
                          "scenario": 2,
                          "number": "+11234567890",
                          "inbound_number": null,
                          "scenario_name": "Outbound Sales Call (Agent Inbound = False)",
                          "test_profile_data": null,
                          "outbound_dial_window_opens_at": "2026-06-24T10:47:30Z",
                          "outbound_dial_window_seconds": 300,
                          "outbound_dial_window_closes_at": "2026-06-24T10:52:30Z"
                        }
                      ]
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time",
                      "example": "2025-02-25T21:00:01.990052Z"
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/scenarios-external/run_scenarios_elevenlabs/": {
      "post": {
        "operationId": "scenarios-run-elevenlabs",
        "description": "ELEVENLABS CONVERSATIONAL VOICE RUN: Execute evaluators against an ElevenLabs Conversational AI agent. The agent must have ElevenLabs credentials configured AND `assistant_id` set to the ElevenLabs agent ID.\n\n**Cost:** voice-simulation rate per run.\n**Run-count math:** total runs = `len(scenarios) × frequency × max(1, len(personality_ids)) × max(1, len(test_profile_ids))`.\n\n**When to use this vs others** (pick the endpoint matching the agent's configured connection — check `aiagents_retrieve`):\n- `scenarios_run_voice` — phone / SIP voice run\n- `scenarios_run_vapi_webrtc` — VAPI agents over WebRTC\n- `scenarios_run_retell_webrtc` — Retell agents over WebRTC\n- `scenarios_run_pipecat_v2` — Pipecat Cloud (project credentials, v2)",
        "summary": "Run evaluators against an ElevenLabs Conversational agent",
        "tags": [
          "Evaluators"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostRunScenariosElevenLabs"
              },
              "examples": {
                "ElevenLabsRun": {
                  "value": {
                    "agent_id": 12,
                    "scenarios": [
                      101,
                      102
                    ],
                    "frequency": 1
                  },
                  "summary": "ElevenLabs run"
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostRunScenariosElevenLabs"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostRunScenariosElevenLabs"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "ID of the result"
                    },
                    "agent": {
                      "type": "integer",
                      "description": "ID of the agent"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "running",
                        "completed",
                        "failed"
                      ],
                      "description": "Status of the result"
                    },
                    "run_as_text": {
                      "type": "boolean",
                      "description": "Whether the scenario ran as text or not",
                      "example": false
                    },
                    "runs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "description": "ID of the run"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "pending",
                              "running",
                              "completed",
                              "failed"
                            ],
                            "description": "Status of the run"
                          },
                          "scenario": {
                            "type": "integer",
                            "description": "ID of the scenario"
                          },
                          "number": {
                            "type": "string",
                            "description": "For outbound runs (agent.inbound=False). The given number that must be called from the phone number configured in the cekura agent.",
                            "example": "+11234567890"
                          },
                          "inbound_number": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "For inbound runs (agent.inbound=True). The agent's configured phone number will receive calls from this number.",
                            "example": "+11234567890"
                          },
                          "scenario_name": {
                            "type": "string",
                            "description": "Name of the scenario"
                          },
                          "test_profile_data": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "description": "Details of the test profile associated with this run scenario"
                          },
                          "outbound_dial_window_opens_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "When the outbound dial window opened (run transitioned to pending/waiting-for-call). Null until dispatched."
                          },
                          "outbound_dial_window_seconds": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "description": "Duration of the outbound dial window in seconds."
                          },
                          "outbound_dial_window_closes_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "Deadline by which your agent must dial the outbound number (opens_at + outbound_dial_window_seconds). Dials after this are dropped and the run returns status: timeout."
                          }
                        }
                      },
                      "examples": [
                        {
                          "id": 274,
                          "status": "pending",
                          "scenario": 1,
                          "number": null,
                          "inbound_number": "+11234567890",
                          "scenario_name": "Customer Support Call (Agent Inbound = True)",
                          "test_profile_data": null,
                          "outbound_dial_window_opens_at": null,
                          "outbound_dial_window_seconds": null,
                          "outbound_dial_window_closes_at": null
                        },
                        {
                          "id": 275,
                          "status": "pending",
                          "scenario": 2,
                          "number": "+11234567890",
                          "inbound_number": null,
                          "scenario_name": "Outbound Sales Call (Agent Inbound = False)",
                          "test_profile_data": null,
                          "outbound_dial_window_opens_at": "2026-06-24T10:47:30Z",
                          "outbound_dial_window_seconds": 300,
                          "outbound_dial_window_closes_at": "2026-06-24T10:52:30Z"
                        }
                      ]
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time",
                      "example": "2025-02-25T21:00:01.990052Z"
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/scenarios-external/run_scenarios_ello/": {
      "post": {
        "operationId": "scenarios-external-run-scenarios-ello-create",
        "description": "Scenarios run scenarios ello",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Scenario"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/Scenario"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Scenario"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Scenario"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/scenarios-external/run_scenarios_email/": {
      "post": {
        "operationId": "scenarios-run-email",
        "description": "EMAIL RUN: Execute evaluators against an agent that communicates over email. Cekura sends an email to the agent's address and simulates the full conversation, receiving replies via inbound webhook.\n\nThe agent must have an `email_id` configured, or you can supply `agent_email` as a one-time override. The `agent_email` field takes precedence if both are set.\n\n**Run-count:** total conversations = `len(scenarios) × frequency`.\n\n**Inbound agents** (`agent.inbound=true`): Cekura sends the first email to the agent. **Outbound agents** (`agent.inbound=false`): the response includes `inbound_email` — the address your agent should email first to start the conversation.\n\n**Polling for completion:** the response contains a `result.id` with `status: 'running'`. Poll `GET /test_framework/v1/results/{result_id}/` until `status` is 'completed' or 'failed'.",
        "summary": "Run evaluators against an email agent",
        "tags": [
          "Evaluators"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RunScenariosEmail"
              },
              "examples": {
                "InboundAgent—AgentConfiguredEmailAddress": {
                  "value": {
                    "agent_id": 99,
                    "scenarios": [
                      102
                    ],
                    "frequency": 1
                  },
                  "summary": "Inbound agent — agent configured email address",
                  "description": "Agent has email_id set. Cekura sends the first email; agent replies."
                },
                "InboundAgent—One-timeEmailOverride": {
                  "value": {
                    "agent_id": 99,
                    "scenarios": [
                      102,
                      103
                    ],
                    "frequency": 2,
                    "agent_email": "support@yourcompany.com"
                  },
                  "summary": "Inbound agent — one-time email override",
                  "description": "Override the agent's configured email for this run only."
                },
                "OutboundAgent—AgentEmailsCekuraFirst": {
                  "value": {
                    "agent_id": 42,
                    "scenarios": [
                      201
                    ],
                    "frequency": 1
                  },
                  "summary": "Outbound agent — agent emails Cekura first",
                  "description": "For outbound agents the response includes `inbound_email` per run. Configure your agent to email that address to start the conversation."
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/RunScenariosEmail"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/RunScenariosEmail"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RunScenarioResult"
                },
                "examples": {
                  "Response—InboundAgent(CekuraSendsFirst)": {
                    "value": {
                      "id": 453,
                      "agent": 99,
                      "agent_inbound": true,
                      "status": "running",
                      "run_as_text": true,
                      "runs": [
                        {
                          "id": 22019,
                          "status": "running",
                          "scenario": 102,
                          "inbound_number": null,
                          "inbound_email": null,
                          "scenario_name": "Customer support scenario"
                        }
                      ],
                      "created_at": "2026-06-22T09:00:00Z"
                    },
                    "summary": "Response — inbound agent (Cekura sends first)"
                  },
                  "Response—OutboundAgent(agentEmailsCekuraFirst)": {
                    "value": {
                      "id": 454,
                      "agent": 42,
                      "agent_inbound": false,
                      "status": "running",
                      "run_as_text": true,
                      "runs": [
                        {
                          "id": 22020,
                          "status": "running",
                          "scenario": 201,
                          "inbound_number": null,
                          "inbound_email": "run-22020@veliitroee.resend.app",
                          "scenario_name": "Outreach scenario"
                        }
                      ],
                      "created_at": "2026-06-22T09:01:00Z"
                    },
                    "summary": "Response — outbound agent (agent emails Cekura first)",
                    "description": "`inbound_email` is the address your agent should send its first email to."
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/scenarios-external/run_scenarios_jotform/": {
      "post": {
        "operationId": "scenarios-external-run-scenarios-jotform-create",
        "description": "Scenarios run scenarios jotform",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Scenario"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/Scenario"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Scenario"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Scenario"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/scenarios-external/run_scenarios_json/": {
      "post": {
        "operationId": "scenarios-run-json",
        "description": "Run agent test cases straight from a JSON spec, without creating evaluators. Keep the spec in your repository and post it from CI.\n\nThe spec describes only what to test. Pick the target with `agent_id` and `channel` on the request — `voice` for a phone call (default), `text` for chat, `elevenlabs` for an ElevenLabs WebRTC session — so one file runs unchanged against any agent or environment.\n\nPass `dry_run=true` to validate only: the response describes the run that would happen (test cases, total runs, estimated cost) and nothing is created or charged. Use that on every commit, and the real call on the branches you want tested.\n\nEvery problem in a spec is reported at once, keyed by its location in the file (for example `scenarios[3].metrics[1]`). Metrics must already exist and be enabled for the target agent; personalities and test profiles can be referenced by ID or defined inline.\n\nFetch the schema this endpoint accepts from `scenarios_json_schema`.\n\n**Cost:** voice- or text-simulation rate per run. Test cases from a spec are removed automatically once no run needs them.",
        "summary": "Run test cases from a JSON spec file",
        "parameters": [
          {
            "in": "query",
            "name": "dry_run",
            "schema": {
              "type": "boolean"
            },
            "description": "Validate and price the spec without running or charging anything."
          }
        ],
        "tags": [
          "Evaluators"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TestSuiteSpecUpload"
              },
              "examples": {
                "RunASpec": {
                  "value": {
                    "agent_id": 12,
                    "channel": "voice",
                    "spec": {
                      "version": "1",
                      "scenarios": [
                        {
                          "name": "Refund happy path",
                          "instructions": "You are a customer whose order arrived damaged.",
                          "expected_outcome": "The agent confirms a refund.",
                          "metrics": [
                            "greeting_by_name"
                          ],
                          "personality": 3,
                          "test_profile": {
                            "agent_variables": {
                              "order_id": "ORD-4471"
                            }
                          }
                        }
                      ]
                    }
                  },
                  "summary": "Run a spec"
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/TestSuiteSpecUpload"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/TestSuiteSpecUpload"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "ID of the result"
                    },
                    "agent": {
                      "type": "integer",
                      "description": "ID of the agent"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "running",
                        "completed",
                        "failed"
                      ],
                      "description": "Status of the result"
                    },
                    "run_as_text": {
                      "type": "boolean",
                      "description": "Whether the scenario ran as text or not",
                      "example": false
                    },
                    "runs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "description": "ID of the run"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "pending",
                              "running",
                              "completed",
                              "failed"
                            ],
                            "description": "Status of the run"
                          },
                          "scenario": {
                            "type": "integer",
                            "description": "ID of the scenario"
                          },
                          "number": {
                            "type": "string",
                            "description": "For outbound runs (agent.inbound=False). The given number that must be called from the phone number configured in the cekura agent.",
                            "example": "+11234567890"
                          },
                          "inbound_number": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "For inbound runs (agent.inbound=True). The agent's configured phone number will receive calls from this number.",
                            "example": "+11234567890"
                          },
                          "scenario_name": {
                            "type": "string",
                            "description": "Name of the scenario"
                          },
                          "test_profile_data": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "description": "Details of the test profile associated with this run scenario"
                          },
                          "outbound_dial_window_opens_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "When the outbound dial window opened (run transitioned to pending/waiting-for-call). Null until dispatched."
                          },
                          "outbound_dial_window_seconds": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "description": "Duration of the outbound dial window in seconds."
                          },
                          "outbound_dial_window_closes_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "Deadline by which your agent must dial the outbound number (opens_at + outbound_dial_window_seconds). Dials after this are dropped and the run returns status: timeout."
                          }
                        }
                      },
                      "examples": [
                        {
                          "id": 274,
                          "status": "pending",
                          "scenario": 1,
                          "number": null,
                          "inbound_number": "+11234567890",
                          "scenario_name": "Customer Support Call (Agent Inbound = True)",
                          "test_profile_data": null,
                          "outbound_dial_window_opens_at": null,
                          "outbound_dial_window_seconds": null,
                          "outbound_dial_window_closes_at": null
                        },
                        {
                          "id": 275,
                          "status": "pending",
                          "scenario": 2,
                          "number": "+11234567890",
                          "inbound_number": null,
                          "scenario_name": "Outbound Sales Call (Agent Inbound = False)",
                          "test_profile_data": null,
                          "outbound_dial_window_opens_at": "2026-06-24T10:47:30Z",
                          "outbound_dial_window_seconds": 300,
                          "outbound_dial_window_closes_at": "2026-06-24T10:52:30Z"
                        }
                      ]
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time",
                      "example": "2025-02-25T21:00:01.990052Z"
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/scenarios-external/run_scenarios_livekit/": {
      "post": {
        "operationId": "scenarios-external-run-scenarios-livekit-create",
        "description": "Scenarios run scenarios livekit",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Scenario"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/Scenario"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Scenario"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Scenario"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/scenarios-external/run_scenarios_livekit_chat/": {
      "post": {
        "operationId": "scenarios-external-run-scenarios-livekit-chat-create",
        "description": "Scenarios run scenarios livekit chat",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Scenario"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/Scenario"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Scenario"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Scenario"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/scenarios-external/run_scenarios_livekit_v2/": {
      "post": {
        "operationId": "scenarios-run-livekit-v2",
        "description": "LIVEKIT VOICE RUN (project credentials, v2): Execute evaluators against a LiveKit agent using credentials configured at the project (or agent) level. Cekura creates the rooms; you don't pass URLs per-scenario. Requires `livekit_api_key`, `livekit_data.api_secret`, and `livekit_data.url` on the agent or project.\n\n**Cost:** voice-simulation rate per run.\n**Run-count math:** total runs = `len(scenarios) × frequency`.\n\n**Per-request `room_config` override** is allowed; merges over agent defaults.\n\n**When to use this vs others** (pick the endpoint matching the agent's configured connection — check `aiagents_retrieve`):\n- `scenarios_run_voice` — phone / SIP voice run\n- `scenarios_run_pipecat_v2` — Pipecat Cloud (project credentials, v2)\n- `scenarios_run_websocket` — JSON/text WebSocket runs",
        "summary": "Run evaluators against a LiveKit agent (project credentials, v2)",
        "tags": [
          "Evaluators"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RunLivekitScenarios"
              },
              "examples": {
                "LiveKitV2Run": {
                  "value": {
                    "scenarios": [
                      {
                        "scenario": 101
                      },
                      {
                        "scenario": 102
                      }
                    ],
                    "frequency": 1
                  },
                  "summary": "LiveKit v2 run"
                },
                "LiveKitV2RunWithOverrides": {
                  "value": {
                    "scenarios": [
                      {
                        "scenario": 101
                      }
                    ],
                    "frequency": 1,
                    "livekit_data": {
                      "agent_name": "my-dispatch-agent",
                      "config": {
                        "empty_timeout": 300,
                        "max_participants": 2
                      }
                    }
                  },
                  "summary": "LiveKit v2 run with overrides"
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/RunLivekitScenarios"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/RunLivekitScenarios"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "ID of the result"
                    },
                    "agent": {
                      "type": "integer",
                      "description": "ID of the agent"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "running",
                        "completed",
                        "failed"
                      ],
                      "description": "Status of the result"
                    },
                    "run_as_text": {
                      "type": "boolean",
                      "description": "Whether the scenario ran as text or not",
                      "example": false
                    },
                    "runs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "description": "ID of the run"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "pending",
                              "running",
                              "completed",
                              "failed"
                            ],
                            "description": "Status of the run"
                          },
                          "scenario": {
                            "type": "integer",
                            "description": "ID of the scenario"
                          },
                          "number": {
                            "type": "string",
                            "description": "For outbound runs (agent.inbound=False). The given number that must be called from the phone number configured in the cekura agent.",
                            "example": "+11234567890"
                          },
                          "inbound_number": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "For inbound runs (agent.inbound=True). The agent's configured phone number will receive calls from this number.",
                            "example": "+11234567890"
                          },
                          "scenario_name": {
                            "type": "string",
                            "description": "Name of the scenario"
                          },
                          "test_profile_data": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "description": "Details of the test profile associated with this run scenario"
                          },
                          "outbound_dial_window_opens_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "When the outbound dial window opened (run transitioned to pending/waiting-for-call). Null until dispatched."
                          },
                          "outbound_dial_window_seconds": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "description": "Duration of the outbound dial window in seconds."
                          },
                          "outbound_dial_window_closes_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "Deadline by which your agent must dial the outbound number (opens_at + outbound_dial_window_seconds). Dials after this are dropped and the run returns status: timeout."
                          }
                        }
                      },
                      "examples": [
                        {
                          "id": 274,
                          "status": "pending",
                          "scenario": 1,
                          "number": null,
                          "inbound_number": "+11234567890",
                          "scenario_name": "Customer Support Call (Agent Inbound = True)",
                          "test_profile_data": null,
                          "outbound_dial_window_opens_at": null,
                          "outbound_dial_window_seconds": null,
                          "outbound_dial_window_closes_at": null
                        },
                        {
                          "id": 275,
                          "status": "pending",
                          "scenario": 2,
                          "number": "+11234567890",
                          "inbound_number": null,
                          "scenario_name": "Outbound Sales Call (Agent Inbound = False)",
                          "test_profile_data": null,
                          "outbound_dial_window_opens_at": "2026-06-24T10:47:30Z",
                          "outbound_dial_window_seconds": 300,
                          "outbound_dial_window_closes_at": "2026-06-24T10:52:30Z"
                        }
                      ]
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time",
                      "example": "2025-02-25T21:00:01.990052Z"
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/scenarios-external/run_scenarios_pipecat/": {
      "post": {
        "operationId": "scenarios-run-pipecat-v1",
        "description": "PIPECAT WEBRTC RUN (manual room URLs, v1): Execute evaluators against an agent running on Pipecat / Daily.co WebRTC. Each scenario entry carries its own `pipecat_room_url` and optional token. For project-credential-based runs (no per-scenario URL), use `scenarios_run_pipecat_v2` instead.\n\n**Run-count:** one run per entry in `scenarios` — this endpoint does not support `frequency` or personality/test-profile multipliers. To run the same scenario multiple times, include it multiple times in the `scenarios` list.\n\n**When to use this vs others** (pick the endpoint matching the agent's configured connection — check `aiagents_retrieve`):\n- `run_scenarios` — real voice / phone / SIP call\n- `run_scenarios_text` — text / SMS / chat mode\n- `run_scenarios_with_websockets` — agent exposes a plain websocket URL (non-Pipecat)\n\n**Scheduled runs:** WebRTC sessions are not generally scheduled. Use `run_scenarios` or `run_scenarios_text` via CronJob for recurring evaluator runs.",
        "summary": "Run evaluators against a Pipecat WebRTC deployment (manual room URLs, v1)",
        "tags": [
          "Evaluators"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostRunScenariosPipecat"
              },
              "examples": {
                "PipecatWebRTCRun": {
                  "value": {
                    "agent": 12,
                    "scenarios": [
                      {
                        "scenario": 101,
                        "pipecat_room_url": "https://acme.daily.co/room-abc",
                        "pipecat_token": "token_xxx"
                      }
                    ]
                  },
                  "summary": "Pipecat WebRTC run"
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostRunScenariosPipecat"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostRunScenariosPipecat"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "ID of the result"
                    },
                    "agent": {
                      "type": "integer",
                      "description": "ID of the agent"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "running",
                        "completed",
                        "failed"
                      ],
                      "description": "Status of the result"
                    },
                    "run_as_text": {
                      "type": "boolean",
                      "description": "Whether the scenario ran as text or not",
                      "example": false
                    },
                    "runs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "description": "ID of the run"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "pending",
                              "running",
                              "completed",
                              "failed"
                            ],
                            "description": "Status of the run"
                          },
                          "scenario": {
                            "type": "integer",
                            "description": "ID of the scenario"
                          },
                          "number": {
                            "type": "string",
                            "description": "For outbound runs (agent.inbound=False). The given number that must be called from the phone number configured in the cekura agent.",
                            "example": "+11234567890"
                          },
                          "inbound_number": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "For inbound runs (agent.inbound=True). The agent's configured phone number will receive calls from this number.",
                            "example": "+11234567890"
                          },
                          "scenario_name": {
                            "type": "string",
                            "description": "Name of the scenario"
                          },
                          "test_profile_data": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "description": "Details of the test profile associated with this run scenario"
                          },
                          "outbound_dial_window_opens_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "When the outbound dial window opened (run transitioned to pending/waiting-for-call). Null until dispatched."
                          },
                          "outbound_dial_window_seconds": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "description": "Duration of the outbound dial window in seconds."
                          },
                          "outbound_dial_window_closes_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "Deadline by which your agent must dial the outbound number (opens_at + outbound_dial_window_seconds). Dials after this are dropped and the run returns status: timeout."
                          }
                        }
                      },
                      "examples": [
                        {
                          "id": 274,
                          "status": "pending",
                          "scenario": 1,
                          "number": null,
                          "inbound_number": "+11234567890",
                          "scenario_name": "Customer Support Call (Agent Inbound = True)",
                          "test_profile_data": null,
                          "outbound_dial_window_opens_at": null,
                          "outbound_dial_window_seconds": null,
                          "outbound_dial_window_closes_at": null
                        },
                        {
                          "id": 275,
                          "status": "pending",
                          "scenario": 2,
                          "number": "+11234567890",
                          "inbound_number": null,
                          "scenario_name": "Outbound Sales Call (Agent Inbound = False)",
                          "test_profile_data": null,
                          "outbound_dial_window_opens_at": "2026-06-24T10:47:30Z",
                          "outbound_dial_window_seconds": 300,
                          "outbound_dial_window_closes_at": "2026-06-24T10:52:30Z"
                        }
                      ]
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time",
                      "example": "2025-02-25T21:00:01.990052Z"
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/scenarios-external/run_scenarios_pipecat_v2/": {
      "post": {
        "operationId": "scenarios-run-pipecat-v2",
        "description": "PIPECAT CLOUD VOICE RUN (project credentials, v2): Execute evaluators against an agent deployed on Pipecat Cloud using credentials configured at the project level. Cekura creates the sessions; you don't pass per-scenario room URLs (that's the v1 endpoint). Requires Pipecat Cloud credentials with `pipecat_agent_name` set on the agent or project.\n\n**Cost:** voice-simulation rate per run.\n**Run-count math:** total runs = `len(scenarios) × frequency`.\n\n**Per-request `session_config` override** is allowed; merges over agent defaults.\n\n**When to use this vs others** (pick the endpoint matching the agent's configured connection — check `aiagents_retrieve`):\n- `scenarios_run_pipecat_v1` — manual room URLs per scenario\n- `scenarios_run_voice` — phone / SIP voice run\n- `scenarios_run_livekit_v2` — LiveKit (project credentials, v2)",
        "summary": "Run evaluators against a Pipecat Cloud deployment (project credentials, v2)",
        "tags": [
          "Evaluators"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostRunScenariosPipecatV2"
              },
              "examples": {
                "PipecatCloudV2Run": {
                  "value": {
                    "scenarios": [
                      {
                        "scenario": 101
                      },
                      {
                        "scenario": 102
                      }
                    ],
                    "frequency": 1
                  },
                  "summary": "Pipecat Cloud v2 run"
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostRunScenariosPipecatV2"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostRunScenariosPipecatV2"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "ID of the result"
                    },
                    "agent": {
                      "type": "integer",
                      "description": "ID of the agent"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "running",
                        "completed",
                        "failed"
                      ],
                      "description": "Status of the result"
                    },
                    "run_as_text": {
                      "type": "boolean",
                      "description": "Whether the scenario ran as text or not",
                      "example": false
                    },
                    "runs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "description": "ID of the run"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "pending",
                              "running",
                              "completed",
                              "failed"
                            ],
                            "description": "Status of the run"
                          },
                          "scenario": {
                            "type": "integer",
                            "description": "ID of the scenario"
                          },
                          "number": {
                            "type": "string",
                            "description": "For outbound runs (agent.inbound=False). The given number that must be called from the phone number configured in the cekura agent.",
                            "example": "+11234567890"
                          },
                          "inbound_number": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "For inbound runs (agent.inbound=True). The agent's configured phone number will receive calls from this number.",
                            "example": "+11234567890"
                          },
                          "scenario_name": {
                            "type": "string",
                            "description": "Name of the scenario"
                          },
                          "test_profile_data": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "description": "Details of the test profile associated with this run scenario"
                          },
                          "outbound_dial_window_opens_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "When the outbound dial window opened (run transitioned to pending/waiting-for-call). Null until dispatched."
                          },
                          "outbound_dial_window_seconds": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "description": "Duration of the outbound dial window in seconds."
                          },
                          "outbound_dial_window_closes_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "Deadline by which your agent must dial the outbound number (opens_at + outbound_dial_window_seconds). Dials after this are dropped and the run returns status: timeout."
                          }
                        }
                      },
                      "examples": [
                        {
                          "id": 274,
                          "status": "pending",
                          "scenario": 1,
                          "number": null,
                          "inbound_number": "+11234567890",
                          "scenario_name": "Customer Support Call (Agent Inbound = True)",
                          "test_profile_data": null,
                          "outbound_dial_window_opens_at": null,
                          "outbound_dial_window_seconds": null,
                          "outbound_dial_window_closes_at": null
                        },
                        {
                          "id": 275,
                          "status": "pending",
                          "scenario": 2,
                          "number": "+11234567890",
                          "inbound_number": null,
                          "scenario_name": "Outbound Sales Call (Agent Inbound = False)",
                          "test_profile_data": null,
                          "outbound_dial_window_opens_at": "2026-06-24T10:47:30Z",
                          "outbound_dial_window_seconds": 300,
                          "outbound_dial_window_closes_at": "2026-06-24T10:52:30Z"
                        }
                      ]
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time",
                      "example": "2025-02-25T21:00:01.990052Z"
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/scenarios-external/run_scenarios_retell_webrtc/": {
      "post": {
        "operationId": "scenarios-run-retell-webrtc",
        "description": "RETELL WEBRTC VOICE RUN: Execute evaluators against a Retell agent over WebRTC (LiveKit infrastructure). The agent must have Retell credentials configured. `retell_agent_id` is optional and defaults to `agent.assistant_id` if not provided.\n\n**Cost:** voice-simulation rate per run.\n**Run-count math:** total runs = `len(scenarios) × frequency`.\n\n**When to use this vs others** (pick the endpoint matching the agent's configured connection — check `aiagents_retrieve`):\n- `scenarios_run_voice` — phone / SIP voice run (no provider WebRTC needed)\n- `scenarios_run_vapi_webrtc` — VAPI agents over WebRTC\n- `scenarios_run_elevenlabs` — ElevenLabs Conversational agents\n- `scenarios_run_pipecat_v2` — Pipecat Cloud (project credentials, v2)\n- `scenarios_run_livekit_v2` — LiveKit (project credentials, v2)",
        "summary": "Run evaluators against a Retell agent over WebRTC",
        "tags": [
          "Evaluators"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RunScenariosRetellWebRTCRequest"
              },
              "examples": {
                "RetellWebRTCRun": {
                  "value": {
                    "agent_id": 12,
                    "scenarios": [
                      101,
                      102
                    ],
                    "frequency": 1
                  },
                  "summary": "Retell WebRTC run"
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/RunScenariosRetellWebRTCRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/RunScenariosRetellWebRTCRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "ID of the result"
                    },
                    "agent": {
                      "type": "integer",
                      "description": "ID of the agent"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "running",
                        "completed",
                        "failed"
                      ],
                      "description": "Status of the result"
                    },
                    "run_as_text": {
                      "type": "boolean",
                      "description": "Whether the scenario ran as text or not",
                      "example": false
                    },
                    "runs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "description": "ID of the run"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "pending",
                              "running",
                              "completed",
                              "failed"
                            ],
                            "description": "Status of the run"
                          },
                          "scenario": {
                            "type": "integer",
                            "description": "ID of the scenario"
                          },
                          "number": {
                            "type": "string",
                            "description": "For outbound runs (agent.inbound=False). The given number that must be called from the phone number configured in the cekura agent.",
                            "example": "+11234567890"
                          },
                          "inbound_number": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "For inbound runs (agent.inbound=True). The agent's configured phone number will receive calls from this number.",
                            "example": "+11234567890"
                          },
                          "scenario_name": {
                            "type": "string",
                            "description": "Name of the scenario"
                          },
                          "test_profile_data": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "description": "Details of the test profile associated with this run scenario"
                          },
                          "outbound_dial_window_opens_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "When the outbound dial window opened (run transitioned to pending/waiting-for-call). Null until dispatched."
                          },
                          "outbound_dial_window_seconds": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "description": "Duration of the outbound dial window in seconds."
                          },
                          "outbound_dial_window_closes_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "Deadline by which your agent must dial the outbound number (opens_at + outbound_dial_window_seconds). Dials after this are dropped and the run returns status: timeout."
                          }
                        }
                      },
                      "examples": [
                        {
                          "id": 274,
                          "status": "pending",
                          "scenario": 1,
                          "number": null,
                          "inbound_number": "+11234567890",
                          "scenario_name": "Customer Support Call (Agent Inbound = True)",
                          "test_profile_data": null,
                          "outbound_dial_window_opens_at": null,
                          "outbound_dial_window_seconds": null,
                          "outbound_dial_window_closes_at": null
                        },
                        {
                          "id": 275,
                          "status": "pending",
                          "scenario": 2,
                          "number": "+11234567890",
                          "inbound_number": null,
                          "scenario_name": "Outbound Sales Call (Agent Inbound = False)",
                          "test_profile_data": null,
                          "outbound_dial_window_opens_at": "2026-06-24T10:47:30Z",
                          "outbound_dial_window_seconds": 300,
                          "outbound_dial_window_closes_at": "2026-06-24T10:52:30Z"
                        }
                      ]
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time",
                      "example": "2025-02-25T21:00:01.990052Z"
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/scenarios-external/run_scenarios_sip/": {
      "post": {
        "operationId": "scenarios-run-sip",
        "description": "SIP VOICE RUN (direct SIP): Execute evaluators against an agent over a direct SIP connection (orchestrated by Cekura's SIP voice service). The agent must have a SIP endpoint configured (`telephony.sip_uri` on the v2 agent).\n\n**Custom SIP headers:** to send custom headers to the agent, attach a test profile whose `main_agent_variables` contain `X-` prefixed keys (pass its ID in `test_profile_ids`) — headers cannot be set on the agent or in this request.\n\n**Cost:** voice-simulation rate per run.\n**Run-count math:** total runs = `len(scenarios) × frequency × max(1, len(personality_ids)) × max(1, len(test_profile_ids))`.\n\n**When to use this vs others** (pick the endpoint matching the agent's configured connection — check `aiagents_retrieve`):\n- `scenarios_run_voice` — phone calls via Cekura's standard voice path\n- `scenarios_run_vapi_webrtc` / `_retell_webrtc` — provider-managed WebRTC\n- `scenarios_run_livekit_v2` — LiveKit (project credentials, v2)",
        "summary": "Run evaluators over a direct SIP connection",
        "tags": [
          "Evaluators"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostRunScenariosSip"
              },
              "examples": {
                "SIPRun": {
                  "value": {
                    "agent_id": 12,
                    "scenarios": [
                      101
                    ],
                    "frequency": 1
                  },
                  "summary": "SIP run"
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostRunScenariosSip"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostRunScenariosSip"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "ID of the result"
                    },
                    "agent": {
                      "type": "integer",
                      "description": "ID of the agent"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "running",
                        "completed",
                        "failed"
                      ],
                      "description": "Status of the result"
                    },
                    "run_as_text": {
                      "type": "boolean",
                      "description": "Whether the scenario ran as text or not",
                      "example": false
                    },
                    "runs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "description": "ID of the run"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "pending",
                              "running",
                              "completed",
                              "failed"
                            ],
                            "description": "Status of the run"
                          },
                          "scenario": {
                            "type": "integer",
                            "description": "ID of the scenario"
                          },
                          "number": {
                            "type": "string",
                            "description": "For outbound runs (agent.inbound=False). The given number that must be called from the phone number configured in the cekura agent.",
                            "example": "+11234567890"
                          },
                          "inbound_number": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "For inbound runs (agent.inbound=True). The agent's configured phone number will receive calls from this number.",
                            "example": "+11234567890"
                          },
                          "scenario_name": {
                            "type": "string",
                            "description": "Name of the scenario"
                          },
                          "test_profile_data": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "description": "Details of the test profile associated with this run scenario"
                          },
                          "outbound_dial_window_opens_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "When the outbound dial window opened (run transitioned to pending/waiting-for-call). Null until dispatched."
                          },
                          "outbound_dial_window_seconds": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "description": "Duration of the outbound dial window in seconds."
                          },
                          "outbound_dial_window_closes_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "Deadline by which your agent must dial the outbound number (opens_at + outbound_dial_window_seconds). Dials after this are dropped and the run returns status: timeout."
                          }
                        }
                      },
                      "examples": [
                        {
                          "id": 274,
                          "status": "pending",
                          "scenario": 1,
                          "number": null,
                          "inbound_number": "+11234567890",
                          "scenario_name": "Customer Support Call (Agent Inbound = True)",
                          "test_profile_data": null,
                          "outbound_dial_window_opens_at": null,
                          "outbound_dial_window_seconds": null,
                          "outbound_dial_window_closes_at": null
                        },
                        {
                          "id": 275,
                          "status": "pending",
                          "scenario": 2,
                          "number": "+11234567890",
                          "inbound_number": null,
                          "scenario_name": "Outbound Sales Call (Agent Inbound = False)",
                          "test_profile_data": null,
                          "outbound_dial_window_opens_at": "2026-06-24T10:47:30Z",
                          "outbound_dial_window_seconds": 300,
                          "outbound_dial_window_closes_at": "2026-06-24T10:52:30Z"
                        }
                      ]
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time",
                      "example": "2025-02-25T21:00:01.990052Z"
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/scenarios-external/run_scenarios_text/": {
      "post": {
        "operationId": "scenarios-run-text",
        "description": "TEXT / SMS / CHAT RUN: Execute evaluators against your agent using text-only simulation (SMS, chat, or an agent-hosted websocket). Cheaper than voice — billed at the text-simulation rate. Requires a chat connection (`provider.chat_agent_details`) on the agent, or a websocket URL for `self_hosted` agents.\n\n**Run-count math:** total conversations = `len(scenarios) × frequency × max(1, len(personality_ids)) × max(1, len(test_profile_ids))`.\n\n**Concurrency:** use `concurrency_limit` to cap parallel conversations. Default: unbounded (subject to provider rate limits).\n\n**Scenario selection (pick one):**\n- `scenarios` — list of integer evaluator IDs (e.g. `[101, 102]`)\n- `tags` — select by tag\n- `folder_path` — select by folder path (e.g. `\"Sales.Inbound\"`); requires `project_id`\n\n**Websocket override:** if the agent exposes a plain websocket URL for text, pass it as `websocket_url` — this bypasses the agent's standard text-readiness check. Pass `websocket_headers` (JSON object) to override connection headers for this run — merged over the agent's configured headers, with the per-run values winning.\n\n**When to use this vs others** (pick the endpoint matching the agent's configured connection — check `aiagents_retrieve`):\n- `run_scenarios` — real voice / phone / SIP call\n- `run_scenarios_with_websockets` — each scenario carries its own websocket URL (bulk)\n- `run_scenarios_pipecat` — Pipecat/Daily.co WebRTC deployment\n\n**`self_hosted` agents:** agents with `assistant_provider=\"self_hosted\"` require a websocket URL. Either pre-configure `websocket_url` on the agent, or pass it directly in this request. Without it, the run fails with `[\"Agent does not have a websocket URL\"]`. Passing `websocket_url` here changes the result's `run_type` to `\"WebSocket\"` instead of `\"Text\"`.\n\n**Personality override:** `personality_ids` must be IDs that are already enabled for the agent's project. Check which are enabled via `aiagents_retrieve` → `enabled_personalities` field. To enable a new personality, call `aiagents_partial_update` with the updated `enabled_personalities` list before using it here. Note: enabling a personality applies project-wide, not just to one agent. Passing an ID that is not enabled returns `[\"Invalid personalities provided.\"]`.\n\n**Scheduled runs:** to run on a cron schedule, create a CronJob via `POST /test_framework/v1/cron_jobs/` with `execution_mode=\"text\"` instead.\n\n**Polling for completion:** the response contains a `result.id` with `status: 'running'`. Poll `GET /test_framework/v1/results/{result_id}/` until `status` is 'completed' or 'failed'. There is no separate progress endpoint for runs. Check `failed_reasons` for infrastructure errors; check `runs[run_id].error_message` for per-run errors.",
        "summary": "Run evaluators in text / SMS / chat mode",
        "tags": [
          "Evaluators"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostRunScenariosText"
              },
              "examples": {
                "RunSelectedScenariosInTextMode": {
                  "value": {
                    "agent_id": 12,
                    "scenarios": [
                      101,
                      102
                    ],
                    "frequency": 1
                  },
                  "summary": "Run selected scenarios in text mode"
                },
                "RunViaAgentWebsocketURL,2×Each,3InParallel": {
                  "value": {
                    "agent_id": 12,
                    "scenarios": [
                      101
                    ],
                    "frequency": 2,
                    "websocket_url": "wss://my-agent.example.com/chat",
                    "concurrency_limit": 3
                  },
                  "summary": "Run via agent websocket URL, 2× each, 3 in parallel"
                },
                "RunAFolderViaSMS": {
                  "value": {
                    "agent_id": 12,
                    "folder_path": "Support.Billing",
                    "project_id": 1376,
                    "frequency": 1,
                    "outbound_phone_number": "+14155551234"
                  },
                  "summary": "Run a folder via SMS"
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostRunScenariosText"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostRunScenariosText"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "ID of the result"
                    },
                    "agent": {
                      "type": "integer",
                      "description": "ID of the agent"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "running",
                        "completed",
                        "failed"
                      ],
                      "description": "Status of the result"
                    },
                    "run_as_text": {
                      "type": "boolean",
                      "description": "Whether the scenario ran as text or not",
                      "example": false
                    },
                    "runs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "description": "ID of the run"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "pending",
                              "running",
                              "completed",
                              "failed"
                            ],
                            "description": "Status of the run"
                          },
                          "scenario": {
                            "type": "integer",
                            "description": "ID of the scenario"
                          },
                          "number": {
                            "type": "string",
                            "description": "For outbound runs (agent.inbound=False). The given number that must be called from the phone number configured in the cekura agent.",
                            "example": "+11234567890"
                          },
                          "inbound_number": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "For inbound runs (agent.inbound=True). The agent's configured phone number will receive calls from this number.",
                            "example": "+11234567890"
                          },
                          "scenario_name": {
                            "type": "string",
                            "description": "Name of the scenario"
                          },
                          "test_profile_data": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "description": "Details of the test profile associated with this run scenario"
                          },
                          "outbound_dial_window_opens_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "When the outbound dial window opened (run transitioned to pending/waiting-for-call). Null until dispatched."
                          },
                          "outbound_dial_window_seconds": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "description": "Duration of the outbound dial window in seconds."
                          },
                          "outbound_dial_window_closes_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "Deadline by which your agent must dial the outbound number (opens_at + outbound_dial_window_seconds). Dials after this are dropped and the run returns status: timeout."
                          }
                        }
                      },
                      "examples": [
                        {
                          "id": 274,
                          "status": "pending",
                          "scenario": 1,
                          "number": null,
                          "inbound_number": "+11234567890",
                          "scenario_name": "Customer Support Call (Agent Inbound = True)",
                          "test_profile_data": null,
                          "outbound_dial_window_opens_at": null,
                          "outbound_dial_window_seconds": null,
                          "outbound_dial_window_closes_at": null
                        },
                        {
                          "id": 275,
                          "status": "pending",
                          "scenario": 2,
                          "number": "+11234567890",
                          "inbound_number": null,
                          "scenario_name": "Outbound Sales Call (Agent Inbound = False)",
                          "test_profile_data": null,
                          "outbound_dial_window_opens_at": "2026-06-24T10:47:30Z",
                          "outbound_dial_window_seconds": 300,
                          "outbound_dial_window_closes_at": "2026-06-24T10:52:30Z"
                        }
                      ]
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time",
                      "example": "2025-02-25T21:00:01.990052Z"
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/scenarios-external/run_scenarios_vapi_webrtc/": {
      "post": {
        "operationId": "scenarios-run-vapi-webrtc",
        "description": "VAPI WEBRTC VOICE RUN: Execute evaluators against a VAPI agent over WebRTC. Required: `vapi_assistant_id` (the VAPI assistant). The agent (looked up via `agent_id` or inferred from the first scenario) must have VAPI credentials configured.\n\n**Cost:** voice-simulation rate per run.\n**Run-count math:** total runs = `len(scenarios) × frequency`.\n\n**When to use this vs others** (pick the endpoint matching the agent's configured connection — check `aiagents_retrieve`):\n- `scenarios_run_voice` — phone / SIP voice run (no provider WebRTC needed)\n- `scenarios_run_text` — text/SMS/chat (cheaper)\n- `scenarios_run_retell_webrtc` — Retell agents over WebRTC\n- `scenarios_run_elevenlabs` — ElevenLabs Conversational agents\n- `scenarios_run_pipecat_v2` — Pipecat Cloud (project credentials, v2)\n- `scenarios_run_livekit_v2` — LiveKit (project credentials, v2)",
        "summary": "Run evaluators against a VAPI WebRTC agent",
        "tags": [
          "Evaluators"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RunScenariosVapiWebRTCRequest"
              },
              "examples": {
                "VAPIWebRTCRun": {
                  "value": {
                    "agent_id": 12,
                    "scenarios": [
                      101,
                      102
                    ],
                    "vapi_assistant_id": "asst_abc123",
                    "frequency": 1
                  },
                  "summary": "VAPI WebRTC run"
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/RunScenariosVapiWebRTCRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/RunScenariosVapiWebRTCRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "ID of the result"
                    },
                    "agent": {
                      "type": "integer",
                      "description": "ID of the agent"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "running",
                        "completed",
                        "failed"
                      ],
                      "description": "Status of the result"
                    },
                    "run_as_text": {
                      "type": "boolean",
                      "description": "Whether the scenario ran as text or not",
                      "example": false
                    },
                    "runs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "description": "ID of the run"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "pending",
                              "running",
                              "completed",
                              "failed"
                            ],
                            "description": "Status of the run"
                          },
                          "scenario": {
                            "type": "integer",
                            "description": "ID of the scenario"
                          },
                          "number": {
                            "type": "string",
                            "description": "For outbound runs (agent.inbound=False). The given number that must be called from the phone number configured in the cekura agent.",
                            "example": "+11234567890"
                          },
                          "inbound_number": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "For inbound runs (agent.inbound=True). The agent's configured phone number will receive calls from this number.",
                            "example": "+11234567890"
                          },
                          "scenario_name": {
                            "type": "string",
                            "description": "Name of the scenario"
                          },
                          "test_profile_data": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "description": "Details of the test profile associated with this run scenario"
                          },
                          "outbound_dial_window_opens_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "When the outbound dial window opened (run transitioned to pending/waiting-for-call). Null until dispatched."
                          },
                          "outbound_dial_window_seconds": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "description": "Duration of the outbound dial window in seconds."
                          },
                          "outbound_dial_window_closes_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "Deadline by which your agent must dial the outbound number (opens_at + outbound_dial_window_seconds). Dials after this are dropped and the run returns status: timeout."
                          }
                        }
                      },
                      "examples": [
                        {
                          "id": 274,
                          "status": "pending",
                          "scenario": 1,
                          "number": null,
                          "inbound_number": "+11234567890",
                          "scenario_name": "Customer Support Call (Agent Inbound = True)",
                          "test_profile_data": null,
                          "outbound_dial_window_opens_at": null,
                          "outbound_dial_window_seconds": null,
                          "outbound_dial_window_closes_at": null
                        },
                        {
                          "id": 275,
                          "status": "pending",
                          "scenario": 2,
                          "number": "+11234567890",
                          "inbound_number": null,
                          "scenario_name": "Outbound Sales Call (Agent Inbound = False)",
                          "test_profile_data": null,
                          "outbound_dial_window_opens_at": "2026-06-24T10:47:30Z",
                          "outbound_dial_window_seconds": 300,
                          "outbound_dial_window_closes_at": "2026-06-24T10:52:30Z"
                        }
                      ]
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time",
                      "example": "2025-02-25T21:00:01.990052Z"
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/scenarios-external/run_scenarios_with_websockets/": {
      "post": {
        "operationId": "scenarios-run-websocket",
        "description": "WEBSOCKET RUN (per-scenario URLs, bulk): Execute evaluators where each scenario carries its own websocket URL. Useful when you have a fleet of agents or stateful websocket sessions to test in a single batch.\n\n**Run-count:** total conversations = `len(scenarios) × frequency`. (Personality and test-profile multipliers are not supported on this endpoint.)\n\n**`frequency` is required** on this endpoint (no default).\n\n**When to use this vs others** (pick the endpoint matching the agent's configured connection — check `aiagents_retrieve`):\n- `run_scenarios_text` — single websocket URL or SMS/chat mode (simpler)\n- `run_scenarios` — real voice / phone / SIP call\n- `run_scenarios_pipecat` — Pipecat/Daily.co WebRTC deployment\n\n**Polling for completion:** the response contains a `result.id` with `status: 'running'`. Poll `GET /test_framework/v1/results/{result_id}/` until `status` is 'completed' or 'failed'.\n\n**Known limitation:** `result.run_type` may show 'Text' instead of 'WebSocket' for runs triggered via this endpoint — this is a display issue only and does not affect execution.",
        "summary": "Run evaluators against per-scenario websocket URLs (bulk)",
        "tags": [
          "Evaluators"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RunScenariosWithWebsockets"
              },
              "examples": {
                "Per-scenarioWebsocketURLs": {
                  "value": {
                    "agent": 12,
                    "frequency": 1,
                    "scenarios": [
                      {
                        "scenario": 101,
                        "websocket_url": "wss://agent-a.example.com/chat"
                      },
                      {
                        "scenario": 102,
                        "websocket_url": "wss://agent-b.example.com/chat"
                      }
                    ]
                  },
                  "summary": "Per-scenario websocket URLs"
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/RunScenariosWithWebsockets"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/RunScenariosWithWebsockets"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "ID of the result"
                    },
                    "agent": {
                      "type": "integer",
                      "description": "ID of the agent"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "running",
                        "completed",
                        "failed"
                      ],
                      "description": "Status of the result"
                    },
                    "run_as_text": {
                      "type": "boolean",
                      "description": "Whether the scenario ran as text or not",
                      "example": false
                    },
                    "runs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "description": "ID of the run"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "pending",
                              "running",
                              "completed",
                              "failed"
                            ],
                            "description": "Status of the run"
                          },
                          "scenario": {
                            "type": "integer",
                            "description": "ID of the scenario"
                          },
                          "number": {
                            "type": "string",
                            "description": "For outbound runs (agent.inbound=False). The given number that must be called from the phone number configured in the cekura agent.",
                            "example": "+11234567890"
                          },
                          "inbound_number": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "For inbound runs (agent.inbound=True). The agent's configured phone number will receive calls from this number.",
                            "example": "+11234567890"
                          },
                          "scenario_name": {
                            "type": "string",
                            "description": "Name of the scenario"
                          },
                          "test_profile_data": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "description": "Details of the test profile associated with this run scenario"
                          },
                          "outbound_dial_window_opens_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "When the outbound dial window opened (run transitioned to pending/waiting-for-call). Null until dispatched."
                          },
                          "outbound_dial_window_seconds": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "description": "Duration of the outbound dial window in seconds."
                          },
                          "outbound_dial_window_closes_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "Deadline by which your agent must dial the outbound number (opens_at + outbound_dial_window_seconds). Dials after this are dropped and the run returns status: timeout."
                          }
                        }
                      },
                      "examples": [
                        {
                          "id": 274,
                          "status": "pending",
                          "scenario": 1,
                          "number": null,
                          "inbound_number": "+11234567890",
                          "scenario_name": "Customer Support Call (Agent Inbound = True)",
                          "test_profile_data": null,
                          "outbound_dial_window_opens_at": null,
                          "outbound_dial_window_seconds": null,
                          "outbound_dial_window_closes_at": null
                        },
                        {
                          "id": 275,
                          "status": "pending",
                          "scenario": 2,
                          "number": "+11234567890",
                          "inbound_number": null,
                          "scenario_name": "Outbound Sales Call (Agent Inbound = False)",
                          "test_profile_data": null,
                          "outbound_dial_window_opens_at": "2026-06-24T10:47:30Z",
                          "outbound_dial_window_seconds": 300,
                          "outbound_dial_window_closes_at": "2026-06-24T10:52:30Z"
                        }
                      ]
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time",
                      "example": "2025-02-25T21:00:01.990052Z"
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/scenarios-external/scenario-agent/": {
      "post": {
        "operationId": "scenarios-agent-create",
        "description": "Create or improve evaluator scenarios using AI by providing natural-language feedback. This tool changes evaluator scenarios only; it does not change an AI agent's prompt, configuration, tools, or provider settings. For a request such as `improve agent <id>`, use the `cekura:cekura-self-improving-agent` skill instead.\n\n**How it works:**\n1. Send evaluator IDs and your improvement request\n2. AI analyzes and suggests improvements\n3. Review suggestions and apply with `apply_changes=true`\n\n**`scenarios` field:** pass a list of integer IDs `[101, 102]`, a single integer `101`, or the string `\"all\"` to improve all scenarios for the agent. Do not pass IDs as a JSON-stringified list — pass them as a native array.\n\n**Applying large change sets:** when using `apply_changes: true` with many scenarios, the `updated_scenarios` payload may be large. If you receive an unexpected error, split the apply into smaller batches of 3–5 scenarios at a time.\n\n**Response:** Returns `progress_id` for polling status at /scenario-agent-progress/\n\n**Multi-turn improvements:** Use the `context` field to maintain conversation history across requests.",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ScenarioAgentRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/ScenarioAgentRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/ScenarioAgentRequest"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScenarioAgentStartResponse"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/scenarios-external/scenario-agent-progress/": {
      "get": {
        "operationId": "scenarios-agent-progress",
        "description": "Check the progress of an evaluator improvement request.\n\nAfter calling POST /scenario-agent/, use the returned `progress_id` to poll this endpoint.\n\n**Status values:**\n- `in_progress` - AI is analyzing and generating improvements (keep polling)\n- `completed` - AI finished; review suggestions in the `result` field\n- `needs_agent_clarification` - AI needs you to select an agent for some evaluators\n- `cancelled` - Request was cancelled\n- `failed` - An error occurred; see `error` field\n\n**Typical flow:**\n1. POST /scenario-agent/ → receive `progress_id`\n2. Poll this endpoint every few seconds\n3. When `status == 'completed'`, review the suggested changes\n4. POST /scenario-agent/ again with `apply_changes=true` to apply them",
        "parameters": [
          {
            "in": "query",
            "name": "progress_id",
            "schema": {
              "type": "string"
            },
            "description": "The progress_id returned by POST /scenario-agent/",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScenarioAgentProgress"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/scenarios-external/tags/": {
      "get": {
        "operationId": "scenarios-external-tags-retrieve",
        "description": "Scenarios tags",
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Scenario"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/scenarios/{id}/": {
      "get": {
        "operationId": "scenarios-retrieve",
        "description": "Fetch a single evaluator by id. Returns full configuration including instructions, expected outcome, metrics, test profile, and — when the agent has mock tools attached and the scenario was auto-generated — the expected mock tool calls (`generated_mock_tool_entries`) with their inputs and outputs.",
        "summary": "Retrieve an evaluator (scenario)",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this scenario.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SchemaScenario"
                }
              }
            },
            "description": ""
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "scenarios-retrieve",
            "description": "Fetch a single evaluator by id. Returns full configuration including instructions, expected outcome, metrics, test profile, and — when the agent has mock tools attached and the scenario was auto-generated — the expected mock tool calls (`generated_mock_tool_entries`) with their inputs and outputs."
          }
        }
      },
      "put": {
        "operationId": "scenarios-update",
        "description": "Update a test scenario",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this scenario.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Scenario"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/Scenario"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Scenario"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Scenario"
                }
              }
            },
            "description": ""
          }
        }
      },
      "patch": {
        "operationId": "scenarios-partial-update",
        "description": "Partially update an evaluator. Same field shape as create — see `scenarios_create` for details.\n\n**Tip:** to add or modify a single condition inside a `conditional_actions` scenario, fetch the scenario with GET, mutate its `conditional_actions` object, and PATCH the full object back. The server replaces all conditions atomically.",
        "summary": "Update an evaluator (scenario)",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this scenario.",
            "required": true
          }
        ],
        "tags": [
          "Scenarios"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchedSchemaPostScenario"
              },
              "examples": {
                "Rename+TweakInstructions": {
                  "value": {
                    "name": "Refund flow v2",
                    "instructions": "Ask for the order ID before refunding."
                  },
                  "summary": "Rename + tweak instructions"
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/PatchedSchemaPostScenario"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/PatchedSchemaPostScenario"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SchemaScenario"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "scenarios-partial-update",
            "description": "Partially update an evaluator. Same field shape as create — see `scenarios_create` for details.\n\n**Tip:** to add or modify a single condition inside a `conditional_actions` scenario, fetch the scenario with GET, mutate its `conditional_actions` object, and PATCH the full object back. The server replaces all conditions atomically."
          }
        }
      },
      "delete": {
        "operationId": "scenarios-destroy",
        "description": "⚠ Irreversible. Deletes the evaluator. Past runs remain in the result history but become orphaned in the UI.",
        "summary": "Delete an evaluator",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this scenario.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "204": {
            "description": "No response body"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "scenarios-destroy",
            "description": "⚠ Irreversible. Deletes the evaluator. Past runs remain in the result history but become orphaned in the UI."
          }
        }
      }
    },
    "/test_framework/v1/scenarios/{id}/condition-audio/": {
      "get": {
        "operationId": "scenarios-condition-audio-list",
        "description": "Scenarios condition audio",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this scenario.",
            "required": true
          },
          {
            "name": "page",
            "required": false,
            "in": "query",
            "description": "A page number within the paginated result set.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "page_size",
            "required": false,
            "in": "query",
            "description": "Number of results to return per page.",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedConditionAudioEntryList"
                }
              }
            },
            "description": ""
          }
        }
      },
      "post": {
        "operationId": "scenarios-condition-audio-create",
        "description": "Attach an audio clip to a fixed-message conditional action. The clip is transcoded to 24kHz mono PCM WAV, stored in S3, and transcribed asynchronously. Pass action_template with one `<audio />` marker to insert the managed tag inline; omit it for legacy whole-action replacement. Shares the condition-audio URL with the list endpoint (GET lists, POST uploads).",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this scenario.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "condition_id": {
                    "type": "integer"
                  },
                  "file": {
                    "type": "string",
                    "format": "binary"
                  },
                  "action_template": {
                    "type": "string"
                  },
                  "replace_audio_id": {
                    "type": "string"
                  }
                },
                "required": [
                  "condition_id",
                  "file"
                ]
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConditionAudioEntry"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/scenarios/{id}/condition-audio/{audio_id}/": {
      "delete": {
        "operationId": "scenarios-condition-audio-destroy",
        "description": "Delete a Detach and delete an audio clip from this scenario's conditional action",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this scenario.",
            "required": true
          },
          {
            "in": "path",
            "name": "audio_id",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "deleted": {
                      "type": "boolean"
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/scenarios/{id}/edit/": {
      "post": {
        "operationId": "scenarios-edit-create",
        "description": "Scenarios edit",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this scenario.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Scenario"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/Scenario"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Scenario"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Scenario"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/scenarios/{id}/history/": {
      "get": {
        "operationId": "scenarios-history-list",
        "description": "Scenarios history",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this scenario.",
            "required": true
          },
          {
            "in": "query",
            "name": "page",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "page_size",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedScenarioHistoryList"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/scenarios/{id}/history/edit/": {
      "patch": {
        "operationId": "scenarios-history-edit-partial-update",
        "description": "Scenarios history edit",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this scenario.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchedScenarioEditHistoryRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/PatchedScenarioEditHistoryRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/PatchedScenarioEditHistoryRequest"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScenarioHistory"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/scenarios/{id}/restore/": {
      "post": {
        "operationId": "scenarios-restore-create",
        "description": "Scenarios restore",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this scenario.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ScenarioRestoreRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/ScenarioRestoreRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/ScenarioRestoreRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScenarioSerializerV2"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/scenarios/{id}/transcript_embeddings/": {
      "get": {
        "operationId": "scenarios-transcript-embeddings-retrieve",
        "description": "Fetches the pre-calculated transcript embeddings for a specific scenario.\nCalled by Pipecat service.\nIncludes audio sample metadata if available.\nApplies test_profile variable substitution to transcript messages.",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this scenario.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "pipecat_agent_token": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Scenario"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/scenarios/{id}/update_conditional_actions/": {
      "post": {
        "operationId": "scenarios-update-conditional-actions-create",
        "description": "DEPRECATED: Use PATCH /v1/scenarios/{id}/ with conditional_actions field instead.\n\nThis endpoint is deprecated and will be removed in a future version.\nPlease use the standard scenario update endpoint (PATCH /v1/scenarios/{id}/)\nwith the 'conditional_actions' field in the request body.\n\nExample:\nPATCH /v1/scenarios/{id}/\n{\n    \"conditional_actions\": {\n        \"role\": \"optional role description\",\n        \"conditions\": [...]\n    }\n}\n\n---\n\nUpdate a scenario with conditional actions data.\nTakes conditional actions in JSON format and saves it to the scenario's instructions field.\n\nURL parameter:\n    - pk: ID of the scenario to update (from URL)\n\nRequest body:\n    - conditional_actions: Object with format:\n        {\n            \"role\": \"optional role description\",\n            \"conditions\": [\n                {\n                    \"condition\": \"when text\",\n                    \"action\": \"action text\",\n                    \"type\": \"standard\" or \"fixed_message\" (optional, defaults to \"standard\")\n                },\n                ...\n            ]\n        }\n\nReturns:\n    - Success message\n\nUpdates:\n    - instructions: JSON string of conditional actions data",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this scenario.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Scenario"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/Scenario"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Scenario"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Scenario"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/scenarios/{id}/update_scenario_with_transcript/": {
      "post": {
        "operationId": "scenarios-update-scenario-with-transcript-create",
        "description": "Update a scenario with transcript-based simulation data.\nTakes a transcript in JSON format and processes it for simulation testing,\nsaving the processed data to the specified scenario including embeddings and\nformatted simulation description.\n\nURL parameter:\n    - pk: ID of the scenario to update (from URL)\n\nRequest body:\n    - transcript_json: List of transcript message objects with format:\n        [\n            {\"role\": \"Main Agent\", \"content\": \"Hello\"},\n            {\"role\": \"Testing Agent\", \"content\": \"Hi\"},\n            ...\n        ]\n\nReturns:\n    - Scenario data with updated transcript simulation data\n\nUpdates:\n    - transcript_embeddings: Embeddings for Main Agent responses\n    - simulation_description: Formatted transcript description",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this scenario.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Scenario"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/Scenario"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Scenario"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Scenario"
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "summary": "Update a scenario from a transcript",
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "scenarios-update-scenario-with-transcript-create",
            "description": "Update a scenario with transcript-based simulation data.\nTakes a transcript in JSON format and processes it for simulation testing,\nsaving the processed data to the specified scenario including embeddings and\nformatted simulation description.\n\nURL parameter:\n    - pk: ID of the scenario to update (from URL)\n\nRequest body:\n    - transcript_json: List of transcript message objects with format:\n        [\n            {\"role\": \"Main Agent\", \"content\": \"Hello\"},\n            {\"role\": \"Testing Agent\", \"content\": \"Hi\"},\n            ...\n        ]\n\nReturns:\n    - Scenario data with updated transcript simulation data\n\nUpdates:\n    - transcript_embeddings: Embeddings for Main Agent responses\n    - simulation_description: Formatted transcript description"
          }
        }
      }
    },
    "/test_framework/v1/scenarios/add_infrastructure_suite/": {
      "post": {
        "operationId": "scenarios-add-infrastructure-suite-create",
        "description": "Scenarios add infrastructure suite",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Scenario"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/Scenario"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Scenario"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Scenario"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/scenarios/add_tags/": {
      "post": {
        "operationId": "scenarios-add-tags-create",
        "description": "Scenarios add tags",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Scenario"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/Scenario"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Scenario"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Scenario"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/scenarios/adv_update/": {
      "post": {
        "operationId": "scenarios-bulk-update_2",
        "description": "Update many evaluators in a single call. Useful for attaching/detaching metrics, switching personality, appending instructions, or moving a batch between folders.\n\n**Non-idempotent fields:** `append_instruction` concatenates — calling twice with the same string adds it twice. `metric_ids_to_add`/`metric_ids_to_remove` and `tool_ids_to_add`/`tool_ids_to_remove` are set-mutating and shouldn't be replayed blindly.\n\n**Affects every ID in `scenarios`.** For modifying a single evaluator, prefer `scenarios_partial_update`. Confirm the `scenarios` list with the user before calling — the change is applied across the whole list in one transaction.\n\n**Required:** `scenarios` (list of evaluator IDs). One of `agent` or `project` is also required to scope the permission check. All other fields are optional and are applied only when present.",
        "summary": "Bulk update evaluators",
        "tags": [
          "Evaluators"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ScenariosBulkUpdateRequest"
              },
              "examples": {
                "AttachTwoMetricsToABatchOfScenarios": {
                  "value": {
                    "agent": 12,
                    "scenarios": [
                      101,
                      102,
                      103
                    ],
                    "metric_ids_to_add": [
                      501,
                      502
                    ]
                  },
                  "summary": "Attach two metrics to a batch of scenarios"
                },
                "MoveScenariosIntoAFolderAndSwitchPersonality": {
                  "value": {
                    "agent": 12,
                    "scenarios": [
                      101,
                      102
                    ],
                    "folder_path": "Sales.Inbound",
                    "personality": 7
                  },
                  "summary": "Move scenarios into a folder and switch personality"
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/ScenariosBulkUpdateRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/ScenariosBulkUpdateRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScenarioList"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "scenarios-bulk-update",
            "description": "Update many evaluators in a single call. Useful for attaching/detaching metrics, switching personality, appending instructions, or moving a batch between folders.\n\n**Non-idempotent fields:** `append_instruction` concatenates — calling twice with the same string adds it twice. `metric_ids_to_add`/`metric_ids_to_remove` and `tool_ids_to_add`/`tool_ids_to_remove` are set-mutating and shouldn't be replayed blindly.\n\n**Affects every ID in `scenarios`.** For modifying a single evaluator, prefer `scenarios_partial_update`. Confirm the `scenarios` list with the user before calling — the change is applied across the whole list in one transaction.\n\n**Required:** `scenarios` (list of evaluator IDs). One of `agent` or `project` is also required to scope the permission check. All other fields are optional and are applied only when present."
          }
        }
      }
    },
    "/test_framework/v1/scenarios/cancel-agent/": {
      "post": {
        "operationId": "scenarios-cancel-agent-create",
        "description": "Scenarios cancel agent",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "type": {
              "schema": {
                "type": "object",
                "additionalProperties": {},
                "description": "Unspecified request body"
              }
            },
            "properties": {
              "schema": {
                "session_id": {
                  "type": "integer"
                }
              }
            },
            "required": {
              "schema": {
                "type": "object",
                "additionalProperties": {},
                "description": "Unspecified request body"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "session_id": {
                      "type": "integer"
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/scenarios/create-from-transcript-bg/": {
      "post": {
        "operationId": "scenarios-create-from-transcript-bg_2",
        "description": "Create a new evaluator from a call transcript. Analyzes the transcript to extract caller behavior, expected outcomes, and conversation flow.\n\n**`transcript_json` format:** array of message objects. Each object requires:\n- `role` — must be one of: `\"Main Agent\"`, `\"Testing Agent\"`, `\"Function Call\"`, `\"Function Call Result\"`\n- `content` — the message text\n- `start_time` (optional) — seconds from call start as a float\n\nNote: this endpoint accepts only the above role names. The role names used in the observability transcript ingestion API (\"agent\", \"user\", etc.) are not valid here.\n\nExample `transcript_json`:\n```json\n[\n  {\"role\": \"Main Agent\", \"content\": \"Hello, how can I help?\", \"start_time\": 0.0},\n  {\"role\": \"Testing Agent\", \"content\": \"I need to reschedule.\", \"start_time\": 2.1},\n  {\"role\": \"Main Agent\", \"content\": \"Sure, what date works?\", \"start_time\": 3.5}\n]\n```\n\n**Agent lookup:** the `agent` field looks up agents scoped to the project associated with your API key. If the agent belongs to a different project, use `assistant_id` instead, Returns a `progress_id`immediately; poll GET /scenarios/create-from-transcript-progress/?progress_id={id} until",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostSimulateScenario"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostSimulateScenario"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostSimulateScenario"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "progress_id": {
                      "type": "string"
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "summary": "Create a scenario from a transcript",
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "scenarios-create-from-transcript-bg",
            "description": "Create a new evaluator from a call transcript. Analyzes the transcript to extract caller behavior, expected outcomes, and conversation flow.\n\n**`transcript_json` format:** array of message objects. Each object requires:\n- `role` — must be one of: `\"Main Agent\"`, `\"Testing Agent\"`, `\"Function Call\"`, `\"Function Call Result\"`\n- `content` — the message text\n- `start_time` (optional) — seconds from call start as a float\n\nNote: this endpoint accepts only the above role names. The role names used in the observability transcript ingestion API (\"agent\", \"user\", etc.) are not valid here.\n\nExample `transcript_json`:\n```json\n[\n  {\"role\": \"Main Agent\", \"content\": \"Hello, how can I help?\", \"start_time\": 0.0},\n  {\"role\": \"Testing Agent\", \"content\": \"I need to reschedule.\", \"start_time\": 2.1},\n  {\"role\": \"Main Agent\", \"content\": \"Sure, what date works?\", \"start_time\": 3.5}\n]\n```\n\n**Agent lookup:** the `agent` field looks up agents scoped to the project associated with your API key. If the agent belongs to a different project, use `assistant_id` instead, Returns a `progress_id`immediately; poll GET /scenarios/create-from-transcript-progress/?progress_id={id} until"
          }
        }
      }
    },
    "/test_framework/v1/scenarios/create-from-transcript-progress/": {
      "get": {
        "operationId": "scenarios-create-from-transcript-progress_2",
        "description": "Get scenario-from-transcript progress",
        "parameters": [
          {
            "in": "query",
            "name": "progress_id",
            "schema": {
              "type": "string"
            },
            "description": "UUID progress identifier returned from create-from-transcript-bg endpoint",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "agent_id": {
                      "type": "integer"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "in_progress",
                        "completed",
                        "failed"
                      ]
                    },
                    "scenario_id": {
                      "type": "integer",
                      "nullable": true
                    },
                    "error": {
                      "type": "string",
                      "nullable": true
                    },
                    "scenario": {
                      "type": "object",
                      "nullable": true
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "summary": "Get scenario-from-transcript progress",
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "scenarios-create-from-transcript-progress",
            "description": "Get scenario-from-transcript progress"
          }
        }
      }
    },
    "/test_framework/v1/scenarios/create_folder/": {
      "post": {
        "operationId": "scenarios-folder-create_2",
        "description": "Create a scenario folder",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ScenarioFolderCreate"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/ScenarioFolderCreate"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/ScenarioFolderCreate"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScenarioFolder"
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "summary": "Create a scenario folder",
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "scenarios-folder-create",
            "description": "Create a scenario folder"
          }
        }
      }
    },
    "/test_framework/v1/scenarios/delete_folder/": {
      "post": {
        "operationId": "scenarios-folder-delete_2",
        "description": "Delete a scenario folder",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeleteFolderRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/DeleteFolderRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/DeleteFolderRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "204": {
            "description": "No response body"
          }
        },
        "x-mcp-expose": true,
        "summary": "Delete a scenario folder",
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "scenarios-folder-delete",
            "description": "Delete a scenario folder"
          }
        }
      }
    },
    "/test_framework/v1/scenarios/delete_scenarios/": {
      "post": {
        "operationId": "scenarios-bulk-delete_2",
        "description": "⚠ Cannot be undone from the UI. Bulk-deletes the listed evaluators — they disappear from `scenarios_list` and from any future evaluator runs.\n\n**Always confirm the exact list of `scenarios` IDs with the user before calling.** For deleting a single evaluator prefer `scenarios_destroy`.\n\n**Required:** `scenarios` (list of evaluator IDs). One of `agent_id` or `project_id` is also required to scope the permission check.",
        "summary": "Bulk delete evaluators",
        "tags": [
          "Evaluators"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ScenariosBulkDeleteRequest"
              },
              "examples": {
                "BulkDeleteByAgent": {
                  "value": {
                    "agent_id": 12,
                    "scenarios": [
                      101,
                      102,
                      103
                    ]
                  },
                  "summary": "Bulk delete by agent"
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/ScenariosBulkDeleteRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/ScenariosBulkDeleteRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "204": {
            "description": "No response body"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "scenarios-bulk-delete",
            "description": "⚠ Cannot be undone from the UI. Bulk-deletes the listed evaluators — they disappear from `scenarios_list` and from any future evaluator runs.\n\n**Always confirm the exact list of `scenarios` IDs with the user before calling.** For deleting a single evaluator prefer `scenarios_destroy`.\n\n**Required:** `scenarios` (list of evaluator IDs). One of `agent_id` or `project_id` is also required to scope the permission check."
          }
        }
      }
    },
    "/test_framework/v1/scenarios/discard-changes/": {
      "post": {
        "operationId": "scenarios-discard-changes-create",
        "description": "Mark the last preview message in a session as discarded. Called when the user clicks Discard on proposed changes so that the next LLM call receives the correct [STATUS: DISCARDED BY USER] annotation in its conversation context.",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "type": {
              "schema": {
                "type": "object",
                "additionalProperties": {},
                "description": "Unspecified request body"
              }
            },
            "properties": {
              "schema": {
                "session_id": {
                  "type": "integer"
                }
              }
            },
            "required": {
              "schema": {
                "type": "object",
                "additionalProperties": {},
                "description": "Unspecified request body"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "session_id": {
                      "type": "integer"
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/scenarios/duplicate/": {
      "post": {
        "operationId": "scenarios-duplicate-create",
        "description": "Create copies of existing evaluators in this project or another project in the same organization. Use this instead of recreating evaluators with `scenarios_create`; same-project copies retain their metrics and test profiles, while cross-project copies use the destination project's predefined metrics. Set `copy_to_project` to the source project for a folder-only copy; `folder_path` is created when needed, and copied evaluators are named `Copy of <original name>`.",
        "summary": "Duplicate evaluators into a folder",
        "parameters": [
          {
            "name": "page",
            "required": false,
            "in": "query",
            "description": "A page number within the paginated result set.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "page_size",
            "required": false,
            "in": "query",
            "description": "Number of results to return per page.",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "tags": [
          "Scenarios"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DuplicateScenariosRequest"
              },
              "examples": {
                "CopyEvaluatorsToANewFolder": {
                  "value": {
                    "project": 123,
                    "copy_to_project": 123,
                    "scenario_agent": 456,
                    "scenarios": [
                      101,
                      102
                    ],
                    "folder_path": "SMS agent - Papi Cleaning"
                  },
                  "summary": "Copy evaluators to a new folder"
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/DuplicateScenariosRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/DuplicateScenariosRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedScenarioList"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "scenarios-duplicate-create",
            "description": "Create copies of existing evaluators in this project or another project in the same organization. Use this instead of recreating evaluators with `scenarios_create`; same-project copies retain their metrics and test profiles, while cross-project copies use the destination project's predefined metrics. Set `copy_to_project` to the source project for a folder-only copy; `folder_path` is created when needed, and copied evaluators are named `Copy of <original name>`."
          }
        }
      }
    },
    "/test_framework/v1/scenarios/export_scenarios/": {
      "get": {
        "operationId": "export-scenarios_2",
        "description": "Export scenarios to CSV/Excel",
        "summary": "Export scenarios to CSV/Excel",
        "parameters": [
          {
            "in": "query",
            "name": "scenario_ids",
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated list of scenario IDs to export. Example: '1,2,3'",
            "required": true
          },
          {
            "in": "query",
            "name": "agent_id",
            "schema": {
              "type": "integer"
            },
            "description": "Filter scenarios by agent ID (either agent_id or project_id is required)"
          },
          {
            "in": "query",
            "name": "project_id",
            "schema": {
              "type": "integer"
            },
            "description": "Filter scenarios by project ID (either agent_id or project_id is required)"
          },
          {
            "in": "query",
            "name": "export_type",
            "schema": {
              "type": "string",
              "enum": [
                "csv",
                "xlsx"
              ]
            },
            "description": "Export format: 'csv' or 'xlsx'. Default: 'csv'"
          }
        ],
        "tags": [
          "Scenarios"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/scenarios/folders/": {
      "get": {
        "operationId": "scenarios-folders-list",
        "description": "List scenario folders",
        "parameters": [
          {
            "name": "page",
            "required": false,
            "in": "query",
            "description": "A page number within the paginated result set.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "page_size",
            "required": false,
            "in": "query",
            "description": "Number of results to return per page.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "project_id",
            "schema": {
              "type": "integer"
            },
            "description": "Project ID to list folders for",
            "required": true
          },
          {
            "in": "query",
            "name": "parent_path",
            "schema": {
              "type": "string"
            },
            "description": "Parent folder path to get direct children only. Example: \"Sales.Inbound\""
          },
          {
            "in": "query",
            "name": "search",
            "schema": {
              "type": "string"
            },
            "description": "Search folders by name (case-insensitive)"
          },
          {
            "name": "agent_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Tenant scope. Supply one of `agent_id`, `project_id`, `assistant_id` when authenticating with a user session or OAuth bearer token; omit when using an API key already scoped to the tenant."
          },
          {
            "name": "assistant_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Tenant scope. Supply one of `agent_id`, `project_id`, `assistant_id` when authenticating with a user session or OAuth bearer token; omit when using an API key already scoped to the tenant."
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedScenarioFolderList"
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "summary": "List scenario folders",
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "scenarios-folders-list",
            "description": "List scenario folders"
          }
        }
      }
    },
    "/test_framework/v1/scenarios/generate-bg/": {
      "post": {
        "operationId": "scenarios-generate-bg_2",
        "description": "Generate scenarios for a given agent in the background. Returns a `progress_id` immediately; poll GET /scenarios/generate-progress/?progress_id={id} until `total_scenarios == completed_scenarios`.\n\n**What happens automatically on generation:**\n- A scenario-specific test profile is created and its `information` is populated using the sectioned shape: `main_agent_variables` (dynamic-variable values that reach the agent under test at call time — e.g. `user_id`, `account_id`) and `testing_agent_variables` (persona/context used by the simulated caller — e.g. `customer_name`, `date_of_birth`). Section values are kept consistent with any generated mock-tool data.\n- When the agent has mock tools attached, each generated scenario also gets `generated_mock_tool_entries` — the expected mock tool calls for that scenario, shaped `[{tool_id, tool_name, new_entry: {input, output}}]`. These are returned on scenario reads and can be edited later via `scenarios_partial_update`.\n- 10 project-level evaluation metrics are attached to every generated scenario automatically (e.g. Latency, Pitch, Interruption Score). Scenarios created manually via `scenarios_create` start with no metrics attached.\n\n**Response fields:** `progress_id` (UUID string) for polling; `session_id` is always null.",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SchemaGenerateScenarios"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/SchemaGenerateScenarios"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/SchemaGenerateScenarios"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "progress_id": {
                      "type": "string"
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "summary": "Generate scenarios in background",
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "scenarios-generate-bg",
            "description": "Generate scenarios for a given agent in the background. Returns a `progress_id` immediately; poll GET /scenarios/generate-progress/?progress_id={id} until `total_scenarios == completed_scenarios`.\n\n**What happens automatically on generation:**\n- A scenario-specific test profile is created and its `information` is populated using the sectioned shape: `main_agent_variables` (dynamic-variable values that reach the agent under test at call time — e.g. `user_id`, `account_id`) and `testing_agent_variables` (persona/context used by the simulated caller — e.g. `customer_name`, `date_of_birth`). Section values are kept consistent with any generated mock-tool data.\n- When the agent has mock tools attached, each generated scenario also gets `generated_mock_tool_entries` — the expected mock tool calls for that scenario, shaped `[{tool_id, tool_name, new_entry: {input, output}}]`. These are returned on scenario reads and can be edited later via `scenarios_partial_update`.\n- 10 project-level evaluation metrics are attached to every generated scenario automatically (e.g. Latency, Pitch, Interruption Score). Scenarios created manually via `scenarios_create` start with no metrics attached.\n\n**Response fields:** `progress_id` (UUID string) for polling; `session_id` is always null."
          }
        }
      }
    },
    "/test_framework/v1/scenarios/generate-clarify-answer/": {
      "post": {
        "operationId": "scenarios-generate-clarify-answer_2",
        "description": "When GET /scenarios/generate-progress/ returns status='pending_clarification', the agentic generation agent has asked one or more clarifying questions. Submit the user's answer here to resume generation. Continue polling /scenarios/generate-progress/ after calling this endpoint.",
        "summary": "Answer a clarification question during agentic scenario generation",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GenerateClarifyAnswer"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/GenerateClarifyAnswer"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/GenerateClarifyAnswer"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "progress_id": {
                      "type": "string"
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/scenarios/generate-instructions/": {
      "post": {
        "operationId": "scenarios-generate-instructions-create",
        "description": "Generate scenario instructions",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Scenario"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/Scenario"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Scenario"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Scenario"
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "summary": "Generate scenario instructions",
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "scenarios-generate-instructions-create",
            "description": "Generate scenario instructions"
          }
        }
      }
    },
    "/test_framework/v1/scenarios/generate-progress/": {
      "get": {
        "operationId": "scenarios-generate-progress_2",
        "description": "Get scenario generation progress",
        "parameters": [
          {
            "in": "query",
            "name": "progress_id",
            "schema": {
              "type": "string"
            },
            "description": "UUID progress identifier returned from generate-bg endpoint",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "total_scenarios": {
                      "type": "integer",
                      "description": "Total number of scenarios"
                    },
                    "completed_scenarios": {
                      "type": "integer",
                      "description": "Number of completed scenarios"
                    },
                    "failed_scenarios": {
                      "type": "integer",
                      "description": "Number of failed scenarios"
                    },
                    "scenarios_list": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "description": "Unique identifier for the scenario"
                          },
                          "name": {
                            "type": "string",
                            "description": "Name of the scenario"
                          },
                          "agent": {
                            "type": "integer",
                            "description": "ID of the AI agent this scenario belongs to"
                          },
                          "assistant_id": {
                            "type": "string",
                            "description": "Alternative to agent ID - the assistant ID to use for this scenario"
                          },
                          "personality": {
                            "type": "integer",
                            "description": "ID of the personality used in this scenario"
                          },
                          "personality_name": {
                            "type": "string",
                            "description": "Name of the personality used in this scenario"
                          },
                          "tags": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "Tags associated with this scenario."
                          },
                          "runs": {
                            "type": "array",
                            "items": {
                              "type": "integer"
                            },
                            "description": "List of IDs for the last run of this scenario"
                          },
                          "metrics": {
                            "type": "array",
                            "items": {
                              "type": "integer"
                            },
                            "description": "List of metric IDs to associate with this scenario"
                          },
                          "metric_names": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "List of metric names associated with this scenario"
                          },
                          "phone_number": {
                            "type": "string",
                            "description": "Phone number used for outbound calls in this scenario"
                          },
                          "phone_number_queue_length": {
                            "type": "integer",
                            "description": "Number of runs in queue for this phone number"
                          },
                          "first_message": {
                            "type": "string",
                            "description": "First message to be sent in the scenario"
                          },
                          "inbound_phone_number": {
                            "type": "integer",
                            "description": "ID of the phone number used for inbound calls"
                          },
                          "inbound_phone_number_data": {
                            "type": "object",
                            "description": "Details of the phone number used for inbound calls",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "description": "ID of the inbound phone number"
                              },
                              "number": {
                                "type": "string",
                                "description": "The actual phone number"
                              },
                              "phone_number_id": {
                                "type": "string",
                                "description": "External ID of the phone number"
                              }
                            }
                          },
                          "instructions": {
                            "type": "string",
                            "description": "Instructions for the AI agent in this scenario"
                          },
                          "simulation_description": {
                            "type": "string",
                            "description": "Description of the simulation if this scenario was created by simulation"
                          },
                          "information_fields": {
                            "type": "object",
                            "description": "Additional information fields for the scenario"
                          },
                          "expected_outcome_prompt": {
                            "type": "string",
                            "description": "Expected outcome prompt for the scenario"
                          },
                          "scenario_language": {
                            "type": "string",
                            "description": "Language of the scenario"
                          },
                          "is_simulating": {
                            "type": "boolean",
                            "description": "Whether this scenario was created by simulation"
                          },
                          "test_profile_data": {
                            "type": "object",
                            "description": "The test profile generated for this scenario, including its sectioned `information` (main_agent_variables / testing_agent_variables)"
                          },
                          "generated_mock_tool_entries": {
                            "type": "array",
                            "description": "Expected mock tool calls generated for this scenario when the agent has mock tools attached. Empty when the agent has no mock tools.",
                            "items": {
                              "type": "object",
                              "properties": {
                                "tool_id": {
                                  "type": "integer",
                                  "description": "ID of the mock tool on the agent"
                                },
                                "tool_name": {
                                  "type": "string",
                                  "description": "Name of the tool being mocked"
                                },
                                "new_entry": {
                                  "type": "object",
                                  "description": "The expected tool call for this scenario",
                                  "properties": {
                                    "input": {
                                      "type": "object",
                                      "description": "Input parameters the tool call is expected to receive"
                                    },
                                    "output": {
                                      "type": "object",
                                      "description": "Response the mock tool will return"
                                    }
                                  }
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "summary": "Get scenario generation progress",
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "scenarios-generate-progress",
            "description": "Get scenario generation progress"
          }
        }
      }
    },
    "/test_framework/v1/scenarios/has_infrastructure_suite/": {
      "get": {
        "operationId": "scenarios-has-infrastructure-suite-retrieve",
        "description": "Scenarios has infrastructure suite",
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Scenario"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/scenarios/improve_instructions/": {
      "post": {
        "operationId": "scenarios-improve-instructions-create",
        "description": "Improve scenario instructions",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ScenarioInstructionsRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/ScenarioInstructionsRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/ScenarioInstructionsRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ImproveInstructionsResponse"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "summary": "Improve scenario instructions",
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "scenarios-improve-instructions-create",
            "description": "Improve scenario instructions"
          }
        }
      }
    },
    "/test_framework/v1/scenarios/infrastructure_suite_preview/": {
      "get": {
        "operationId": "scenarios-infrastructure-suite-preview-retrieve",
        "description": "Scenarios infrastructure suite preview",
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Scenario"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/scenarios/instructions-progress/": {
      "get": {
        "operationId": "scenarios-instructions-progress-retrieve",
        "description": "Get scenario instructions progress",
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Scenario"
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "summary": "Get scenario instructions progress",
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "scenarios-instructions-progress-retrieve",
            "description": "Get scenario instructions progress"
          }
        },
        "parameters": [
          {
            "name": "agent_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Tenant scope. Supply one of `agent_id`, `project_id`, `assistant_id` when authenticating with a user session or OAuth bearer token; omit when using an API key already scoped to the tenant."
          },
          {
            "name": "project_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Tenant scope. Supply one of `agent_id`, `project_id`, `assistant_id` when authenticating with a user session or OAuth bearer token; omit when using an API key already scoped to the tenant."
          },
          {
            "name": "assistant_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Tenant scope. Supply one of `agent_id`, `project_id`, `assistant_id` when authenticating with a user session or OAuth bearer token; omit when using an API key already scoped to the tenant."
          }
        ]
      }
    },
    "/test_framework/v1/scenarios/json_schema/": {
      "get": {
        "operationId": "scenarios-json-schema_2",
        "description": "Fetch the JSON Schema for test-suite spec files",
        "summary": "Fetch the JSON Schema for test-suite spec files",
        "parameters": [
          {
            "in": "query",
            "name": "version",
            "schema": {
              "type": "string"
            },
            "description": "Spec version to fetch. Defaults to the current version."
          }
        ],
        "tags": [
          "Evaluators"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Scenario"
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "scenarios-json-schema",
            "description": "Fetch the JSON Schema for test-suite spec files"
          }
        }
      }
    },
    "/test_framework/v1/scenarios/move_folder/": {
      "post": {
        "operationId": "scenarios-folder-move_2",
        "description": "Move a scenario folder",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MoveFolderRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/MoveFolderRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/MoveFolderRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScenarioFolder"
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "summary": "Move a scenario folder",
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "scenarios-folder-move",
            "description": "Move a scenario folder"
          }
        }
      }
    },
    "/test_framework/v1/scenarios/rename_folder/": {
      "post": {
        "operationId": "scenarios-folder-rename_2",
        "description": "Rename a scenario folder",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RenameFolderRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/RenameFolderRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/RenameFolderRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScenarioFolder"
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "summary": "Rename a scenario folder",
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "scenarios-folder-rename",
            "description": "Rename a scenario folder"
          }
        }
      }
    },
    "/test_framework/v1/scenarios/run_scenarios/": {
      "post": {
        "operationId": "scenarios-run-voice_2",
        "description": "VOICE RUN: Execute evaluators against your agent using a real voice / phone / SIP call. This is the primary 'run your evaluators' endpoint for voice-mode testing. Requires `telephony.phone_number` configured on the agent (any provider).\n\n**Run-count math:** total calls = `len(scenarios) × frequency × max(1, len(personality_ids)) × max(1, len(test_profile_ids))`. Each call is billed at the voice-simulation rate — check `frequency` carefully.\n\n**Concurrency:** use `concurrency_limit` to cap parallel calls. Default: unbounded (subject to provider rate limits).\n\n**Scenario selection (pick one):**\n- `scenarios` — list of integer evaluator IDs (e.g. `[101, 102]`)\n- `tags` — select by tag\n- `folder_path` — select by folder path (e.g. `\"Sales.Inbound\"`); requires `project_id`\n\n**Phone-number overrides:**\n- `outbound_phone_number` — override the number dialed\n- `agent_number` — override the contact number the inbound agent receives calls on\n- `mode` — `same_number` (all runs use one pair) vs `different_numbers`\n\n**When to use this vs others** (pick the endpoint matching the agent's configured connection — check `aiagents_retrieve`):\n- `run_scenarios_text` — text / SMS / chat mode; cheaper, no voice cost\n- `run_scenarios_with_websockets` — each scenario carries its own websocket URL\n- `run_scenarios_pipecat` — Pipecat/Daily.co WebRTC deployment\n\n**Personality override:** `personality_ids` must be IDs that are already enabled for the agent's project. Check which are enabled via `aiagents_retrieve` → `enabled_personalities` field. To enable a new personality, call `aiagents_partial_update` with the updated `enabled_personalities` list before using it here. Note: enabling a personality applies project-wide, not just to one agent. Passing an ID that is not enabled returns `[\"Invalid personalities provided.\"]`.\n\n**Scheduled runs:** to run on a recurring cron schedule, create a CronJob via `POST /test_framework/v1/cron_jobs/` with `execution_mode=\"voice\"` instead of looping this endpoint.\n\n**Polling for completion:** the response contains a `result.id` with `status: 'running'`. Poll `GET /test_framework/v1/results/{result_id}/` until `status` is 'completed' or 'failed'. There is no separate progress endpoint for runs. Check `failed_reasons` for infrastructure errors; check `runs[run_id].error_message` for per-run errors.\n\n**Outbound dial window:** for outbound runs (agent `inbound=false`), your agent must dial the run's `outbound_number` before `outbound_dial_window_closes_at` (default 300s after the run reaches `waiting_for_call` / pending state). Dials received after that deadline are dropped and the run returns `status: timeout`.",
        "summary": "Run evaluators over a voice call",
        "tags": [
          "Evaluators"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostRunScenarios"
              },
              "examples": {
                "RunSelectedScenarios(simplest)": {
                  "value": {
                    "agent_id": 12,
                    "scenarios": [
                      101,
                      102,
                      103
                    ],
                    "frequency": 1
                  },
                  "summary": "Run selected scenarios (simplest)"
                },
                "RunAnEntireFolder,3×Each,5InParallel": {
                  "value": {
                    "agent_id": 12,
                    "folder_path": "Sales.Inbound",
                    "project_id": 1376,
                    "frequency": 3,
                    "concurrency_limit": 5,
                    "name": "Nightly Sales.Inbound regression"
                  },
                  "summary": "Run an entire folder, 3× each, 5 in parallel"
                },
                "OverridePersonalities+TestProfiles(multipliesRunCount)": {
                  "value": {
                    "agent_id": 12,
                    "scenarios": [
                      101
                    ],
                    "frequency": 2,
                    "personality_ids": [
                      3,
                      7
                    ],
                    "test_profile_ids": [
                      20,
                      21
                    ]
                  },
                  "summary": "Override personalities + test profiles (multiplies run count)"
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostRunScenarios"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostRunScenarios"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "ID of the result"
                    },
                    "agent": {
                      "type": "integer",
                      "description": "ID of the agent"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "running",
                        "completed",
                        "failed"
                      ],
                      "description": "Status of the result"
                    },
                    "run_as_text": {
                      "type": "boolean",
                      "description": "Whether the scenario ran as text or not",
                      "example": false
                    },
                    "runs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "description": "ID of the run"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "pending",
                              "running",
                              "completed",
                              "failed"
                            ],
                            "description": "Status of the run"
                          },
                          "scenario": {
                            "type": "integer",
                            "description": "ID of the scenario"
                          },
                          "number": {
                            "type": "string",
                            "description": "For outbound runs (agent.inbound=False). The given number that must be called from the phone number configured in the cekura agent.",
                            "example": "+11234567890"
                          },
                          "inbound_number": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "For inbound runs (agent.inbound=True). The agent's configured phone number will receive calls from this number.",
                            "example": "+11234567890"
                          },
                          "scenario_name": {
                            "type": "string",
                            "description": "Name of the scenario"
                          },
                          "test_profile_data": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "description": "Details of the test profile associated with this run scenario"
                          },
                          "outbound_dial_window_opens_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "When the outbound dial window opened (run transitioned to pending/waiting-for-call). Null until dispatched."
                          },
                          "outbound_dial_window_seconds": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "description": "Duration of the outbound dial window in seconds."
                          },
                          "outbound_dial_window_closes_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "Deadline by which your agent must dial the outbound number (opens_at + outbound_dial_window_seconds). Dials after this are dropped and the run returns status: timeout."
                          }
                        }
                      },
                      "examples": [
                        {
                          "id": 274,
                          "status": "pending",
                          "scenario": 1,
                          "number": null,
                          "inbound_number": "+11234567890",
                          "scenario_name": "Customer Support Call (Agent Inbound = True)",
                          "test_profile_data": null,
                          "outbound_dial_window_opens_at": null,
                          "outbound_dial_window_seconds": null,
                          "outbound_dial_window_closes_at": null
                        },
                        {
                          "id": 275,
                          "status": "pending",
                          "scenario": 2,
                          "number": "+11234567890",
                          "inbound_number": null,
                          "scenario_name": "Outbound Sales Call (Agent Inbound = False)",
                          "test_profile_data": null,
                          "outbound_dial_window_opens_at": "2026-06-24T10:47:30Z",
                          "outbound_dial_window_seconds": 300,
                          "outbound_dial_window_closes_at": "2026-06-24T10:52:30Z"
                        }
                      ]
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time",
                      "example": "2025-02-25T21:00:01.990052Z"
                    }
                  }
                },
                "examples": {
                  "InboundScenario": {
                    "value": {
                      "id": 167,
                      "agent": 1,
                      "status": "pending",
                      "success_rate": 0,
                      "run_as_text": false,
                      "runs": [
                        {
                          "id": 274,
                          "scenario": 1,
                          "number": null,
                          "inbound_number": "+11234567890",
                          "outbound_dial_window_opens_at": null,
                          "outbound_dial_window_seconds": null,
                          "outbound_dial_window_closes_at": null
                        },
                        {
                          "id": 273,
                          "scenario": 2,
                          "number": null,
                          "inbound_number": "+11234567891",
                          "outbound_dial_window_opens_at": null,
                          "outbound_dial_window_seconds": null,
                          "outbound_dial_window_closes_at": null
                        }
                      ],
                      "created_at": "2025-02-25T21:00:01.990052Z"
                    },
                    "summary": "Inbound Scenario"
                  },
                  "OutboundScenario": {
                    "value": {
                      "id": 167,
                      "agent": 1,
                      "status": "pending",
                      "success_rate": 0,
                      "run_as_text": false,
                      "runs": [
                        {
                          "id": 274,
                          "scenario": 1,
                          "number": "+11234567890",
                          "inbound_number": null,
                          "outbound_dial_window_opens_at": "2026-06-24T10:47:30Z",
                          "outbound_dial_window_seconds": 300,
                          "outbound_dial_window_closes_at": "2026-06-24T10:52:30Z"
                        },
                        {
                          "id": 273,
                          "scenario": 2,
                          "number": "+11234567891",
                          "inbound_number": null,
                          "outbound_dial_window_opens_at": "2026-06-24T10:47:30Z",
                          "outbound_dial_window_seconds": 300,
                          "outbound_dial_window_closes_at": "2026-06-24T10:52:30Z"
                        }
                      ],
                      "created_at": "2025-02-25T21:00:01.990052Z"
                    },
                    "summary": "Outbound Scenario"
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "scenarios-run-voice",
            "description": "VOICE RUN: Execute evaluators against your agent using a real voice / phone / SIP call. This is the primary 'run your evaluators' endpoint for voice-mode testing. Requires `telephony.phone_number` configured on the agent (any provider).\n\n**Run-count math:** total calls = `len(scenarios) × frequency × max(1, len(personality_ids)) × max(1, len(test_profile_ids))`. Each call is billed at the voice-simulation rate — check `frequency` carefully.\n\n**Concurrency:** use `concurrency_limit` to cap parallel calls. Default: unbounded (subject to provider rate limits).\n\n**Scenario selection (pick one):**\n- `scenarios` — list of integer evaluator IDs (e.g. `[101, 102]`)\n- `tags` — select by tag\n- `folder_path` — select by folder path (e.g. `\"Sales.Inbound\"`); requires `project_id`\n\n**Phone-number overrides:**\n- `outbound_phone_number` — override the number dialed\n- `agent_number` — override the contact number the inbound agent receives calls on\n- `mode` — `same_number` (all runs use one pair) vs `different_numbers`\n\n**When to use this vs others** (pick the endpoint matching the agent's configured connection — check `aiagents_retrieve`):\n- `run_scenarios_text` — text / SMS / chat mode; cheaper, no voice cost\n- `run_scenarios_with_websockets` — each scenario carries its own websocket URL\n- `run_scenarios_pipecat` — Pipecat/Daily.co WebRTC deployment\n\n**Personality override:** `personality_ids` must be IDs that are already enabled for the agent's project. Check which are enabled via `aiagents_retrieve` → `enabled_personalities` field. To enable a new personality, call `aiagents_partial_update` with the updated `enabled_personalities` list before using it here. Note: enabling a personality applies project-wide, not just to one agent. Passing an ID that is not enabled returns `[\"Invalid personalities provided.\"]`.\n\n**Scheduled runs:** to run on a recurring cron schedule, create a CronJob via `POST /test_framework/v1/cron_jobs/` with `execution_mode=\"voice\"` instead of looping this endpoint.\n\n**Polling for completion:** the response contains a `result.id` with `status: 'running'`. Poll `GET /test_framework/v1/results/{result_id}/` until `status` is 'completed' or 'failed'. There is no separate progress endpoint for runs. Check `failed_reasons` for infrastructure errors; check `runs[run_id].error_message` for per-run errors.\n\n**Outbound dial window:** for outbound runs (agent `inbound=false`), your agent must dial the run's `outbound_number` before `outbound_dial_window_closes_at` (default 300s after the run reaches `waiting_for_call` / pending state). Dials received after that deadline are dropped and the run returns `status: timeout`."
          }
        }
      }
    },
    "/test_framework/v1/scenarios/run_scenarios_agora/": {
      "post": {
        "operationId": "scenarios-run-agora_2",
        "description": "AGORA RTC VOICE RUN: Execute evaluators against an agent reachable in an Agora RTC channel. Cekura joins the channel as a participant and converses. The agent must have `agora_data.session_endpoint_url` configured — an endpoint that mints the per-call channel and token; Cekura calls it at run time and never stores the join details.\n\n**Cost:** voice-simulation rate per run.\n**Run-count math:** total runs = `len(scenarios) × frequency × max(1, len(personality_ids)) × max(1, len(test_profile_ids))`.\n\n**When to use this vs others** (pick the endpoint matching the agent's configured connection — check `aiagents_retrieve`):\n- `scenarios_run_voice` — phone / SIP voice run\n- `scenarios_run_livekit_v2` — LiveKit (project credentials, v2)\n- `scenarios_run_pipecat_v2` — Pipecat Cloud WebRTC",
        "summary": "Run evaluators against an agent in an Agora RTC channel",
        "tags": [
          "Evaluators"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostRunScenarios"
              },
              "examples": {
                "AgoraRun": {
                  "value": {
                    "agent_id": 12,
                    "scenarios": [
                      101
                    ],
                    "frequency": 1
                  },
                  "summary": "Agora run"
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostRunScenarios"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostRunScenarios"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "ID of the result"
                    },
                    "agent": {
                      "type": "integer",
                      "description": "ID of the agent"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "running",
                        "completed",
                        "failed"
                      ],
                      "description": "Status of the result"
                    },
                    "run_as_text": {
                      "type": "boolean",
                      "description": "Whether the scenario ran as text or not",
                      "example": false
                    },
                    "runs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "description": "ID of the run"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "pending",
                              "running",
                              "completed",
                              "failed"
                            ],
                            "description": "Status of the run"
                          },
                          "scenario": {
                            "type": "integer",
                            "description": "ID of the scenario"
                          },
                          "number": {
                            "type": "string",
                            "description": "For outbound runs (agent.inbound=False). The given number that must be called from the phone number configured in the cekura agent.",
                            "example": "+11234567890"
                          },
                          "inbound_number": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "For inbound runs (agent.inbound=True). The agent's configured phone number will receive calls from this number.",
                            "example": "+11234567890"
                          },
                          "scenario_name": {
                            "type": "string",
                            "description": "Name of the scenario"
                          },
                          "test_profile_data": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "description": "Details of the test profile associated with this run scenario"
                          },
                          "outbound_dial_window_opens_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "When the outbound dial window opened (run transitioned to pending/waiting-for-call). Null until dispatched."
                          },
                          "outbound_dial_window_seconds": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "description": "Duration of the outbound dial window in seconds."
                          },
                          "outbound_dial_window_closes_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "Deadline by which your agent must dial the outbound number (opens_at + outbound_dial_window_seconds). Dials after this are dropped and the run returns status: timeout."
                          }
                        }
                      },
                      "examples": [
                        {
                          "id": 274,
                          "status": "pending",
                          "scenario": 1,
                          "number": null,
                          "inbound_number": "+11234567890",
                          "scenario_name": "Customer Support Call (Agent Inbound = True)",
                          "test_profile_data": null,
                          "outbound_dial_window_opens_at": null,
                          "outbound_dial_window_seconds": null,
                          "outbound_dial_window_closes_at": null
                        },
                        {
                          "id": 275,
                          "status": "pending",
                          "scenario": 2,
                          "number": "+11234567890",
                          "inbound_number": null,
                          "scenario_name": "Outbound Sales Call (Agent Inbound = False)",
                          "test_profile_data": null,
                          "outbound_dial_window_opens_at": "2026-06-24T10:47:30Z",
                          "outbound_dial_window_seconds": 300,
                          "outbound_dial_window_closes_at": "2026-06-24T10:52:30Z"
                        }
                      ]
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time",
                      "example": "2025-02-25T21:00:01.990052Z"
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "scenarios-run-agora",
            "description": "AGORA RTC VOICE RUN: Execute evaluators against an agent reachable in an Agora RTC channel. Cekura joins the channel as a participant and converses. The agent must have `agora_data.session_endpoint_url` configured — an endpoint that mints the per-call channel and token; Cekura calls it at run time and never stores the join details.\n\n**Cost:** voice-simulation rate per run.\n**Run-count math:** total runs = `len(scenarios) × frequency × max(1, len(personality_ids)) × max(1, len(test_profile_ids))`.\n\n**When to use this vs others** (pick the endpoint matching the agent's configured connection — check `aiagents_retrieve`):\n- `scenarios_run_voice` — phone / SIP voice run\n- `scenarios_run_livekit_v2` — LiveKit (project credentials, v2)\n- `scenarios_run_pipecat_v2` — Pipecat Cloud WebRTC"
          }
        }
      }
    },
    "/test_framework/v1/scenarios/run_scenarios_api_chat/": {
      "post": {
        "operationId": "scenarios-run-api-chat_2",
        "description": "API CHAT RUN (pull mode): open one or more chat conversations that YOU drive turn-by-turn over REST — Cekura plays the simulated user, you play the agent under test. No agent connection is dialed; there is no server-side conversation loop, so a conversation can span minutes or up to an hour with turns arbitrarily far apart.\n\n**Run-count:** total conversations = `len(scenarios) × frequency`.\n\n**Driving each run** (the response `result.runs[].id` are the run IDs):\n1. If the scenario has a first message, the simulated user speaks first — read it from the run transcript. Otherwise you speak first.\n2. `POST /runs/{run_id}/chat/` with your agent's message → returns a `turn_id`.\n3. Poll `GET /runs/{run_id}/chat/{turn_id}/` until `status` is `ready` to read the reply.\n4. Repeat until `ended` is true, or call `POST /runs/{run_id}/end-chat/`.\n\n`timeout` is the overall run timeout: each conversation is finalized and scored automatically once it elapses (defaults to the project's duration, capped at 1 hour).",
        "summary": "Start customer-driven (API chat) evaluator runs",
        "tags": [
          "Evaluators"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostRunScenariosApiChat"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostRunScenariosApiChat"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostRunScenariosApiChat"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RunScenarioResult"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/scenarios/run_scenarios_chirp/": {
      "post": {
        "operationId": "scenarios-run-chirp_2",
        "description": "RAW-PCM WEBSOCKET VOICE RUN: Execute evaluators against an agent that exposes a raw-PCM WebSocket endpoint (16 kHz, 16-bit mono, binary frames). The agent must have a websocket endpoint configured (`telephony.websocket_url`); optional Basic Auth lives in `telephony.websocket_auth`. Pass `websocket_url` to override the agent's stored endpoint for this run.\n\n**Cost:** voice-simulation rate per run.\n**Run-count math:** total runs = `len(scenarios) × frequency × max(1, len(personality_ids)) × max(1, len(test_profile_ids))`.\n\n**When to use this vs others** (pick the endpoint matching the agent's configured connection — check `aiagents_retrieve`):\n- `scenarios_run_websocket` — JSON/text WebSocket protocol (per-scenario URLs)\n- `scenarios_run_voice` — phone / SIP voice run\n- `scenarios_run_pipecat_v2` — Pipecat Cloud WebRTC",
        "summary": "Run evaluators against a raw-PCM WebSocket voice endpoint",
        "tags": [
          "Evaluators"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostRunScenariosChirp"
              },
              "examples": {
                "WebsocketVoiceRun": {
                  "value": {
                    "agent_id": 12,
                    "scenarios": [
                      101
                    ],
                    "frequency": 1
                  },
                  "summary": "Websocket voice run"
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostRunScenariosChirp"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostRunScenariosChirp"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "ID of the result"
                    },
                    "agent": {
                      "type": "integer",
                      "description": "ID of the agent"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "running",
                        "completed",
                        "failed"
                      ],
                      "description": "Status of the result"
                    },
                    "run_as_text": {
                      "type": "boolean",
                      "description": "Whether the scenario ran as text or not",
                      "example": false
                    },
                    "runs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "description": "ID of the run"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "pending",
                              "running",
                              "completed",
                              "failed"
                            ],
                            "description": "Status of the run"
                          },
                          "scenario": {
                            "type": "integer",
                            "description": "ID of the scenario"
                          },
                          "number": {
                            "type": "string",
                            "description": "For outbound runs (agent.inbound=False). The given number that must be called from the phone number configured in the cekura agent.",
                            "example": "+11234567890"
                          },
                          "inbound_number": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "For inbound runs (agent.inbound=True). The agent's configured phone number will receive calls from this number.",
                            "example": "+11234567890"
                          },
                          "scenario_name": {
                            "type": "string",
                            "description": "Name of the scenario"
                          },
                          "test_profile_data": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "description": "Details of the test profile associated with this run scenario"
                          },
                          "outbound_dial_window_opens_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "When the outbound dial window opened (run transitioned to pending/waiting-for-call). Null until dispatched."
                          },
                          "outbound_dial_window_seconds": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "description": "Duration of the outbound dial window in seconds."
                          },
                          "outbound_dial_window_closes_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "Deadline by which your agent must dial the outbound number (opens_at + outbound_dial_window_seconds). Dials after this are dropped and the run returns status: timeout."
                          }
                        }
                      },
                      "examples": [
                        {
                          "id": 274,
                          "status": "pending",
                          "scenario": 1,
                          "number": null,
                          "inbound_number": "+11234567890",
                          "scenario_name": "Customer Support Call (Agent Inbound = True)",
                          "test_profile_data": null,
                          "outbound_dial_window_opens_at": null,
                          "outbound_dial_window_seconds": null,
                          "outbound_dial_window_closes_at": null
                        },
                        {
                          "id": 275,
                          "status": "pending",
                          "scenario": 2,
                          "number": "+11234567890",
                          "inbound_number": null,
                          "scenario_name": "Outbound Sales Call (Agent Inbound = False)",
                          "test_profile_data": null,
                          "outbound_dial_window_opens_at": "2026-06-24T10:47:30Z",
                          "outbound_dial_window_seconds": 300,
                          "outbound_dial_window_closes_at": "2026-06-24T10:52:30Z"
                        }
                      ]
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time",
                      "example": "2025-02-25T21:00:01.990052Z"
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "scenarios-run-chirp",
            "description": "RAW-PCM WEBSOCKET VOICE RUN: Execute evaluators against an agent that exposes a raw-PCM WebSocket endpoint (16 kHz, 16-bit mono, binary frames). The agent must have a websocket endpoint configured (`telephony.websocket_url`); optional Basic Auth lives in `telephony.websocket_auth`. Pass `websocket_url` to override the agent's stored endpoint for this run.\n\n**Cost:** voice-simulation rate per run.\n**Run-count math:** total runs = `len(scenarios) × frequency × max(1, len(personality_ids)) × max(1, len(test_profile_ids))`.\n\n**When to use this vs others** (pick the endpoint matching the agent's configured connection — check `aiagents_retrieve`):\n- `scenarios_run_websocket` — JSON/text WebSocket protocol (per-scenario URLs)\n- `scenarios_run_voice` — phone / SIP voice run\n- `scenarios_run_pipecat_v2` — Pipecat Cloud WebRTC"
          }
        }
      }
    },
    "/test_framework/v1/scenarios/run_scenarios_elevenlabs/": {
      "post": {
        "operationId": "scenarios-run-elevenlabs_2",
        "description": "ELEVENLABS CONVERSATIONAL VOICE RUN: Execute evaluators against an ElevenLabs Conversational AI agent. The agent must have ElevenLabs credentials configured AND `assistant_id` set to the ElevenLabs agent ID.\n\n**Cost:** voice-simulation rate per run.\n**Run-count math:** total runs = `len(scenarios) × frequency × max(1, len(personality_ids)) × max(1, len(test_profile_ids))`.\n\n**When to use this vs others** (pick the endpoint matching the agent's configured connection — check `aiagents_retrieve`):\n- `scenarios_run_voice` — phone / SIP voice run\n- `scenarios_run_vapi_webrtc` — VAPI agents over WebRTC\n- `scenarios_run_retell_webrtc` — Retell agents over WebRTC\n- `scenarios_run_pipecat_v2` — Pipecat Cloud (project credentials, v2)",
        "summary": "Run evaluators against an ElevenLabs Conversational agent",
        "tags": [
          "Evaluators"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostRunScenariosElevenLabs"
              },
              "examples": {
                "ElevenLabsRun": {
                  "value": {
                    "agent_id": 12,
                    "scenarios": [
                      101,
                      102
                    ],
                    "frequency": 1
                  },
                  "summary": "ElevenLabs run"
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostRunScenariosElevenLabs"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostRunScenariosElevenLabs"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "ID of the result"
                    },
                    "agent": {
                      "type": "integer",
                      "description": "ID of the agent"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "running",
                        "completed",
                        "failed"
                      ],
                      "description": "Status of the result"
                    },
                    "run_as_text": {
                      "type": "boolean",
                      "description": "Whether the scenario ran as text or not",
                      "example": false
                    },
                    "runs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "description": "ID of the run"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "pending",
                              "running",
                              "completed",
                              "failed"
                            ],
                            "description": "Status of the run"
                          },
                          "scenario": {
                            "type": "integer",
                            "description": "ID of the scenario"
                          },
                          "number": {
                            "type": "string",
                            "description": "For outbound runs (agent.inbound=False). The given number that must be called from the phone number configured in the cekura agent.",
                            "example": "+11234567890"
                          },
                          "inbound_number": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "For inbound runs (agent.inbound=True). The agent's configured phone number will receive calls from this number.",
                            "example": "+11234567890"
                          },
                          "scenario_name": {
                            "type": "string",
                            "description": "Name of the scenario"
                          },
                          "test_profile_data": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "description": "Details of the test profile associated with this run scenario"
                          },
                          "outbound_dial_window_opens_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "When the outbound dial window opened (run transitioned to pending/waiting-for-call). Null until dispatched."
                          },
                          "outbound_dial_window_seconds": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "description": "Duration of the outbound dial window in seconds."
                          },
                          "outbound_dial_window_closes_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "Deadline by which your agent must dial the outbound number (opens_at + outbound_dial_window_seconds). Dials after this are dropped and the run returns status: timeout."
                          }
                        }
                      },
                      "examples": [
                        {
                          "id": 274,
                          "status": "pending",
                          "scenario": 1,
                          "number": null,
                          "inbound_number": "+11234567890",
                          "scenario_name": "Customer Support Call (Agent Inbound = True)",
                          "test_profile_data": null,
                          "outbound_dial_window_opens_at": null,
                          "outbound_dial_window_seconds": null,
                          "outbound_dial_window_closes_at": null
                        },
                        {
                          "id": 275,
                          "status": "pending",
                          "scenario": 2,
                          "number": "+11234567890",
                          "inbound_number": null,
                          "scenario_name": "Outbound Sales Call (Agent Inbound = False)",
                          "test_profile_data": null,
                          "outbound_dial_window_opens_at": "2026-06-24T10:47:30Z",
                          "outbound_dial_window_seconds": 300,
                          "outbound_dial_window_closes_at": "2026-06-24T10:52:30Z"
                        }
                      ]
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time",
                      "example": "2025-02-25T21:00:01.990052Z"
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "scenarios-run-elevenlabs",
            "description": "ELEVENLABS CONVERSATIONAL VOICE RUN: Execute evaluators against an ElevenLabs Conversational AI agent. The agent must have ElevenLabs credentials configured AND `assistant_id` set to the ElevenLabs agent ID.\n\n**Cost:** voice-simulation rate per run.\n**Run-count math:** total runs = `len(scenarios) × frequency × max(1, len(personality_ids)) × max(1, len(test_profile_ids))`.\n\n**When to use this vs others** (pick the endpoint matching the agent's configured connection — check `aiagents_retrieve`):\n- `scenarios_run_voice` — phone / SIP voice run\n- `scenarios_run_vapi_webrtc` — VAPI agents over WebRTC\n- `scenarios_run_retell_webrtc` — Retell agents over WebRTC\n- `scenarios_run_pipecat_v2` — Pipecat Cloud (project credentials, v2)"
          }
        }
      }
    },
    "/test_framework/v1/scenarios/run_scenarios_ello/": {
      "post": {
        "operationId": "scenarios-run-scenarios-ello-create",
        "description": "Scenarios run scenarios ello",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Scenario"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/Scenario"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Scenario"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Scenario"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/scenarios/run_scenarios_email/": {
      "post": {
        "operationId": "scenarios-run-email_2",
        "description": "EMAIL RUN: Execute evaluators against an agent that communicates over email. Cekura sends an email to the agent's address and simulates the full conversation, receiving replies via inbound webhook.\n\nThe agent must have an `email_id` configured, or you can supply `agent_email` as a one-time override. The `agent_email` field takes precedence if both are set.\n\n**Run-count:** total conversations = `len(scenarios) × frequency`.\n\n**Inbound agents** (`agent.inbound=true`): Cekura sends the first email to the agent. **Outbound agents** (`agent.inbound=false`): the response includes `inbound_email` — the address your agent should email first to start the conversation.\n\n**Polling for completion:** the response contains a `result.id` with `status: 'running'`. Poll `GET /test_framework/v1/results/{result_id}/` until `status` is 'completed' or 'failed'.",
        "summary": "Run evaluators against an email agent",
        "tags": [
          "Evaluators"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RunScenariosEmail"
              },
              "examples": {
                "InboundAgent—AgentConfiguredEmailAddress": {
                  "value": {
                    "agent_id": 99,
                    "scenarios": [
                      102
                    ],
                    "frequency": 1
                  },
                  "summary": "Inbound agent — agent configured email address",
                  "description": "Agent has email_id set. Cekura sends the first email; agent replies."
                },
                "InboundAgent—One-timeEmailOverride": {
                  "value": {
                    "agent_id": 99,
                    "scenarios": [
                      102,
                      103
                    ],
                    "frequency": 2,
                    "agent_email": "support@yourcompany.com"
                  },
                  "summary": "Inbound agent — one-time email override",
                  "description": "Override the agent's configured email for this run only."
                },
                "OutboundAgent—AgentEmailsCekuraFirst": {
                  "value": {
                    "agent_id": 42,
                    "scenarios": [
                      201
                    ],
                    "frequency": 1
                  },
                  "summary": "Outbound agent — agent emails Cekura first",
                  "description": "For outbound agents the response includes `inbound_email` per run. Configure your agent to email that address to start the conversation."
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/RunScenariosEmail"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/RunScenariosEmail"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RunScenarioResult"
                },
                "examples": {
                  "Response—InboundAgent(CekuraSendsFirst)": {
                    "value": {
                      "id": 453,
                      "agent": 99,
                      "agent_inbound": true,
                      "status": "running",
                      "run_as_text": true,
                      "runs": [
                        {
                          "id": 22019,
                          "status": "running",
                          "scenario": 102,
                          "inbound_number": null,
                          "inbound_email": null,
                          "scenario_name": "Customer support scenario"
                        }
                      ],
                      "created_at": "2026-06-22T09:00:00Z"
                    },
                    "summary": "Response — inbound agent (Cekura sends first)"
                  },
                  "Response—OutboundAgent(agentEmailsCekuraFirst)": {
                    "value": {
                      "id": 454,
                      "agent": 42,
                      "agent_inbound": false,
                      "status": "running",
                      "run_as_text": true,
                      "runs": [
                        {
                          "id": 22020,
                          "status": "running",
                          "scenario": 201,
                          "inbound_number": null,
                          "inbound_email": "run-22020@veliitroee.resend.app",
                          "scenario_name": "Outreach scenario"
                        }
                      ],
                      "created_at": "2026-06-22T09:01:00Z"
                    },
                    "summary": "Response — outbound agent (agent emails Cekura first)",
                    "description": "`inbound_email` is the address your agent should send its first email to."
                  }
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "scenarios-run-email",
            "description": "EMAIL RUN: Execute evaluators against an agent that communicates over email. Cekura sends an email to the agent's address and simulates the full conversation, receiving replies via inbound webhook.\n\nThe agent must have an `email_id` configured, or you can supply `agent_email` as a one-time override. The `agent_email` field takes precedence if both are set.\n\n**Run-count:** total conversations = `len(scenarios) × frequency`.\n\n**Inbound agents** (`agent.inbound=true`): Cekura sends the first email to the agent. **Outbound agents** (`agent.inbound=false`): the response includes `inbound_email` — the address your agent should email first to start the conversation.\n\n**Polling for completion:** the response contains a `result.id` with `status: 'running'`. Poll `GET /test_framework/v1/results/{result_id}/` until `status` is 'completed' or 'failed'."
          }
        }
      }
    },
    "/test_framework/v1/scenarios/run_scenarios_jotform/": {
      "post": {
        "operationId": "scenarios-run-scenarios-jotform-create",
        "description": "Scenarios run scenarios jotform",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Scenario"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/Scenario"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Scenario"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Scenario"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/scenarios/run_scenarios_json/": {
      "post": {
        "operationId": "scenarios-run-json_2",
        "description": "Run agent test cases straight from a JSON spec, without creating evaluators. Keep the spec in your repository and post it from CI.\n\nThe spec describes only what to test. Pick the target with `agent_id` and `channel` on the request — `voice` for a phone call (default), `text` for chat, `elevenlabs` for an ElevenLabs WebRTC session — so one file runs unchanged against any agent or environment.\n\nPass `dry_run=true` to validate only: the response describes the run that would happen (test cases, total runs, estimated cost) and nothing is created or charged. Use that on every commit, and the real call on the branches you want tested.\n\nEvery problem in a spec is reported at once, keyed by its location in the file (for example `scenarios[3].metrics[1]`). Metrics must already exist and be enabled for the target agent; personalities and test profiles can be referenced by ID or defined inline.\n\nFetch the schema this endpoint accepts from `scenarios_json_schema`.\n\n**Cost:** voice- or text-simulation rate per run. Test cases from a spec are removed automatically once no run needs them.",
        "summary": "Run test cases from a JSON spec file",
        "parameters": [
          {
            "in": "query",
            "name": "dry_run",
            "schema": {
              "type": "boolean"
            },
            "description": "Validate and price the spec without running or charging anything."
          }
        ],
        "tags": [
          "Evaluators"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TestSuiteSpecUpload"
              },
              "examples": {
                "RunASpec": {
                  "value": {
                    "agent_id": 12,
                    "channel": "voice",
                    "spec": {
                      "version": "1",
                      "scenarios": [
                        {
                          "name": "Refund happy path",
                          "instructions": "You are a customer whose order arrived damaged.",
                          "expected_outcome": "The agent confirms a refund.",
                          "metrics": [
                            "greeting_by_name"
                          ],
                          "personality": 3,
                          "test_profile": {
                            "agent_variables": {
                              "order_id": "ORD-4471"
                            }
                          }
                        }
                      ]
                    }
                  },
                  "summary": "Run a spec"
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/TestSuiteSpecUpload"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/TestSuiteSpecUpload"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "ID of the result"
                    },
                    "agent": {
                      "type": "integer",
                      "description": "ID of the agent"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "running",
                        "completed",
                        "failed"
                      ],
                      "description": "Status of the result"
                    },
                    "run_as_text": {
                      "type": "boolean",
                      "description": "Whether the scenario ran as text or not",
                      "example": false
                    },
                    "runs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "description": "ID of the run"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "pending",
                              "running",
                              "completed",
                              "failed"
                            ],
                            "description": "Status of the run"
                          },
                          "scenario": {
                            "type": "integer",
                            "description": "ID of the scenario"
                          },
                          "number": {
                            "type": "string",
                            "description": "For outbound runs (agent.inbound=False). The given number that must be called from the phone number configured in the cekura agent.",
                            "example": "+11234567890"
                          },
                          "inbound_number": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "For inbound runs (agent.inbound=True). The agent's configured phone number will receive calls from this number.",
                            "example": "+11234567890"
                          },
                          "scenario_name": {
                            "type": "string",
                            "description": "Name of the scenario"
                          },
                          "test_profile_data": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "description": "Details of the test profile associated with this run scenario"
                          },
                          "outbound_dial_window_opens_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "When the outbound dial window opened (run transitioned to pending/waiting-for-call). Null until dispatched."
                          },
                          "outbound_dial_window_seconds": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "description": "Duration of the outbound dial window in seconds."
                          },
                          "outbound_dial_window_closes_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "Deadline by which your agent must dial the outbound number (opens_at + outbound_dial_window_seconds). Dials after this are dropped and the run returns status: timeout."
                          }
                        }
                      },
                      "examples": [
                        {
                          "id": 274,
                          "status": "pending",
                          "scenario": 1,
                          "number": null,
                          "inbound_number": "+11234567890",
                          "scenario_name": "Customer Support Call (Agent Inbound = True)",
                          "test_profile_data": null,
                          "outbound_dial_window_opens_at": null,
                          "outbound_dial_window_seconds": null,
                          "outbound_dial_window_closes_at": null
                        },
                        {
                          "id": 275,
                          "status": "pending",
                          "scenario": 2,
                          "number": "+11234567890",
                          "inbound_number": null,
                          "scenario_name": "Outbound Sales Call (Agent Inbound = False)",
                          "test_profile_data": null,
                          "outbound_dial_window_opens_at": "2026-06-24T10:47:30Z",
                          "outbound_dial_window_seconds": 300,
                          "outbound_dial_window_closes_at": "2026-06-24T10:52:30Z"
                        }
                      ]
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time",
                      "example": "2025-02-25T21:00:01.990052Z"
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "x-mcp-destructive": true,
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "scenarios-run-json",
            "description": "Run agent test cases straight from a JSON spec, without creating evaluators. Keep the spec in your repository and post it from CI.\n\nThe spec describes only what to test. Pick the target with `agent_id` and `channel` on the request — `voice` for a phone call (default), `text` for chat, `elevenlabs` for an ElevenLabs WebRTC session — so one file runs unchanged against any agent or environment.\n\nPass `dry_run=true` to validate only: the response describes the run that would happen (test cases, total runs, estimated cost) and nothing is created or charged. Use that on every commit, and the real call on the branches you want tested.\n\nEvery problem in a spec is reported at once, keyed by its location in the file (for example `scenarios[3].metrics[1]`). Metrics must already exist and be enabled for the target agent; personalities and test profiles can be referenced by ID or defined inline.\n\nFetch the schema this endpoint accepts from `scenarios_json_schema`.\n\n**Cost:** voice- or text-simulation rate per run. Test cases from a spec are removed automatically once no run needs them."
          }
        }
      }
    },
    "/test_framework/v1/scenarios/run_scenarios_livekit/": {
      "post": {
        "operationId": "scenarios-run-scenarios-livekit-create",
        "description": "Scenarios run scenarios livekit",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Scenario"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/Scenario"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Scenario"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Scenario"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/scenarios/run_scenarios_livekit_chat/": {
      "post": {
        "operationId": "scenarios-run-scenarios-livekit-chat-create",
        "description": "Scenarios run scenarios livekit chat",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Scenario"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/Scenario"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Scenario"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Scenario"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/scenarios/run_scenarios_livekit_v2/": {
      "post": {
        "operationId": "scenarios-run-livekit-v2_2",
        "description": "LIVEKIT VOICE RUN (project credentials, v2): Execute evaluators against a LiveKit agent using credentials configured at the project (or agent) level. Cekura creates the rooms; you don't pass URLs per-scenario. Requires `livekit_api_key`, `livekit_data.api_secret`, and `livekit_data.url` on the agent or project.\n\n**Cost:** voice-simulation rate per run.\n**Run-count math:** total runs = `len(scenarios) × frequency`.\n\n**Per-request `room_config` override** is allowed; merges over agent defaults.\n\n**When to use this vs others** (pick the endpoint matching the agent's configured connection — check `aiagents_retrieve`):\n- `scenarios_run_voice` — phone / SIP voice run\n- `scenarios_run_pipecat_v2` — Pipecat Cloud (project credentials, v2)\n- `scenarios_run_websocket` — JSON/text WebSocket runs",
        "summary": "Run evaluators against a LiveKit agent (project credentials, v2)",
        "tags": [
          "Evaluators"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RunLivekitScenarios"
              },
              "examples": {
                "LiveKitV2Run": {
                  "value": {
                    "scenarios": [
                      {
                        "scenario": 101
                      },
                      {
                        "scenario": 102
                      }
                    ],
                    "frequency": 1
                  },
                  "summary": "LiveKit v2 run"
                },
                "LiveKitV2RunWithOverrides": {
                  "value": {
                    "scenarios": [
                      {
                        "scenario": 101
                      }
                    ],
                    "frequency": 1,
                    "livekit_data": {
                      "agent_name": "my-dispatch-agent",
                      "config": {
                        "empty_timeout": 300,
                        "max_participants": 2
                      }
                    }
                  },
                  "summary": "LiveKit v2 run with overrides"
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/RunLivekitScenarios"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/RunLivekitScenarios"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "ID of the result"
                    },
                    "agent": {
                      "type": "integer",
                      "description": "ID of the agent"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "running",
                        "completed",
                        "failed"
                      ],
                      "description": "Status of the result"
                    },
                    "run_as_text": {
                      "type": "boolean",
                      "description": "Whether the scenario ran as text or not",
                      "example": false
                    },
                    "runs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "description": "ID of the run"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "pending",
                              "running",
                              "completed",
                              "failed"
                            ],
                            "description": "Status of the run"
                          },
                          "scenario": {
                            "type": "integer",
                            "description": "ID of the scenario"
                          },
                          "number": {
                            "type": "string",
                            "description": "For outbound runs (agent.inbound=False). The given number that must be called from the phone number configured in the cekura agent.",
                            "example": "+11234567890"
                          },
                          "inbound_number": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "For inbound runs (agent.inbound=True). The agent's configured phone number will receive calls from this number.",
                            "example": "+11234567890"
                          },
                          "scenario_name": {
                            "type": "string",
                            "description": "Name of the scenario"
                          },
                          "test_profile_data": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "description": "Details of the test profile associated with this run scenario"
                          },
                          "outbound_dial_window_opens_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "When the outbound dial window opened (run transitioned to pending/waiting-for-call). Null until dispatched."
                          },
                          "outbound_dial_window_seconds": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "description": "Duration of the outbound dial window in seconds."
                          },
                          "outbound_dial_window_closes_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "Deadline by which your agent must dial the outbound number (opens_at + outbound_dial_window_seconds). Dials after this are dropped and the run returns status: timeout."
                          }
                        }
                      },
                      "examples": [
                        {
                          "id": 274,
                          "status": "pending",
                          "scenario": 1,
                          "number": null,
                          "inbound_number": "+11234567890",
                          "scenario_name": "Customer Support Call (Agent Inbound = True)",
                          "test_profile_data": null,
                          "outbound_dial_window_opens_at": null,
                          "outbound_dial_window_seconds": null,
                          "outbound_dial_window_closes_at": null
                        },
                        {
                          "id": 275,
                          "status": "pending",
                          "scenario": 2,
                          "number": "+11234567890",
                          "inbound_number": null,
                          "scenario_name": "Outbound Sales Call (Agent Inbound = False)",
                          "test_profile_data": null,
                          "outbound_dial_window_opens_at": "2026-06-24T10:47:30Z",
                          "outbound_dial_window_seconds": 300,
                          "outbound_dial_window_closes_at": "2026-06-24T10:52:30Z"
                        }
                      ]
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time",
                      "example": "2025-02-25T21:00:01.990052Z"
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "scenarios-run-livekit-v2",
            "description": "LIVEKIT VOICE RUN (project credentials, v2): Execute evaluators against a LiveKit agent using credentials configured at the project (or agent) level. Cekura creates the rooms; you don't pass URLs per-scenario. Requires `livekit_api_key`, `livekit_data.api_secret`, and `livekit_data.url` on the agent or project.\n\n**Cost:** voice-simulation rate per run.\n**Run-count math:** total runs = `len(scenarios) × frequency`.\n\n**Per-request `room_config` override** is allowed; merges over agent defaults.\n\n**When to use this vs others** (pick the endpoint matching the agent's configured connection — check `aiagents_retrieve`):\n- `scenarios_run_voice` — phone / SIP voice run\n- `scenarios_run_pipecat_v2` — Pipecat Cloud (project credentials, v2)\n- `scenarios_run_websocket` — JSON/text WebSocket runs"
          }
        }
      }
    },
    "/test_framework/v1/scenarios/run_scenarios_pipecat/": {
      "post": {
        "operationId": "scenarios-run-pipecat-v1_2",
        "description": "PIPECAT WEBRTC RUN (manual room URLs, v1): Execute evaluators against an agent running on Pipecat / Daily.co WebRTC. Each scenario entry carries its own `pipecat_room_url` and optional token. For project-credential-based runs (no per-scenario URL), use `scenarios_run_pipecat_v2` instead.\n\n**Run-count:** one run per entry in `scenarios` — this endpoint does not support `frequency` or personality/test-profile multipliers. To run the same scenario multiple times, include it multiple times in the `scenarios` list.\n\n**When to use this vs others** (pick the endpoint matching the agent's configured connection — check `aiagents_retrieve`):\n- `run_scenarios` — real voice / phone / SIP call\n- `run_scenarios_text` — text / SMS / chat mode\n- `run_scenarios_with_websockets` — agent exposes a plain websocket URL (non-Pipecat)\n\n**Scheduled runs:** WebRTC sessions are not generally scheduled. Use `run_scenarios` or `run_scenarios_text` via CronJob for recurring evaluator runs.",
        "summary": "Run evaluators against a Pipecat WebRTC deployment (manual room URLs, v1)",
        "tags": [
          "Evaluators"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostRunScenariosPipecat"
              },
              "examples": {
                "PipecatWebRTCRun": {
                  "value": {
                    "agent": 12,
                    "scenarios": [
                      {
                        "scenario": 101,
                        "pipecat_room_url": "https://acme.daily.co/room-abc",
                        "pipecat_token": "token_xxx"
                      }
                    ]
                  },
                  "summary": "Pipecat WebRTC run"
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostRunScenariosPipecat"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostRunScenariosPipecat"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "ID of the result"
                    },
                    "agent": {
                      "type": "integer",
                      "description": "ID of the agent"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "running",
                        "completed",
                        "failed"
                      ],
                      "description": "Status of the result"
                    },
                    "run_as_text": {
                      "type": "boolean",
                      "description": "Whether the scenario ran as text or not",
                      "example": false
                    },
                    "runs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "description": "ID of the run"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "pending",
                              "running",
                              "completed",
                              "failed"
                            ],
                            "description": "Status of the run"
                          },
                          "scenario": {
                            "type": "integer",
                            "description": "ID of the scenario"
                          },
                          "number": {
                            "type": "string",
                            "description": "For outbound runs (agent.inbound=False). The given number that must be called from the phone number configured in the cekura agent.",
                            "example": "+11234567890"
                          },
                          "inbound_number": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "For inbound runs (agent.inbound=True). The agent's configured phone number will receive calls from this number.",
                            "example": "+11234567890"
                          },
                          "scenario_name": {
                            "type": "string",
                            "description": "Name of the scenario"
                          },
                          "test_profile_data": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "description": "Details of the test profile associated with this run scenario"
                          },
                          "outbound_dial_window_opens_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "When the outbound dial window opened (run transitioned to pending/waiting-for-call). Null until dispatched."
                          },
                          "outbound_dial_window_seconds": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "description": "Duration of the outbound dial window in seconds."
                          },
                          "outbound_dial_window_closes_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "Deadline by which your agent must dial the outbound number (opens_at + outbound_dial_window_seconds). Dials after this are dropped and the run returns status: timeout."
                          }
                        }
                      },
                      "examples": [
                        {
                          "id": 274,
                          "status": "pending",
                          "scenario": 1,
                          "number": null,
                          "inbound_number": "+11234567890",
                          "scenario_name": "Customer Support Call (Agent Inbound = True)",
                          "test_profile_data": null,
                          "outbound_dial_window_opens_at": null,
                          "outbound_dial_window_seconds": null,
                          "outbound_dial_window_closes_at": null
                        },
                        {
                          "id": 275,
                          "status": "pending",
                          "scenario": 2,
                          "number": "+11234567890",
                          "inbound_number": null,
                          "scenario_name": "Outbound Sales Call (Agent Inbound = False)",
                          "test_profile_data": null,
                          "outbound_dial_window_opens_at": "2026-06-24T10:47:30Z",
                          "outbound_dial_window_seconds": 300,
                          "outbound_dial_window_closes_at": "2026-06-24T10:52:30Z"
                        }
                      ]
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time",
                      "example": "2025-02-25T21:00:01.990052Z"
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "scenarios-run-pipecat-v1",
            "description": "PIPECAT WEBRTC RUN (manual room URLs, v1): Execute evaluators against an agent running on Pipecat / Daily.co WebRTC. Each scenario entry carries its own `pipecat_room_url` and optional token. For project-credential-based runs (no per-scenario URL), use `scenarios_run_pipecat_v2` instead.\n\n**Run-count:** one run per entry in `scenarios` — this endpoint does not support `frequency` or personality/test-profile multipliers. To run the same scenario multiple times, include it multiple times in the `scenarios` list.\n\n**When to use this vs others** (pick the endpoint matching the agent's configured connection — check `aiagents_retrieve`):\n- `run_scenarios` — real voice / phone / SIP call\n- `run_scenarios_text` — text / SMS / chat mode\n- `run_scenarios_with_websockets` — agent exposes a plain websocket URL (non-Pipecat)\n\n**Scheduled runs:** WebRTC sessions are not generally scheduled. Use `run_scenarios` or `run_scenarios_text` via CronJob for recurring evaluator runs."
          }
        }
      }
    },
    "/test_framework/v1/scenarios/run_scenarios_pipecat_v2/": {
      "post": {
        "operationId": "scenarios-run-pipecat-v2_2",
        "description": "PIPECAT CLOUD VOICE RUN (project credentials, v2): Execute evaluators against an agent deployed on Pipecat Cloud using credentials configured at the project level. Cekura creates the sessions; you don't pass per-scenario room URLs (that's the v1 endpoint). Requires Pipecat Cloud credentials with `pipecat_agent_name` set on the agent or project.\n\n**Cost:** voice-simulation rate per run.\n**Run-count math:** total runs = `len(scenarios) × frequency`.\n\n**Per-request `session_config` override** is allowed; merges over agent defaults.\n\n**When to use this vs others** (pick the endpoint matching the agent's configured connection — check `aiagents_retrieve`):\n- `scenarios_run_pipecat_v1` — manual room URLs per scenario\n- `scenarios_run_voice` — phone / SIP voice run\n- `scenarios_run_livekit_v2` — LiveKit (project credentials, v2)",
        "summary": "Run evaluators against a Pipecat Cloud deployment (project credentials, v2)",
        "tags": [
          "Evaluators"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostRunScenariosPipecatV2"
              },
              "examples": {
                "PipecatCloudV2Run": {
                  "value": {
                    "scenarios": [
                      {
                        "scenario": 101
                      },
                      {
                        "scenario": 102
                      }
                    ],
                    "frequency": 1
                  },
                  "summary": "Pipecat Cloud v2 run"
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostRunScenariosPipecatV2"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostRunScenariosPipecatV2"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "ID of the result"
                    },
                    "agent": {
                      "type": "integer",
                      "description": "ID of the agent"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "running",
                        "completed",
                        "failed"
                      ],
                      "description": "Status of the result"
                    },
                    "run_as_text": {
                      "type": "boolean",
                      "description": "Whether the scenario ran as text or not",
                      "example": false
                    },
                    "runs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "description": "ID of the run"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "pending",
                              "running",
                              "completed",
                              "failed"
                            ],
                            "description": "Status of the run"
                          },
                          "scenario": {
                            "type": "integer",
                            "description": "ID of the scenario"
                          },
                          "number": {
                            "type": "string",
                            "description": "For outbound runs (agent.inbound=False). The given number that must be called from the phone number configured in the cekura agent.",
                            "example": "+11234567890"
                          },
                          "inbound_number": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "For inbound runs (agent.inbound=True). The agent's configured phone number will receive calls from this number.",
                            "example": "+11234567890"
                          },
                          "scenario_name": {
                            "type": "string",
                            "description": "Name of the scenario"
                          },
                          "test_profile_data": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "description": "Details of the test profile associated with this run scenario"
                          },
                          "outbound_dial_window_opens_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "When the outbound dial window opened (run transitioned to pending/waiting-for-call). Null until dispatched."
                          },
                          "outbound_dial_window_seconds": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "description": "Duration of the outbound dial window in seconds."
                          },
                          "outbound_dial_window_closes_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "Deadline by which your agent must dial the outbound number (opens_at + outbound_dial_window_seconds). Dials after this are dropped and the run returns status: timeout."
                          }
                        }
                      },
                      "examples": [
                        {
                          "id": 274,
                          "status": "pending",
                          "scenario": 1,
                          "number": null,
                          "inbound_number": "+11234567890",
                          "scenario_name": "Customer Support Call (Agent Inbound = True)",
                          "test_profile_data": null,
                          "outbound_dial_window_opens_at": null,
                          "outbound_dial_window_seconds": null,
                          "outbound_dial_window_closes_at": null
                        },
                        {
                          "id": 275,
                          "status": "pending",
                          "scenario": 2,
                          "number": "+11234567890",
                          "inbound_number": null,
                          "scenario_name": "Outbound Sales Call (Agent Inbound = False)",
                          "test_profile_data": null,
                          "outbound_dial_window_opens_at": "2026-06-24T10:47:30Z",
                          "outbound_dial_window_seconds": 300,
                          "outbound_dial_window_closes_at": "2026-06-24T10:52:30Z"
                        }
                      ]
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time",
                      "example": "2025-02-25T21:00:01.990052Z"
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "scenarios-run-pipecat-v2",
            "description": "PIPECAT CLOUD VOICE RUN (project credentials, v2): Execute evaluators against an agent deployed on Pipecat Cloud using credentials configured at the project level. Cekura creates the sessions; you don't pass per-scenario room URLs (that's the v1 endpoint). Requires Pipecat Cloud credentials with `pipecat_agent_name` set on the agent or project.\n\n**Cost:** voice-simulation rate per run.\n**Run-count math:** total runs = `len(scenarios) × frequency`.\n\n**Per-request `session_config` override** is allowed; merges over agent defaults.\n\n**When to use this vs others** (pick the endpoint matching the agent's configured connection — check `aiagents_retrieve`):\n- `scenarios_run_pipecat_v1` — manual room URLs per scenario\n- `scenarios_run_voice` — phone / SIP voice run\n- `scenarios_run_livekit_v2` — LiveKit (project credentials, v2)"
          }
        }
      }
    },
    "/test_framework/v1/scenarios/run_scenarios_retell_webrtc/": {
      "post": {
        "operationId": "scenarios-run-retell-webrtc_2",
        "description": "RETELL WEBRTC VOICE RUN: Execute evaluators against a Retell agent over WebRTC (LiveKit infrastructure). The agent must have Retell credentials configured. `retell_agent_id` is optional and defaults to `agent.assistant_id` if not provided.\n\n**Cost:** voice-simulation rate per run.\n**Run-count math:** total runs = `len(scenarios) × frequency`.\n\n**When to use this vs others** (pick the endpoint matching the agent's configured connection — check `aiagents_retrieve`):\n- `scenarios_run_voice` — phone / SIP voice run (no provider WebRTC needed)\n- `scenarios_run_vapi_webrtc` — VAPI agents over WebRTC\n- `scenarios_run_elevenlabs` — ElevenLabs Conversational agents\n- `scenarios_run_pipecat_v2` — Pipecat Cloud (project credentials, v2)\n- `scenarios_run_livekit_v2` — LiveKit (project credentials, v2)",
        "summary": "Run evaluators against a Retell agent over WebRTC",
        "tags": [
          "Evaluators"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RunScenariosRetellWebRTCRequest"
              },
              "examples": {
                "RetellWebRTCRun": {
                  "value": {
                    "agent_id": 12,
                    "scenarios": [
                      101,
                      102
                    ],
                    "frequency": 1
                  },
                  "summary": "Retell WebRTC run"
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/RunScenariosRetellWebRTCRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/RunScenariosRetellWebRTCRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "ID of the result"
                    },
                    "agent": {
                      "type": "integer",
                      "description": "ID of the agent"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "running",
                        "completed",
                        "failed"
                      ],
                      "description": "Status of the result"
                    },
                    "run_as_text": {
                      "type": "boolean",
                      "description": "Whether the scenario ran as text or not",
                      "example": false
                    },
                    "runs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "description": "ID of the run"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "pending",
                              "running",
                              "completed",
                              "failed"
                            ],
                            "description": "Status of the run"
                          },
                          "scenario": {
                            "type": "integer",
                            "description": "ID of the scenario"
                          },
                          "number": {
                            "type": "string",
                            "description": "For outbound runs (agent.inbound=False). The given number that must be called from the phone number configured in the cekura agent.",
                            "example": "+11234567890"
                          },
                          "inbound_number": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "For inbound runs (agent.inbound=True). The agent's configured phone number will receive calls from this number.",
                            "example": "+11234567890"
                          },
                          "scenario_name": {
                            "type": "string",
                            "description": "Name of the scenario"
                          },
                          "test_profile_data": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "description": "Details of the test profile associated with this run scenario"
                          },
                          "outbound_dial_window_opens_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "When the outbound dial window opened (run transitioned to pending/waiting-for-call). Null until dispatched."
                          },
                          "outbound_dial_window_seconds": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "description": "Duration of the outbound dial window in seconds."
                          },
                          "outbound_dial_window_closes_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "Deadline by which your agent must dial the outbound number (opens_at + outbound_dial_window_seconds). Dials after this are dropped and the run returns status: timeout."
                          }
                        }
                      },
                      "examples": [
                        {
                          "id": 274,
                          "status": "pending",
                          "scenario": 1,
                          "number": null,
                          "inbound_number": "+11234567890",
                          "scenario_name": "Customer Support Call (Agent Inbound = True)",
                          "test_profile_data": null,
                          "outbound_dial_window_opens_at": null,
                          "outbound_dial_window_seconds": null,
                          "outbound_dial_window_closes_at": null
                        },
                        {
                          "id": 275,
                          "status": "pending",
                          "scenario": 2,
                          "number": "+11234567890",
                          "inbound_number": null,
                          "scenario_name": "Outbound Sales Call (Agent Inbound = False)",
                          "test_profile_data": null,
                          "outbound_dial_window_opens_at": "2026-06-24T10:47:30Z",
                          "outbound_dial_window_seconds": 300,
                          "outbound_dial_window_closes_at": "2026-06-24T10:52:30Z"
                        }
                      ]
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time",
                      "example": "2025-02-25T21:00:01.990052Z"
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "scenarios-run-retell-webrtc",
            "description": "RETELL WEBRTC VOICE RUN: Execute evaluators against a Retell agent over WebRTC (LiveKit infrastructure). The agent must have Retell credentials configured. `retell_agent_id` is optional and defaults to `agent.assistant_id` if not provided.\n\n**Cost:** voice-simulation rate per run.\n**Run-count math:** total runs = `len(scenarios) × frequency`.\n\n**When to use this vs others** (pick the endpoint matching the agent's configured connection — check `aiagents_retrieve`):\n- `scenarios_run_voice` — phone / SIP voice run (no provider WebRTC needed)\n- `scenarios_run_vapi_webrtc` — VAPI agents over WebRTC\n- `scenarios_run_elevenlabs` — ElevenLabs Conversational agents\n- `scenarios_run_pipecat_v2` — Pipecat Cloud (project credentials, v2)\n- `scenarios_run_livekit_v2` — LiveKit (project credentials, v2)"
          }
        }
      }
    },
    "/test_framework/v1/scenarios/run_scenarios_sip/": {
      "post": {
        "operationId": "scenarios-run-sip_2",
        "description": "SIP VOICE RUN (direct SIP): Execute evaluators against an agent over a direct SIP connection (orchestrated by Cekura's SIP voice service). The agent must have a SIP endpoint configured (`telephony.sip_uri` on the v2 agent).\n\n**Custom SIP headers:** to send custom headers to the agent, attach a test profile whose `main_agent_variables` contain `X-` prefixed keys (pass its ID in `test_profile_ids`) — headers cannot be set on the agent or in this request.\n\n**Cost:** voice-simulation rate per run.\n**Run-count math:** total runs = `len(scenarios) × frequency × max(1, len(personality_ids)) × max(1, len(test_profile_ids))`.\n\n**When to use this vs others** (pick the endpoint matching the agent's configured connection — check `aiagents_retrieve`):\n- `scenarios_run_voice` — phone calls via Cekura's standard voice path\n- `scenarios_run_vapi_webrtc` / `_retell_webrtc` — provider-managed WebRTC\n- `scenarios_run_livekit_v2` — LiveKit (project credentials, v2)",
        "summary": "Run evaluators over a direct SIP connection",
        "tags": [
          "Evaluators"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostRunScenariosSip"
              },
              "examples": {
                "SIPRun": {
                  "value": {
                    "agent_id": 12,
                    "scenarios": [
                      101
                    ],
                    "frequency": 1
                  },
                  "summary": "SIP run"
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostRunScenariosSip"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostRunScenariosSip"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "ID of the result"
                    },
                    "agent": {
                      "type": "integer",
                      "description": "ID of the agent"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "running",
                        "completed",
                        "failed"
                      ],
                      "description": "Status of the result"
                    },
                    "run_as_text": {
                      "type": "boolean",
                      "description": "Whether the scenario ran as text or not",
                      "example": false
                    },
                    "runs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "description": "ID of the run"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "pending",
                              "running",
                              "completed",
                              "failed"
                            ],
                            "description": "Status of the run"
                          },
                          "scenario": {
                            "type": "integer",
                            "description": "ID of the scenario"
                          },
                          "number": {
                            "type": "string",
                            "description": "For outbound runs (agent.inbound=False). The given number that must be called from the phone number configured in the cekura agent.",
                            "example": "+11234567890"
                          },
                          "inbound_number": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "For inbound runs (agent.inbound=True). The agent's configured phone number will receive calls from this number.",
                            "example": "+11234567890"
                          },
                          "scenario_name": {
                            "type": "string",
                            "description": "Name of the scenario"
                          },
                          "test_profile_data": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "description": "Details of the test profile associated with this run scenario"
                          },
                          "outbound_dial_window_opens_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "When the outbound dial window opened (run transitioned to pending/waiting-for-call). Null until dispatched."
                          },
                          "outbound_dial_window_seconds": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "description": "Duration of the outbound dial window in seconds."
                          },
                          "outbound_dial_window_closes_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "Deadline by which your agent must dial the outbound number (opens_at + outbound_dial_window_seconds). Dials after this are dropped and the run returns status: timeout."
                          }
                        }
                      },
                      "examples": [
                        {
                          "id": 274,
                          "status": "pending",
                          "scenario": 1,
                          "number": null,
                          "inbound_number": "+11234567890",
                          "scenario_name": "Customer Support Call (Agent Inbound = True)",
                          "test_profile_data": null,
                          "outbound_dial_window_opens_at": null,
                          "outbound_dial_window_seconds": null,
                          "outbound_dial_window_closes_at": null
                        },
                        {
                          "id": 275,
                          "status": "pending",
                          "scenario": 2,
                          "number": "+11234567890",
                          "inbound_number": null,
                          "scenario_name": "Outbound Sales Call (Agent Inbound = False)",
                          "test_profile_data": null,
                          "outbound_dial_window_opens_at": "2026-06-24T10:47:30Z",
                          "outbound_dial_window_seconds": 300,
                          "outbound_dial_window_closes_at": "2026-06-24T10:52:30Z"
                        }
                      ]
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time",
                      "example": "2025-02-25T21:00:01.990052Z"
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "scenarios-run-sip",
            "description": "SIP VOICE RUN (direct SIP): Execute evaluators against an agent over a direct SIP connection (orchestrated by Cekura's SIP voice service). The agent must have a SIP endpoint configured (`telephony.sip_uri` on the v2 agent).\n\n**Custom SIP headers:** to send custom headers to the agent, attach a test profile whose `main_agent_variables` contain `X-` prefixed keys (pass its ID in `test_profile_ids`) — headers cannot be set on the agent or in this request.\n\n**Cost:** voice-simulation rate per run.\n**Run-count math:** total runs = `len(scenarios) × frequency × max(1, len(personality_ids)) × max(1, len(test_profile_ids))`.\n\n**When to use this vs others** (pick the endpoint matching the agent's configured connection — check `aiagents_retrieve`):\n- `scenarios_run_voice` — phone calls via Cekura's standard voice path\n- `scenarios_run_vapi_webrtc` / `_retell_webrtc` — provider-managed WebRTC\n- `scenarios_run_livekit_v2` — LiveKit (project credentials, v2)"
          }
        }
      }
    },
    "/test_framework/v1/scenarios/run_scenarios_text/": {
      "post": {
        "operationId": "scenarios-run-text_2",
        "description": "TEXT / SMS / CHAT RUN: Execute evaluators against your agent using text-only simulation (SMS, chat, or an agent-hosted websocket). Cheaper than voice — billed at the text-simulation rate. Requires a chat connection (`provider.chat_agent_details`) on the agent, or a websocket URL for `self_hosted` agents.\n\n**Run-count math:** total conversations = `len(scenarios) × frequency × max(1, len(personality_ids)) × max(1, len(test_profile_ids))`.\n\n**Concurrency:** use `concurrency_limit` to cap parallel conversations. Default: unbounded (subject to provider rate limits).\n\n**Scenario selection (pick one):**\n- `scenarios` — list of integer evaluator IDs (e.g. `[101, 102]`)\n- `tags` — select by tag\n- `folder_path` — select by folder path (e.g. `\"Sales.Inbound\"`); requires `project_id`\n\n**Websocket override:** if the agent exposes a plain websocket URL for text, pass it as `websocket_url` — this bypasses the agent's standard text-readiness check. Pass `websocket_headers` (JSON object) to override connection headers for this run — merged over the agent's configured headers, with the per-run values winning.\n\n**When to use this vs others** (pick the endpoint matching the agent's configured connection — check `aiagents_retrieve`):\n- `run_scenarios` — real voice / phone / SIP call\n- `run_scenarios_with_websockets` — each scenario carries its own websocket URL (bulk)\n- `run_scenarios_pipecat` — Pipecat/Daily.co WebRTC deployment\n\n**`self_hosted` agents:** agents with `assistant_provider=\"self_hosted\"` require a websocket URL. Either pre-configure `websocket_url` on the agent, or pass it directly in this request. Without it, the run fails with `[\"Agent does not have a websocket URL\"]`. Passing `websocket_url` here changes the result's `run_type` to `\"WebSocket\"` instead of `\"Text\"`.\n\n**Personality override:** `personality_ids` must be IDs that are already enabled for the agent's project. Check which are enabled via `aiagents_retrieve` → `enabled_personalities` field. To enable a new personality, call `aiagents_partial_update` with the updated `enabled_personalities` list before using it here. Note: enabling a personality applies project-wide, not just to one agent. Passing an ID that is not enabled returns `[\"Invalid personalities provided.\"]`.\n\n**Scheduled runs:** to run on a cron schedule, create a CronJob via `POST /test_framework/v1/cron_jobs/` with `execution_mode=\"text\"` instead.\n\n**Polling for completion:** the response contains a `result.id` with `status: 'running'`. Poll `GET /test_framework/v1/results/{result_id}/` until `status` is 'completed' or 'failed'. There is no separate progress endpoint for runs. Check `failed_reasons` for infrastructure errors; check `runs[run_id].error_message` for per-run errors.",
        "summary": "Run evaluators in text / SMS / chat mode",
        "tags": [
          "Evaluators"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostRunScenariosText"
              },
              "examples": {
                "RunSelectedScenariosInTextMode": {
                  "value": {
                    "agent_id": 12,
                    "scenarios": [
                      101,
                      102
                    ],
                    "frequency": 1
                  },
                  "summary": "Run selected scenarios in text mode"
                },
                "RunViaAgentWebsocketURL,2×Each,3InParallel": {
                  "value": {
                    "agent_id": 12,
                    "scenarios": [
                      101
                    ],
                    "frequency": 2,
                    "websocket_url": "wss://my-agent.example.com/chat",
                    "concurrency_limit": 3
                  },
                  "summary": "Run via agent websocket URL, 2× each, 3 in parallel"
                },
                "RunAFolderViaSMS": {
                  "value": {
                    "agent_id": 12,
                    "folder_path": "Support.Billing",
                    "project_id": 1376,
                    "frequency": 1,
                    "outbound_phone_number": "+14155551234"
                  },
                  "summary": "Run a folder via SMS"
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostRunScenariosText"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostRunScenariosText"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "ID of the result"
                    },
                    "agent": {
                      "type": "integer",
                      "description": "ID of the agent"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "running",
                        "completed",
                        "failed"
                      ],
                      "description": "Status of the result"
                    },
                    "run_as_text": {
                      "type": "boolean",
                      "description": "Whether the scenario ran as text or not",
                      "example": false
                    },
                    "runs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "description": "ID of the run"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "pending",
                              "running",
                              "completed",
                              "failed"
                            ],
                            "description": "Status of the run"
                          },
                          "scenario": {
                            "type": "integer",
                            "description": "ID of the scenario"
                          },
                          "number": {
                            "type": "string",
                            "description": "For outbound runs (agent.inbound=False). The given number that must be called from the phone number configured in the cekura agent.",
                            "example": "+11234567890"
                          },
                          "inbound_number": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "For inbound runs (agent.inbound=True). The agent's configured phone number will receive calls from this number.",
                            "example": "+11234567890"
                          },
                          "scenario_name": {
                            "type": "string",
                            "description": "Name of the scenario"
                          },
                          "test_profile_data": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "description": "Details of the test profile associated with this run scenario"
                          },
                          "outbound_dial_window_opens_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "When the outbound dial window opened (run transitioned to pending/waiting-for-call). Null until dispatched."
                          },
                          "outbound_dial_window_seconds": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "description": "Duration of the outbound dial window in seconds."
                          },
                          "outbound_dial_window_closes_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "Deadline by which your agent must dial the outbound number (opens_at + outbound_dial_window_seconds). Dials after this are dropped and the run returns status: timeout."
                          }
                        }
                      },
                      "examples": [
                        {
                          "id": 274,
                          "status": "pending",
                          "scenario": 1,
                          "number": null,
                          "inbound_number": "+11234567890",
                          "scenario_name": "Customer Support Call (Agent Inbound = True)",
                          "test_profile_data": null,
                          "outbound_dial_window_opens_at": null,
                          "outbound_dial_window_seconds": null,
                          "outbound_dial_window_closes_at": null
                        },
                        {
                          "id": 275,
                          "status": "pending",
                          "scenario": 2,
                          "number": "+11234567890",
                          "inbound_number": null,
                          "scenario_name": "Outbound Sales Call (Agent Inbound = False)",
                          "test_profile_data": null,
                          "outbound_dial_window_opens_at": "2026-06-24T10:47:30Z",
                          "outbound_dial_window_seconds": 300,
                          "outbound_dial_window_closes_at": "2026-06-24T10:52:30Z"
                        }
                      ]
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time",
                      "example": "2025-02-25T21:00:01.990052Z"
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "scenarios-run-text",
            "description": "TEXT / SMS / CHAT RUN: Execute evaluators against your agent using text-only simulation (SMS, chat, or an agent-hosted websocket). Cheaper than voice — billed at the text-simulation rate. Requires a chat connection (`provider.chat_agent_details`) on the agent, or a websocket URL for `self_hosted` agents.\n\n**Run-count math:** total conversations = `len(scenarios) × frequency × max(1, len(personality_ids)) × max(1, len(test_profile_ids))`.\n\n**Concurrency:** use `concurrency_limit` to cap parallel conversations. Default: unbounded (subject to provider rate limits).\n\n**Scenario selection (pick one):**\n- `scenarios` — list of integer evaluator IDs (e.g. `[101, 102]`)\n- `tags` — select by tag\n- `folder_path` — select by folder path (e.g. `\"Sales.Inbound\"`); requires `project_id`\n\n**Websocket override:** if the agent exposes a plain websocket URL for text, pass it as `websocket_url` — this bypasses the agent's standard text-readiness check. Pass `websocket_headers` (JSON object) to override connection headers for this run — merged over the agent's configured headers, with the per-run values winning.\n\n**When to use this vs others** (pick the endpoint matching the agent's configured connection — check `aiagents_retrieve`):\n- `run_scenarios` — real voice / phone / SIP call\n- `run_scenarios_with_websockets` — each scenario carries its own websocket URL (bulk)\n- `run_scenarios_pipecat` — Pipecat/Daily.co WebRTC deployment\n\n**`self_hosted` agents:** agents with `assistant_provider=\"self_hosted\"` require a websocket URL. Either pre-configure `websocket_url` on the agent, or pass it directly in this request. Without it, the run fails with `[\"Agent does not have a websocket URL\"]`. Passing `websocket_url` here changes the result's `run_type` to `\"WebSocket\"` instead of `\"Text\"`.\n\n**Personality override:** `personality_ids` must be IDs that are already enabled for the agent's project. Check which are enabled via `aiagents_retrieve` → `enabled_personalities` field. To enable a new personality, call `aiagents_partial_update` with the updated `enabled_personalities` list before using it here. Note: enabling a personality applies project-wide, not just to one agent. Passing an ID that is not enabled returns `[\"Invalid personalities provided.\"]`.\n\n**Scheduled runs:** to run on a cron schedule, create a CronJob via `POST /test_framework/v1/cron_jobs/` with `execution_mode=\"text\"` instead.\n\n**Polling for completion:** the response contains a `result.id` with `status: 'running'`. Poll `GET /test_framework/v1/results/{result_id}/` until `status` is 'completed' or 'failed'. There is no separate progress endpoint for runs. Check `failed_reasons` for infrastructure errors; check `runs[run_id].error_message` for per-run errors."
          }
        }
      }
    },
    "/test_framework/v1/scenarios/run_scenarios_vapi_webrtc/": {
      "post": {
        "operationId": "scenarios-run-vapi-webrtc_2",
        "description": "VAPI WEBRTC VOICE RUN: Execute evaluators against a VAPI agent over WebRTC. Required: `vapi_assistant_id` (the VAPI assistant). The agent (looked up via `agent_id` or inferred from the first scenario) must have VAPI credentials configured.\n\n**Cost:** voice-simulation rate per run.\n**Run-count math:** total runs = `len(scenarios) × frequency`.\n\n**When to use this vs others** (pick the endpoint matching the agent's configured connection — check `aiagents_retrieve`):\n- `scenarios_run_voice` — phone / SIP voice run (no provider WebRTC needed)\n- `scenarios_run_text` — text/SMS/chat (cheaper)\n- `scenarios_run_retell_webrtc` — Retell agents over WebRTC\n- `scenarios_run_elevenlabs` — ElevenLabs Conversational agents\n- `scenarios_run_pipecat_v2` — Pipecat Cloud (project credentials, v2)\n- `scenarios_run_livekit_v2` — LiveKit (project credentials, v2)",
        "summary": "Run evaluators against a VAPI WebRTC agent",
        "tags": [
          "Evaluators"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RunScenariosVapiWebRTCRequest"
              },
              "examples": {
                "VAPIWebRTCRun": {
                  "value": {
                    "agent_id": 12,
                    "scenarios": [
                      101,
                      102
                    ],
                    "vapi_assistant_id": "asst_abc123",
                    "frequency": 1
                  },
                  "summary": "VAPI WebRTC run"
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/RunScenariosVapiWebRTCRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/RunScenariosVapiWebRTCRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "ID of the result"
                    },
                    "agent": {
                      "type": "integer",
                      "description": "ID of the agent"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "running",
                        "completed",
                        "failed"
                      ],
                      "description": "Status of the result"
                    },
                    "run_as_text": {
                      "type": "boolean",
                      "description": "Whether the scenario ran as text or not",
                      "example": false
                    },
                    "runs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "description": "ID of the run"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "pending",
                              "running",
                              "completed",
                              "failed"
                            ],
                            "description": "Status of the run"
                          },
                          "scenario": {
                            "type": "integer",
                            "description": "ID of the scenario"
                          },
                          "number": {
                            "type": "string",
                            "description": "For outbound runs (agent.inbound=False). The given number that must be called from the phone number configured in the cekura agent.",
                            "example": "+11234567890"
                          },
                          "inbound_number": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "For inbound runs (agent.inbound=True). The agent's configured phone number will receive calls from this number.",
                            "example": "+11234567890"
                          },
                          "scenario_name": {
                            "type": "string",
                            "description": "Name of the scenario"
                          },
                          "test_profile_data": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "description": "Details of the test profile associated with this run scenario"
                          },
                          "outbound_dial_window_opens_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "When the outbound dial window opened (run transitioned to pending/waiting-for-call). Null until dispatched."
                          },
                          "outbound_dial_window_seconds": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "description": "Duration of the outbound dial window in seconds."
                          },
                          "outbound_dial_window_closes_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "Deadline by which your agent must dial the outbound number (opens_at + outbound_dial_window_seconds). Dials after this are dropped and the run returns status: timeout."
                          }
                        }
                      },
                      "examples": [
                        {
                          "id": 274,
                          "status": "pending",
                          "scenario": 1,
                          "number": null,
                          "inbound_number": "+11234567890",
                          "scenario_name": "Customer Support Call (Agent Inbound = True)",
                          "test_profile_data": null,
                          "outbound_dial_window_opens_at": null,
                          "outbound_dial_window_seconds": null,
                          "outbound_dial_window_closes_at": null
                        },
                        {
                          "id": 275,
                          "status": "pending",
                          "scenario": 2,
                          "number": "+11234567890",
                          "inbound_number": null,
                          "scenario_name": "Outbound Sales Call (Agent Inbound = False)",
                          "test_profile_data": null,
                          "outbound_dial_window_opens_at": "2026-06-24T10:47:30Z",
                          "outbound_dial_window_seconds": 300,
                          "outbound_dial_window_closes_at": "2026-06-24T10:52:30Z"
                        }
                      ]
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time",
                      "example": "2025-02-25T21:00:01.990052Z"
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "scenarios-run-vapi-webrtc",
            "description": "VAPI WEBRTC VOICE RUN: Execute evaluators against a VAPI agent over WebRTC. Required: `vapi_assistant_id` (the VAPI assistant). The agent (looked up via `agent_id` or inferred from the first scenario) must have VAPI credentials configured.\n\n**Cost:** voice-simulation rate per run.\n**Run-count math:** total runs = `len(scenarios) × frequency`.\n\n**When to use this vs others** (pick the endpoint matching the agent's configured connection — check `aiagents_retrieve`):\n- `scenarios_run_voice` — phone / SIP voice run (no provider WebRTC needed)\n- `scenarios_run_text` — text/SMS/chat (cheaper)\n- `scenarios_run_retell_webrtc` — Retell agents over WebRTC\n- `scenarios_run_elevenlabs` — ElevenLabs Conversational agents\n- `scenarios_run_pipecat_v2` — Pipecat Cloud (project credentials, v2)\n- `scenarios_run_livekit_v2` — LiveKit (project credentials, v2)"
          }
        }
      }
    },
    "/test_framework/v1/scenarios/run_scenarios_with_websockets/": {
      "post": {
        "operationId": "scenarios-run-websocket_2",
        "description": "WEBSOCKET RUN (per-scenario URLs, bulk): Execute evaluators where each scenario carries its own websocket URL. Useful when you have a fleet of agents or stateful websocket sessions to test in a single batch.\n\n**Run-count:** total conversations = `len(scenarios) × frequency`. (Personality and test-profile multipliers are not supported on this endpoint.)\n\n**`frequency` is required** on this endpoint (no default).\n\n**When to use this vs others** (pick the endpoint matching the agent's configured connection — check `aiagents_retrieve`):\n- `run_scenarios_text` — single websocket URL or SMS/chat mode (simpler)\n- `run_scenarios` — real voice / phone / SIP call\n- `run_scenarios_pipecat` — Pipecat/Daily.co WebRTC deployment\n\n**Polling for completion:** the response contains a `result.id` with `status: 'running'`. Poll `GET /test_framework/v1/results/{result_id}/` until `status` is 'completed' or 'failed'.\n\n**Known limitation:** `result.run_type` may show 'Text' instead of 'WebSocket' for runs triggered via this endpoint — this is a display issue only and does not affect execution.",
        "summary": "Run evaluators against per-scenario websocket URLs (bulk)",
        "tags": [
          "Evaluators"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RunScenariosWithWebsockets"
              },
              "examples": {
                "Per-scenarioWebsocketURLs": {
                  "value": {
                    "agent": 12,
                    "frequency": 1,
                    "scenarios": [
                      {
                        "scenario": 101,
                        "websocket_url": "wss://agent-a.example.com/chat"
                      },
                      {
                        "scenario": 102,
                        "websocket_url": "wss://agent-b.example.com/chat"
                      }
                    ]
                  },
                  "summary": "Per-scenario websocket URLs"
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/RunScenariosWithWebsockets"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/RunScenariosWithWebsockets"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "ID of the result"
                    },
                    "agent": {
                      "type": "integer",
                      "description": "ID of the agent"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "running",
                        "completed",
                        "failed"
                      ],
                      "description": "Status of the result"
                    },
                    "run_as_text": {
                      "type": "boolean",
                      "description": "Whether the scenario ran as text or not",
                      "example": false
                    },
                    "runs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "description": "ID of the run"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "pending",
                              "running",
                              "completed",
                              "failed"
                            ],
                            "description": "Status of the run"
                          },
                          "scenario": {
                            "type": "integer",
                            "description": "ID of the scenario"
                          },
                          "number": {
                            "type": "string",
                            "description": "For outbound runs (agent.inbound=False). The given number that must be called from the phone number configured in the cekura agent.",
                            "example": "+11234567890"
                          },
                          "inbound_number": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "For inbound runs (agent.inbound=True). The agent's configured phone number will receive calls from this number.",
                            "example": "+11234567890"
                          },
                          "scenario_name": {
                            "type": "string",
                            "description": "Name of the scenario"
                          },
                          "test_profile_data": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "description": "Details of the test profile associated with this run scenario"
                          },
                          "outbound_dial_window_opens_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "When the outbound dial window opened (run transitioned to pending/waiting-for-call). Null until dispatched."
                          },
                          "outbound_dial_window_seconds": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "description": "Duration of the outbound dial window in seconds."
                          },
                          "outbound_dial_window_closes_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "Deadline by which your agent must dial the outbound number (opens_at + outbound_dial_window_seconds). Dials after this are dropped and the run returns status: timeout."
                          }
                        }
                      },
                      "examples": [
                        {
                          "id": 274,
                          "status": "pending",
                          "scenario": 1,
                          "number": null,
                          "inbound_number": "+11234567890",
                          "scenario_name": "Customer Support Call (Agent Inbound = True)",
                          "test_profile_data": null,
                          "outbound_dial_window_opens_at": null,
                          "outbound_dial_window_seconds": null,
                          "outbound_dial_window_closes_at": null
                        },
                        {
                          "id": 275,
                          "status": "pending",
                          "scenario": 2,
                          "number": "+11234567890",
                          "inbound_number": null,
                          "scenario_name": "Outbound Sales Call (Agent Inbound = False)",
                          "test_profile_data": null,
                          "outbound_dial_window_opens_at": "2026-06-24T10:47:30Z",
                          "outbound_dial_window_seconds": 300,
                          "outbound_dial_window_closes_at": "2026-06-24T10:52:30Z"
                        }
                      ]
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time",
                      "example": "2025-02-25T21:00:01.990052Z"
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "scenarios-run-websocket",
            "description": "WEBSOCKET RUN (per-scenario URLs, bulk): Execute evaluators where each scenario carries its own websocket URL. Useful when you have a fleet of agents or stateful websocket sessions to test in a single batch.\n\n**Run-count:** total conversations = `len(scenarios) × frequency`. (Personality and test-profile multipliers are not supported on this endpoint.)\n\n**`frequency` is required** on this endpoint (no default).\n\n**When to use this vs others** (pick the endpoint matching the agent's configured connection — check `aiagents_retrieve`):\n- `run_scenarios_text` — single websocket URL or SMS/chat mode (simpler)\n- `run_scenarios` — real voice / phone / SIP call\n- `run_scenarios_pipecat` — Pipecat/Daily.co WebRTC deployment\n\n**Polling for completion:** the response contains a `result.id` with `status: 'running'`. Poll `GET /test_framework/v1/results/{result_id}/` until `status` is 'completed' or 'failed'.\n\n**Known limitation:** `result.run_type` may show 'Text' instead of 'WebSocket' for runs triggered via this endpoint — this is a display issue only and does not affect execution."
          }
        }
      }
    },
    "/test_framework/v1/scenarios/scenario-agent/": {
      "post": {
        "operationId": "scenarios-agent-create_2",
        "description": "Create or improve evaluator scenarios using AI by providing natural-language feedback. This tool changes evaluator scenarios only; it does not change an AI agent's prompt, configuration, tools, or provider settings. For a request such as `improve agent <id>`, use the `cekura:cekura-self-improving-agent` skill instead.\n\n**How it works:**\n1. Send evaluator IDs and your improvement request\n2. AI analyzes and suggests improvements\n3. Review suggestions and apply with `apply_changes=true`\n\n**`scenarios` field:** pass a list of integer IDs `[101, 102]`, a single integer `101`, or the string `\"all\"` to improve all scenarios for the agent. Do not pass IDs as a JSON-stringified list — pass them as a native array.\n\n**Applying large change sets:** when using `apply_changes: true` with many scenarios, the `updated_scenarios` payload may be large. If you receive an unexpected error, split the apply into smaller batches of 3–5 scenarios at a time.\n\n**Response:** Returns `progress_id` for polling status at /scenario-agent-progress/\n\n**Multi-turn improvements:** Use the `context` field to maintain conversation history across requests.",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ScenarioAgentRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/ScenarioAgentRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/ScenarioAgentRequest"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScenarioAgentStartResponse"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "summary": "Create or improve scenarios via agent",
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "scenarios-agent-create",
            "description": "Create or improve evaluator scenarios using AI by providing natural-language feedback. This tool changes evaluator scenarios only; it does not change an AI agent's prompt, configuration, tools, or provider settings. For a request such as `improve agent <id>`, use the `cekura:cekura-self-improving-agent` skill instead.\n\n**How it works:**\n1. Send evaluator IDs and your improvement request\n2. AI analyzes and suggests improvements\n3. Review suggestions and apply with `apply_changes=true`\n\n**`scenarios` field:** pass a list of integer IDs `[101, 102]`, a single integer `101`, or the string `\"all\"` to improve all scenarios for the agent. Do not pass IDs as a JSON-stringified list — pass them as a native array.\n\n**Applying large change sets:** when using `apply_changes: true` with many scenarios, the `updated_scenarios` payload may be large. If you receive an unexpected error, split the apply into smaller batches of 3–5 scenarios at a time.\n\n**Response:** Returns `progress_id` for polling status at /scenario-agent-progress/\n\n**Multi-turn improvements:** Use the `context` field to maintain conversation history across requests."
          }
        }
      }
    },
    "/test_framework/v1/scenarios/scenario-agent-progress/": {
      "get": {
        "operationId": "scenarios-agent-progress_2",
        "description": "Check the progress of an evaluator improvement request.\n\nAfter calling POST /scenario-agent/, use the returned `progress_id` to poll this endpoint.\n\n**Status values:**\n- `in_progress` - AI is analyzing and generating improvements (keep polling)\n- `completed` - AI finished; review suggestions in the `result` field\n- `needs_agent_clarification` - AI needs you to select an agent for some evaluators\n- `cancelled` - Request was cancelled\n- `failed` - An error occurred; see `error` field\n\n**Typical flow:**\n1. POST /scenario-agent/ → receive `progress_id`\n2. Poll this endpoint every few seconds\n3. When `status == 'completed'`, review the suggested changes\n4. POST /scenario-agent/ again with `apply_changes=true` to apply them",
        "parameters": [
          {
            "in": "query",
            "name": "progress_id",
            "schema": {
              "type": "string"
            },
            "description": "The progress_id returned by POST /scenario-agent/",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScenarioAgentProgress"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "summary": "Get scenario-agent progress",
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "scenarios-agent-progress",
            "description": "Check the progress of an evaluator improvement request.\n\nAfter calling POST /scenario-agent/, use the returned `progress_id` to poll this endpoint.\n\n**Status values:**\n- `in_progress` - AI is analyzing and generating improvements (keep polling)\n- `completed` - AI finished; review suggestions in the `result` field\n- `needs_agent_clarification` - AI needs you to select an agent for some evaluators\n- `cancelled` - Request was cancelled\n- `failed` - An error occurred; see `error` field\n\n**Typical flow:**\n1. POST /scenario-agent/ → receive `progress_id`\n2. Poll this endpoint every few seconds\n3. When `status == 'completed'`, review the suggested changes\n4. POST /scenario-agent/ again with `apply_changes=true` to apply them"
          }
        }
      }
    },
    "/test_framework/v1/scenarios/tags/": {
      "get": {
        "operationId": "scenarios-tags-retrieve",
        "description": "Scenarios tags",
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Scenario"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/share-tokens/{token}/resolve/": {
      "get": {
        "operationId": "share-tokens-resolve-retrieve",
        "description": "Resolve a shareable-link token to the underlying source object(s).\n\nGiven the opaque token from a `https://<host>/share/results/<token>` URL,\nreturns the result_id (or other source object IDs) the token grants access\nto, plus org/agent context and expiry state.\n\nRestricted to OAuth tokens minted by the `cekura-support-bot` client via\nthe client_credentials grant. The support-bot's subject user must be a\nmember of the source object's organization — so support agents can only\nresolve tokens for results belonging to the customer they're helping.",
        "parameters": [
          {
            "in": "path",
            "name": "token",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "support_bot_oauth": []
          }
        ],
        "responses": {
          "200": {
            "description": "No response body"
          }
        }
      }
    },
    "/test_framework/v1/test-profiles/": {
      "get": {
        "operationId": "test-profiles-list",
        "description": "List test profiles",
        "parameters": [
          {
            "in": "query",
            "name": "agent_id",
            "schema": {
              "type": "integer"
            },
            "description": "ID of the agent. Either agent_id or project_id must be provided."
          },
          {
            "in": "query",
            "name": "project_id",
            "schema": {
              "type": "integer"
            },
            "description": "ID of the project. Either agent_id or project_id must be provided."
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AIAgentTestProfileList"
                  }
                },
                "examples": {
                  "ListTestProfiles": {
                    "value": [
                      {
                        "agent": 123,
                        "name": "<string>",
                        "information": {
                          "main_agent_variables": {
                            "user_id": "<string>",
                            "account_id": "<string>"
                          },
                          "testing_agent_variables": {
                            "user_name": "<string>",
                            "user_email": "<string>"
                          }
                        }
                      }
                    ],
                    "summary": "List Test Profiles"
                  }
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "summary": "List test profiles",
        "x-mcp-summary-derived": true,
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "test-profiles-list",
            "description": "List test profiles"
          }
        }
      },
      "post": {
        "operationId": "test-profiles-create",
        "description": "Create a test profile",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostAIAgentTestProfileExternal"
              },
              "examples": {
                "CreateTestProfileWithAgent": {
                  "value": {
                    "agent": 123,
                    "name": "<string>",
                    "information": {
                      "main_agent_variables": {
                        "user_id": "<string>",
                        "account_id": "<string>"
                      },
                      "testing_agent_variables": {
                        "user_name": "<string>",
                        "user_email": "<string>"
                      }
                    }
                  },
                  "summary": "Create Test Profile with Agent"
                },
                "CreateTestProfileWithProject": {
                  "value": {
                    "project": 456,
                    "name": "<string>",
                    "information": {
                      "main_agent_variables": {
                        "user_id": "<string>",
                        "account_id": "<string>"
                      },
                      "testing_agent_variables": {
                        "user_name": "<string>",
                        "user_email": "<string>"
                      }
                    }
                  },
                  "summary": "Create Test Profile with Project"
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostAIAgentTestProfileExternal"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostAIAgentTestProfileExternal"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AIAgentTestProfile"
                },
                "examples": {
                  "CreateTestProfileResponse": {
                    "value": {
                      "id": 123,
                      "project": 456,
                      "agent": null,
                      "name": "<string>",
                      "information": {
                        "main_agent_variables": {
                          "user_id": "U-42",
                          "account_id": "ACC-4521"
                        },
                        "testing_agent_variables": {
                          "user_name": "John Doe",
                          "user_email": "john.doe@example.com"
                        }
                      }
                    },
                    "summary": "Create Test Profile Response"
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "summary": "Create a test profile",
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "test-profiles-create",
            "description": "Create a test profile"
          }
        }
      }
    },
    "/test_framework/v1/test-profiles-external/": {
      "get": {
        "operationId": "test-profiles-external-list",
        "description": "List test profiles",
        "parameters": [
          {
            "in": "query",
            "name": "agent_id",
            "schema": {
              "type": "integer"
            },
            "description": "ID of the agent. Either agent_id or project_id must be provided."
          },
          {
            "in": "query",
            "name": "project_id",
            "schema": {
              "type": "integer"
            },
            "description": "ID of the project. Either agent_id or project_id must be provided."
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AIAgentTestProfileList"
                  }
                },
                "examples": {
                  "ListTestProfiles": {
                    "value": [
                      {
                        "agent": 123,
                        "name": "<string>",
                        "information": {
                          "main_agent_variables": {
                            "user_id": "<string>",
                            "account_id": "<string>"
                          },
                          "testing_agent_variables": {
                            "user_name": "<string>",
                            "user_email": "<string>"
                          }
                        }
                      }
                    ],
                    "summary": "List Test Profiles"
                  }
                }
              }
            },
            "description": ""
          }
        }
      },
      "post": {
        "operationId": "test-profiles-external-create",
        "description": "Create a new test profile",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostAIAgentTestProfileExternal"
              },
              "examples": {
                "CreateTestProfileWithAgent": {
                  "value": {
                    "agent": 123,
                    "name": "<string>",
                    "information": {
                      "main_agent_variables": {
                        "user_id": "<string>",
                        "account_id": "<string>"
                      },
                      "testing_agent_variables": {
                        "user_name": "<string>",
                        "user_email": "<string>"
                      }
                    }
                  },
                  "summary": "Create Test Profile with Agent"
                },
                "CreateTestProfileWithProject": {
                  "value": {
                    "project": 456,
                    "name": "<string>",
                    "information": {
                      "main_agent_variables": {
                        "user_id": "<string>",
                        "account_id": "<string>"
                      },
                      "testing_agent_variables": {
                        "user_name": "<string>",
                        "user_email": "<string>"
                      }
                    }
                  },
                  "summary": "Create Test Profile with Project"
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostAIAgentTestProfileExternal"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostAIAgentTestProfileExternal"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AIAgentTestProfile"
                },
                "examples": {
                  "CreateTestProfileResponse": {
                    "value": {
                      "id": 123,
                      "project": 456,
                      "agent": null,
                      "name": "<string>",
                      "information": {
                        "main_agent_variables": {
                          "user_id": "U-42",
                          "account_id": "ACC-4521"
                        },
                        "testing_agent_variables": {
                          "user_name": "John Doe",
                          "user_email": "john.doe@example.com"
                        }
                      }
                    },
                    "summary": "Create Test Profile Response"
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/test-profiles-external/{id}/": {
      "get": {
        "operationId": "test-profiles-external-retrieve",
        "description": "Retrieve a test profile by ID",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this ai agent test profile.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AIAgentTestProfile"
                },
                "examples": {
                  "GetTestProfile": {
                    "value": {
                      "id": 123,
                      "agent": 123,
                      "name": "<string>",
                      "information": {
                        "main_agent_variables": {
                          "user_id": "<string>",
                          "account_id": "<string>"
                        },
                        "testing_agent_variables": {
                          "user_name": "<string>",
                          "user_email": "<string>"
                        }
                      }
                    },
                    "summary": "Get Test Profile"
                  }
                }
              }
            },
            "description": ""
          }
        }
      },
      "put": {
        "operationId": "test-profiles-external-update",
        "description": "Update a test profile",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this ai agent test profile.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AIAgentTestProfile"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/AIAgentTestProfile"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/AIAgentTestProfile"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AIAgentTestProfile"
                }
              }
            },
            "description": ""
          }
        }
      },
      "patch": {
        "operationId": "test-profiles-external-partial-update",
        "description": "Update a test profile",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this ai agent test profile.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchedSchemaPostAIAgentTestProfileExternal"
              },
              "examples": {
                "PartialUpdateTestProfile": {
                  "value": {
                    "name": "<string>",
                    "information": {
                      "main_agent_variables": {
                        "user_id": "<string>",
                        "account_id": "<string>"
                      },
                      "testing_agent_variables": {
                        "user_name": "<string>",
                        "user_email": "<string>"
                      }
                    }
                  },
                  "summary": "Partial Update Test Profile"
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/PatchedSchemaPostAIAgentTestProfileExternal"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/PatchedSchemaPostAIAgentTestProfileExternal"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AIAgentTestProfile"
                },
                "examples": {
                  "PartialUpdateTestProfileResponse": {
                    "value": {
                      "id": 123,
                      "agent": 123,
                      "name": "<string>",
                      "information": {
                        "main_agent_variables": {
                          "user_id": "<string>",
                          "account_id": "<string>"
                        },
                        "testing_agent_variables": {
                          "user_name": "<string>",
                          "user_email": "<string>"
                        }
                      }
                    },
                    "summary": "Partial Update Test Profile Response"
                  }
                }
              }
            },
            "description": ""
          }
        }
      },
      "delete": {
        "operationId": "test-profiles-external-destroy",
        "description": "⚠ Irreversible. Deletes the test profile. Evaluators that referenced this profile will no longer receive caller metadata on future runs.",
        "summary": "Delete a test profile",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this ai agent test profile.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "204": {
            "description": "No response body"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/test-profiles/{id}/": {
      "get": {
        "operationId": "test-profiles-retrieve",
        "description": "Get a test profile",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this ai agent test profile.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AIAgentTestProfile"
                },
                "examples": {
                  "GetTestProfile": {
                    "value": {
                      "id": 123,
                      "agent": 123,
                      "name": "<string>",
                      "information": {
                        "main_agent_variables": {
                          "user_id": "<string>",
                          "account_id": "<string>"
                        },
                        "testing_agent_variables": {
                          "user_name": "<string>",
                          "user_email": "<string>"
                        }
                      }
                    },
                    "summary": "Get Test Profile"
                  }
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "summary": "Get a test profile",
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "test-profiles-retrieve",
            "description": "Get a test profile"
          }
        }
      },
      "put": {
        "operationId": "test-profiles-update",
        "description": "Update a test profile",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this ai agent test profile.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AIAgentTestProfile"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/AIAgentTestProfile"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/AIAgentTestProfile"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AIAgentTestProfile"
                }
              }
            },
            "description": ""
          }
        }
      },
      "patch": {
        "operationId": "test-profiles-partial-update",
        "description": "Update a test profile",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this ai agent test profile.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchedSchemaPostAIAgentTestProfileExternal"
              },
              "examples": {
                "PartialUpdateTestProfile": {
                  "value": {
                    "name": "<string>",
                    "information": {
                      "main_agent_variables": {
                        "user_id": "<string>",
                        "account_id": "<string>"
                      },
                      "testing_agent_variables": {
                        "user_name": "<string>",
                        "user_email": "<string>"
                      }
                    }
                  },
                  "summary": "Partial Update Test Profile"
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/PatchedSchemaPostAIAgentTestProfileExternal"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/PatchedSchemaPostAIAgentTestProfileExternal"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AIAgentTestProfile"
                },
                "examples": {
                  "PartialUpdateTestProfileResponse": {
                    "value": {
                      "id": 123,
                      "agent": 123,
                      "name": "<string>",
                      "information": {
                        "main_agent_variables": {
                          "user_id": "<string>",
                          "account_id": "<string>"
                        },
                        "testing_agent_variables": {
                          "user_name": "<string>",
                          "user_email": "<string>"
                        }
                      }
                    },
                    "summary": "Partial Update Test Profile Response"
                  }
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "summary": "Update a test profile",
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "test-profiles-partial-update",
            "description": "Update a test profile"
          }
        }
      },
      "delete": {
        "operationId": "test-profiles-destroy",
        "description": "⚠ Irreversible. Deletes the test profile. Evaluators that referenced this profile will no longer receive caller metadata on future runs.",
        "summary": "Delete a test profile",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this ai agent test profile.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "204": {
            "description": "No response body"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "test-profiles-destroy",
            "description": "⚠ Irreversible. Deletes the test profile. Evaluators that referenced this profile will no longer receive caller metadata on future runs."
          }
        }
      }
    },
    "/test_framework/v1/views/": {
      "get": {
        "operationId": "views-list",
        "description": "List saved filter views",
        "parameters": [
          {
            "name": "page",
            "required": false,
            "in": "query",
            "description": "A page number within the paginated result set.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "page_size",
            "required": false,
            "in": "query",
            "description": "Number of results to return per page.",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedViewList"
                }
              }
            },
            "description": ""
          }
        }
      },
      "post": {
        "operationId": "views-create",
        "description": "Create a new saved filter view",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/View"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/View"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/View"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/View"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v1/views/{id}/": {
      "get": {
        "operationId": "views-retrieve",
        "description": "Retrieve a saved filter view by ID",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this view.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/View"
                }
              }
            },
            "description": ""
          }
        }
      },
      "put": {
        "operationId": "views-update",
        "description": "Update a saved filter view",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this view.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/View"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/View"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/View"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/View"
                }
              }
            },
            "description": ""
          }
        }
      },
      "patch": {
        "operationId": "views-partial-update",
        "description": "Update a saved filter view",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this view.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchedView"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/PatchedView"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/PatchedView"
              }
            }
          }
        },
        "security": [
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/View"
                }
              }
            },
            "description": ""
          }
        }
      },
      "delete": {
        "operationId": "views-destroy",
        "description": "Delete a saved filter view",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this view.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "204": {
            "description": "No response body"
          }
        }
      }
    },
    "/test_framework/v2/aiagents/": {
      "get": {
        "operationId": "aiagents-list",
        "description": "List AI voice agents. Filter by project_id to scope to one project. Returns agents in the v2 format with a nested provider block.",
        "summary": "List AI voice agents",
        "parameters": [
          {
            "name": "page",
            "required": false,
            "in": "query",
            "description": "A page number within the paginated result set.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "page_size",
            "required": false,
            "in": "query",
            "description": "Number of results to return per page.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "project_id",
            "schema": {
              "type": "integer"
            },
            "description": "Filter by project ID"
          },
          {
            "in": "query",
            "name": "q",
            "schema": {
              "type": "string"
            },
            "description": "Search agents by name. A numeric value also matches the agent id."
          },
          {
            "name": "organization_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Tenant scope. Supply one of `project_id`, `organization_id` when authenticating with a user session or OAuth bearer token; omit when using an API key already scoped to the tenant."
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedAIAgentV2List"
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "aiagents-list",
            "description": "List AI voice agents. Filter by project_id to scope to one project. Returns agents in the v2 format with a nested provider block."
          }
        }
      },
      "post": {
        "operationId": "aiagents-create",
        "description": "Register a new AI voice agent. Required fields: name, description, project, inbound. Provider credentials are nested under provider.{type, agent_id, credentials} instead of flat fields. transcript_provider defaults to provider.type when omitted.\n\n**provider.credentials keys by type (voice providers only):**\n- vapi: api_key + config.{public_key, trigger_url}\n- retell: api_key + agent_id + optional chat_agent_details.config.agent_id\n- elevenlabs: api_key + config.{trigger_url}\n- bland: api_key + agent_id (pathway_id) + config.{encrypted_key} for Twilio\n- livekit: api_key + config.{api_secret (required), url (required)}\n- pipecat: api_key + config.{webhook_url}\n- cisco: no credentials needed\n- self-hosted chat: provider.type=custom + chat_agent_details.{type: self_hosted, config.{url (wss://), headers}}\nNote: agentforce goes in chat_agent_details; koreai/genesys/synthflow use the v1 API.\n\n**Auto-import from a cloud provider** — set `provider.configure_from_provider: true` (vapi/retell/elevenlabs/synthflow) with `provider.agent_id` + `provider.credentials.api_key`. Cekura fetches the prompt, name, language, who-speaks-first, phone number, tool calls, dynamic variables and knowledge base and configures the agent automatically — `name` and `description` become optional (auto-fetched). The response is **202** with the created agent plus a `progress_id`; poll `auto-fetch-progress/` to follow the staged import.\n\nSee examples below for full per-provider payloads.",
        "summary": "Create an AI voice agent",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostAIAgentV2"
              },
              "examples": {
                "CloudAuto-import(configureFromProvider)": {
                  "value": {
                    "project": 42,
                    "provider": {
                      "type": "retell",
                      "agent_id": "agent_abc123",
                      "credentials": {
                        "api_key": "key_xxx"
                      },
                      "configure_from_provider": true
                    }
                  },
                  "summary": "Cloud auto-import (configure_from_provider)",
                  "description": "Fetch & configure everything from the provider; returns 202 + progress_id."
                },
                "Custom-hosted(observation-only,MostCommon)": {
                  "value": {
                    "name": "Support Bot",
                    "description": "Handles inbound support calls",
                    "project": 42,
                    "inbound": true,
                    "phone_number": "+14155551234",
                    "provider": {
                      "type": "custom"
                    }
                  },
                  "summary": "Custom-hosted (observation-only, most common)"
                },
                "Self-hostedViaWebSocket(text-modeTesting)": {
                  "value": {
                    "name": "WS Agent",
                    "description": "Agent with websocket endpoint for text-mode test runs",
                    "project": 42,
                    "inbound": false,
                    "provider": {
                      "type": "custom",
                      "chat_agent_details": {
                        "type": "self_hosted",
                        "config": {
                          "url": "wss://staging.example.com/agent",
                          "headers": {
                            "Authorization": "Bearer token"
                          }
                        }
                      }
                    }
                  },
                  "summary": "Self-hosted via WebSocket (text-mode testing)",
                  "description": "Websocket is a CHAT/TEXT connection — put url and headers in chat_agent_details, not provider.credentials."
                },
                "VAPI": {
                  "value": {
                    "name": "VAPI Sales Agent",
                    "description": "Outbound sales qualification",
                    "project": 42,
                    "inbound": false,
                    "phone_number": "+14155551234",
                    "provider": {
                      "type": "vapi",
                      "agent_id": "asst_abc123xyz",
                      "credentials": {
                        "api_key": "vapi_sk_xxx",
                        "config": {
                          "public_key": "vapi_pk_xxx"
                        }
                      },
                      "auto_import_calls": true,
                      "auto_sync_prompt": true
                    }
                  }
                },
                "Retell": {
                  "value": {
                    "name": "Retell Booking Agent",
                    "description": "Schedules appointments",
                    "project": 42,
                    "inbound": true,
                    "phone_number": "+14155551234",
                    "provider": {
                      "type": "retell",
                      "agent_id": "retell_voice_agent_abc123",
                      "credentials": {
                        "api_key": "key_xxx",
                        "config": {
                          "trigger_url": "https://api.retellai.com/create-phone-call"
                        }
                      },
                      "chat_agent_details": {
                        "type": "retell",
                        "config": {
                          "agent_id": "retell_chat_agent_xyz456"
                        }
                      }
                    }
                  },
                  "description": "agent_id = Retell agent for voice/inbound calls. chat_agent_details = optional separate agent for text-mode test runs."
                },
                "Bland": {
                  "value": {
                    "name": "Bland Support Agent",
                    "description": "Handles billing questions",
                    "project": 42,
                    "inbound": true,
                    "phone_number": "+14155551234",
                    "provider": {
                      "type": "bland",
                      "agent_id": "bland_pathway_xyz",
                      "credentials": {
                        "api_key": "bland_xxx",
                        "config": {
                          "encrypted_key": "twilio_encrypted_key_xxx"
                        }
                      }
                    }
                  },
                  "description": "agent_id is the Bland pathway_id. bland_data.encrypted_key is the Twilio credential bundle."
                },
                "LiveKit": {
                  "value": {
                    "name": "LiveKit Concierge",
                    "description": "Multi-modal front-desk agent",
                    "project": 42,
                    "inbound": true,
                    "provider": {
                      "type": "livekit",
                      "credentials": {
                        "api_key": "APIxxx",
                        "config": {
                          "api_secret": "secret_xxx",
                          "url": "wss://acme.livekit.cloud"
                        }
                      }
                    }
                  },
                  "description": "api_secret and url are required inside credentials.config."
                },
                "ElevenLabs": {
                  "value": {
                    "name": "ElevenLabs Voice Agent",
                    "description": "Voice agent on ElevenLabs",
                    "project": 42,
                    "inbound": true,
                    "provider": {
                      "type": "elevenlabs",
                      "agent_id": "elevenlabs_agent_abc123",
                      "credentials": {
                        "api_key": "elevenlabs_key_xxx"
                      }
                    }
                  }
                },
                "Self-hostedWithMockTools(direct+MCPRouting)": {
                  "value": {
                    "name": "Support Bot",
                    "description": "Handles inbound support calls",
                    "project": 42,
                    "inbound": true,
                    "provider": {
                      "type": "custom"
                    },
                    "mock_tools": [
                      {
                        "name": "get_order",
                        "description": "Look up an order",
                        "mock_data": [
                          {
                            "input": {
                              "order_id": "A1"
                            },
                            "output": {
                              "status": "shipped"
                            }
                          }
                        ]
                      },
                      {
                        "name": "crm_lookup",
                        "description": "CRM read",
                        "mock_data": [],
                        "served_via": {
                          "type": "mcp",
                          "mock_index": 1
                        }
                      },
                      {
                        "name": "crm_update",
                        "description": "CRM write",
                        "mock_data": [],
                        "served_via": {
                          "type": "mcp",
                          "mock_index": 1
                        }
                      }
                    ],
                    "dynamic_variables": [
                      {
                        "name": "customer_name",
                        "description": "Caller name"
                      }
                    ]
                  },
                  "summary": "Self-hosted with mock tools (direct + MCP routing)",
                  "description": "served_via.type='mcp' groups tools under a shared MCP endpoint (same mock_index = same endpoint); omit served_via (or use 'direct') for a per-tool URL. url is server-computed and never sent on the request."
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostAIAgentV2"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostAIAgentV2"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AIAgentV2"
                },
                "examples": {
                  "CreatedAgent": {
                    "value": {
                      "id": 303,
                      "name": "Support Bot",
                      "description": "Handles inbound support calls",
                      "project": 42,
                      "language": "en",
                      "telephony": {
                        "inbound": true,
                        "phone_number": "+14155551234",
                        "sip_uri": null
                      },
                      "provider": {
                        "type": "custom"
                      },
                      "agent_speaks_first": null,
                      "knowledge_base_files": [],
                      "mock_tools": [
                        {
                          "id": 1,
                          "name": "get_order",
                          "description": "Look up an order",
                          "mock_data": [
                            {
                              "input": {
                                "order_id": "A1"
                              },
                              "output": {
                                "status": "shipped"
                              }
                            }
                          ],
                          "served_via": {
                            "type": "direct",
                            "url": "https://api.cekura.ai/test_framework/v1/aiagents/303/tool/get_order/"
                          }
                        },
                        {
                          "id": 2,
                          "name": "crm_lookup",
                          "description": "CRM read",
                          "mock_data": [],
                          "served_via": {
                            "type": "mcp",
                            "mock_index": 1,
                            "url": "https://api.cekura.ai/test_framework/v1/aiagents/303/mcp/1/"
                          }
                        }
                      ],
                      "mock_tools_enabled": false,
                      "mock_tools_provider": null,
                      "dynamic_variables": [
                        {
                          "id": 10,
                          "name": "customer_name",
                          "description": "Caller name"
                        }
                      ],
                      "created_at": "2026-01-01T00:00:00Z",
                      "updated_at": "2026-01-01T00:00:00Z"
                    },
                    "summary": "Created agent",
                    "description": "201 response. served_via.type is always present; url is server-computed."
                  }
                }
              }
            },
            "description": ""
          },
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AIAgentConfigureFromProviderResponse"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "aiagents-create",
            "description": "Register a new AI voice agent. Required fields: name, description, project, inbound. Provider credentials are nested under provider.{type, agent_id, credentials} instead of flat fields. transcript_provider defaults to provider.type when omitted.\n\n**provider.credentials keys by type (voice providers only):**\n- vapi: api_key + config.{public_key, trigger_url}\n- retell: api_key + agent_id + optional chat_agent_details.config.agent_id\n- elevenlabs: api_key + config.{trigger_url}\n- bland: api_key + agent_id (pathway_id) + config.{encrypted_key} for Twilio\n- livekit: api_key + config.{api_secret (required), url (required)}\n- pipecat: api_key + config.{webhook_url}\n- cisco: no credentials needed\n- self-hosted chat: provider.type=custom + chat_agent_details.{type: self_hosted, config.{url (wss://), headers}}\nNote: agentforce goes in chat_agent_details; koreai/genesys/synthflow use the v1 API.\n\n**Auto-import from a cloud provider** — set `provider.configure_from_provider: true` (vapi/retell/elevenlabs/synthflow) with `provider.agent_id` + `provider.credentials.api_key`. Cekura fetches the prompt, name, language, who-speaks-first, phone number, tool calls, dynamic variables and knowledge base and configures the agent automatically — `name` and `description` become optional (auto-fetched). The response is **202** with the created agent plus a `progress_id`; poll `auto-fetch-progress/` to follow the staged import.\n\nSee examples below for full per-provider payloads."
          }
        }
      }
    },
    "/test_framework/v2/aiagents/{id}/": {
      "get": {
        "operationId": "aiagents-retrieve",
        "description": "Retrieve an AI voice agent, including its configured connections.\n\n**Configured connection → run endpoint** (call this before running scenarios; a run endpoint only works if its connection is configured on the agent):\n- `telephony.phone_number` → `scenarios-run-voice`\n- `telephony.sip_uri` → `scenarios-run-sip`\n- `telephony.websocket_url` → `scenarios-run-chirp` (raw-PCM voice websocket)\n- `provider.type` vapi / retell / livekit / pipecat / agora (WebRTC) → `scenarios-run-vapi-webrtc` / `-retell-webrtc` / `-livekit-v2` / `-pipecat-v2` / `-agora`\n- `provider.type` elevenlabs → `scenarios-run-elevenlabs`\n- `provider.chat_agent_details` (chat/SMS/WhatsApp) → `scenarios-run-text`",
        "summary": "Retrieve an AI voice agent",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this ai agent.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AIAgentV2"
                }
              }
            },
            "description": ""
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "aiagents-retrieve",
            "description": "Retrieve an AI voice agent, including its configured connections.\n\n**Configured connection → run endpoint** (call this before running scenarios; a run endpoint only works if its connection is configured on the agent):\n- `telephony.phone_number` → `scenarios-run-voice`\n- `telephony.sip_uri` → `scenarios-run-sip`\n- `telephony.websocket_url` → `scenarios-run-chirp` (raw-PCM voice websocket)\n- `provider.type` vapi / retell / livekit / pipecat / agora (WebRTC) → `scenarios-run-vapi-webrtc` / `-retell-webrtc` / `-livekit-v2` / `-pipecat-v2` / `-agora`\n- `provider.type` elevenlabs → `scenarios-run-elevenlabs`\n- `provider.chat_agent_details` (chat/SMS/WhatsApp) → `scenarios-run-text`"
          }
        }
      },
      "put": {
        "operationId": "aiagents-update",
        "description": "Fully replace an agent's fields. Prefer PATCH unless you need full-replacement semantics.",
        "summary": "Replace an AI voice agent (full update)",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this ai agent.",
            "required": true
          }
        ],
        "tags": [
          "AI Agents"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostAIAgentV2"
              },
              "examples": {
                "ReplaceAgent(fullPayload)": {
                  "value": {
                    "agent_name": "Support Bot v2",
                    "description": "Handles inbound support calls for ACME Inc.",
                    "inbound": true,
                    "project": 1376,
                    "contact_number": "+14155551234",
                    "language": "en",
                    "assistant_provider": "self_hosted"
                  },
                  "summary": "Replace agent (full payload)"
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostAIAgentV2"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostAIAgentV2"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AIAgentV2"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "aiagents-update",
            "description": "Fully replace an agent's fields. Prefer PATCH unless you need full-replacement semantics."
          }
        }
      },
      "patch": {
        "operationId": "aiagents-partial-update",
        "description": "Partially update an agent. Only fields included in the request body are modified. Mock tools (create, update, delete) are managed via the `mock_tools` field — pass the full desired list of tools. Knowledge base files are managed via the `knowledge_base_files` field. Dynamic variables are managed via the `dynamic_variables` field.",
        "summary": "Update an AI voice agent (partial)",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this ai agent.",
            "required": true
          }
        ],
        "tags": [
          "AI Agents"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchedSchemaPostAIAgentV2"
              },
              "examples": {
                "Rename+UpdateDescription": {
                  "value": {
                    "agent_name": "Support Bot v2",
                    "description": "Updated description"
                  },
                  "summary": "Rename + update description"
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/PatchedSchemaPostAIAgentV2"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/PatchedSchemaPostAIAgentV2"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AIAgentV2"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "aiagents-partial-update",
            "description": "Partially update an agent. Only fields included in the request body are modified. Mock tools (create, update, delete) are managed via the `mock_tools` field — pass the full desired list of tools. Knowledge base files are managed via the `knowledge_base_files` field. Dynamic variables are managed via the `dynamic_variables` field."
          }
        }
      },
      "delete": {
        "operationId": "aiagents-destroy",
        "description": "⚠ Irreversible. Deletes the agent. Pass delete_related=false to detach evaluators instead of deleting them.",
        "summary": "Delete an AI voice agent",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this ai agent.",
            "required": true
          },
          {
            "in": "query",
            "name": "delete_related",
            "schema": {
              "type": "boolean"
            },
            "description": "If true (default), delete associated call logs, scenario evaluators, results and runs. If false, detach scenario evaluators and leave call logs, metric evaluations, results and runs as-is."
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "204": {
            "description": "No response body"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "aiagents-destroy",
            "description": "⚠ Irreversible. Deletes the agent. Pass delete_related=false to detach evaluators instead of deleting them."
          }
        }
      }
    },
    "/test_framework/v2/aiagents/{id}/auto-fetch/": {
      "post": {
        "operationId": "aiagents-auto-fetch-create",
        "description": "Re-fetch the full agent configuration from its connected provider (Retell, VAPI, ElevenLabs, Synthflow, Bland): system prompt, call settings, phone number, tools with mock data, dynamic variables and knowledge base files. Returns a `progress_id`; poll `auto-fetch-progress/` for staged status.",
        "summary": "Auto-fetch the agent configuration from its provider",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this ai agent.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentAutoFetchResponse"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentAutoFetchErrorResponse"
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "aiagents-auto-fetch-create",
            "description": "Re-fetch the full agent configuration from its connected provider (Retell, VAPI, ElevenLabs, Synthflow, Bland): system prompt, call settings, phone number, tools with mock data, dynamic variables and knowledge base files. Returns a `progress_id`; poll `auto-fetch-progress/` for staged status."
          }
        }
      }
    },
    "/test_framework/v2/aiagents/{id}/auto-fetch-progress/": {
      "get": {
        "operationId": "aiagents-auto-fetch-progress-retrieve",
        "description": "Poll the staged status of a background auto-fetch (whole-agent import).",
        "summary": "Poll status of an auto-fetch task",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this ai agent.",
            "required": true
          },
          {
            "in": "query",
            "name": "progress_id",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentAutoFetchProgressResponse"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentAutoFetchProgressErrorResponse"
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "aiagents-auto-fetch-progress-retrieve",
            "description": "Poll the staged status of a background auto-fetch (whole-agent import)."
          }
        }
      }
    },
    "/test_framework/v2/aiagents/{id}/delete_knowledge_base/": {
      "delete": {
        "operationId": "aiagents-delete-knowledge-base-destroy",
        "description": "Aiagents delete knowledge base",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this ai agent.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "deleted_count": {
                      "type": "integer"
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v2/aiagents/{id}/disable_personalities/": {
      "post": {
        "operationId": "aiagents-disable-personalities-create",
        "description": "Disable personalities for the agent's project. Pass `personalities` as a list of personality IDs, or the string \"all\".",
        "summary": "Disable personalities for an agent's project",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this ai agent.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnableDisablePersonalities"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/EnableDisablePersonalities"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/EnableDisablePersonalities"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DisablePersonalitiesResponse"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "aiagents-disable-personalities-create",
            "description": "Disable personalities for the agent's project. Pass `personalities` as a list of personality IDs, or the string \"all\"."
          }
        }
      }
    },
    "/test_framework/v2/aiagents/{id}/duplicate/": {
      "post": {
        "operationId": "aiagents-duplicate-create",
        "description": "Create a copy of the agent with all its configuration. Returns the new agent in v2 format.",
        "summary": "Duplicate an AI voice agent",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this ai agent.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostCopyAgent"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostCopyAgent"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostCopyAgent"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AIAgentV2"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "aiagents-duplicate-create",
            "description": "Create a copy of the agent with all its configuration. Returns the new agent in v2 format."
          }
        }
      }
    },
    "/test_framework/v2/aiagents/{id}/enable_personalities/": {
      "post": {
        "operationId": "aiagents-enable-personalities-create",
        "description": "Enable personalities for the agent's project. Pass `personalities` as a list of personality IDs, or the string \"all\". Returns the project's personalities.",
        "summary": "Enable personalities for an agent's project",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this ai agent.",
            "required": true
          },
          {
            "name": "page",
            "required": false,
            "in": "query",
            "description": "A page number within the paginated result set.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "page_size",
            "required": false,
            "in": "query",
            "description": "Number of results to return per page.",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnableDisablePersonalities"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/EnableDisablePersonalities"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/EnableDisablePersonalities"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedPersonalityList"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "aiagents-enable-personalities-create",
            "description": "Enable personalities for the agent's project. Pass `personalities` as a list of personality IDs, or the string \"all\". Returns the project's personalities."
          }
        }
      }
    },
    "/test_framework/v2/aiagents/{id}/history/": {
      "get": {
        "operationId": "aiagents-history-list",
        "description": "Paginated version history for an agent: name/language/description plus the mock\ntools, dynamic variables, and knowledge base files active at each version.",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this ai agent.",
            "required": true
          },
          {
            "in": "query",
            "name": "page",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "page_size",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedAIAgentHistoryList"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v2/aiagents/{id}/history/edit/": {
      "patch": {
        "operationId": "aiagents-history-edit-partial-update",
        "description": "Edit metadata (e.g. version name) on a specific agent version.",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this ai agent.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchedAIAgentEditHistoryRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/PatchedAIAgentEditHistoryRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/PatchedAIAgentEditHistoryRequest"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AIAgentHistory"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v2/aiagents/{id}/knowledge_base/": {
      "get": {
        "operationId": "aiagents-knowledge-base-list",
        "description": "Aiagents knowledge base",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this ai agent.",
            "required": true
          },
          {
            "name": "page",
            "required": false,
            "in": "query",
            "description": "A page number within the paginated result set.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "page_size",
            "required": false,
            "in": "query",
            "description": "Number of results to return per page.",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedKnowledgeBaseFileList"
                }
              }
            },
            "description": ""
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v2/aiagents/{id}/personalities/": {
      "get": {
        "operationId": "aiagents-personalities-list",
        "description": "List the caller/tester personalities available to this agent's project. Filter with query params: type, language, enabled_only=true (only the personalities currently enabled for the project).",
        "summary": "List personalities available to an agent",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this ai agent.",
            "required": true
          },
          {
            "name": "page",
            "required": false,
            "in": "query",
            "description": "A page number within the paginated result set.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "page_size",
            "required": false,
            "in": "query",
            "description": "Number of results to return per page.",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedPersonalityList"
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "aiagents-personalities-list",
            "description": "List the caller/tester personalities available to this agent's project. Filter with query params: type, language, enabled_only=true (only the personalities currently enabled for the project)."
          }
        }
      }
    },
    "/test_framework/v2/aiagents/{id}/restore/": {
      "post": {
        "operationId": "aiagents-restore-create",
        "description": "Restore an agent to a previous version, creating a new version for the restore.\n\nRestores the versioned concrete fields (name, language, description) and the related\ncollections: tools and dynamic variables are reverted in place to their\nlinked versions (ids preserved) and any not in the version are soft-deleted; knowledge\nbase files referenced by the version are reactivated and the rest soft-deleted.",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this ai agent.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AIAgentRestoreRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/AIAgentRestoreRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/AIAgentRestoreRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AIAgentV2"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v2/aiagents/{id}/runs_overview/": {
      "get": {
        "operationId": "aiagents-runs-overview-retrieve",
        "description": "Aiagents runs overview",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this ai agent.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AIAgentV2"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v2/aiagents/{id}/upload_knowledge_base/": {
      "post": {
        "operationId": "aiagents-upload-knowledge-base_2",
        "description": "Upload one or more files to the agent's knowledge base. Accepts either a `multipart/form-data` body (used by the web dashboard) or an `application/json` body where each entry carries base64-encoded file content.",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this ai agent.",
            "required": true
          },
          {
            "name": "page",
            "required": false,
            "in": "query",
            "description": "A page number within the paginated result set.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "page_size",
            "required": false,
            "in": "query",
            "description": "Number of results to return per page.",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary"
                    },
                    "description": "List of files to upload to the knowledge base"
                  }
                },
                "required": [
                  "files"
                ]
              }
            },
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "files": {
                    "type": "array",
                    "description": "List of files to upload, each provided as base64-encoded content.",
                    "items": {
                      "type": "object",
                      "required": [
                        "name",
                        "content_base64"
                      ],
                      "properties": {
                        "name": {
                          "type": "string",
                          "description": "Filename including extension (e.g. `manual.pdf`)."
                        },
                        "content_base64": {
                          "type": "string",
                          "contentEncoding": "base64",
                          "description": "Base64-encoded file content. Accepts a raw base64 string or a `data:<mime>;base64,...` data URI."
                        }
                      }
                    }
                  }
                },
                "required": [
                  "files"
                ]
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedKnowledgeBaseFileList"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "summary": "Upload AI agent knowledge base",
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "aiagents-upload-knowledge-base",
            "description": "Upload one or more files to the agent's knowledge base. Accepts either a `multipart/form-data` body (used by the web dashboard) or an `application/json` body where each entry carries base64-encoded file content."
          }
        }
      }
    },
    "/test_framework/v2/aiagents/runs_overview_project/": {
      "get": {
        "operationId": "aiagents-runs-overview-project-retrieve",
        "description": "Aiagents runs overview project",
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AIAgentV2"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v2/aiagents/short_list/": {
      "get": {
        "operationId": "aiagents-short-list-list",
        "description": "Aiagents short list",
        "parameters": [
          {
            "name": "page",
            "required": false,
            "in": "query",
            "description": "A page number within the paginated result set.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "page_size",
            "required": false,
            "in": "query",
            "description": "Number of results to return per page.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "project_id",
            "schema": {
              "type": "integer"
            },
            "description": "Filter agents by project ID"
          },
          {
            "in": "query",
            "name": "organization_id",
            "schema": {
              "type": "integer"
            },
            "description": "Filter agents by organization ID"
          },
          {
            "in": "query",
            "name": "q",
            "schema": {
              "type": "string"
            },
            "description": "Search agents by name. A numeric value also matches the agent id."
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedAIAgentListList"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v2/metrics/": {
      "get": {
        "operationId": "metrics-list",
        "description": "List quality metrics. Filter by `project_id` or `agent_id` to scope results.",
        "summary": "List quality metrics",
        "parameters": [
          {
            "in": "query",
            "name": "agent_id",
            "schema": {
              "type": "integer"
            },
            "description": "\nFilter by agent ID\nExample: `123`\n"
          },
          {
            "in": "query",
            "name": "project_id",
            "schema": {
              "type": "integer"
            },
            "description": "\nFilter by project ID\nExample: `456`\n"
          },
          {
            "in": "query",
            "name": "assistant_id",
            "schema": {
              "type": "string"
            },
            "description": "\nFilter by assistant ID\nExample: `asst_1234567890`\n"
          },
          {
            "in": "query",
            "name": "agents",
            "schema": {
              "type": "string"
            },
            "description": "\nFilter metrics by agent IDs. Supports comma-separated list.\nExample: `1,2,3` to filter metrics associated with any of these agents\n"
          },
          {
            "in": "query",
            "name": "slug",
            "schema": {
              "type": "string"
            },
            "description": "\nFilter by metric slug\nExample: `latency_metric` or `customer_satisfaction`\n"
          },
          {
            "in": "query",
            "name": "filters",
            "schema": {
              "type": "object"
            },
            "description": "JSON filter parameter for advanced filtering.\n\nExample:\n```json\n{\"operator\":\"and\",\"conditions\":[{\"field\":\"agents__id\",\"op\":\"in\",\"value\":[1,2,3]}]}\n```\n\nSupported fields: agents__id, eval_type, type, name\nSupported operators: in, eq, contains"
          },
          {
            "in": "query",
            "name": "include_scores",
            "schema": {
              "type": "boolean"
            },
            "description": "\nInclude Overall and Total scores in Metric List\nExample: `true` or `false`\n                "
          }
        ],
        "tags": [
          "Metrics"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/MetricListSerializerV2"
                  }
                },
                "examples": {
                  "MetricList": {
                    "value": [
                      {
                        "id": 123,
                        "name": "<string>",
                        "description": "<string>",
                        "function_name": "<string>",
                        "type": "basic",
                        "eval_type": "binary",
                        "enum_values": [
                          "<string>"
                        ],
                        "audio_enabled": true,
                        "observability_enabled": true,
                        "simulation_enabled": true,
                        "prompt": "<string>",
                        "evaluation_trigger": "always",
                        "evaluation_trigger_prompt": "<string>",
                        "priority_assignment_prompt": "<string>",
                        "vocera_defined_metric_code": "<string>",
                        "configuration": {
                          "infra_issues_timeout": "<integer>",
                          "key": "value"
                        },
                        "kb_file_ids": [
                          "<integer>"
                        ],
                        "knowledge_base_files": [
                          {
                            "id": "<integer>",
                            "agent": "<integer>",
                            "file_url": "<string>",
                            "file_name": "<string>",
                            "file_type": "<string>",
                            "file_size": "<integer>",
                            "created_at": "<datetime>",
                            "updated_at": "<datetime>"
                          }
                        ],
                        "metric_cost": "<float>"
                      }
                    ]
                  },
                  "MetricListWithOverallScore": {
                    "value": [
                      {
                        "id": "<integer>",
                        "name": "<string>",
                        "description": "<string>",
                        "function_name": "<string>",
                        "type": "basic",
                        "eval_type": "binary",
                        "enum_values": [
                          "<string>"
                        ],
                        "audio_enabled": true,
                        "observability_enabled": true,
                        "simulation_enabled": true,
                        "prompt": "<string>",
                        "evaluation_trigger": "always",
                        "evaluation_trigger_prompt": "<string>",
                        "priority_assignment_prompt": "<string>",
                        "vocera_defined_metric_code": "<string>",
                        "configuration": {
                          "infra_issues_timeout": "<integer>",
                          "key": "value"
                        },
                        "kb_file_ids": [
                          "<integer>"
                        ],
                        "knowledge_base_files": [
                          {
                            "id": "<integer>",
                            "agent": "<int>",
                            "file_url": "<string>",
                            "file_name": "<string>",
                            "file_type": "<string>",
                            "file_size": "<integer>",
                            "created_at": "<datetime>",
                            "updated_at": "<datetime>"
                          }
                        ],
                        "metric_cost": "<float>",
                        "overall_score": "<integer>",
                        "total_score": "<integer>"
                      }
                    ]
                  }
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "metrics-list",
            "description": "List quality metrics. Filter by `project_id` or `agent_id` to scope results."
          }
        }
      },
      "post": {
        "operationId": "metrics-create",
        "description": "Create a quality metric. `type` is `llm_judge` or `custom_code`. `eval_type` is one of `binary`, `continuous_qualitative`, `numeric`, `enum`. Set `add_to_rubric=true` to include the metric in the project's call-success rubric.",
        "summary": "Create a metric",
        "tags": [
          "Metrics"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MetricEditSerializerV2"
              },
              "examples": {
                "LLMJudgeMetric(simplest—MostCommon)": {
                  "value": {
                    "project": 1376,
                    "name": "Was the caller greeted by name",
                    "description": "Score TRUE if the agent addressed the caller by their name within the first 3 turns, FALSE otherwise.",
                    "type": "llm_judge",
                    "eval_type": "bool",
                    "simulation_enabled": true,
                    "observability_enabled": true
                  },
                  "summary": "LLM judge metric (simplest — most common)"
                },
                "LLMJudge—EnumOutput": {
                  "value": {
                    "project": 1376,
                    "name": "Call resolution outcome",
                    "description": "Classify how the call ended: `resolved` (caller's issue was fully addressed), `transferred` (caller was handed off to a human), `dropped` (caller hung up without resolution).",
                    "type": "llm_judge",
                    "eval_type": "enum",
                    "enum_values": [
                      "resolved",
                      "transferred",
                      "dropped"
                    ],
                    "observability_enabled": true
                  },
                  "summary": "LLM judge — enum output"
                },
                "CustomCodeMetric(deterministicCheck)": {
                  "value": {
                    "project": 1376,
                    "name": "Agent asked for order ID before refund",
                    "type": "custom_code",
                    "eval_type": "bool",
                    "custom_code": "def score(transcript, context):\n    text = transcript.lower()\n    return 'order id' in text[:text.find('refund')] if 'refund' in text else True\n",
                    "simulation_enabled": true
                  },
                  "summary": "Custom code metric (deterministic check)"
                },
                "BinaryLLM-judgeMetric(addedToRubric)": {
                  "value": {
                    "name": "Agent greeted the customer",
                    "description": "Check if the agent greeted the customer at the start of the call.",
                    "project": 42,
                    "type": "llm_judge",
                    "eval_type": "binary",
                    "evaluation_trigger": "always",
                    "add_to_rubric": true
                  },
                  "summary": "Binary LLM-judge metric (added to rubric)"
                },
                "ContinuousLLM-judgeMetric(0–5Rubric)": {
                  "value": {
                    "name": "Empathy level",
                    "description": "Rate how empathetic the agent was on a 0–5 scale.",
                    "project": 42,
                    "type": "llm_judge",
                    "eval_type": "continuous_qualitative",
                    "evaluation_trigger": "always"
                  },
                  "summary": "Continuous LLM-judge metric (0–5 rubric)"
                },
                "NumericCustom-codeMetric": {
                  "value": {
                    "name": "Words per minute",
                    "description": "Compute the agent's speaking rate.",
                    "project": 42,
                    "type": "custom_code",
                    "eval_type": "numeric",
                    "custom_code": "def evaluate(transcript):\n    return {'score': len(transcript.split()) / max(1, transcript_duration_minutes)}",
                    "evaluation_trigger": "always"
                  },
                  "summary": "Numeric custom-code metric"
                },
                "EnumLLM-judgeMetric": {
                  "value": {
                    "name": "Call outcome",
                    "description": "Classify the call outcome as one of: booked, follow_up, declined.",
                    "project": 42,
                    "type": "llm_judge",
                    "eval_type": "enum",
                    "enum_values": [
                      "booked",
                      "follow_up",
                      "declined"
                    ],
                    "evaluation_trigger": "always"
                  },
                  "summary": "Enum LLM-judge metric"
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/MetricEditSerializerV2"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/MetricEditSerializerV2"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetricDetailSerializerV2"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "metrics-create",
            "description": "Create a quality metric. `type` is `llm_judge` or `custom_code`. `eval_type` is one of `binary`, `continuous_qualitative`, `numeric`, `enum`. Set `add_to_rubric=true` to include the metric in the project's call-success rubric."
          }
        }
      }
    },
    "/test_framework/v2/metrics/{id}/": {
      "get": {
        "operationId": "metrics-retrieve",
        "description": "Fetch one metric by id.",
        "summary": "Retrieve a metric",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string"
            },
            "description": "**ID or Slug** - Metric identifier. Can be either:\n- Numeric ID (e.g., `123`)\n- Slug (e.g., `latency_metric`, `customer_satisfaction`)",
            "required": true
          }
        ],
        "tags": [
          "Metrics"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetricDetailSerializerV2"
                }
              }
            },
            "description": ""
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "metrics-retrieve",
            "description": "Fetch one metric by id."
          }
        }
      },
      "put": {
        "operationId": "metrics-update",
        "description": "Update a metric (full)",
        "summary": "Update a metric (full)",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this metric.",
            "required": true
          }
        ],
        "tags": [
          "Metrics"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostMetricEdit"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostMetricEdit"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostMetricEdit"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SchemaPostMetricEdit"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      },
      "patch": {
        "operationId": "metrics-partial-update",
        "description": "Partially update a metric. Pass `add_to_rubric=true` to add the metric to the project's rubric, or `false` to remove it.",
        "summary": "Update a metric (partial)",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this metric.",
            "required": true
          }
        ],
        "tags": [
          "Metrics"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchedMetricEditSerializerV2"
              },
              "examples": {
                "UpdatePrompt+CriticalFlag": {
                  "value": {
                    "description": "Updated rubric",
                    "is_critical": true
                  },
                  "summary": "Update prompt + critical flag"
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/PatchedMetricEditSerializerV2"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/PatchedMetricEditSerializerV2"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetricDetailSerializerV2"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "metrics-partial-update",
            "description": "Partially update a metric. Pass `add_to_rubric=true` to add the metric to the project's rubric, or `false` to remove it."
          }
        }
      },
      "delete": {
        "operationId": "metrics-destroy",
        "description": "⚠ Irreversible. Deletes the metric and detaches it from all agents and evaluators. Dashboard widgets that displayed this metric are also removed.",
        "summary": "Delete a metric",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this metric.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "204": {
            "description": "No response body"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "metrics-destroy",
            "description": "⚠ Irreversible. Deletes the metric and detaches it from all agents and evaluators. Dashboard widgets that displayed this metric are also removed."
          }
        }
      }
    },
    "/test_framework/v2/metrics/{id}/add_to_predefined_metrics/": {
      "post": {
        "operationId": "metrics-add-to-predefined-metrics-create",
        "description": "Metrics add to predefined metrics",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this metric.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MetricDetailV2"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/MetricDetailV2"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/MetricDetailV2"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetricDetailV2"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v2/metrics/{id}/apply_optimisation_proposal/": {
      "post": {
        "operationId": "metrics-apply-optimisation-proposal-create",
        "description": "Apply a pending optimisation proposal",
        "summary": "Apply a pending optimisation proposal",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this metric.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "description": "Metric updated; pending proposal cleared."
          }
        }
      }
    },
    "/test_framework/v2/metrics/{id}/dismiss_optimisation_proposal/": {
      "post": {
        "operationId": "metrics-dismiss-optimisation-proposal-create",
        "description": "Dismiss a pending optimisation proposal",
        "summary": "Dismiss a pending optimisation proposal",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this metric.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "description": "Proposal cleared."
          }
        }
      }
    },
    "/test_framework/v2/metrics/{id}/evaluate_advance_metric/": {
      "post": {
        "operationId": "metrics-evaluate-advance-metric-create",
        "description": "Evaluate an advance metric in the background.\n\nReturns a progress_id to poll for results.",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this metric.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MetricDetailV2"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/MetricDetailV2"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/MetricDetailV2"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "lambda_token": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetricDetailV2"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v2/metrics/{id}/evaluate_basic_metric/": {
      "post": {
        "operationId": "metrics-evaluate-basic-metric-create",
        "description": "Evaluate a basic metric in the background.\n\nReturns a progress_id to poll for results.",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this metric.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MetricDetailV2"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/MetricDetailV2"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/MetricDetailV2"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "lambda_token": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetricDetailV2"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v2/metrics/{id}/evaluate_llm_judge_metric/": {
      "post": {
        "operationId": "metrics-evaluate-llm-judge-metric-create",
        "description": "Evaluate a metric using LLM Judge (DSPy) in the background.\n\nReturns a progress_id to poll for results.",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this metric.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EvaluateLlmJudgeMetricRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/EvaluateLlmJudgeMetricRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/EvaluateLlmJudgeMetricRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "lambda_token": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EvaluateLlmJudgeMetricResponse"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v2/metrics/{id}/history/": {
      "get": {
        "operationId": "metrics-history-list",
        "description": "Metrics history",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this metric.",
            "required": true
          },
          {
            "in": "query",
            "name": "page",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "page_size",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedMetricHistoryList"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v2/metrics/{id}/history/edit/": {
      "patch": {
        "operationId": "metrics-history-edit-partial-update",
        "description": "Metrics history edit",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this metric.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchedMetricEditHistoryRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/PatchedMetricEditHistoryRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/PatchedMetricEditHistoryRequest"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetricHistory"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v2/metrics/{id}/restore/": {
      "post": {
        "operationId": "metrics-restore-create",
        "description": "Metrics restore",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this metric.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MetricRestoreRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/MetricRestoreRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/MetricRestoreRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetricDetailV2"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v2/metrics/{id}/run_reviews/": {
      "post": {
        "operationId": "metrics-run-reviews-create",
        "description": "Run metric reviews",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this metric.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RunReviewsRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/RunReviewsRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/RunReviewsRequest"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "description": "Returns progress_id for tracking progress"
          }
        },
        "x-mcp-expose": true,
        "summary": "Run metric reviews",
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "metrics-run-reviews-create",
            "description": "Run metric reviews"
          }
        }
      }
    },
    "/test_framework/v2/metrics/{id}/variables/": {
      "post": {
        "operationId": "metrics-variables-create",
        "description": "Get all variables and their values for a specific test_set and metric combination.\n\nURL Parameter:\n- pk: The metric_id\n\nRequest Body:\n- test_set_id (required): The ID of the test_set (datapoint)\n- metric_description_variables (required/optional): Array of variable names for description.\n  At least one of metric_description_variables or evaluation_trigger_variables must be provided.\n- evaluation_trigger_variables (required/optional): Array of variable names for trigger.\n  At least one of metric_description_variables or evaluation_trigger_variables must be provided.\n\nThis endpoint retrieves the variables and populates them with values from the test_set (datapoint).",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this metric.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MetricDetailV2"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/MetricDetailV2"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/MetricDetailV2"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetricDetailV2"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v2/metrics/basic_list/": {
      "get": {
        "operationId": "metrics-basic-list-retrieve",
        "description": "Metrics basic list",
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetricBasicList"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v2/metrics/build-agent/": {
      "post": {
        "operationId": "metrics-build-agent-create",
        "description": "Start (or continue) an agentic metric-building session. On the first call, pass `agent_id` and `description` (the natural-language metric intent); the agent cleans up the definition, runs it against a sample of the agent's calls and runs, and either asks a clarifying question or returns a refined definition. To answer a question, pass `session_id` and `user_message`. Poll build-agent-progress with the returned `progress_id`.",
        "summary": "Build or refine a metric via the agent chatbot",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MetricDetailV2"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/MetricDetailV2"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/MetricDetailV2"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetricDetailV2"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v2/metrics/build-agent-cancel/": {
      "post": {
        "operationId": "metrics-build-agent-cancel-create",
        "description": "Metrics build agent cancel",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MetricDetailV2"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/MetricDetailV2"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/MetricDetailV2"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetricDetailV2"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v2/metrics/build-agent-progress/": {
      "get": {
        "operationId": "metrics-build-agent-progress-retrieve",
        "description": "Metrics build agent progress",
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetricDetailV2"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v2/metrics/bulk-toggle-settings/": {
      "post": {
        "operationId": "metrics-bulk-toggle-settings-create",
        "description": "Metrics bulk toggle settings",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MetricDetailV2"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/MetricDetailV2"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/MetricDetailV2"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetricDetailV2"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v2/metrics/bulk_create/": {
      "post": {
        "operationId": "metrics-bulk-create_3",
        "description": "Create multiple metrics in a single request",
        "summary": "Create multiple metrics in a single request",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/SchemaPostMetricEdit"
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/SchemaPostMetricEdit"
                }
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/SchemaPostMetricEdit"
                }
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SchemaPostMetricEdit"
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "metrics-bulk-create",
            "description": "Create multiple metrics in a single request"
          }
        }
      }
    },
    "/test_framework/v2/metrics/bulk_manage_agents/": {
      "post": {
        "operationId": "metrics-bulk-manage-agents-create",
        "description": "Metrics bulk manage agents",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BulkAgentAssignment"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/BulkAgentAssignment"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/BulkAgentAssignment"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BulkAgentAssignmentResponse"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v2/metrics/delete_metrics/": {
      "post": {
        "operationId": "metrics-delete-metrics-create",
        "description": "Metrics delete metrics",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MetricDetailV2"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/MetricDetailV2"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/MetricDetailV2"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetricDetailV2"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v2/metrics/evaluate_metric_progress/": {
      "get": {
        "operationId": "metrics-evaluate-metric-progress-retrieve",
        "description": "Poll for metric evaluation progress.\n\nQuery params:\n    progress_id: The progress_id returned from evaluate_basic_metric or evaluate_advance_metric\n\nReturns:\n    State object with status, output, error, etc.",
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "lambda_token": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetricDetailV2"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v2/metrics/fetch_call_details/": {
      "get": {
        "operationId": "metrics-fetch-call-details-retrieve",
        "description": "Metrics fetch call details",
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "lambda_token": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetricDetailV2"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v2/metrics/generate_clean_description/": {
      "post": {
        "operationId": "metrics-generate-clean-description-create",
        "description": "Generate a clean metric description",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MetricDetailV2"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/MetricDetailV2"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/MetricDetailV2"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetricDetailV2"
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "summary": "Generate a clean metric description",
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "metrics-generate-clean-description-create",
            "description": "Generate a clean metric description"
          }
        }
      }
    },
    "/test_framework/v2/metrics/generate_clean_description_bg/": {
      "post": {
        "operationId": "metrics-generate-clean-description-bg-create",
        "description": "Start async clean description generation",
        "summary": "Start async clean description generation",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CleanMetricDescriptionRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/CleanMetricDescriptionRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/CleanMetricDescriptionRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenerateCleanDescriptionBgResponse"
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "metrics-generate-clean-description-bg-create",
            "description": "Start async clean description generation"
          }
        }
      }
    },
    "/test_framework/v2/metrics/generate_clean_description_progress/": {
      "get": {
        "operationId": "metrics-generate-clean-description-progress-retrieve",
        "description": "Poll async clean description generation",
        "summary": "Poll async clean description generation",
        "parameters": [
          {
            "in": "query",
            "name": "progress_id",
            "schema": {
              "type": "string"
            },
            "description": "progress_id returned from generate_clean_description_bg",
            "required": true
          },
          {
            "name": "agent_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Tenant scope. Supply one of `agent_id`, `project_id`, `assistant_id` when authenticating with a user session or OAuth bearer token; omit when using an API key already scoped to the tenant."
          },
          {
            "name": "project_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Tenant scope. Supply one of `agent_id`, `project_id`, `assistant_id` when authenticating with a user session or OAuth bearer token; omit when using an API key already scoped to the tenant."
          },
          {
            "name": "assistant_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Tenant scope. Supply one of `agent_id`, `project_id`, `assistant_id` when authenticating with a user session or OAuth bearer token; omit when using an API key already scoped to the tenant."
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenerateCleanDescriptionProgressResponse"
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "metrics-generate-clean-description-progress-retrieve",
            "description": "Poll async clean description generation"
          }
        }
      }
    },
    "/test_framework/v2/metrics/generate_evaluation_trigger/": {
      "post": {
        "operationId": "metrics-generate-evaluation-trigger-create",
        "description": "Generate a metric evaluation trigger",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MetricDetailV2"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/MetricDetailV2"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/MetricDetailV2"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetricDetailV2"
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "summary": "Generate a metric evaluation trigger",
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "metrics-generate-evaluation-trigger-create",
            "description": "Generate a metric evaluation trigger"
          }
        }
      }
    },
    "/test_framework/v2/metrics/generate_metrics/": {
      "post": {
        "operationId": "metrics-generate_3",
        "description": "Generates suggested metrics for an AI agent. Returns a `progress_id` to poll via `generate_metrics_progress`. Results appear in the progress response but are not saved automatically — pass them to the metrics bulk create endpoint to persist. The agent must have a description of at least 100 characters.",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SchemaGenerateMetricsMetricCreate"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/SchemaGenerateMetricsMetricCreate"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/SchemaGenerateMetricsMetricCreate"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SchemaGenerateMetricsResponse"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "summary": "Generate suggested metrics",
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "metrics-generate",
            "description": "Generates suggested metrics for an AI agent. Returns a `progress_id` to poll via `generate_metrics_progress`. Results appear in the progress response but are not saved automatically — pass them to the metrics bulk create endpoint to persist. The agent must have a description of at least 100 characters."
          }
        }
      }
    },
    "/test_framework/v2/metrics/generate_metrics_progress/": {
      "get": {
        "operationId": "metrics-generate-metrics-progress-retrieve",
        "description": "Get metric generation progress",
        "parameters": [
          {
            "in": "query",
            "name": "progress_id",
            "schema": {
              "type": "string"
            },
            "description": "Progress ID returned from the generate_metrics endpoint",
            "required": true
          },
          {
            "name": "agent_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Tenant scope. Supply one of `agent_id`, `project_id`, `assistant_id` when authenticating with a user session or OAuth bearer token; omit when using an API key already scoped to the tenant."
          },
          {
            "name": "project_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Tenant scope. Supply one of `agent_id`, `project_id`, `assistant_id` when authenticating with a user session or OAuth bearer token; omit when using an API key already scoped to the tenant."
          },
          {
            "name": "assistant_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Tenant scope. Supply one of `agent_id`, `project_id`, `assistant_id` when authenticating with a user session or OAuth bearer token; omit when using an API key already scoped to the tenant."
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "description": "Returns generation state with status and generated metrics"
          }
        },
        "x-mcp-expose": true,
        "summary": "Get metric generation progress",
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "metrics-generate-metrics-progress-retrieve",
            "description": "Get metric generation progress"
          }
        }
      }
    },
    "/test_framework/v2/metrics/preview/": {
      "post": {
        "operationId": "metrics-preview-create",
        "description": "Preview a metric",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MetricPreview"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/MetricPreview"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/MetricPreview"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "description": "Returns progress_id for tracking progress"
          }
        },
        "x-mcp-expose": true,
        "summary": "Preview a metric",
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "metrics-preview-create",
            "description": "Preview a metric"
          }
        }
      }
    },
    "/test_framework/v2/metrics/preview-progress/": {
      "get": {
        "operationId": "metrics-preview-progress_3",
        "description": "Get metric preview progress",
        "parameters": [
          {
            "in": "query",
            "name": "progress_id",
            "schema": {
              "type": "string"
            },
            "description": "Progress ID returned from the preview endpoint",
            "required": true
          },
          {
            "name": "agent_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Tenant scope. Supply one of `agent_id`, `project_id`, `assistant_id` when authenticating with a user session or OAuth bearer token; omit when using an API key already scoped to the tenant."
          },
          {
            "name": "project_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Tenant scope. Supply one of `agent_id`, `project_id`, `assistant_id` when authenticating with a user session or OAuth bearer token; omit when using an API key already scoped to the tenant."
          },
          {
            "name": "assistant_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Tenant scope. Supply one of `agent_id`, `project_id`, `assistant_id` when authenticating with a user session or OAuth bearer token; omit when using an API key already scoped to the tenant."
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "description": "Returns preview state with status and results"
          }
        },
        "x-mcp-expose": true,
        "summary": "Get metric preview progress",
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "metrics-preview-progress",
            "description": "Get metric preview progress"
          }
        }
      }
    },
    "/test_framework/v2/metrics/run_reviews_progress/": {
      "get": {
        "operationId": "metrics-run-reviews-progress_3",
        "description": "Get metric reviews progress",
        "parameters": [
          {
            "in": "query",
            "name": "progress_id",
            "schema": {
              "type": "string"
            },
            "description": "Progress ID returned from the run_reviews endpoint",
            "required": true
          },
          {
            "in": "query",
            "name": "agent_id",
            "schema": {
              "type": "integer"
            },
            "description": "Agent ID for permission validation"
          },
          {
            "in": "query",
            "name": "project_id",
            "schema": {
              "type": "integer"
            },
            "description": "Project ID for permission validation"
          },
          {
            "name": "assistant_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Tenant scope. Supply one of `agent_id`, `project_id`, `assistant_id` when authenticating with a user session or OAuth bearer token; omit when using an API key already scoped to the tenant."
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "description": "Returns progress state with completed/failed counts and metric data when finished"
          }
        },
        "x-mcp-expose": true,
        "summary": "Get metric reviews progress",
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "metrics-run-reviews-progress",
            "description": "Get metric reviews progress"
          }
        }
      }
    },
    "/test_framework/v2/metrics/save_result/": {
      "post": {
        "operationId": "metrics-save-result-create",
        "description": "Metrics save result",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MetricDetailV2"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/MetricDetailV2"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/MetricDetailV2"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "lambda_token": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetricDetailV2"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v2/metrics/simplify_prompt/": {
      "post": {
        "operationId": "metrics-simplify-prompt-create",
        "description": "Simplify a metric prompt",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SimplifyPromptRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/SimplifyPromptRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/SimplifyPromptRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SimplifyPromptResponse"
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "summary": "Simplify a metric prompt",
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "metrics-simplify-prompt-create",
            "description": "Simplify a metric prompt"
          }
        }
      }
    },
    "/test_framework/v2/metrics/simplify_prompt_progress/": {
      "get": {
        "operationId": "metrics-simplify-prompt-progress-retrieve",
        "description": "Get prompt simplification progress",
        "parameters": [
          {
            "in": "query",
            "name": "progress_id",
            "schema": {
              "type": "string"
            },
            "description": "Progress ID returned from simplify_prompt endpoint",
            "required": true
          },
          {
            "name": "agent_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Tenant scope. Supply one of `agent_id`, `project_id`, `assistant_id` when authenticating with a user session or OAuth bearer token; omit when using an API key already scoped to the tenant."
          },
          {
            "name": "project_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Tenant scope. Supply one of `agent_id`, `project_id`, `assistant_id` when authenticating with a user session or OAuth bearer token; omit when using an API key already scoped to the tenant."
          },
          {
            "name": "assistant_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Tenant scope. Supply one of `agent_id`, `project_id`, `assistant_id` when authenticating with a user session or OAuth bearer token; omit when using an API key already scoped to the tenant."
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SimplifyPromptProgressResponse"
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "summary": "Get prompt simplification progress",
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "metrics-simplify-prompt-progress-retrieve",
            "description": "Get prompt simplification progress"
          }
        }
      }
    },
    "/test_framework/v2/results/": {
      "get": {
        "operationId": "results-list",
        "description": "List test results.\n\nTo filter by status, use `results_retrieve(id=result_id)` and inspect `status` directly ('running', 'completed', 'failed') — there is no list-level status filter.\n\n**Result status:** a result marked `failed` indicates infrastructure failures (e.g. connection errors, websocket handshake failures), not metric evaluation failures. `success_runs_count` counts runs that reached terminal state regardless of connection errors. See `results_retrieve().failed_reasons` for the breakdown.\n\n**Scenarios filter note:** filtering by `scenarios` may return duplicate result rows when a result contains multiple runs of the same scenario — deduplicate by `result.id` if needed.\n\nAfter triggering a run, poll `results_retrieve(id=result_id)` until `status` is 'completed' or 'failed'. For outbound runs, each run's `outbound_dial_window_closes_at` shows the deadline by which your agent must dial in.",
        "parameters": [
          {
            "name": "page",
            "required": false,
            "in": "query",
            "description": "A page number within the paginated result set.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "page_size",
            "required": false,
            "in": "query",
            "description": "Number of results to return per page.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "agent_id",
            "schema": {
              "type": "integer"
            },
            "description": "Filter by agent ID"
          },
          {
            "in": "query",
            "name": "project_id",
            "schema": {
              "type": "integer"
            },
            "description": "Filter by project ID"
          },
          {
            "in": "query",
            "name": "search",
            "schema": {
              "type": "string"
            },
            "description": "Filter by Result name"
          },
          {
            "in": "query",
            "name": "scenarios",
            "schema": {
              "type": "string"
            },
            "description": "Filter by scenario IDs — comma-separated string (e.g. '24270,24271'), not a JSON array."
          },
          {
            "name": "assistant_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Tenant scope. Supply one of `agent_id`, `assistant_id`, `project_id` when authenticating with a user session or OAuth bearer token; omit when using an API key already scoped to the tenant."
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "shareable_link": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedResultList"
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "summary": "List test results",
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "results-list",
            "description": "List test results.\n\nTo filter by status, use `results_retrieve(id=result_id)` and inspect `status` directly ('running', 'completed', 'failed') — there is no list-level status filter.\n\n**Result status:** a result marked `failed` indicates infrastructure failures (e.g. connection errors, websocket handshake failures), not metric evaluation failures. `success_runs_count` counts runs that reached terminal state regardless of connection errors. See `results_retrieve().failed_reasons` for the breakdown.\n\n**Scenarios filter note:** filtering by `scenarios` may return duplicate result rows when a result contains multiple runs of the same scenario — deduplicate by `result.id` if needed.\n\nAfter triggering a run, poll `results_retrieve(id=result_id)` until `status` is 'completed' or 'failed'. For outbound runs, each run's `outbound_dial_window_closes_at` shows the deadline by which your agent must dial in."
          }
        }
      },
      "post": {
        "operationId": "results-create",
        "description": "Create a new Results with the canonical binary wire format (eval_type `binary`,",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Result"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/Result"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Result"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "shareable_link": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v2/results/{id}/": {
      "get": {
        "operationId": "results-retrieve",
        "description": "`success` indicates whether the run passed its quality evaluation. A run with `success=false` either failed to connect (check `error_message`) or failed an evaluation check (check `evaluation`). `success_rate` is the percentage of runs with `success=true`.\n\nThe `runs` field is a dict keyed by run ID string (e.g. `{\"86368\": {...}, \"86367\": {...}}`), not an array — unlike the list endpoint. Each run also has a `call_id` STRING field (the provider's call identifier) — that is a data field, NOT an endpoint ID; do not pass it where `run_id` is expected.",
        "summary": "Retrieve a test result",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this result.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "shareable_link": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultDetailV2"
                },
                "examples": {
                  "Success": {
                    "value": {
                      "id": "integer",
                      "name": "string",
                      "agent": "integer",
                      "status": "string",
                      "met_expected_outcome_count": "integer",
                      "total_expected_outcome_count": "integer",
                      "success_rate": "float",
                      "run_as_text": "boolean",
                      "is_cronjob": "boolean",
                      "runs": {
                        "run_id": {
                          "id": "integer",
                          "scenario": "integer",
                          "outbound_number": "string",
                          "expected_outcome": {
                            "score": 100,
                            "explanation": [
                              "✅ Positive outcome explanation with checkmark emoji",
                              "❌ Negative outcome explanation with X emoji"
                            ],
                            "outcome_alignments": [
                              {
                                "outcome": "string",
                                "prompt_part": "string",
                                "aligned": "boolean"
                              }
                            ]
                          },
                          "success": "boolean",
                          "evaluation": {
                            "metrics": [
                              {
                                "id": "integer",
                                "name": "string",
                                "type": "binary | continuous_qualitative | numeric | enum",
                                "score": "number",
                                "explanation": "string | array",
                                "function_name": "string (optional)",
                                "extra": {
                                  "categories": [
                                    {
                                      "category": "string",
                                      "deviation": "string (optional)",
                                      "priority": "string (optional)"
                                    }
                                  ],
                                  "percentiles": {
                                    "p50": "number"
                                  }
                                },
                                "enum": "string (for enum type metrics only)"
                              }
                            ]
                          },
                          "timestamp": "datetime",
                          "executed_at": "datetime",
                          "error_message": "string",
                          "status": "string",
                          "duration": "string (MM:SS format)",
                          "scenario_name": "string",
                          "personality_name": "string",
                          "metadata": "object",
                          "inbound_number": "string"
                        }
                      },
                      "overall_evaluation": {
                        "success_rate": "number",
                        "metric_summary": {
                          "metric_id": {
                            "id": "integer",
                            "name": "string",
                            "type": "string",
                            "score": "number",
                            "explanation": "string (optional)",
                            "function_name": "string",
                            "vocera_defined_metric_code": "string (optional)",
                            "p50": "number (for numeric metrics)"
                          }
                        },
                        "worst_performing_metrics": {
                          "binary_adherence": [
                            "array of metric_ids"
                          ]
                        },
                        "numeric_metrics": [
                          {
                            "name": "string",
                            "type": "numeric",
                            "value": "number",
                            "percentiles": {
                              "p50": "number"
                            }
                          }
                        ],
                        "enum_metrics": [
                          "array of metric_ids"
                        ],
                        "extra_metrics": [
                          {
                            "name": "string (e.g., 'Expected Outcome', 'Average Ringing Duration')",
                            "type": "string",
                            "value": "number",
                            "percentiles": {
                              "p50": "number (optional)"
                            }
                          }
                        ]
                      },
                      "total_duration": "string (MM:SS format)",
                      "total_runs_count": "integer",
                      "completed_runs_count": "integer",
                      "success_runs_count": "integer",
                      "failed_runs_count": "integer",
                      "scenarios": [
                        {
                          "id": "integer",
                          "name": "string"
                        }
                      ],
                      "critical_categories": "array",
                      "metrics": "array",
                      "domain": "string (nullable)",
                      "domain_logo": "string (nullable)",
                      "runs_by_tags": "object",
                      "latency_data": "object",
                      "failed_reasons": "array",
                      "run_settings": {
                        "override_value": 10,
                        "frequency": 2,
                        "concurrency_limit": 5,
                        "personality_ids": [
                          3,
                          7
                        ],
                        "test_profile_ids": [
                          20
                        ],
                        "mode": "same_number",
                        "livekit_data": {
                          "agent_name": "kit",
                          "config": {},
                          "url": "wss://example"
                        }
                      },
                      "created_at": "datetime",
                      "updated_at": "datetime"
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "results-retrieve",
            "description": "`success` indicates whether the run passed its quality evaluation. A run with `success=false` either failed to connect (check `error_message`) or failed an evaluation check (check `evaluation`). `success_rate` is the percentage of runs with `success=true`.\n\nThe `runs` field is a dict keyed by run ID string (e.g. `{\"86368\": {...}, \"86367\": {...}}`), not an array — unlike the list endpoint. Each run also has a `call_id` STRING field (the provider's call identifier) — that is a data field, NOT an endpoint ID; do not pass it where `run_id` is expected."
          }
        }
      },
      "put": {
        "operationId": "results-update",
        "description": "Update a Results with the canonical binary wire format (eval_type `binary`,",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this result.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ResultDetailV2"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/ResultDetailV2"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/ResultDetailV2"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "shareable_link": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultDetailV2"
                }
              }
            },
            "description": ""
          }
        }
      },
      "patch": {
        "operationId": "results-partial-update",
        "description": "Update a Results with the canonical binary wire format (eval_type `binary`,",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this result.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchedResultDetailV2"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/PatchedResultDetailV2"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/PatchedResultDetailV2"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "shareable_link": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultDetailV2"
                }
              }
            },
            "description": ""
          }
        }
      },
      "delete": {
        "operationId": "results-destroy",
        "description": "Delete a Results with the canonical binary wire format (eval_type `binary`,",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this result.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "shareable_link": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "204": {
            "description": "No response body"
          }
        }
      }
    },
    "/test_framework/v2/results/{id}/ask_about_failures/": {
      "post": {
        "operationId": "results-ask-about-failures-create",
        "description": "Query failed runs chatbot",
        "summary": "Query failed runs chatbot",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this result.",
            "required": true
          }
        ],
        "tags": [
          "Results"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AskAboutFailuresRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/AskAboutFailuresRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/AskAboutFailuresRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "shareable_link": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "description": "Streaming AI-generated analysis of test failures"
          },
          "400": {
            "description": "Invalid request (missing or invalid question)"
          },
          "404": {
            "description": "Result not found"
          },
          "429": {
            "description": "Rate limit exceeded"
          }
        },
        "x-mcp-expose": true,
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "results-ask-about-failures-create",
            "description": "Query failed runs chatbot"
          }
        }
      }
    },
    "/test_framework/v2/results/{id}/create_shareable_link_token/": {
      "post": {
        "operationId": "create-shareable-link-token_3",
        "description": "Generate shareable link for result",
        "summary": "Generate shareable link for result",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this result.",
            "required": true
          }
        ],
        "tags": [
          "Results"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostCreateShareableLinkToken"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostCreateShareableLinkToken"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostCreateShareableLinkToken"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "shareable_link": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SchemaCreateShareableLinkTokenResponse"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "create-shareable-link-token",
            "description": "Generate shareable link for result"
          }
        }
      }
    },
    "/test_framework/v2/results/{id}/delete_runs/": {
      "post": {
        "operationId": "delete-runs_3",
        "description": "⚠ Irreversible. Removes the specified runs from a result, then triggers re-evaluation so aggregate metrics recompute without them. Maximum 100 run IDs per request.",
        "summary": "Delete runs from result",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this result.",
            "required": true
          }
        ],
        "tags": [
          "Results"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostDeleteRuns"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostDeleteRuns"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostDeleteRuns"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "shareable_link": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "204": {
            "description": "No response body"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "delete-runs",
            "description": "⚠ Irreversible. Removes the specified runs from a result, then triggers re-evaluation so aggregate metrics recompute without them. Maximum 100 run IDs per request."
          }
        }
      }
    },
    "/test_framework/v2/results/{id}/end_calls/": {
      "post": {
        "operationId": "end-calls_3",
        "description": "End all calls in result",
        "summary": "End all calls in result",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this result.",
            "required": true
          }
        ],
        "tags": [
          "Results"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "shareable_link": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "description": "No response body"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "end-calls",
            "description": "End all calls in result"
          }
        }
      }
    },
    "/test_framework/v2/results/{id}/evaluate_metrics/": {
      "post": {
        "operationId": "results-evaluate-metrics-create",
        "description": "Evaluate metrics on a result",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this result.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostReRunResultDetail"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostReRunResultDetail"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostReRunResultDetail"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "shareable_link": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "summary": "Evaluate metrics on a result",
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "results-evaluate-metrics-create",
            "description": "Evaluate metrics on a result"
          }
        }
      }
    },
    "/test_framework/v2/results/{id}/regenerate_ai_summary/": {
      "post": {
        "operationId": "results-regenerate-ai-summary-create",
        "description": "Queue a background job that regenerates the structured AI summary (what_happened / why_it_happened / how_to_fix), recommended next steps, and the workflow coverage for this result, based on its current runs. The new values appear on the next `results_retrieve` call once the job finishes.",
        "summary": "Regenerate the AI summary for a result",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this result.",
            "required": true
          }
        ],
        "tags": [
          "Results"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "shareable_link": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "202": {
            "description": "Regeneration queued; poll results_retrieve to see the new ai_summary / next_steps."
          },
          "404": {
            "description": "Result not found"
          }
        }
      }
    },
    "/test_framework/v2/results/{id}/rerun/": {
      "post": {
        "operationId": "results-rerun-create",
        "description": "Re-execute every scenario from a completed result against the same agent, creating a new result with a fresh set of runs. The connection mode (voice or text) and provider are inherited from the original runs. Consumes simulation credits (one run per scenario) and launches live calls, so the new result populates asynchronously.",
        "summary": "Re-run the scenarios from a completed test result",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this result.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "shareable_link": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "results-rerun-create",
            "description": "Re-execute every scenario from a completed result against the same agent, creating a new result with a fresh set of runs. The connection mode (voice or text) and provider are inherited from the original runs. Consumes simulation credits (one run per scenario) and launches live calls, so the new result populates asynchronously."
          }
        }
      }
    },
    "/test_framework/v2/results/bulk_delete/": {
      "post": {
        "operationId": "bulk-delete-results_3",
        "description": "⚠ Irreversible. Soft-deletes each result (and its non-deleted runs) with the same side-effects as deleting a single result: outbound phone numbers are released when no queued runs remain, capacity-manager slots are freed, and active_sessions / pending_demand counters are decremented in aggregate. Maximum 100 result IDs per request. Results that are already deleted or that the caller cannot access are silently skipped — the response is 204 even when no results are deleted.",
        "summary": "Soft-delete multiple results",
        "tags": [
          "Results"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostBulkDeleteResults"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostBulkDeleteResults"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostBulkDeleteResults"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "shareable_link": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "204": {
            "description": "No response body"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v2/results/bulk_evaluate_metrics/": {
      "post": {
        "operationId": "bulk-evaluate-result-metrics_3",
        "description": "Schedules re-evaluation of the given metrics against every completed/failed, non-deleted run of every selected result. Metrics are validated against each agent's metric scope; balance is checked for the full batch up front before any work is dispatched. Each affected result's status is flipped to RUNNING. Maximum 100 result IDs per request.",
        "summary": "Re-evaluate metrics across multiple results",
        "tags": [
          "Results"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostBulkEvaluateResultMetrics"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostBulkEvaluateResultMetrics"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostBulkEvaluateResultMetrics"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "shareable_link": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "description": "No response body"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v2/results/bulk_export_progress/": {
      "get": {
        "operationId": "results-bulk-export-progress-retrieve",
        "description": "Results bulk export progress",
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "shareable_link": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v2/results/bulk_export_result_runs/": {
      "get": {
        "operationId": "results-bulk-export-result-runs-retrieve",
        "description": "Bulk export results with progress tracking and file URL response.\nAccepts export_type in query params and applies the same filters as the queryset.",
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "shareable_link": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v2/results/export_result_runs/": {
      "get": {
        "operationId": "results-export-result-runs-retrieve",
        "description": "Results export result runs",
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "shareable_link": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v2/results/reports/": {
      "get": {
        "operationId": "results-reports-retrieve",
        "description": "Results reports",
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "shareable_link": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v2/results/reports/ask-about-failures/": {
      "post": {
        "operationId": "results-reports-ask-about-failures-create",
        "description": "Query failed runs chatbot for combined reports",
        "summary": "Query failed runs chatbot for combined reports",
        "tags": [
          "Results"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AskAboutFailuresReportsRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/AskAboutFailuresReportsRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/AskAboutFailuresReportsRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "shareable_link": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "description": "Streaming AI-generated analysis of test failures across combined results"
          },
          "400": {
            "description": "Invalid request (missing result_ids or question)"
          },
          "404": {
            "description": "No results found"
          },
          "429": {
            "description": "Rate limit exceeded"
          }
        }
      }
    },
    "/test_framework/v2/results/reports/share/": {
      "post": {
        "operationId": "results-reports-share-create",
        "description": "Results reports share",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Result"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/Result"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Result"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "shareable_link": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v2/results/result_ids/": {
      "get": {
        "operationId": "results-result-ids-retrieve",
        "description": "Results result ids",
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "shareable_link": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v2/runs/": {
      "get": {
        "operationId": "runs-list",
        "description": "List Runs with the canonical binary wire format (eval_type `binary`,",
        "parameters": [
          {
            "in": "query",
            "name": "id__in",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer"
              }
            },
            "description": "Multiple values may be separated by commas.",
            "explode": false,
            "style": "form"
          },
          {
            "in": "query",
            "name": "id",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "id__contains",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "timestamp__gte",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "timestamp__lte",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "result__agent_id",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "result__agent_id__in",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer"
              }
            },
            "description": "Multiple values may be separated by commas.",
            "explode": false,
            "style": "form"
          },
          {
            "in": "query",
            "name": "status__in",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Multiple values may be separated by commas.",
            "explode": false,
            "style": "form"
          },
          {
            "in": "query",
            "name": "status",
            "schema": {
              "type": "string",
              "x-spec-enum-id": "623e22fc1eb17833",
              "enum": [
                "cancelled",
                "completed",
                "evaluating",
                "failed",
                "in_progress",
                "in_queue",
                "pending",
                "running",
                "scaling_up",
                "timeout"
              ]
            },
            "description": "* `running` - Running\n* `completed` - Completed\n* `failed` - Failed\n* `pending` - Pending\n* `in_progress` - In Progress\n* `evaluating` - Evaluating\n* `in_queue` - In Queue\n* `timeout` - Timeout\n* `cancelled` - Cancelled\n* `scaling_up` - Scaling Up"
          },
          {
            "in": "query",
            "name": "success",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "duration__gte",
            "schema": {
              "type": "number",
              "format": "float"
            }
          },
          {
            "in": "query",
            "name": "duration__lte",
            "schema": {
              "type": "number",
              "format": "float"
            }
          },
          {
            "in": "query",
            "name": "call_id__icontains",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "call_id",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "provider_call_id__icontains",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "provider_call_id",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "scenario__id__in",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer"
              }
            },
            "description": "Multiple values may be separated by commas.",
            "explode": false,
            "style": "form"
          },
          {
            "in": "query",
            "name": "scenario__id",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "personality__id__in",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer"
              }
            },
            "description": "Multiple values may be separated by commas.",
            "explode": false,
            "style": "form"
          },
          {
            "in": "query",
            "name": "personality__id",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "result__id",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "result__run_as_text",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "created_at_from",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "created_at_to",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "agent_id",
            "schema": {
              "type": "integer"
            },
            "description": "Filter runs by agent ID"
          },
          {
            "in": "query",
            "name": "assistant_id",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "scenarios",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "tags",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "personalities",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "success_rate",
            "schema": {
              "type": "number"
            }
          },
          {
            "in": "query",
            "name": "search",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "call_ended_reason",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "call_ended_reason__icontains",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "call_ended_reason__in",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "created_at_range",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "duration_range",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "required": false,
            "in": "query",
            "description": "A page number within the paginated result set.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "page_size",
            "required": false,
            "in": "query",
            "description": "Number of results to return per page.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "project_id",
            "schema": {
              "type": "integer"
            },
            "description": "Filter runs by project ID"
          },
          {
            "in": "query",
            "name": "result_id",
            "schema": {
              "type": "integer"
            },
            "description": "Filter runs by result ID"
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "shareable_link": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedRunListList"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v2/runs/{id}/": {
      "get": {
        "operationId": "runs-retrieve",
        "description": "Retrieve a Runs with the canonical binary wire format (eval_type `binary`, by ID",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this run.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "shareable_link": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Run"
                }
              }
            },
            "description": ""
          }
        }
      },
      "put": {
        "operationId": "runs-update",
        "description": "Update a Runs with the canonical binary wire format (eval_type `binary`,",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this run.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Run"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/Run"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Run"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "shareable_link": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Run"
                }
              }
            },
            "description": ""
          }
        }
      },
      "patch": {
        "operationId": "runs-partial-update",
        "description": "Update a Runs with the canonical binary wire format (eval_type `binary`,",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this run.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchedRun"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/PatchedRun"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/PatchedRun"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "shareable_link": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Run"
                }
              }
            },
            "description": ""
          }
        }
      },
      "delete": {
        "operationId": "runs-destroy",
        "description": "Delete a Runs with the canonical binary wire format (eval_type `binary`,",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this run.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "shareable_link": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "204": {
            "description": "No response body"
          }
        }
      }
    },
    "/test_framework/v2/runs/{id}/chat/": {
      "post": {
        "operationId": "runs-api-chat_3",
        "description": "Submit your agent-under-test's latest message on a customer-driven (API chat) run. The simulated user's reply is generated in the background — the response returns a `turn_id` immediately; poll GET /runs/{run_id}/chat/{turn_id}/ until its `status` is `ready` to read the reply, then submit the next turn. Submitting a new turn while one is still generating interrupts it: the older turn is marked `dropped` but its message is kept, and the newest turn's reply answers all messages received since the last reply. Repeat until `ended` is true (or call end-chat).",
        "summary": "Submit a turn to an API-chat run",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this run.",
            "required": true
          }
        ],
        "tags": [
          "Runs"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiChatTurn"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/ApiChatTurn"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/ApiChatTurn"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "shareable_link": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiChatTurnSubmitResponse"
                }
              }
            },
            "description": ""
          },
          "409": {
            "description": "Run is still starting, or has already ended."
          }
        }
      }
    },
    "/test_framework/v2/runs/{id}/chat/{turn_id}/": {
      "get": {
        "operationId": "runs-api-chat-turn_3",
        "description": "Poll for the simulated user's reply to a turn submitted via POST /runs/{run_id}/chat/. `status` is `generating` until the reply is ready, then `ready` (with `message` and `ended`). `dropped` means the turn was superseded by a newer submission — its message is kept and the newer turn's reply answers both; `error` means generation failed. Turn 0 is the run's opening: `message` is the evaluator's first message, or null when your agent speaks first. Any turn stays pollable until the run's turn history expires, so the last reply is still retrievable after the run finishes.",
        "summary": "Poll a submitted API-chat turn",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this run.",
            "required": true
          },
          {
            "in": "path",
            "name": "turn_id",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "required": true
          }
        ],
        "tags": [
          "Runs"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "shareable_link": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiChatTurnPollResponse"
                }
              }
            },
            "description": ""
          },
          "404": {
            "description": "Unknown turn."
          }
        }
      }
    },
    "/test_framework/v2/runs/{id}/end-chat/": {
      "post": {
        "operationId": "runs-api-chat-end_3",
        "description": "Finish an API-chat run",
        "summary": "Finish an API-chat run",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this run.",
            "required": true
          }
        ],
        "tags": [
          "Runs"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiChatFinish"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/ApiChatFinish"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/ApiChatFinish"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "shareable_link": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiChatFinishResponse"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v2/runs/{id}/end_call/": {
      "post": {
        "operationId": "end-call_3",
        "description": "End a single call",
        "summary": "End a single call",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this run.",
            "required": true
          }
        ],
        "tags": [
          "Runs"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "shareable_link": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "description": "No response body"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "end-call",
            "description": "End a single call"
          }
        }
      }
    },
    "/test_framework/v2/runs/{id}/get_listen_url/": {
      "get": {
        "operationId": "runs-get-listen-url-retrieve",
        "description": "Runs get listen url",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this run.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "shareable_link": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Run"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v2/runs/{id}/mark_critical_scenario_wrong/": {
      "post": {
        "operationId": "runs-mark-critical-scenario-wrong-create",
        "description": "Runs mark critical scenario wrong",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this run.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Run"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/Run"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Run"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "shareable_link": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Run"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v2/runs/{id}/mark_expected_outcome_vote/": {
      "post": {
        "operationId": "runs-mark-expected-outcome-vote-create",
        "description": "Runs mark expected outcome vote",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this run.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Run"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/Run"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Run"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "shareable_link": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Run"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v2/runs/{id}/mark_metric_vote/": {
      "post": {
        "operationId": "runs-mark-metric-vote-create",
        "description": "Record a thumbs-up or thumbs-down vote on a specific metric evaluation for this run and optionally provide an expected value and free-text feedback. Updates the metric evaluation and marks the run as reviewed.",
        "summary": "Submit a metric vote for a run",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this run.",
            "required": true
          }
        ],
        "tags": [
          "Runs"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MarkMetricVote"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/MarkMetricVote"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/MarkMetricVote"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "shareable_link": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MarkMetricVoteRunResponse"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "runs-mark-metric-vote-create",
            "description": "Record a thumbs-up or thumbs-down vote on a specific metric evaluation for this run and optionally provide an expected value and free-text feedback. Updates the metric evaluation and marks the run as reviewed."
          }
        }
      }
    },
    "/test_framework/v2/runs/{id}/run_expected_outcome_bg/": {
      "post": {
        "operationId": "runs-run-expected-outcome-bg-create",
        "description": "Runs run expected outcome bg",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this run.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Run"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/Run"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Run"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "shareable_link": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Run"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v2/runs/{id}/unmark_critical_scenario_wrong/": {
      "post": {
        "operationId": "runs-unmark-critical-scenario-wrong-create",
        "description": "Runs unmark critical scenario wrong",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this run.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Run"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/Run"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Run"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "shareable_link": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Run"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v2/runs/bulk/": {
      "get": {
        "operationId": "runs-bulk-retrieve",
        "description": "Retrieve multiple runs in a single request.\n\n`success: true` indicates the run passed its quality evaluation. A run with `success=false` either failed to connect (check `error_message`) or failed an evaluation check. For detailed outcomes check: `error_message`, `metadata.ended_reason`, and `evaluation.metrics[].result`.",
        "parameters": [
          {
            "in": "query",
            "name": "run_ids",
            "schema": {
              "type": "string"
            },
            "description": "\nComma-separated list of run IDs.\nExample: `1,2,3`\n\nMust be a plain comma-separated string, not a JSON array — passing a JSON array returns a 400 error.\n",
            "required": true
          },
          {
            "name": "agent_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Tenant scope. Supply one of `agent_id`, `result_id`, `project_id` when authenticating with a user session or OAuth bearer token; omit when using an API key already scoped to the tenant."
          },
          {
            "name": "result_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Tenant scope. Supply one of `agent_id`, `result_id`, `project_id` when authenticating with a user session or OAuth bearer token; omit when using an API key already scoped to the tenant."
          },
          {
            "name": "project_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Tenant scope. Supply one of `agent_id`, `result_id`, `project_id` when authenticating with a user session or OAuth bearer token; omit when using an API key already scoped to the tenant."
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "shareable_link": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Run"
                  }
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "summary": "Get multiple runs",
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "runs-bulk-retrieve",
            "description": "Retrieve multiple runs in a single request.\n\n`success: true` indicates the run passed its quality evaluation. A run with `success=false` either failed to connect (check `error_message`) or failed an evaluation check. For detailed outcomes check: `error_message`, `metadata.ended_reason`, and `evaluation.metrics[].result`."
          }
        }
      }
    },
    "/test_framework/v2/runs/run_expected_outcome_progress/": {
      "get": {
        "operationId": "runs-run-expected-outcome-progress-retrieve",
        "description": "Runs run expected outcome progress",
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "shareable_link": []
          },
          {
            "supabase_session": []
          },
          {
            "embedded_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Run"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v2/scenarios/": {
      "get": {
        "operationId": "test-framework-v2-scenarios-list",
        "description": "scenarios_list: List evaluators (test scenarios) that simulate callers interacting with your agent. Filter by `agent_id`, `project_id`, `tags`, `folder_path`, or other params (see Schema). Returns paginated scenarios with their instructions, type, personalities, and metrics.\n\nPerformance tip: pass the most specific filter you have. `agent_id` if a specific agent is in context, `folder_path` if you're discussing a specific folder, or `project_id` for a workspace-level view. `page_size=20` is a reasonable starting size if you want to peek at recent ones first.",
        "summary": "List evaluators (scenarios)",
        "parameters": [
          {
            "name": "page",
            "required": false,
            "in": "query",
            "description": "A page number within the paginated result set.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "page_size",
            "required": false,
            "in": "query",
            "description": "Number of results to return per page.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "agent_id",
            "schema": {
              "type": "integer"
            },
            "description": "\nFilter evaluators by agent ID\nExample: `2142`\n"
          },
          {
            "in": "query",
            "name": "project_id",
            "schema": {
              "type": "integer"
            },
            "description": "\nFilter evaluators by project ID\nExample: `1`\n"
          },
          {
            "in": "query",
            "name": "assistant_id",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "\nFilter evaluators by assistant ID\nExample: `asst_1234567890`\n"
          },
          {
            "in": "query",
            "name": "tags",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "\nComma-separated list of tags to filter evaluators by\nExample: `tag1,tag2,tag3`\n"
          },
          {
            "in": "query",
            "name": "tag_filter_type",
            "schema": {
              "enum": [
                "and",
                "or",
                "not"
              ],
              "type": "string",
              "x-spec-enum-id": "b8b9507605e7dc0e",
              "default": "or",
              "minLength": 1
            },
            "description": "\nFilter operation type for tags\n\n\n* `and` - and\n* `or` - or\n* `not` - not"
          },
          {
            "in": "query",
            "name": "folder_path",
            "schema": {
              "type": "string"
            },
            "description": "\nFilter evaluators by folder path. Use empty string to get evaluators without a folder.\nExample: `Sales.Inbound`\n"
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedScenarioListList"
                }
              }
            },
            "description": ""
          }
        }
      },
      "post": {
        "operationId": "test-framework-v2-scenarios-create",
        "description": "scenarios_create: Create a test scenario (evaluator) that simulates a caller interacting with your agent. Required: `name`, `instructions` or program (see modes), and an `agent` or `project` to attach to.\n\n**Two modes — pick one via `scenario_type`:**\n\n- `instruction` (default, simplest) — put plain-text caller instructions in the `instructions` field. The simulated caller uses an LLM to paraphrase your instructions during the call.\n\n- `conditional_actions` — deterministic, rule-based caller. Provide the structured `conditional_actions` object. Use either `conditional_actions` or `instructions` — not both.\n\n**Common companion fields:**\n- `personality` (required) — caller voice/personality ID. Browse via `GET /personalities/`.\n- `metrics` — list of metric IDs to evaluate after each run.\n- `tags` — for grouping and later selection via `run_scenarios?tags=[...]`.\n- `folder_path` — e.g. `\"Sales.Inbound\"` for folder organization.\n- `test_profile` — a test profile ID providing caller metadata (order_id, user_email, etc.).\n\n**To run evaluators after creating:** call `run_scenarios` (voice), `run_scenarios_text`, `run_scenarios_with_websockets`, or `run_scenarios_pipecat` with the scenario ID(s) returned here.",
        "summary": "Create an evaluator (scenario)",
        "tags": [
          "Scenarios"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostScenario"
              },
              "examples": {
                "InstructionScenario(simplest—MostCommon)": {
                  "value": {
                    "agent": 12,
                    "name": "Frustrated patient asking about billing",
                    "scenario_type": "instruction",
                    "instructions": "You are a patient who just got a surprise bill. Call the clinic, ask for the billing department, and refuse to pay until they explain each line item.",
                    "personality": 3,
                    "metrics": [
                      5,
                      8
                    ],
                    "tags": [
                      "billing",
                      "angry-caller"
                    ]
                  },
                  "summary": "Instruction scenario (simplest — most common)"
                },
                "ConditionalActions(structured,DeterministicFlow)": {
                  "value": {
                    "agent": 12,
                    "name": "Happy path booking",
                    "scenario_type": "conditional_actions",
                    "conditional_actions": {
                      "role": "You are a patient booking a dental appointment",
                      "conditions": [
                        {
                          "id": 0,
                          "condition": "FIRST_MESSAGE",
                          "action": "Hi, I'd like to book a dental cleaning.",
                          "type": "standard",
                          "fixed_message": true
                        },
                        {
                          "id": 1,
                          "condition": "The agent asks when you'd like to come in",
                          "action": "Next Tuesday afternoon works.",
                          "type": "standard",
                          "fixed_message": false
                        },
                        {
                          "id": 2,
                          "condition": "The agent confirms the appointment is booked",
                          "action": "Great, thanks! <endcall />",
                          "type": "standard",
                          "fixed_message": true
                        }
                      ]
                    },
                    "personality": 3,
                    "metrics": [
                      5
                    ],
                    "folder_path": "Booking.Happy path"
                  },
                  "summary": "Conditional actions (structured, deterministic flow)"
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostScenario"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostScenario"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SchemaScenario"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v2/scenarios/{id}/": {
      "get": {
        "operationId": "test-framework-v2-scenarios-retrieve",
        "description": "Fetch a single evaluator by id. Returns full configuration including instructions, expected outcome, metrics, test profile, and — when the agent has mock tools attached and the scenario was auto-generated — the expected mock tool calls (`generated_mock_tool_entries`) with their inputs and outputs.",
        "summary": "Retrieve an evaluator (scenario)",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this scenario.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SchemaScenario"
                }
              }
            },
            "description": ""
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      },
      "put": {
        "operationId": "test-framework-v2-scenarios-update",
        "description": "Update a test scenario",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this scenario.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ScenarioSerializerV2"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/ScenarioSerializerV2"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/ScenarioSerializerV2"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScenarioSerializerV2"
                }
              }
            },
            "description": ""
          }
        }
      },
      "patch": {
        "operationId": "test-framework-v2-scenarios-partial-update",
        "description": "Partially update an evaluator. Same field shape as create — see `scenarios_create` for details.\n\n**Tip:** to add or modify a single condition inside a `conditional_actions` scenario, fetch the scenario with GET, mutate its `conditional_actions` object, and PATCH the full object back. The server replaces all conditions atomically.",
        "summary": "Update an evaluator (scenario)",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this scenario.",
            "required": true
          }
        ],
        "tags": [
          "Scenarios"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchedSchemaPostScenario"
              },
              "examples": {
                "Rename+TweakInstructions": {
                  "value": {
                    "name": "Refund flow v2",
                    "instructions": "Ask for the order ID before refunding."
                  },
                  "summary": "Rename + tweak instructions"
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/PatchedSchemaPostScenario"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/PatchedSchemaPostScenario"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SchemaScenario"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      },
      "delete": {
        "operationId": "test-framework-v2-scenarios-destroy",
        "description": "⚠ Irreversible. Deletes the evaluator. Past runs remain in the result history but become orphaned in the UI.",
        "summary": "Delete an evaluator",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this scenario.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "204": {
            "description": "No response body"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v2/scenarios/{id}/condition-audio/": {
      "get": {
        "operationId": "test-framework-v2-scenarios-condition-audio-list",
        "description": "Scenarios condition audio",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this scenario.",
            "required": true
          },
          {
            "name": "page",
            "required": false,
            "in": "query",
            "description": "A page number within the paginated result set.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "page_size",
            "required": false,
            "in": "query",
            "description": "Number of results to return per page.",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedConditionAudioEntryList"
                }
              }
            },
            "description": ""
          }
        }
      },
      "post": {
        "operationId": "test-framework-v2-scenarios-condition-audio-create",
        "description": "Attach an audio clip to a fixed-message conditional action. The clip is transcoded to 24kHz mono PCM WAV, stored in S3, and transcribed asynchronously. Pass action_template with one `<audio />` marker to insert the managed tag inline; omit it for legacy whole-action replacement. Shares the condition-audio URL with the list endpoint (GET lists, POST uploads).",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this scenario.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "condition_id": {
                    "type": "integer"
                  },
                  "file": {
                    "type": "string",
                    "format": "binary"
                  },
                  "action_template": {
                    "type": "string"
                  },
                  "replace_audio_id": {
                    "type": "string"
                  }
                },
                "required": [
                  "condition_id",
                  "file"
                ]
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConditionAudioEntry"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v2/scenarios/{id}/condition-audio/{audio_id}/": {
      "delete": {
        "operationId": "test-framework-v2-scenarios-condition-audio-destroy",
        "description": "Delete a Detach and delete an audio clip from this scenario's conditional action",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this scenario.",
            "required": true
          },
          {
            "in": "path",
            "name": "audio_id",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "deleted": {
                      "type": "boolean"
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v2/scenarios/{id}/edit/": {
      "post": {
        "operationId": "test-framework-v2-scenarios-edit-create",
        "description": "Scenarios edit",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this scenario.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ScenarioSerializerV2"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/ScenarioSerializerV2"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/ScenarioSerializerV2"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScenarioSerializerV2"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v2/scenarios/{id}/history/": {
      "get": {
        "operationId": "test-framework-v2-scenarios-history-list",
        "description": "Scenarios history",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this scenario.",
            "required": true
          },
          {
            "in": "query",
            "name": "page",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "page_size",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedScenarioHistoryList"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v2/scenarios/{id}/history/edit/": {
      "patch": {
        "operationId": "test-framework-v2-scenarios-history-edit-partial-update",
        "description": "Scenarios history edit",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this scenario.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchedScenarioEditHistoryRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/PatchedScenarioEditHistoryRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/PatchedScenarioEditHistoryRequest"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScenarioHistory"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v2/scenarios/{id}/restore/": {
      "post": {
        "operationId": "test-framework-v2-scenarios-restore-create",
        "description": "Scenarios restore",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this scenario.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ScenarioRestoreRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/ScenarioRestoreRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/ScenarioRestoreRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScenarioSerializerV2"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v2/scenarios/{id}/transcript_embeddings/": {
      "get": {
        "operationId": "test-framework-v2-scenarios-transcript-embeddings-retrieve",
        "description": "Fetches the pre-calculated transcript embeddings for a specific scenario.\nCalled by Pipecat service.\nIncludes audio sample metadata if available.\nApplies test_profile variable substitution to transcript messages.",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this scenario.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "pipecat_agent_token": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScenarioSerializerV2"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v2/scenarios/{id}/update_conditional_actions/": {
      "post": {
        "operationId": "test-framework-v2-scenarios-update-conditional-actions-create",
        "description": "DEPRECATED: Use PATCH /v1/scenarios/{id}/ with conditional_actions field instead.\n\nThis endpoint is deprecated and will be removed in a future version.\nPlease use the standard scenario update endpoint (PATCH /v1/scenarios/{id}/)\nwith the 'conditional_actions' field in the request body.\n\nExample:\nPATCH /v1/scenarios/{id}/\n{\n    \"conditional_actions\": {\n        \"role\": \"optional role description\",\n        \"conditions\": [...]\n    }\n}\n\n---\n\nUpdate a scenario with conditional actions data.\nTakes conditional actions in JSON format and saves it to the scenario's instructions field.\n\nURL parameter:\n    - pk: ID of the scenario to update (from URL)\n\nRequest body:\n    - conditional_actions: Object with format:\n        {\n            \"role\": \"optional role description\",\n            \"conditions\": [\n                {\n                    \"condition\": \"when text\",\n                    \"action\": \"action text\",\n                    \"type\": \"standard\" or \"fixed_message\" (optional, defaults to \"standard\")\n                },\n                ...\n            ]\n        }\n\nReturns:\n    - Success message\n\nUpdates:\n    - instructions: JSON string of conditional actions data",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this scenario.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ScenarioSerializerV2"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/ScenarioSerializerV2"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/ScenarioSerializerV2"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScenarioSerializerV2"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v2/scenarios/{id}/update_scenario_with_transcript/": {
      "post": {
        "operationId": "test-framework-v2-scenarios-update-scenario-with-transcript-crea",
        "description": "Update a scenario with transcript-based simulation data.\nTakes a transcript in JSON format and processes it for simulation testing,\nsaving the processed data to the specified scenario including embeddings and\nformatted simulation description.\n\nURL parameter:\n    - pk: ID of the scenario to update (from URL)\n\nRequest body:\n    - transcript_json: List of transcript message objects with format:\n        [\n            {\"role\": \"Main Agent\", \"content\": \"Hello\"},\n            {\"role\": \"Testing Agent\", \"content\": \"Hi\"},\n            ...\n        ]\n\nReturns:\n    - Scenario data with updated transcript simulation data\n\nUpdates:\n    - transcript_embeddings: Embeddings for Main Agent responses\n    - simulation_description: Formatted transcript description",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this scenario.",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ScenarioSerializerV2"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/ScenarioSerializerV2"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/ScenarioSerializerV2"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScenarioSerializerV2"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v2/scenarios/add_infrastructure_suite/": {
      "post": {
        "operationId": "test-framework-v2-scenarios-add-infrastructure-suite-create",
        "description": "Scenarios add infrastructure suite",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ScenarioSerializerV2"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/ScenarioSerializerV2"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/ScenarioSerializerV2"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScenarioSerializerV2"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v2/scenarios/add_tags/": {
      "post": {
        "operationId": "test-framework-v2-scenarios-add-tags-create",
        "description": "Scenarios add tags",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ScenarioSerializerV2"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/ScenarioSerializerV2"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/ScenarioSerializerV2"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScenarioSerializerV2"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v2/scenarios/adv_update/": {
      "post": {
        "operationId": "scenarios-bulk-update_3",
        "description": "Update many evaluators in a single call. Useful for attaching/detaching metrics, switching personality, appending instructions, or moving a batch between folders.\n\n**Non-idempotent fields:** `append_instruction` concatenates — calling twice with the same string adds it twice. `metric_ids_to_add`/`metric_ids_to_remove` and `tool_ids_to_add`/`tool_ids_to_remove` are set-mutating and shouldn't be replayed blindly.\n\n**Affects every ID in `scenarios`.** For modifying a single evaluator, prefer `scenarios_partial_update`. Confirm the `scenarios` list with the user before calling — the change is applied across the whole list in one transaction.\n\n**Required:** `scenarios` (list of evaluator IDs). One of `agent` or `project` is also required to scope the permission check. All other fields are optional and are applied only when present.",
        "summary": "Bulk update evaluators",
        "tags": [
          "Evaluators"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ScenariosBulkUpdateRequest"
              },
              "examples": {
                "AttachTwoMetricsToABatchOfScenarios": {
                  "value": {
                    "agent": 12,
                    "scenarios": [
                      101,
                      102,
                      103
                    ],
                    "metric_ids_to_add": [
                      501,
                      502
                    ]
                  },
                  "summary": "Attach two metrics to a batch of scenarios"
                },
                "MoveScenariosIntoAFolderAndSwitchPersonality": {
                  "value": {
                    "agent": 12,
                    "scenarios": [
                      101,
                      102
                    ],
                    "folder_path": "Sales.Inbound",
                    "personality": 7
                  },
                  "summary": "Move scenarios into a folder and switch personality"
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/ScenariosBulkUpdateRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/ScenariosBulkUpdateRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScenarioList"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v2/scenarios/cancel-agent/": {
      "post": {
        "operationId": "test-framework-v2-scenarios-cancel-agent-create",
        "description": "Scenarios cancel agent",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "type": {
              "schema": {
                "type": "object",
                "additionalProperties": {},
                "description": "Unspecified request body"
              }
            },
            "properties": {
              "schema": {
                "session_id": {
                  "type": "integer"
                }
              }
            },
            "required": {
              "schema": {
                "type": "object",
                "additionalProperties": {},
                "description": "Unspecified request body"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "session_id": {
                      "type": "integer"
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v2/scenarios/create-from-transcript-bg/": {
      "post": {
        "operationId": "scenarios-create-from-transcript-bg_3",
        "description": "Create a new evaluator from a call transcript. Analyzes the transcript to extract caller behavior, expected outcomes, and conversation flow.\n\n**`transcript_json` format:** array of message objects. Each object requires:\n- `role` — must be one of: `\"Main Agent\"`, `\"Testing Agent\"`, `\"Function Call\"`, `\"Function Call Result\"`\n- `content` — the message text\n- `start_time` (optional) — seconds from call start as a float\n\nNote: this endpoint accepts only the above role names. The role names used in the observability transcript ingestion API (\"agent\", \"user\", etc.) are not valid here.\n\nExample `transcript_json`:\n```json\n[\n  {\"role\": \"Main Agent\", \"content\": \"Hello, how can I help?\", \"start_time\": 0.0},\n  {\"role\": \"Testing Agent\", \"content\": \"I need to reschedule.\", \"start_time\": 2.1},\n  {\"role\": \"Main Agent\", \"content\": \"Sure, what date works?\", \"start_time\": 3.5}\n]\n```\n\n**Agent lookup:** the `agent` field looks up agents scoped to the project associated with your API key. If the agent belongs to a different project, use `assistant_id` instead, Returns a `progress_id`immediately; poll GET /scenarios/create-from-transcript-progress/?progress_id={id} until",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostSimulateScenario"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostSimulateScenario"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostSimulateScenario"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "progress_id": {
                      "type": "string"
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v2/scenarios/create-from-transcript-progress/": {
      "get": {
        "operationId": "scenarios-create-from-transcript-progress_3",
        "description": "Scenarios create from transcript progress",
        "parameters": [
          {
            "in": "query",
            "name": "progress_id",
            "schema": {
              "type": "string"
            },
            "description": "UUID progress identifier returned from create-from-transcript-bg endpoint",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "agent_id": {
                      "type": "integer"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "in_progress",
                        "completed",
                        "failed"
                      ]
                    },
                    "scenario_id": {
                      "type": "integer",
                      "nullable": true
                    },
                    "error": {
                      "type": "string",
                      "nullable": true
                    },
                    "scenario": {
                      "type": "object",
                      "nullable": true
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v2/scenarios/create_folder/": {
      "post": {
        "operationId": "scenarios-folder-create_3",
        "description": "Scenarios folder",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ScenarioFolderCreate"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/ScenarioFolderCreate"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/ScenarioFolderCreate"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScenarioFolder"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v2/scenarios/delete_folder/": {
      "post": {
        "operationId": "scenarios-folder-delete_3",
        "description": "Scenarios folder delete",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeleteFolderRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/DeleteFolderRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/DeleteFolderRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "204": {
            "description": "No response body"
          }
        }
      }
    },
    "/test_framework/v2/scenarios/delete_scenarios/": {
      "post": {
        "operationId": "scenarios-bulk-delete_3",
        "description": "⚠ Cannot be undone from the UI. Bulk-deletes the listed evaluators — they disappear from `scenarios_list` and from any future evaluator runs.\n\n**Always confirm the exact list of `scenarios` IDs with the user before calling.** For deleting a single evaluator prefer `scenarios_destroy`.\n\n**Required:** `scenarios` (list of evaluator IDs). One of `agent_id` or `project_id` is also required to scope the permission check.",
        "summary": "Bulk delete evaluators",
        "tags": [
          "Evaluators"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ScenariosBulkDeleteRequest"
              },
              "examples": {
                "BulkDeleteByAgent": {
                  "value": {
                    "agent_id": 12,
                    "scenarios": [
                      101,
                      102,
                      103
                    ]
                  },
                  "summary": "Bulk delete by agent"
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/ScenariosBulkDeleteRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/ScenariosBulkDeleteRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "204": {
            "description": "No response body"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v2/scenarios/discard-changes/": {
      "post": {
        "operationId": "test-framework-v2-scenarios-discard-changes-create",
        "description": "Mark the last preview message in a session as discarded. Called when the user clicks Discard on proposed changes so that the next LLM call receives the correct [STATUS: DISCARDED BY USER] annotation in its conversation context.",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "type": {
              "schema": {
                "type": "object",
                "additionalProperties": {},
                "description": "Unspecified request body"
              }
            },
            "properties": {
              "schema": {
                "session_id": {
                  "type": "integer"
                }
              }
            },
            "required": {
              "schema": {
                "type": "object",
                "additionalProperties": {},
                "description": "Unspecified request body"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "session_id": {
                      "type": "integer"
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v2/scenarios/duplicate/": {
      "post": {
        "operationId": "test-framework-v2-scenarios-duplicate-create",
        "description": "Create copies of existing evaluators in this project or another project in the same organization. Use this instead of recreating evaluators with `scenarios_create`; same-project copies retain their metrics and test profiles, while cross-project copies use the destination project's predefined metrics. Set `copy_to_project` to the source project for a folder-only copy; `folder_path` is created when needed, and copied evaluators are named `Copy of <original name>`.",
        "summary": "Duplicate evaluators into a folder",
        "parameters": [
          {
            "name": "page",
            "required": false,
            "in": "query",
            "description": "A page number within the paginated result set.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "page_size",
            "required": false,
            "in": "query",
            "description": "Number of results to return per page.",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "tags": [
          "Scenarios"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DuplicateScenariosRequest"
              },
              "examples": {
                "CopyEvaluatorsToANewFolder": {
                  "value": {
                    "project": 123,
                    "copy_to_project": 123,
                    "scenario_agent": 456,
                    "scenarios": [
                      101,
                      102
                    ],
                    "folder_path": "SMS agent - Papi Cleaning"
                  },
                  "summary": "Copy evaluators to a new folder"
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/DuplicateScenariosRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/DuplicateScenariosRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedScenarioList"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v2/scenarios/export_scenarios/": {
      "get": {
        "operationId": "export-scenarios_3",
        "description": "Export scenarios to CSV/Excel",
        "summary": "Export scenarios to CSV/Excel",
        "parameters": [
          {
            "in": "query",
            "name": "scenario_ids",
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated list of scenario IDs to export. Example: '1,2,3'",
            "required": true
          },
          {
            "in": "query",
            "name": "agent_id",
            "schema": {
              "type": "integer"
            },
            "description": "Filter scenarios by agent ID (either agent_id or project_id is required)"
          },
          {
            "in": "query",
            "name": "project_id",
            "schema": {
              "type": "integer"
            },
            "description": "Filter scenarios by project ID (either agent_id or project_id is required)"
          },
          {
            "in": "query",
            "name": "export_type",
            "schema": {
              "type": "string",
              "enum": [
                "csv",
                "xlsx"
              ]
            },
            "description": "Export format: 'csv' or 'xlsx'. Default: 'csv'"
          }
        ],
        "tags": [
          "Scenarios"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string"
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v2/scenarios/folders/": {
      "get": {
        "operationId": "test-framework-v2-scenarios-folders-list",
        "description": "Scenarios folders",
        "parameters": [
          {
            "name": "page",
            "required": false,
            "in": "query",
            "description": "A page number within the paginated result set.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "page_size",
            "required": false,
            "in": "query",
            "description": "Number of results to return per page.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "project_id",
            "schema": {
              "type": "integer"
            },
            "description": "Project ID to list folders for",
            "required": true
          },
          {
            "in": "query",
            "name": "parent_path",
            "schema": {
              "type": "string"
            },
            "description": "Parent folder path to get direct children only. Example: \"Sales.Inbound\""
          },
          {
            "in": "query",
            "name": "search",
            "schema": {
              "type": "string"
            },
            "description": "Search folders by name (case-insensitive)"
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedScenarioFolderList"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v2/scenarios/generate-bg/": {
      "post": {
        "operationId": "scenarios-generate-bg_3",
        "description": "Generate scenarios for a given agent in the background. Returns a `progress_id` immediately; poll GET /scenarios/generate-progress/?progress_id={id} until `total_scenarios == completed_scenarios`.\n\n**What happens automatically on generation:**\n- A scenario-specific test profile is created and its `information` is populated using the sectioned shape: `main_agent_variables` (dynamic-variable values that reach the agent under test at call time — e.g. `user_id`, `account_id`) and `testing_agent_variables` (persona/context used by the simulated caller — e.g. `customer_name`, `date_of_birth`). Section values are kept consistent with any generated mock-tool data.\n- When the agent has mock tools attached, each generated scenario also gets `generated_mock_tool_entries` — the expected mock tool calls for that scenario, shaped `[{tool_id, tool_name, new_entry: {input, output}}]`. These are returned on scenario reads and can be edited later via `scenarios_partial_update`.\n- 10 project-level evaluation metrics are attached to every generated scenario automatically (e.g. Latency, Pitch, Interruption Score). Scenarios created manually via `scenarios_create` start with no metrics attached.\n\n**Response fields:** `progress_id` (UUID string) for polling; `session_id` is always null.",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SchemaGenerateScenarios"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/SchemaGenerateScenarios"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/SchemaGenerateScenarios"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "progress_id": {
                      "type": "string"
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v2/scenarios/generate-clarify-answer/": {
      "post": {
        "operationId": "scenarios-generate-clarify-answer_3",
        "description": "When GET /scenarios/generate-progress/ returns status='pending_clarification', the agentic generation agent has asked one or more clarifying questions. Submit the user's answer here to resume generation. Continue polling /scenarios/generate-progress/ after calling this endpoint.",
        "summary": "Answer a clarification question during agentic scenario generation",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GenerateClarifyAnswer"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/GenerateClarifyAnswer"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/GenerateClarifyAnswer"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "progress_id": {
                      "type": "string"
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v2/scenarios/generate-instructions/": {
      "post": {
        "operationId": "test-framework-v2-scenarios-generate-instructions-create",
        "description": "Scenarios generate instructions",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ScenarioSerializerV2"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/ScenarioSerializerV2"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/ScenarioSerializerV2"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScenarioSerializerV2"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v2/scenarios/generate-progress/": {
      "get": {
        "operationId": "scenarios-generate-progress_3",
        "description": "Scenarios generate progress",
        "parameters": [
          {
            "in": "query",
            "name": "progress_id",
            "schema": {
              "type": "string"
            },
            "description": "UUID progress identifier returned from generate-bg endpoint",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "total_scenarios": {
                      "type": "integer",
                      "description": "Total number of scenarios"
                    },
                    "completed_scenarios": {
                      "type": "integer",
                      "description": "Number of completed scenarios"
                    },
                    "failed_scenarios": {
                      "type": "integer",
                      "description": "Number of failed scenarios"
                    },
                    "scenarios_list": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "description": "Unique identifier for the scenario"
                          },
                          "name": {
                            "type": "string",
                            "description": "Name of the scenario"
                          },
                          "agent": {
                            "type": "integer",
                            "description": "ID of the AI agent this scenario belongs to"
                          },
                          "assistant_id": {
                            "type": "string",
                            "description": "Alternative to agent ID - the assistant ID to use for this scenario"
                          },
                          "personality": {
                            "type": "integer",
                            "description": "ID of the personality used in this scenario"
                          },
                          "personality_name": {
                            "type": "string",
                            "description": "Name of the personality used in this scenario"
                          },
                          "tags": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "Tags associated with this scenario."
                          },
                          "runs": {
                            "type": "array",
                            "items": {
                              "type": "integer"
                            },
                            "description": "List of IDs for the last run of this scenario"
                          },
                          "metrics": {
                            "type": "array",
                            "items": {
                              "type": "integer"
                            },
                            "description": "List of metric IDs to associate with this scenario"
                          },
                          "metric_names": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "List of metric names associated with this scenario"
                          },
                          "phone_number": {
                            "type": "string",
                            "description": "Phone number used for outbound calls in this scenario"
                          },
                          "phone_number_queue_length": {
                            "type": "integer",
                            "description": "Number of runs in queue for this phone number"
                          },
                          "first_message": {
                            "type": "string",
                            "description": "First message to be sent in the scenario"
                          },
                          "inbound_phone_number": {
                            "type": "integer",
                            "description": "ID of the phone number used for inbound calls"
                          },
                          "inbound_phone_number_data": {
                            "type": "object",
                            "description": "Details of the phone number used for inbound calls",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "description": "ID of the inbound phone number"
                              },
                              "number": {
                                "type": "string",
                                "description": "The actual phone number"
                              },
                              "phone_number_id": {
                                "type": "string",
                                "description": "External ID of the phone number"
                              }
                            }
                          },
                          "instructions": {
                            "type": "string",
                            "description": "Instructions for the AI agent in this scenario"
                          },
                          "simulation_description": {
                            "type": "string",
                            "description": "Description of the simulation if this scenario was created by simulation"
                          },
                          "information_fields": {
                            "type": "object",
                            "description": "Additional information fields for the scenario"
                          },
                          "expected_outcome_prompt": {
                            "type": "string",
                            "description": "Expected outcome prompt for the scenario"
                          },
                          "scenario_language": {
                            "type": "string",
                            "description": "Language of the scenario"
                          },
                          "is_simulating": {
                            "type": "boolean",
                            "description": "Whether this scenario was created by simulation"
                          },
                          "test_profile_data": {
                            "type": "object",
                            "description": "The test profile generated for this scenario, including its sectioned `information` (main_agent_variables / testing_agent_variables)"
                          },
                          "generated_mock_tool_entries": {
                            "type": "array",
                            "description": "Expected mock tool calls generated for this scenario when the agent has mock tools attached. Empty when the agent has no mock tools.",
                            "items": {
                              "type": "object",
                              "properties": {
                                "tool_id": {
                                  "type": "integer",
                                  "description": "ID of the mock tool on the agent"
                                },
                                "tool_name": {
                                  "type": "string",
                                  "description": "Name of the tool being mocked"
                                },
                                "new_entry": {
                                  "type": "object",
                                  "description": "The expected tool call for this scenario",
                                  "properties": {
                                    "input": {
                                      "type": "object",
                                      "description": "Input parameters the tool call is expected to receive"
                                    },
                                    "output": {
                                      "type": "object",
                                      "description": "Response the mock tool will return"
                                    }
                                  }
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v2/scenarios/has_infrastructure_suite/": {
      "get": {
        "operationId": "test-framework-v2-scenarios-has-infrastructure-suite-retrieve",
        "description": "Scenarios has infrastructure suite",
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScenarioSerializerV2"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v2/scenarios/improve_instructions/": {
      "post": {
        "operationId": "test-framework-v2-scenarios-improve-instructions-create",
        "description": "Scenarios improve instructions",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ScenarioInstructionsRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/ScenarioInstructionsRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/ScenarioInstructionsRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ImproveInstructionsResponse"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v2/scenarios/infrastructure_suite_preview/": {
      "get": {
        "operationId": "test-framework-v2-scenarios-infrastructure-suite-preview-retriev",
        "description": "Scenarios infrastructure suite preview retriev",
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScenarioSerializerV2"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v2/scenarios/instructions-progress/": {
      "get": {
        "operationId": "test-framework-v2-scenarios-instructions-progress-retrieve",
        "description": "Scenarios instructions progress",
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScenarioSerializerV2"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v2/scenarios/json_schema/": {
      "get": {
        "operationId": "scenarios-json-schema_3",
        "description": "Fetch the JSON Schema for test-suite spec files",
        "summary": "Fetch the JSON Schema for test-suite spec files",
        "parameters": [
          {
            "in": "query",
            "name": "version",
            "schema": {
              "type": "string"
            },
            "description": "Spec version to fetch. Defaults to the current version."
          }
        ],
        "tags": [
          "Evaluators"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScenarioSerializerV2"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v2/scenarios/move_folder/": {
      "post": {
        "operationId": "scenarios-folder-move_3",
        "description": "Scenarios folder move",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MoveFolderRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/MoveFolderRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/MoveFolderRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScenarioFolder"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v2/scenarios/rename_folder/": {
      "post": {
        "operationId": "scenarios-folder-rename_3",
        "description": "Scenarios folder rename",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RenameFolderRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/RenameFolderRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/RenameFolderRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScenarioFolder"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v2/scenarios/run_scenarios/": {
      "post": {
        "operationId": "scenarios-run-voice_3",
        "description": "VOICE RUN: Execute evaluators against your agent using a real voice / phone / SIP call. This is the primary 'run your evaluators' endpoint for voice-mode testing. Requires `telephony.phone_number` configured on the agent (any provider).\n\n**Run-count math:** total calls = `len(scenarios) × frequency × max(1, len(personality_ids)) × max(1, len(test_profile_ids))`. Each call is billed at the voice-simulation rate — check `frequency` carefully.\n\n**Concurrency:** use `concurrency_limit` to cap parallel calls. Default: unbounded (subject to provider rate limits).\n\n**Scenario selection (pick one):**\n- `scenarios` — list of integer evaluator IDs (e.g. `[101, 102]`)\n- `tags` — select by tag\n- `folder_path` — select by folder path (e.g. `\"Sales.Inbound\"`); requires `project_id`\n\n**Phone-number overrides:**\n- `outbound_phone_number` — override the number dialed\n- `agent_number` — override the contact number the inbound agent receives calls on\n- `mode` — `same_number` (all runs use one pair) vs `different_numbers`\n\n**When to use this vs others** (pick the endpoint matching the agent's configured connection — check `aiagents_retrieve`):\n- `run_scenarios_text` — text / SMS / chat mode; cheaper, no voice cost\n- `run_scenarios_with_websockets` — each scenario carries its own websocket URL\n- `run_scenarios_pipecat` — Pipecat/Daily.co WebRTC deployment\n\n**Personality override:** `personality_ids` must be IDs that are already enabled for the agent's project. Check which are enabled via `aiagents_retrieve` → `enabled_personalities` field. To enable a new personality, call `aiagents_partial_update` with the updated `enabled_personalities` list before using it here. Note: enabling a personality applies project-wide, not just to one agent. Passing an ID that is not enabled returns `[\"Invalid personalities provided.\"]`.\n\n**Scheduled runs:** to run on a recurring cron schedule, create a CronJob via `POST /test_framework/v1/cron_jobs/` with `execution_mode=\"voice\"` instead of looping this endpoint.\n\n**Polling for completion:** the response contains a `result.id` with `status: 'running'`. Poll `GET /test_framework/v1/results/{result_id}/` until `status` is 'completed' or 'failed'. There is no separate progress endpoint for runs. Check `failed_reasons` for infrastructure errors; check `runs[run_id].error_message` for per-run errors.\n\n**Outbound dial window:** for outbound runs (agent `inbound=false`), your agent must dial the run's `outbound_number` before `outbound_dial_window_closes_at` (default 300s after the run reaches `waiting_for_call` / pending state). Dials received after that deadline are dropped and the run returns `status: timeout`.",
        "summary": "Run evaluators over a voice call",
        "tags": [
          "Evaluators"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostRunScenarios"
              },
              "examples": {
                "RunSelectedScenarios(simplest)": {
                  "value": {
                    "agent_id": 12,
                    "scenarios": [
                      101,
                      102,
                      103
                    ],
                    "frequency": 1
                  },
                  "summary": "Run selected scenarios (simplest)"
                },
                "RunAnEntireFolder,3×Each,5InParallel": {
                  "value": {
                    "agent_id": 12,
                    "folder_path": "Sales.Inbound",
                    "project_id": 1376,
                    "frequency": 3,
                    "concurrency_limit": 5,
                    "name": "Nightly Sales.Inbound regression"
                  },
                  "summary": "Run an entire folder, 3× each, 5 in parallel"
                },
                "OverridePersonalities+TestProfiles(multipliesRunCount)": {
                  "value": {
                    "agent_id": 12,
                    "scenarios": [
                      101
                    ],
                    "frequency": 2,
                    "personality_ids": [
                      3,
                      7
                    ],
                    "test_profile_ids": [
                      20,
                      21
                    ]
                  },
                  "summary": "Override personalities + test profiles (multiplies run count)"
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostRunScenarios"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostRunScenarios"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "ID of the result"
                    },
                    "agent": {
                      "type": "integer",
                      "description": "ID of the agent"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "running",
                        "completed",
                        "failed"
                      ],
                      "description": "Status of the result"
                    },
                    "run_as_text": {
                      "type": "boolean",
                      "description": "Whether the scenario ran as text or not",
                      "example": false
                    },
                    "runs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "description": "ID of the run"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "pending",
                              "running",
                              "completed",
                              "failed"
                            ],
                            "description": "Status of the run"
                          },
                          "scenario": {
                            "type": "integer",
                            "description": "ID of the scenario"
                          },
                          "number": {
                            "type": "string",
                            "description": "For outbound runs (agent.inbound=False). The given number that must be called from the phone number configured in the cekura agent.",
                            "example": "+11234567890"
                          },
                          "inbound_number": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "For inbound runs (agent.inbound=True). The agent's configured phone number will receive calls from this number.",
                            "example": "+11234567890"
                          },
                          "scenario_name": {
                            "type": "string",
                            "description": "Name of the scenario"
                          },
                          "test_profile_data": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "description": "Details of the test profile associated with this run scenario"
                          },
                          "outbound_dial_window_opens_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "When the outbound dial window opened (run transitioned to pending/waiting-for-call). Null until dispatched."
                          },
                          "outbound_dial_window_seconds": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "description": "Duration of the outbound dial window in seconds."
                          },
                          "outbound_dial_window_closes_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "Deadline by which your agent must dial the outbound number (opens_at + outbound_dial_window_seconds). Dials after this are dropped and the run returns status: timeout."
                          }
                        }
                      },
                      "examples": [
                        {
                          "id": 274,
                          "status": "pending",
                          "scenario": 1,
                          "number": null,
                          "inbound_number": "+11234567890",
                          "scenario_name": "Customer Support Call (Agent Inbound = True)",
                          "test_profile_data": null,
                          "outbound_dial_window_opens_at": null,
                          "outbound_dial_window_seconds": null,
                          "outbound_dial_window_closes_at": null
                        },
                        {
                          "id": 275,
                          "status": "pending",
                          "scenario": 2,
                          "number": "+11234567890",
                          "inbound_number": null,
                          "scenario_name": "Outbound Sales Call (Agent Inbound = False)",
                          "test_profile_data": null,
                          "outbound_dial_window_opens_at": "2026-06-24T10:47:30Z",
                          "outbound_dial_window_seconds": 300,
                          "outbound_dial_window_closes_at": "2026-06-24T10:52:30Z"
                        }
                      ]
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time",
                      "example": "2025-02-25T21:00:01.990052Z"
                    }
                  }
                },
                "examples": {
                  "InboundScenario": {
                    "value": {
                      "id": 167,
                      "agent": 1,
                      "status": "pending",
                      "success_rate": 0,
                      "run_as_text": false,
                      "runs": [
                        {
                          "id": 274,
                          "scenario": 1,
                          "number": null,
                          "inbound_number": "+11234567890",
                          "outbound_dial_window_opens_at": null,
                          "outbound_dial_window_seconds": null,
                          "outbound_dial_window_closes_at": null
                        },
                        {
                          "id": 273,
                          "scenario": 2,
                          "number": null,
                          "inbound_number": "+11234567891",
                          "outbound_dial_window_opens_at": null,
                          "outbound_dial_window_seconds": null,
                          "outbound_dial_window_closes_at": null
                        }
                      ],
                      "created_at": "2025-02-25T21:00:01.990052Z"
                    },
                    "summary": "Inbound Scenario"
                  },
                  "OutboundScenario": {
                    "value": {
                      "id": 167,
                      "agent": 1,
                      "status": "pending",
                      "success_rate": 0,
                      "run_as_text": false,
                      "runs": [
                        {
                          "id": 274,
                          "scenario": 1,
                          "number": "+11234567890",
                          "inbound_number": null,
                          "outbound_dial_window_opens_at": "2026-06-24T10:47:30Z",
                          "outbound_dial_window_seconds": 300,
                          "outbound_dial_window_closes_at": "2026-06-24T10:52:30Z"
                        },
                        {
                          "id": 273,
                          "scenario": 2,
                          "number": "+11234567891",
                          "inbound_number": null,
                          "outbound_dial_window_opens_at": "2026-06-24T10:47:30Z",
                          "outbound_dial_window_seconds": 300,
                          "outbound_dial_window_closes_at": "2026-06-24T10:52:30Z"
                        }
                      ],
                      "created_at": "2025-02-25T21:00:01.990052Z"
                    },
                    "summary": "Outbound Scenario"
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v2/scenarios/run_scenarios_agora/": {
      "post": {
        "operationId": "scenarios-run-agora_3",
        "description": "AGORA RTC VOICE RUN: Execute evaluators against an agent reachable in an Agora RTC channel. Cekura joins the channel as a participant and converses. The agent must have `agora_data.session_endpoint_url` configured — an endpoint that mints the per-call channel and token; Cekura calls it at run time and never stores the join details.\n\n**Cost:** voice-simulation rate per run.\n**Run-count math:** total runs = `len(scenarios) × frequency × max(1, len(personality_ids)) × max(1, len(test_profile_ids))`.\n\n**When to use this vs others** (pick the endpoint matching the agent's configured connection — check `aiagents_retrieve`):\n- `scenarios_run_voice` — phone / SIP voice run\n- `scenarios_run_livekit_v2` — LiveKit (project credentials, v2)\n- `scenarios_run_pipecat_v2` — Pipecat Cloud WebRTC",
        "summary": "Run evaluators against an agent in an Agora RTC channel",
        "tags": [
          "Evaluators"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostRunScenarios"
              },
              "examples": {
                "AgoraRun": {
                  "value": {
                    "agent_id": 12,
                    "scenarios": [
                      101
                    ],
                    "frequency": 1
                  },
                  "summary": "Agora run"
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostRunScenarios"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostRunScenarios"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "ID of the result"
                    },
                    "agent": {
                      "type": "integer",
                      "description": "ID of the agent"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "running",
                        "completed",
                        "failed"
                      ],
                      "description": "Status of the result"
                    },
                    "run_as_text": {
                      "type": "boolean",
                      "description": "Whether the scenario ran as text or not",
                      "example": false
                    },
                    "runs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "description": "ID of the run"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "pending",
                              "running",
                              "completed",
                              "failed"
                            ],
                            "description": "Status of the run"
                          },
                          "scenario": {
                            "type": "integer",
                            "description": "ID of the scenario"
                          },
                          "number": {
                            "type": "string",
                            "description": "For outbound runs (agent.inbound=False). The given number that must be called from the phone number configured in the cekura agent.",
                            "example": "+11234567890"
                          },
                          "inbound_number": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "For inbound runs (agent.inbound=True). The agent's configured phone number will receive calls from this number.",
                            "example": "+11234567890"
                          },
                          "scenario_name": {
                            "type": "string",
                            "description": "Name of the scenario"
                          },
                          "test_profile_data": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "description": "Details of the test profile associated with this run scenario"
                          },
                          "outbound_dial_window_opens_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "When the outbound dial window opened (run transitioned to pending/waiting-for-call). Null until dispatched."
                          },
                          "outbound_dial_window_seconds": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "description": "Duration of the outbound dial window in seconds."
                          },
                          "outbound_dial_window_closes_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "Deadline by which your agent must dial the outbound number (opens_at + outbound_dial_window_seconds). Dials after this are dropped and the run returns status: timeout."
                          }
                        }
                      },
                      "examples": [
                        {
                          "id": 274,
                          "status": "pending",
                          "scenario": 1,
                          "number": null,
                          "inbound_number": "+11234567890",
                          "scenario_name": "Customer Support Call (Agent Inbound = True)",
                          "test_profile_data": null,
                          "outbound_dial_window_opens_at": null,
                          "outbound_dial_window_seconds": null,
                          "outbound_dial_window_closes_at": null
                        },
                        {
                          "id": 275,
                          "status": "pending",
                          "scenario": 2,
                          "number": "+11234567890",
                          "inbound_number": null,
                          "scenario_name": "Outbound Sales Call (Agent Inbound = False)",
                          "test_profile_data": null,
                          "outbound_dial_window_opens_at": "2026-06-24T10:47:30Z",
                          "outbound_dial_window_seconds": 300,
                          "outbound_dial_window_closes_at": "2026-06-24T10:52:30Z"
                        }
                      ]
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time",
                      "example": "2025-02-25T21:00:01.990052Z"
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v2/scenarios/run_scenarios_api_chat/": {
      "post": {
        "operationId": "scenarios-run-api-chat_3",
        "description": "API CHAT RUN (pull mode): open one or more chat conversations that YOU drive turn-by-turn over REST — Cekura plays the simulated user, you play the agent under test. No agent connection is dialed; there is no server-side conversation loop, so a conversation can span minutes or up to an hour with turns arbitrarily far apart.\n\n**Run-count:** total conversations = `len(scenarios) × frequency`.\n\n**Driving each run** (the response `result.runs[].id` are the run IDs):\n1. If the scenario has a first message, the simulated user speaks first — read it from the run transcript. Otherwise you speak first.\n2. `POST /runs/{run_id}/chat/` with your agent's message → returns a `turn_id`.\n3. Poll `GET /runs/{run_id}/chat/{turn_id}/` until `status` is `ready` to read the reply.\n4. Repeat until `ended` is true, or call `POST /runs/{run_id}/end-chat/`.\n\n`timeout` is the overall run timeout: each conversation is finalized and scored automatically once it elapses (defaults to the project's duration, capped at 1 hour).",
        "summary": "Start customer-driven (API chat) evaluator runs",
        "tags": [
          "Evaluators"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostRunScenariosApiChat"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostRunScenariosApiChat"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostRunScenariosApiChat"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RunScenarioResult"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v2/scenarios/run_scenarios_chirp/": {
      "post": {
        "operationId": "scenarios-run-chirp_3",
        "description": "RAW-PCM WEBSOCKET VOICE RUN: Execute evaluators against an agent that exposes a raw-PCM WebSocket endpoint (16 kHz, 16-bit mono, binary frames). The agent must have a websocket endpoint configured (`telephony.websocket_url`); optional Basic Auth lives in `telephony.websocket_auth`. Pass `websocket_url` to override the agent's stored endpoint for this run.\n\n**Cost:** voice-simulation rate per run.\n**Run-count math:** total runs = `len(scenarios) × frequency × max(1, len(personality_ids)) × max(1, len(test_profile_ids))`.\n\n**When to use this vs others** (pick the endpoint matching the agent's configured connection — check `aiagents_retrieve`):\n- `scenarios_run_websocket` — JSON/text WebSocket protocol (per-scenario URLs)\n- `scenarios_run_voice` — phone / SIP voice run\n- `scenarios_run_pipecat_v2` — Pipecat Cloud WebRTC",
        "summary": "Run evaluators against a raw-PCM WebSocket voice endpoint",
        "tags": [
          "Evaluators"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostRunScenariosChirp"
              },
              "examples": {
                "WebsocketVoiceRun": {
                  "value": {
                    "agent_id": 12,
                    "scenarios": [
                      101
                    ],
                    "frequency": 1
                  },
                  "summary": "Websocket voice run"
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostRunScenariosChirp"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostRunScenariosChirp"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "ID of the result"
                    },
                    "agent": {
                      "type": "integer",
                      "description": "ID of the agent"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "running",
                        "completed",
                        "failed"
                      ],
                      "description": "Status of the result"
                    },
                    "run_as_text": {
                      "type": "boolean",
                      "description": "Whether the scenario ran as text or not",
                      "example": false
                    },
                    "runs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "description": "ID of the run"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "pending",
                              "running",
                              "completed",
                              "failed"
                            ],
                            "description": "Status of the run"
                          },
                          "scenario": {
                            "type": "integer",
                            "description": "ID of the scenario"
                          },
                          "number": {
                            "type": "string",
                            "description": "For outbound runs (agent.inbound=False). The given number that must be called from the phone number configured in the cekura agent.",
                            "example": "+11234567890"
                          },
                          "inbound_number": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "For inbound runs (agent.inbound=True). The agent's configured phone number will receive calls from this number.",
                            "example": "+11234567890"
                          },
                          "scenario_name": {
                            "type": "string",
                            "description": "Name of the scenario"
                          },
                          "test_profile_data": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "description": "Details of the test profile associated with this run scenario"
                          },
                          "outbound_dial_window_opens_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "When the outbound dial window opened (run transitioned to pending/waiting-for-call). Null until dispatched."
                          },
                          "outbound_dial_window_seconds": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "description": "Duration of the outbound dial window in seconds."
                          },
                          "outbound_dial_window_closes_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "Deadline by which your agent must dial the outbound number (opens_at + outbound_dial_window_seconds). Dials after this are dropped and the run returns status: timeout."
                          }
                        }
                      },
                      "examples": [
                        {
                          "id": 274,
                          "status": "pending",
                          "scenario": 1,
                          "number": null,
                          "inbound_number": "+11234567890",
                          "scenario_name": "Customer Support Call (Agent Inbound = True)",
                          "test_profile_data": null,
                          "outbound_dial_window_opens_at": null,
                          "outbound_dial_window_seconds": null,
                          "outbound_dial_window_closes_at": null
                        },
                        {
                          "id": 275,
                          "status": "pending",
                          "scenario": 2,
                          "number": "+11234567890",
                          "inbound_number": null,
                          "scenario_name": "Outbound Sales Call (Agent Inbound = False)",
                          "test_profile_data": null,
                          "outbound_dial_window_opens_at": "2026-06-24T10:47:30Z",
                          "outbound_dial_window_seconds": 300,
                          "outbound_dial_window_closes_at": "2026-06-24T10:52:30Z"
                        }
                      ]
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time",
                      "example": "2025-02-25T21:00:01.990052Z"
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v2/scenarios/run_scenarios_elevenlabs/": {
      "post": {
        "operationId": "scenarios-run-elevenlabs_3",
        "description": "ELEVENLABS CONVERSATIONAL VOICE RUN: Execute evaluators against an ElevenLabs Conversational AI agent. The agent must have ElevenLabs credentials configured AND `assistant_id` set to the ElevenLabs agent ID.\n\n**Cost:** voice-simulation rate per run.\n**Run-count math:** total runs = `len(scenarios) × frequency × max(1, len(personality_ids)) × max(1, len(test_profile_ids))`.\n\n**When to use this vs others** (pick the endpoint matching the agent's configured connection — check `aiagents_retrieve`):\n- `scenarios_run_voice` — phone / SIP voice run\n- `scenarios_run_vapi_webrtc` — VAPI agents over WebRTC\n- `scenarios_run_retell_webrtc` — Retell agents over WebRTC\n- `scenarios_run_pipecat_v2` — Pipecat Cloud (project credentials, v2)",
        "summary": "Run evaluators against an ElevenLabs Conversational agent",
        "tags": [
          "Evaluators"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostRunScenariosElevenLabs"
              },
              "examples": {
                "ElevenLabsRun": {
                  "value": {
                    "agent_id": 12,
                    "scenarios": [
                      101,
                      102
                    ],
                    "frequency": 1
                  },
                  "summary": "ElevenLabs run"
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostRunScenariosElevenLabs"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostRunScenariosElevenLabs"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "ID of the result"
                    },
                    "agent": {
                      "type": "integer",
                      "description": "ID of the agent"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "running",
                        "completed",
                        "failed"
                      ],
                      "description": "Status of the result"
                    },
                    "run_as_text": {
                      "type": "boolean",
                      "description": "Whether the scenario ran as text or not",
                      "example": false
                    },
                    "runs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "description": "ID of the run"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "pending",
                              "running",
                              "completed",
                              "failed"
                            ],
                            "description": "Status of the run"
                          },
                          "scenario": {
                            "type": "integer",
                            "description": "ID of the scenario"
                          },
                          "number": {
                            "type": "string",
                            "description": "For outbound runs (agent.inbound=False). The given number that must be called from the phone number configured in the cekura agent.",
                            "example": "+11234567890"
                          },
                          "inbound_number": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "For inbound runs (agent.inbound=True). The agent's configured phone number will receive calls from this number.",
                            "example": "+11234567890"
                          },
                          "scenario_name": {
                            "type": "string",
                            "description": "Name of the scenario"
                          },
                          "test_profile_data": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "description": "Details of the test profile associated with this run scenario"
                          },
                          "outbound_dial_window_opens_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "When the outbound dial window opened (run transitioned to pending/waiting-for-call). Null until dispatched."
                          },
                          "outbound_dial_window_seconds": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "description": "Duration of the outbound dial window in seconds."
                          },
                          "outbound_dial_window_closes_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "Deadline by which your agent must dial the outbound number (opens_at + outbound_dial_window_seconds). Dials after this are dropped and the run returns status: timeout."
                          }
                        }
                      },
                      "examples": [
                        {
                          "id": 274,
                          "status": "pending",
                          "scenario": 1,
                          "number": null,
                          "inbound_number": "+11234567890",
                          "scenario_name": "Customer Support Call (Agent Inbound = True)",
                          "test_profile_data": null,
                          "outbound_dial_window_opens_at": null,
                          "outbound_dial_window_seconds": null,
                          "outbound_dial_window_closes_at": null
                        },
                        {
                          "id": 275,
                          "status": "pending",
                          "scenario": 2,
                          "number": "+11234567890",
                          "inbound_number": null,
                          "scenario_name": "Outbound Sales Call (Agent Inbound = False)",
                          "test_profile_data": null,
                          "outbound_dial_window_opens_at": "2026-06-24T10:47:30Z",
                          "outbound_dial_window_seconds": 300,
                          "outbound_dial_window_closes_at": "2026-06-24T10:52:30Z"
                        }
                      ]
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time",
                      "example": "2025-02-25T21:00:01.990052Z"
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v2/scenarios/run_scenarios_ello/": {
      "post": {
        "operationId": "test-framework-v2-scenarios-run-scenarios-ello-create",
        "description": "Scenarios run scenarios ello",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ScenarioSerializerV2"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/ScenarioSerializerV2"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/ScenarioSerializerV2"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScenarioSerializerV2"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v2/scenarios/run_scenarios_email/": {
      "post": {
        "operationId": "scenarios-run-email_3",
        "description": "EMAIL RUN: Execute evaluators against an agent that communicates over email. Cekura sends an email to the agent's address and simulates the full conversation, receiving replies via inbound webhook.\n\nThe agent must have an `email_id` configured, or you can supply `agent_email` as a one-time override. The `agent_email` field takes precedence if both are set.\n\n**Run-count:** total conversations = `len(scenarios) × frequency`.\n\n**Inbound agents** (`agent.inbound=true`): Cekura sends the first email to the agent. **Outbound agents** (`agent.inbound=false`): the response includes `inbound_email` — the address your agent should email first to start the conversation.\n\n**Polling for completion:** the response contains a `result.id` with `status: 'running'`. Poll `GET /test_framework/v1/results/{result_id}/` until `status` is 'completed' or 'failed'.",
        "summary": "Run evaluators against an email agent",
        "tags": [
          "Evaluators"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RunScenariosEmail"
              },
              "examples": {
                "InboundAgent—AgentConfiguredEmailAddress": {
                  "value": {
                    "agent_id": 99,
                    "scenarios": [
                      102
                    ],
                    "frequency": 1
                  },
                  "summary": "Inbound agent — agent configured email address",
                  "description": "Agent has email_id set. Cekura sends the first email; agent replies."
                },
                "InboundAgent—One-timeEmailOverride": {
                  "value": {
                    "agent_id": 99,
                    "scenarios": [
                      102,
                      103
                    ],
                    "frequency": 2,
                    "agent_email": "support@yourcompany.com"
                  },
                  "summary": "Inbound agent — one-time email override",
                  "description": "Override the agent's configured email for this run only."
                },
                "OutboundAgent—AgentEmailsCekuraFirst": {
                  "value": {
                    "agent_id": 42,
                    "scenarios": [
                      201
                    ],
                    "frequency": 1
                  },
                  "summary": "Outbound agent — agent emails Cekura first",
                  "description": "For outbound agents the response includes `inbound_email` per run. Configure your agent to email that address to start the conversation."
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/RunScenariosEmail"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/RunScenariosEmail"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RunScenarioResult"
                },
                "examples": {
                  "Response—InboundAgent(CekuraSendsFirst)": {
                    "value": {
                      "id": 453,
                      "agent": 99,
                      "agent_inbound": true,
                      "status": "running",
                      "run_as_text": true,
                      "runs": [
                        {
                          "id": 22019,
                          "status": "running",
                          "scenario": 102,
                          "inbound_number": null,
                          "inbound_email": null,
                          "scenario_name": "Customer support scenario"
                        }
                      ],
                      "created_at": "2026-06-22T09:00:00Z"
                    },
                    "summary": "Response — inbound agent (Cekura sends first)"
                  },
                  "Response—OutboundAgent(agentEmailsCekuraFirst)": {
                    "value": {
                      "id": 454,
                      "agent": 42,
                      "agent_inbound": false,
                      "status": "running",
                      "run_as_text": true,
                      "runs": [
                        {
                          "id": 22020,
                          "status": "running",
                          "scenario": 201,
                          "inbound_number": null,
                          "inbound_email": "run-22020@veliitroee.resend.app",
                          "scenario_name": "Outreach scenario"
                        }
                      ],
                      "created_at": "2026-06-22T09:01:00Z"
                    },
                    "summary": "Response — outbound agent (agent emails Cekura first)",
                    "description": "`inbound_email` is the address your agent should send its first email to."
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v2/scenarios/run_scenarios_jotform/": {
      "post": {
        "operationId": "test-framework-v2-scenarios-run-scenarios-jotform-create",
        "description": "Scenarios run scenarios jotform",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ScenarioSerializerV2"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/ScenarioSerializerV2"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/ScenarioSerializerV2"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScenarioSerializerV2"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v2/scenarios/run_scenarios_json/": {
      "post": {
        "operationId": "scenarios-run-json_3",
        "description": "Run agent test cases straight from a JSON spec, without creating evaluators. Keep the spec in your repository and post it from CI.\n\nThe spec describes only what to test. Pick the target with `agent_id` and `channel` on the request — `voice` for a phone call (default), `text` for chat, `elevenlabs` for an ElevenLabs WebRTC session — so one file runs unchanged against any agent or environment.\n\nPass `dry_run=true` to validate only: the response describes the run that would happen (test cases, total runs, estimated cost) and nothing is created or charged. Use that on every commit, and the real call on the branches you want tested.\n\nEvery problem in a spec is reported at once, keyed by its location in the file (for example `scenarios[3].metrics[1]`). Metrics must already exist and be enabled for the target agent; personalities and test profiles can be referenced by ID or defined inline.\n\nFetch the schema this endpoint accepts from `scenarios_json_schema`.\n\n**Cost:** voice- or text-simulation rate per run. Test cases from a spec are removed automatically once no run needs them.",
        "summary": "Run test cases from a JSON spec file",
        "parameters": [
          {
            "in": "query",
            "name": "dry_run",
            "schema": {
              "type": "boolean"
            },
            "description": "Validate and price the spec without running or charging anything."
          }
        ],
        "tags": [
          "Evaluators"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TestSuiteSpecUpload"
              },
              "examples": {
                "RunASpec": {
                  "value": {
                    "agent_id": 12,
                    "channel": "voice",
                    "spec": {
                      "version": "1",
                      "scenarios": [
                        {
                          "name": "Refund happy path",
                          "instructions": "You are a customer whose order arrived damaged.",
                          "expected_outcome": "The agent confirms a refund.",
                          "metrics": [
                            "greeting_by_name"
                          ],
                          "personality": 3,
                          "test_profile": {
                            "agent_variables": {
                              "order_id": "ORD-4471"
                            }
                          }
                        }
                      ]
                    }
                  },
                  "summary": "Run a spec"
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/TestSuiteSpecUpload"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/TestSuiteSpecUpload"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "ID of the result"
                    },
                    "agent": {
                      "type": "integer",
                      "description": "ID of the agent"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "running",
                        "completed",
                        "failed"
                      ],
                      "description": "Status of the result"
                    },
                    "run_as_text": {
                      "type": "boolean",
                      "description": "Whether the scenario ran as text or not",
                      "example": false
                    },
                    "runs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "description": "ID of the run"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "pending",
                              "running",
                              "completed",
                              "failed"
                            ],
                            "description": "Status of the run"
                          },
                          "scenario": {
                            "type": "integer",
                            "description": "ID of the scenario"
                          },
                          "number": {
                            "type": "string",
                            "description": "For outbound runs (agent.inbound=False). The given number that must be called from the phone number configured in the cekura agent.",
                            "example": "+11234567890"
                          },
                          "inbound_number": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "For inbound runs (agent.inbound=True). The agent's configured phone number will receive calls from this number.",
                            "example": "+11234567890"
                          },
                          "scenario_name": {
                            "type": "string",
                            "description": "Name of the scenario"
                          },
                          "test_profile_data": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "description": "Details of the test profile associated with this run scenario"
                          },
                          "outbound_dial_window_opens_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "When the outbound dial window opened (run transitioned to pending/waiting-for-call). Null until dispatched."
                          },
                          "outbound_dial_window_seconds": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "description": "Duration of the outbound dial window in seconds."
                          },
                          "outbound_dial_window_closes_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "Deadline by which your agent must dial the outbound number (opens_at + outbound_dial_window_seconds). Dials after this are dropped and the run returns status: timeout."
                          }
                        }
                      },
                      "examples": [
                        {
                          "id": 274,
                          "status": "pending",
                          "scenario": 1,
                          "number": null,
                          "inbound_number": "+11234567890",
                          "scenario_name": "Customer Support Call (Agent Inbound = True)",
                          "test_profile_data": null,
                          "outbound_dial_window_opens_at": null,
                          "outbound_dial_window_seconds": null,
                          "outbound_dial_window_closes_at": null
                        },
                        {
                          "id": 275,
                          "status": "pending",
                          "scenario": 2,
                          "number": "+11234567890",
                          "inbound_number": null,
                          "scenario_name": "Outbound Sales Call (Agent Inbound = False)",
                          "test_profile_data": null,
                          "outbound_dial_window_opens_at": "2026-06-24T10:47:30Z",
                          "outbound_dial_window_seconds": 300,
                          "outbound_dial_window_closes_at": "2026-06-24T10:52:30Z"
                        }
                      ]
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time",
                      "example": "2025-02-25T21:00:01.990052Z"
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v2/scenarios/run_scenarios_livekit/": {
      "post": {
        "operationId": "test-framework-v2-scenarios-run-scenarios-livekit-create",
        "description": "Scenarios run scenarios livekit",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ScenarioSerializerV2"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/ScenarioSerializerV2"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/ScenarioSerializerV2"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScenarioSerializerV2"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v2/scenarios/run_scenarios_livekit_chat/": {
      "post": {
        "operationId": "test-framework-v2-scenarios-run-scenarios-livekit-chat-create",
        "description": "Scenarios run scenarios livekit chat",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ScenarioSerializerV2"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/ScenarioSerializerV2"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/ScenarioSerializerV2"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScenarioSerializerV2"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v2/scenarios/run_scenarios_livekit_v2/": {
      "post": {
        "operationId": "scenarios-run-livekit-v2_3",
        "description": "LIVEKIT VOICE RUN (project credentials, v2): Execute evaluators against a LiveKit agent using credentials configured at the project (or agent) level. Cekura creates the rooms; you don't pass URLs per-scenario. Requires `livekit_api_key`, `livekit_data.api_secret`, and `livekit_data.url` on the agent or project.\n\n**Cost:** voice-simulation rate per run.\n**Run-count math:** total runs = `len(scenarios) × frequency`.\n\n**Per-request `room_config` override** is allowed; merges over agent defaults.\n\n**When to use this vs others** (pick the endpoint matching the agent's configured connection — check `aiagents_retrieve`):\n- `scenarios_run_voice` — phone / SIP voice run\n- `scenarios_run_pipecat_v2` — Pipecat Cloud (project credentials, v2)\n- `scenarios_run_websocket` — JSON/text WebSocket runs",
        "summary": "Run evaluators against a LiveKit agent (project credentials, v2)",
        "tags": [
          "Evaluators"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RunLivekitScenarios"
              },
              "examples": {
                "LiveKitV2Run": {
                  "value": {
                    "scenarios": [
                      {
                        "scenario": 101
                      },
                      {
                        "scenario": 102
                      }
                    ],
                    "frequency": 1
                  },
                  "summary": "LiveKit v2 run"
                },
                "LiveKitV2RunWithOverrides": {
                  "value": {
                    "scenarios": [
                      {
                        "scenario": 101
                      }
                    ],
                    "frequency": 1,
                    "livekit_data": {
                      "agent_name": "my-dispatch-agent",
                      "config": {
                        "empty_timeout": 300,
                        "max_participants": 2
                      }
                    }
                  },
                  "summary": "LiveKit v2 run with overrides"
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/RunLivekitScenarios"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/RunLivekitScenarios"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "ID of the result"
                    },
                    "agent": {
                      "type": "integer",
                      "description": "ID of the agent"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "running",
                        "completed",
                        "failed"
                      ],
                      "description": "Status of the result"
                    },
                    "run_as_text": {
                      "type": "boolean",
                      "description": "Whether the scenario ran as text or not",
                      "example": false
                    },
                    "runs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "description": "ID of the run"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "pending",
                              "running",
                              "completed",
                              "failed"
                            ],
                            "description": "Status of the run"
                          },
                          "scenario": {
                            "type": "integer",
                            "description": "ID of the scenario"
                          },
                          "number": {
                            "type": "string",
                            "description": "For outbound runs (agent.inbound=False). The given number that must be called from the phone number configured in the cekura agent.",
                            "example": "+11234567890"
                          },
                          "inbound_number": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "For inbound runs (agent.inbound=True). The agent's configured phone number will receive calls from this number.",
                            "example": "+11234567890"
                          },
                          "scenario_name": {
                            "type": "string",
                            "description": "Name of the scenario"
                          },
                          "test_profile_data": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "description": "Details of the test profile associated with this run scenario"
                          },
                          "outbound_dial_window_opens_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "When the outbound dial window opened (run transitioned to pending/waiting-for-call). Null until dispatched."
                          },
                          "outbound_dial_window_seconds": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "description": "Duration of the outbound dial window in seconds."
                          },
                          "outbound_dial_window_closes_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "Deadline by which your agent must dial the outbound number (opens_at + outbound_dial_window_seconds). Dials after this are dropped and the run returns status: timeout."
                          }
                        }
                      },
                      "examples": [
                        {
                          "id": 274,
                          "status": "pending",
                          "scenario": 1,
                          "number": null,
                          "inbound_number": "+11234567890",
                          "scenario_name": "Customer Support Call (Agent Inbound = True)",
                          "test_profile_data": null,
                          "outbound_dial_window_opens_at": null,
                          "outbound_dial_window_seconds": null,
                          "outbound_dial_window_closes_at": null
                        },
                        {
                          "id": 275,
                          "status": "pending",
                          "scenario": 2,
                          "number": "+11234567890",
                          "inbound_number": null,
                          "scenario_name": "Outbound Sales Call (Agent Inbound = False)",
                          "test_profile_data": null,
                          "outbound_dial_window_opens_at": "2026-06-24T10:47:30Z",
                          "outbound_dial_window_seconds": 300,
                          "outbound_dial_window_closes_at": "2026-06-24T10:52:30Z"
                        }
                      ]
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time",
                      "example": "2025-02-25T21:00:01.990052Z"
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v2/scenarios/run_scenarios_pipecat/": {
      "post": {
        "operationId": "scenarios-run-pipecat-v1_3",
        "description": "PIPECAT WEBRTC RUN (manual room URLs, v1): Execute evaluators against an agent running on Pipecat / Daily.co WebRTC. Each scenario entry carries its own `pipecat_room_url` and optional token. For project-credential-based runs (no per-scenario URL), use `scenarios_run_pipecat_v2` instead.\n\n**Run-count:** one run per entry in `scenarios` — this endpoint does not support `frequency` or personality/test-profile multipliers. To run the same scenario multiple times, include it multiple times in the `scenarios` list.\n\n**When to use this vs others** (pick the endpoint matching the agent's configured connection — check `aiagents_retrieve`):\n- `run_scenarios` — real voice / phone / SIP call\n- `run_scenarios_text` — text / SMS / chat mode\n- `run_scenarios_with_websockets` — agent exposes a plain websocket URL (non-Pipecat)\n\n**Scheduled runs:** WebRTC sessions are not generally scheduled. Use `run_scenarios` or `run_scenarios_text` via CronJob for recurring evaluator runs.",
        "summary": "Run evaluators against a Pipecat WebRTC deployment (manual room URLs, v1)",
        "tags": [
          "Evaluators"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostRunScenariosPipecat"
              },
              "examples": {
                "PipecatWebRTCRun": {
                  "value": {
                    "agent": 12,
                    "scenarios": [
                      {
                        "scenario": 101,
                        "pipecat_room_url": "https://acme.daily.co/room-abc",
                        "pipecat_token": "token_xxx"
                      }
                    ]
                  },
                  "summary": "Pipecat WebRTC run"
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostRunScenariosPipecat"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostRunScenariosPipecat"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "ID of the result"
                    },
                    "agent": {
                      "type": "integer",
                      "description": "ID of the agent"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "running",
                        "completed",
                        "failed"
                      ],
                      "description": "Status of the result"
                    },
                    "run_as_text": {
                      "type": "boolean",
                      "description": "Whether the scenario ran as text or not",
                      "example": false
                    },
                    "runs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "description": "ID of the run"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "pending",
                              "running",
                              "completed",
                              "failed"
                            ],
                            "description": "Status of the run"
                          },
                          "scenario": {
                            "type": "integer",
                            "description": "ID of the scenario"
                          },
                          "number": {
                            "type": "string",
                            "description": "For outbound runs (agent.inbound=False). The given number that must be called from the phone number configured in the cekura agent.",
                            "example": "+11234567890"
                          },
                          "inbound_number": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "For inbound runs (agent.inbound=True). The agent's configured phone number will receive calls from this number.",
                            "example": "+11234567890"
                          },
                          "scenario_name": {
                            "type": "string",
                            "description": "Name of the scenario"
                          },
                          "test_profile_data": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "description": "Details of the test profile associated with this run scenario"
                          },
                          "outbound_dial_window_opens_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "When the outbound dial window opened (run transitioned to pending/waiting-for-call). Null until dispatched."
                          },
                          "outbound_dial_window_seconds": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "description": "Duration of the outbound dial window in seconds."
                          },
                          "outbound_dial_window_closes_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "Deadline by which your agent must dial the outbound number (opens_at + outbound_dial_window_seconds). Dials after this are dropped and the run returns status: timeout."
                          }
                        }
                      },
                      "examples": [
                        {
                          "id": 274,
                          "status": "pending",
                          "scenario": 1,
                          "number": null,
                          "inbound_number": "+11234567890",
                          "scenario_name": "Customer Support Call (Agent Inbound = True)",
                          "test_profile_data": null,
                          "outbound_dial_window_opens_at": null,
                          "outbound_dial_window_seconds": null,
                          "outbound_dial_window_closes_at": null
                        },
                        {
                          "id": 275,
                          "status": "pending",
                          "scenario": 2,
                          "number": "+11234567890",
                          "inbound_number": null,
                          "scenario_name": "Outbound Sales Call (Agent Inbound = False)",
                          "test_profile_data": null,
                          "outbound_dial_window_opens_at": "2026-06-24T10:47:30Z",
                          "outbound_dial_window_seconds": 300,
                          "outbound_dial_window_closes_at": "2026-06-24T10:52:30Z"
                        }
                      ]
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time",
                      "example": "2025-02-25T21:00:01.990052Z"
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v2/scenarios/run_scenarios_pipecat_v2/": {
      "post": {
        "operationId": "scenarios-run-pipecat-v2_3",
        "description": "PIPECAT CLOUD VOICE RUN (project credentials, v2): Execute evaluators against an agent deployed on Pipecat Cloud using credentials configured at the project level. Cekura creates the sessions; you don't pass per-scenario room URLs (that's the v1 endpoint). Requires Pipecat Cloud credentials with `pipecat_agent_name` set on the agent or project.\n\n**Cost:** voice-simulation rate per run.\n**Run-count math:** total runs = `len(scenarios) × frequency`.\n\n**Per-request `session_config` override** is allowed; merges over agent defaults.\n\n**When to use this vs others** (pick the endpoint matching the agent's configured connection — check `aiagents_retrieve`):\n- `scenarios_run_pipecat_v1` — manual room URLs per scenario\n- `scenarios_run_voice` — phone / SIP voice run\n- `scenarios_run_livekit_v2` — LiveKit (project credentials, v2)",
        "summary": "Run evaluators against a Pipecat Cloud deployment (project credentials, v2)",
        "tags": [
          "Evaluators"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostRunScenariosPipecatV2"
              },
              "examples": {
                "PipecatCloudV2Run": {
                  "value": {
                    "scenarios": [
                      {
                        "scenario": 101
                      },
                      {
                        "scenario": 102
                      }
                    ],
                    "frequency": 1
                  },
                  "summary": "Pipecat Cloud v2 run"
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostRunScenariosPipecatV2"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostRunScenariosPipecatV2"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "ID of the result"
                    },
                    "agent": {
                      "type": "integer",
                      "description": "ID of the agent"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "running",
                        "completed",
                        "failed"
                      ],
                      "description": "Status of the result"
                    },
                    "run_as_text": {
                      "type": "boolean",
                      "description": "Whether the scenario ran as text or not",
                      "example": false
                    },
                    "runs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "description": "ID of the run"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "pending",
                              "running",
                              "completed",
                              "failed"
                            ],
                            "description": "Status of the run"
                          },
                          "scenario": {
                            "type": "integer",
                            "description": "ID of the scenario"
                          },
                          "number": {
                            "type": "string",
                            "description": "For outbound runs (agent.inbound=False). The given number that must be called from the phone number configured in the cekura agent.",
                            "example": "+11234567890"
                          },
                          "inbound_number": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "For inbound runs (agent.inbound=True). The agent's configured phone number will receive calls from this number.",
                            "example": "+11234567890"
                          },
                          "scenario_name": {
                            "type": "string",
                            "description": "Name of the scenario"
                          },
                          "test_profile_data": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "description": "Details of the test profile associated with this run scenario"
                          },
                          "outbound_dial_window_opens_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "When the outbound dial window opened (run transitioned to pending/waiting-for-call). Null until dispatched."
                          },
                          "outbound_dial_window_seconds": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "description": "Duration of the outbound dial window in seconds."
                          },
                          "outbound_dial_window_closes_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "Deadline by which your agent must dial the outbound number (opens_at + outbound_dial_window_seconds). Dials after this are dropped and the run returns status: timeout."
                          }
                        }
                      },
                      "examples": [
                        {
                          "id": 274,
                          "status": "pending",
                          "scenario": 1,
                          "number": null,
                          "inbound_number": "+11234567890",
                          "scenario_name": "Customer Support Call (Agent Inbound = True)",
                          "test_profile_data": null,
                          "outbound_dial_window_opens_at": null,
                          "outbound_dial_window_seconds": null,
                          "outbound_dial_window_closes_at": null
                        },
                        {
                          "id": 275,
                          "status": "pending",
                          "scenario": 2,
                          "number": "+11234567890",
                          "inbound_number": null,
                          "scenario_name": "Outbound Sales Call (Agent Inbound = False)",
                          "test_profile_data": null,
                          "outbound_dial_window_opens_at": "2026-06-24T10:47:30Z",
                          "outbound_dial_window_seconds": 300,
                          "outbound_dial_window_closes_at": "2026-06-24T10:52:30Z"
                        }
                      ]
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time",
                      "example": "2025-02-25T21:00:01.990052Z"
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v2/scenarios/run_scenarios_retell_webrtc/": {
      "post": {
        "operationId": "scenarios-run-retell-webrtc_3",
        "description": "RETELL WEBRTC VOICE RUN: Execute evaluators against a Retell agent over WebRTC (LiveKit infrastructure). The agent must have Retell credentials configured. `retell_agent_id` is optional and defaults to `agent.assistant_id` if not provided.\n\n**Cost:** voice-simulation rate per run.\n**Run-count math:** total runs = `len(scenarios) × frequency`.\n\n**When to use this vs others** (pick the endpoint matching the agent's configured connection — check `aiagents_retrieve`):\n- `scenarios_run_voice` — phone / SIP voice run (no provider WebRTC needed)\n- `scenarios_run_vapi_webrtc` — VAPI agents over WebRTC\n- `scenarios_run_elevenlabs` — ElevenLabs Conversational agents\n- `scenarios_run_pipecat_v2` — Pipecat Cloud (project credentials, v2)\n- `scenarios_run_livekit_v2` — LiveKit (project credentials, v2)",
        "summary": "Run evaluators against a Retell agent over WebRTC",
        "tags": [
          "Evaluators"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RunScenariosRetellWebRTCRequest"
              },
              "examples": {
                "RetellWebRTCRun": {
                  "value": {
                    "agent_id": 12,
                    "scenarios": [
                      101,
                      102
                    ],
                    "frequency": 1
                  },
                  "summary": "Retell WebRTC run"
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/RunScenariosRetellWebRTCRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/RunScenariosRetellWebRTCRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "ID of the result"
                    },
                    "agent": {
                      "type": "integer",
                      "description": "ID of the agent"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "running",
                        "completed",
                        "failed"
                      ],
                      "description": "Status of the result"
                    },
                    "run_as_text": {
                      "type": "boolean",
                      "description": "Whether the scenario ran as text or not",
                      "example": false
                    },
                    "runs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "description": "ID of the run"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "pending",
                              "running",
                              "completed",
                              "failed"
                            ],
                            "description": "Status of the run"
                          },
                          "scenario": {
                            "type": "integer",
                            "description": "ID of the scenario"
                          },
                          "number": {
                            "type": "string",
                            "description": "For outbound runs (agent.inbound=False). The given number that must be called from the phone number configured in the cekura agent.",
                            "example": "+11234567890"
                          },
                          "inbound_number": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "For inbound runs (agent.inbound=True). The agent's configured phone number will receive calls from this number.",
                            "example": "+11234567890"
                          },
                          "scenario_name": {
                            "type": "string",
                            "description": "Name of the scenario"
                          },
                          "test_profile_data": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "description": "Details of the test profile associated with this run scenario"
                          },
                          "outbound_dial_window_opens_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "When the outbound dial window opened (run transitioned to pending/waiting-for-call). Null until dispatched."
                          },
                          "outbound_dial_window_seconds": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "description": "Duration of the outbound dial window in seconds."
                          },
                          "outbound_dial_window_closes_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "Deadline by which your agent must dial the outbound number (opens_at + outbound_dial_window_seconds). Dials after this are dropped and the run returns status: timeout."
                          }
                        }
                      },
                      "examples": [
                        {
                          "id": 274,
                          "status": "pending",
                          "scenario": 1,
                          "number": null,
                          "inbound_number": "+11234567890",
                          "scenario_name": "Customer Support Call (Agent Inbound = True)",
                          "test_profile_data": null,
                          "outbound_dial_window_opens_at": null,
                          "outbound_dial_window_seconds": null,
                          "outbound_dial_window_closes_at": null
                        },
                        {
                          "id": 275,
                          "status": "pending",
                          "scenario": 2,
                          "number": "+11234567890",
                          "inbound_number": null,
                          "scenario_name": "Outbound Sales Call (Agent Inbound = False)",
                          "test_profile_data": null,
                          "outbound_dial_window_opens_at": "2026-06-24T10:47:30Z",
                          "outbound_dial_window_seconds": 300,
                          "outbound_dial_window_closes_at": "2026-06-24T10:52:30Z"
                        }
                      ]
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time",
                      "example": "2025-02-25T21:00:01.990052Z"
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v2/scenarios/run_scenarios_sip/": {
      "post": {
        "operationId": "scenarios-run-sip_3",
        "description": "SIP VOICE RUN (direct SIP): Execute evaluators against an agent over a direct SIP connection (orchestrated by Cekura's SIP voice service). The agent must have a SIP endpoint configured (`telephony.sip_uri` on the v2 agent).\n\n**Custom SIP headers:** to send custom headers to the agent, attach a test profile whose `main_agent_variables` contain `X-` prefixed keys (pass its ID in `test_profile_ids`) — headers cannot be set on the agent or in this request.\n\n**Cost:** voice-simulation rate per run.\n**Run-count math:** total runs = `len(scenarios) × frequency × max(1, len(personality_ids)) × max(1, len(test_profile_ids))`.\n\n**When to use this vs others** (pick the endpoint matching the agent's configured connection — check `aiagents_retrieve`):\n- `scenarios_run_voice` — phone calls via Cekura's standard voice path\n- `scenarios_run_vapi_webrtc` / `_retell_webrtc` — provider-managed WebRTC\n- `scenarios_run_livekit_v2` — LiveKit (project credentials, v2)",
        "summary": "Run evaluators over a direct SIP connection",
        "tags": [
          "Evaluators"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostRunScenariosSip"
              },
              "examples": {
                "SIPRun": {
                  "value": {
                    "agent_id": 12,
                    "scenarios": [
                      101
                    ],
                    "frequency": 1
                  },
                  "summary": "SIP run"
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostRunScenariosSip"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostRunScenariosSip"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "ID of the result"
                    },
                    "agent": {
                      "type": "integer",
                      "description": "ID of the agent"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "running",
                        "completed",
                        "failed"
                      ],
                      "description": "Status of the result"
                    },
                    "run_as_text": {
                      "type": "boolean",
                      "description": "Whether the scenario ran as text or not",
                      "example": false
                    },
                    "runs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "description": "ID of the run"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "pending",
                              "running",
                              "completed",
                              "failed"
                            ],
                            "description": "Status of the run"
                          },
                          "scenario": {
                            "type": "integer",
                            "description": "ID of the scenario"
                          },
                          "number": {
                            "type": "string",
                            "description": "For outbound runs (agent.inbound=False). The given number that must be called from the phone number configured in the cekura agent.",
                            "example": "+11234567890"
                          },
                          "inbound_number": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "For inbound runs (agent.inbound=True). The agent's configured phone number will receive calls from this number.",
                            "example": "+11234567890"
                          },
                          "scenario_name": {
                            "type": "string",
                            "description": "Name of the scenario"
                          },
                          "test_profile_data": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "description": "Details of the test profile associated with this run scenario"
                          },
                          "outbound_dial_window_opens_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "When the outbound dial window opened (run transitioned to pending/waiting-for-call). Null until dispatched."
                          },
                          "outbound_dial_window_seconds": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "description": "Duration of the outbound dial window in seconds."
                          },
                          "outbound_dial_window_closes_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "Deadline by which your agent must dial the outbound number (opens_at + outbound_dial_window_seconds). Dials after this are dropped and the run returns status: timeout."
                          }
                        }
                      },
                      "examples": [
                        {
                          "id": 274,
                          "status": "pending",
                          "scenario": 1,
                          "number": null,
                          "inbound_number": "+11234567890",
                          "scenario_name": "Customer Support Call (Agent Inbound = True)",
                          "test_profile_data": null,
                          "outbound_dial_window_opens_at": null,
                          "outbound_dial_window_seconds": null,
                          "outbound_dial_window_closes_at": null
                        },
                        {
                          "id": 275,
                          "status": "pending",
                          "scenario": 2,
                          "number": "+11234567890",
                          "inbound_number": null,
                          "scenario_name": "Outbound Sales Call (Agent Inbound = False)",
                          "test_profile_data": null,
                          "outbound_dial_window_opens_at": "2026-06-24T10:47:30Z",
                          "outbound_dial_window_seconds": 300,
                          "outbound_dial_window_closes_at": "2026-06-24T10:52:30Z"
                        }
                      ]
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time",
                      "example": "2025-02-25T21:00:01.990052Z"
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v2/scenarios/run_scenarios_text/": {
      "post": {
        "operationId": "scenarios-run-text_3",
        "description": "TEXT / SMS / CHAT RUN: Execute evaluators against your agent using text-only simulation (SMS, chat, or an agent-hosted websocket). Cheaper than voice — billed at the text-simulation rate. Requires a chat connection (`provider.chat_agent_details`) on the agent, or a websocket URL for `self_hosted` agents.\n\n**Run-count math:** total conversations = `len(scenarios) × frequency × max(1, len(personality_ids)) × max(1, len(test_profile_ids))`.\n\n**Concurrency:** use `concurrency_limit` to cap parallel conversations. Default: unbounded (subject to provider rate limits).\n\n**Scenario selection (pick one):**\n- `scenarios` — list of integer evaluator IDs (e.g. `[101, 102]`)\n- `tags` — select by tag\n- `folder_path` — select by folder path (e.g. `\"Sales.Inbound\"`); requires `project_id`\n\n**Websocket override:** if the agent exposes a plain websocket URL for text, pass it as `websocket_url` — this bypasses the agent's standard text-readiness check. Pass `websocket_headers` (JSON object) to override connection headers for this run — merged over the agent's configured headers, with the per-run values winning.\n\n**When to use this vs others** (pick the endpoint matching the agent's configured connection — check `aiagents_retrieve`):\n- `run_scenarios` — real voice / phone / SIP call\n- `run_scenarios_with_websockets` — each scenario carries its own websocket URL (bulk)\n- `run_scenarios_pipecat` — Pipecat/Daily.co WebRTC deployment\n\n**`self_hosted` agents:** agents with `assistant_provider=\"self_hosted\"` require a websocket URL. Either pre-configure `websocket_url` on the agent, or pass it directly in this request. Without it, the run fails with `[\"Agent does not have a websocket URL\"]`. Passing `websocket_url` here changes the result's `run_type` to `\"WebSocket\"` instead of `\"Text\"`.\n\n**Personality override:** `personality_ids` must be IDs that are already enabled for the agent's project. Check which are enabled via `aiagents_retrieve` → `enabled_personalities` field. To enable a new personality, call `aiagents_partial_update` with the updated `enabled_personalities` list before using it here. Note: enabling a personality applies project-wide, not just to one agent. Passing an ID that is not enabled returns `[\"Invalid personalities provided.\"]`.\n\n**Scheduled runs:** to run on a cron schedule, create a CronJob via `POST /test_framework/v1/cron_jobs/` with `execution_mode=\"text\"` instead.\n\n**Polling for completion:** the response contains a `result.id` with `status: 'running'`. Poll `GET /test_framework/v1/results/{result_id}/` until `status` is 'completed' or 'failed'. There is no separate progress endpoint for runs. Check `failed_reasons` for infrastructure errors; check `runs[run_id].error_message` for per-run errors.",
        "summary": "Run evaluators in text / SMS / chat mode",
        "tags": [
          "Evaluators"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostRunScenariosText"
              },
              "examples": {
                "RunSelectedScenariosInTextMode": {
                  "value": {
                    "agent_id": 12,
                    "scenarios": [
                      101,
                      102
                    ],
                    "frequency": 1
                  },
                  "summary": "Run selected scenarios in text mode"
                },
                "RunViaAgentWebsocketURL,2×Each,3InParallel": {
                  "value": {
                    "agent_id": 12,
                    "scenarios": [
                      101
                    ],
                    "frequency": 2,
                    "websocket_url": "wss://my-agent.example.com/chat",
                    "concurrency_limit": 3
                  },
                  "summary": "Run via agent websocket URL, 2× each, 3 in parallel"
                },
                "RunAFolderViaSMS": {
                  "value": {
                    "agent_id": 12,
                    "folder_path": "Support.Billing",
                    "project_id": 1376,
                    "frequency": 1,
                    "outbound_phone_number": "+14155551234"
                  },
                  "summary": "Run a folder via SMS"
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostRunScenariosText"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPostRunScenariosText"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "ID of the result"
                    },
                    "agent": {
                      "type": "integer",
                      "description": "ID of the agent"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "running",
                        "completed",
                        "failed"
                      ],
                      "description": "Status of the result"
                    },
                    "run_as_text": {
                      "type": "boolean",
                      "description": "Whether the scenario ran as text or not",
                      "example": false
                    },
                    "runs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "description": "ID of the run"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "pending",
                              "running",
                              "completed",
                              "failed"
                            ],
                            "description": "Status of the run"
                          },
                          "scenario": {
                            "type": "integer",
                            "description": "ID of the scenario"
                          },
                          "number": {
                            "type": "string",
                            "description": "For outbound runs (agent.inbound=False). The given number that must be called from the phone number configured in the cekura agent.",
                            "example": "+11234567890"
                          },
                          "inbound_number": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "For inbound runs (agent.inbound=True). The agent's configured phone number will receive calls from this number.",
                            "example": "+11234567890"
                          },
                          "scenario_name": {
                            "type": "string",
                            "description": "Name of the scenario"
                          },
                          "test_profile_data": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "description": "Details of the test profile associated with this run scenario"
                          },
                          "outbound_dial_window_opens_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "When the outbound dial window opened (run transitioned to pending/waiting-for-call). Null until dispatched."
                          },
                          "outbound_dial_window_seconds": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "description": "Duration of the outbound dial window in seconds."
                          },
                          "outbound_dial_window_closes_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "Deadline by which your agent must dial the outbound number (opens_at + outbound_dial_window_seconds). Dials after this are dropped and the run returns status: timeout."
                          }
                        }
                      },
                      "examples": [
                        {
                          "id": 274,
                          "status": "pending",
                          "scenario": 1,
                          "number": null,
                          "inbound_number": "+11234567890",
                          "scenario_name": "Customer Support Call (Agent Inbound = True)",
                          "test_profile_data": null,
                          "outbound_dial_window_opens_at": null,
                          "outbound_dial_window_seconds": null,
                          "outbound_dial_window_closes_at": null
                        },
                        {
                          "id": 275,
                          "status": "pending",
                          "scenario": 2,
                          "number": "+11234567890",
                          "inbound_number": null,
                          "scenario_name": "Outbound Sales Call (Agent Inbound = False)",
                          "test_profile_data": null,
                          "outbound_dial_window_opens_at": "2026-06-24T10:47:30Z",
                          "outbound_dial_window_seconds": 300,
                          "outbound_dial_window_closes_at": "2026-06-24T10:52:30Z"
                        }
                      ]
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time",
                      "example": "2025-02-25T21:00:01.990052Z"
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v2/scenarios/run_scenarios_vapi_webrtc/": {
      "post": {
        "operationId": "scenarios-run-vapi-webrtc_3",
        "description": "VAPI WEBRTC VOICE RUN: Execute evaluators against a VAPI agent over WebRTC. Required: `vapi_assistant_id` (the VAPI assistant). The agent (looked up via `agent_id` or inferred from the first scenario) must have VAPI credentials configured.\n\n**Cost:** voice-simulation rate per run.\n**Run-count math:** total runs = `len(scenarios) × frequency`.\n\n**When to use this vs others** (pick the endpoint matching the agent's configured connection — check `aiagents_retrieve`):\n- `scenarios_run_voice` — phone / SIP voice run (no provider WebRTC needed)\n- `scenarios_run_text` — text/SMS/chat (cheaper)\n- `scenarios_run_retell_webrtc` — Retell agents over WebRTC\n- `scenarios_run_elevenlabs` — ElevenLabs Conversational agents\n- `scenarios_run_pipecat_v2` — Pipecat Cloud (project credentials, v2)\n- `scenarios_run_livekit_v2` — LiveKit (project credentials, v2)",
        "summary": "Run evaluators against a VAPI WebRTC agent",
        "tags": [
          "Evaluators"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RunScenariosVapiWebRTCRequest"
              },
              "examples": {
                "VAPIWebRTCRun": {
                  "value": {
                    "agent_id": 12,
                    "scenarios": [
                      101,
                      102
                    ],
                    "vapi_assistant_id": "asst_abc123",
                    "frequency": 1
                  },
                  "summary": "VAPI WebRTC run"
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/RunScenariosVapiWebRTCRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/RunScenariosVapiWebRTCRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "ID of the result"
                    },
                    "agent": {
                      "type": "integer",
                      "description": "ID of the agent"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "running",
                        "completed",
                        "failed"
                      ],
                      "description": "Status of the result"
                    },
                    "run_as_text": {
                      "type": "boolean",
                      "description": "Whether the scenario ran as text or not",
                      "example": false
                    },
                    "runs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "description": "ID of the run"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "pending",
                              "running",
                              "completed",
                              "failed"
                            ],
                            "description": "Status of the run"
                          },
                          "scenario": {
                            "type": "integer",
                            "description": "ID of the scenario"
                          },
                          "number": {
                            "type": "string",
                            "description": "For outbound runs (agent.inbound=False). The given number that must be called from the phone number configured in the cekura agent.",
                            "example": "+11234567890"
                          },
                          "inbound_number": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "For inbound runs (agent.inbound=True). The agent's configured phone number will receive calls from this number.",
                            "example": "+11234567890"
                          },
                          "scenario_name": {
                            "type": "string",
                            "description": "Name of the scenario"
                          },
                          "test_profile_data": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "description": "Details of the test profile associated with this run scenario"
                          },
                          "outbound_dial_window_opens_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "When the outbound dial window opened (run transitioned to pending/waiting-for-call). Null until dispatched."
                          },
                          "outbound_dial_window_seconds": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "description": "Duration of the outbound dial window in seconds."
                          },
                          "outbound_dial_window_closes_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "Deadline by which your agent must dial the outbound number (opens_at + outbound_dial_window_seconds). Dials after this are dropped and the run returns status: timeout."
                          }
                        }
                      },
                      "examples": [
                        {
                          "id": 274,
                          "status": "pending",
                          "scenario": 1,
                          "number": null,
                          "inbound_number": "+11234567890",
                          "scenario_name": "Customer Support Call (Agent Inbound = True)",
                          "test_profile_data": null,
                          "outbound_dial_window_opens_at": null,
                          "outbound_dial_window_seconds": null,
                          "outbound_dial_window_closes_at": null
                        },
                        {
                          "id": 275,
                          "status": "pending",
                          "scenario": 2,
                          "number": "+11234567890",
                          "inbound_number": null,
                          "scenario_name": "Outbound Sales Call (Agent Inbound = False)",
                          "test_profile_data": null,
                          "outbound_dial_window_opens_at": "2026-06-24T10:47:30Z",
                          "outbound_dial_window_seconds": 300,
                          "outbound_dial_window_closes_at": "2026-06-24T10:52:30Z"
                        }
                      ]
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time",
                      "example": "2025-02-25T21:00:01.990052Z"
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v2/scenarios/run_scenarios_with_websockets/": {
      "post": {
        "operationId": "scenarios-run-websocket_3",
        "description": "WEBSOCKET RUN (per-scenario URLs, bulk): Execute evaluators where each scenario carries its own websocket URL. Useful when you have a fleet of agents or stateful websocket sessions to test in a single batch.\n\n**Run-count:** total conversations = `len(scenarios) × frequency`. (Personality and test-profile multipliers are not supported on this endpoint.)\n\n**`frequency` is required** on this endpoint (no default).\n\n**When to use this vs others** (pick the endpoint matching the agent's configured connection — check `aiagents_retrieve`):\n- `run_scenarios_text` — single websocket URL or SMS/chat mode (simpler)\n- `run_scenarios` — real voice / phone / SIP call\n- `run_scenarios_pipecat` — Pipecat/Daily.co WebRTC deployment\n\n**Polling for completion:** the response contains a `result.id` with `status: 'running'`. Poll `GET /test_framework/v1/results/{result_id}/` until `status` is 'completed' or 'failed'.\n\n**Known limitation:** `result.run_type` may show 'Text' instead of 'WebSocket' for runs triggered via this endpoint — this is a display issue only and does not affect execution.",
        "summary": "Run evaluators against per-scenario websocket URLs (bulk)",
        "tags": [
          "Evaluators"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RunScenariosWithWebsockets"
              },
              "examples": {
                "Per-scenarioWebsocketURLs": {
                  "value": {
                    "agent": 12,
                    "frequency": 1,
                    "scenarios": [
                      {
                        "scenario": 101,
                        "websocket_url": "wss://agent-a.example.com/chat"
                      },
                      {
                        "scenario": 102,
                        "websocket_url": "wss://agent-b.example.com/chat"
                      }
                    ]
                  },
                  "summary": "Per-scenario websocket URLs"
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/RunScenariosWithWebsockets"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/RunScenariosWithWebsockets"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "ID of the result"
                    },
                    "agent": {
                      "type": "integer",
                      "description": "ID of the agent"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "running",
                        "completed",
                        "failed"
                      ],
                      "description": "Status of the result"
                    },
                    "run_as_text": {
                      "type": "boolean",
                      "description": "Whether the scenario ran as text or not",
                      "example": false
                    },
                    "runs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "description": "ID of the run"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "pending",
                              "running",
                              "completed",
                              "failed"
                            ],
                            "description": "Status of the run"
                          },
                          "scenario": {
                            "type": "integer",
                            "description": "ID of the scenario"
                          },
                          "number": {
                            "type": "string",
                            "description": "For outbound runs (agent.inbound=False). The given number that must be called from the phone number configured in the cekura agent.",
                            "example": "+11234567890"
                          },
                          "inbound_number": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "For inbound runs (agent.inbound=True). The agent's configured phone number will receive calls from this number.",
                            "example": "+11234567890"
                          },
                          "scenario_name": {
                            "type": "string",
                            "description": "Name of the scenario"
                          },
                          "test_profile_data": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "description": "Details of the test profile associated with this run scenario"
                          },
                          "outbound_dial_window_opens_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "When the outbound dial window opened (run transitioned to pending/waiting-for-call). Null until dispatched."
                          },
                          "outbound_dial_window_seconds": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "description": "Duration of the outbound dial window in seconds."
                          },
                          "outbound_dial_window_closes_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "Deadline by which your agent must dial the outbound number (opens_at + outbound_dial_window_seconds). Dials after this are dropped and the run returns status: timeout."
                          }
                        }
                      },
                      "examples": [
                        {
                          "id": 274,
                          "status": "pending",
                          "scenario": 1,
                          "number": null,
                          "inbound_number": "+11234567890",
                          "scenario_name": "Customer Support Call (Agent Inbound = True)",
                          "test_profile_data": null,
                          "outbound_dial_window_opens_at": null,
                          "outbound_dial_window_seconds": null,
                          "outbound_dial_window_closes_at": null
                        },
                        {
                          "id": 275,
                          "status": "pending",
                          "scenario": 2,
                          "number": "+11234567890",
                          "inbound_number": null,
                          "scenario_name": "Outbound Sales Call (Agent Inbound = False)",
                          "test_profile_data": null,
                          "outbound_dial_window_opens_at": "2026-06-24T10:47:30Z",
                          "outbound_dial_window_seconds": 300,
                          "outbound_dial_window_closes_at": "2026-06-24T10:52:30Z"
                        }
                      ]
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time",
                      "example": "2025-02-25T21:00:01.990052Z"
                    }
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v2/scenarios/scenario-agent/": {
      "post": {
        "operationId": "scenarios-agent-create_3",
        "description": "Create or improve evaluator scenarios using AI by providing natural-language feedback. This tool changes evaluator scenarios only; it does not change an AI agent's prompt, configuration, tools, or provider settings. For a request such as `improve agent <id>`, use the `cekura:cekura-self-improving-agent` skill instead.\n\n**How it works:**\n1. Send evaluator IDs and your improvement request\n2. AI analyzes and suggests improvements\n3. Review suggestions and apply with `apply_changes=true`\n\n**`scenarios` field:** pass a list of integer IDs `[101, 102]`, a single integer `101`, or the string `\"all\"` to improve all scenarios for the agent. Do not pass IDs as a JSON-stringified list — pass them as a native array.\n\n**Applying large change sets:** when using `apply_changes: true` with many scenarios, the `updated_scenarios` payload may be large. If you receive an unexpected error, split the apply into smaller batches of 3–5 scenarios at a time.\n\n**Response:** Returns `progress_id` for polling status at /scenario-agent-progress/\n\n**Multi-turn improvements:** Use the `context` field to maintain conversation history across requests.",
        "tags": [
          "test_framework"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ScenarioAgentRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/ScenarioAgentRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/ScenarioAgentRequest"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScenarioAgentStartResponse"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v2/scenarios/scenario-agent-progress/": {
      "get": {
        "operationId": "scenarios-agent-progress_3",
        "description": "Check the progress of an evaluator improvement request.\n\nAfter calling POST /scenario-agent/, use the returned `progress_id` to poll this endpoint.\n\n**Status values:**\n- `in_progress` - AI is analyzing and generating improvements (keep polling)\n- `completed` - AI finished; review suggestions in the `result` field\n- `needs_agent_clarification` - AI needs you to select an agent for some evaluators\n- `cancelled` - Request was cancelled\n- `failed` - An error occurred; see `error` field\n\n**Typical flow:**\n1. POST /scenario-agent/ → receive `progress_id`\n2. Poll this endpoint every few seconds\n3. When `status == 'completed'`, review the suggested changes\n4. POST /scenario-agent/ again with `apply_changes=true` to apply them",
        "parameters": [
          {
            "in": "query",
            "name": "progress_id",
            "schema": {
              "type": "string"
            },
            "description": "The progress_id returned by POST /scenario-agent/",
            "required": true
          }
        ],
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScenarioAgentProgress"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field_name": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/test_framework/v2/scenarios/tags/": {
      "get": {
        "operationId": "test-framework-v2-scenarios-tags-retrieve",
        "description": "Scenarios tags",
        "tags": [
          "test_framework"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScenarioSerializerV2"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/user/api/v1/oauth-token/": {
      "post": {
        "operationId": "oauth-token-create",
        "description": "Issue a short-lived JWT for MCP OAuth connections. No org scoping — user-level access.",
        "tags": [
          "user"
        ],
        "security": [
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "200": {
            "description": "No response body"
          }
        }
      }
    },
    "/user/api/v1/user-api-key/": {
      "get": {
        "operationId": "user-api-key-list",
        "tags": [
          "user"
        ],
        "security": [
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/UserAPIKey"
                  }
                }
              }
            },
            "description": ""
          }
        },
        "description": "List user api key"
      },
      "post": {
        "operationId": "user-api-key-create",
        "description": "Create a new API key. When using API key authentication, only project-level API keys can be created.",
        "tags": [
          "user"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UserAPIKey"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/UserAPIKey"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/UserAPIKey"
              }
            }
          }
        },
        "security": [
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserAPIKey"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/user/api/v1/user-api-key/{id}/": {
      "get": {
        "operationId": "user-api-key-retrieve",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "tags": [
          "user"
        ],
        "security": [
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserAPIKey"
                }
              }
            },
            "description": ""
          }
        },
        "description": "Retrieve an user api key by ID"
      },
      "put": {
        "operationId": "user-api-key-update",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "tags": [
          "user"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UserAPIKey"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/UserAPIKey"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/UserAPIKey"
              }
            }
          }
        },
        "security": [
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserAPIKey"
                }
              }
            },
            "description": ""
          }
        },
        "description": "Update an user api key"
      },
      "patch": {
        "operationId": "user-api-key-partial-update",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "tags": [
          "user"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchedUserAPIKey"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/PatchedUserAPIKey"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/PatchedUserAPIKey"
              }
            }
          }
        },
        "security": [
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserAPIKey"
                }
              }
            },
            "description": ""
          }
        },
        "description": "Update an user api key"
      },
      "delete": {
        "operationId": "user-api-key-destroy",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "tags": [
          "user"
        ],
        "security": [
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "204": {
            "description": "No response body"
          }
        },
        "description": "Delete an user api key"
      }
    },
    "/user/embedded-token-detail/": {
      "get": {
        "operationId": "user-embedded-token-detail-retrieve",
        "tags": [
          "user"
        ],
        "security": [
          {
            "embedded_session": []
          }
        ],
        "responses": {
          "200": {
            "description": "No response body"
          }
        },
        "description": "User embedded token detail"
      }
    },
    "/user/invites/": {
      "get": {
        "operationId": "user-invites-list",
        "tags": [
          "user"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Invite"
                  }
                }
              }
            },
            "description": ""
          }
        },
        "description": "List user invites"
      },
      "post": {
        "operationId": "user-invites-create",
        "tags": [
          "user"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Invite"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/Invite"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Invite"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Invite"
                }
              }
            },
            "description": ""
          }
        },
        "description": "Create a new user invite"
      }
    },
    "/user/invites/{id}/": {
      "get": {
        "operationId": "user-invites-retrieve",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "tags": [
          "user"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Invite"
                }
              }
            },
            "description": ""
          }
        },
        "description": "Retrieve an user invite by ID"
      },
      "put": {
        "operationId": "user-invites-update",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "tags": [
          "user"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Invite"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/Invite"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Invite"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Invite"
                }
              }
            },
            "description": ""
          }
        },
        "description": "Update an user invite"
      },
      "patch": {
        "operationId": "user-invites-partial-update",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "tags": [
          "user"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchedInvite"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/PatchedInvite"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/PatchedInvite"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Invite"
                }
              }
            },
            "description": ""
          }
        },
        "description": "Update an user invite"
      },
      "delete": {
        "operationId": "user-invites-destroy",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "tags": [
          "user"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "204": {
            "description": "No response body"
          }
        },
        "description": "Delete an user invite"
      }
    },
    "/user/invites/{id}/accept_invite/": {
      "post": {
        "operationId": "user-invites-accept-invite-create",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "tags": [
          "user"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Invite"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/Invite"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Invite"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Invite"
                }
              }
            },
            "description": ""
          }
        },
        "description": "User invites accept invite"
      }
    },
    "/user/invites/{id}/approve_request/": {
      "post": {
        "operationId": "user-invites-approve-request-create",
        "description": "Allow admins to approve a user's join request.",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "tags": [
          "user"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Invite"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/Invite"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Invite"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Invite"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/user/invites/{id}/reject_invite/": {
      "post": {
        "operationId": "user-invites-reject-invite-create",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "tags": [
          "user"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Invite"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/Invite"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Invite"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Invite"
                }
              }
            },
            "description": ""
          }
        },
        "description": "User invites reject invite"
      }
    },
    "/user/invites/{id}/reject_request/": {
      "post": {
        "operationId": "user-invites-reject-request-create",
        "description": "Allow admins to reject a user's join request.",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "tags": [
          "user"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Invite"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/Invite"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Invite"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Invite"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/user/invites/get_available_organizations/": {
      "get": {
        "operationId": "user-invites-get-available-organizations-retrieve",
        "description": "Return organizations that match the user's email domain and allow join requests.\nUsed for new users to see which organizations they can request to join.",
        "tags": [
          "user"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Invite"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/user/invites/my_invites/": {
      "get": {
        "operationId": "user-invites-my-invites-retrieve",
        "tags": [
          "user"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Invite"
                }
              }
            },
            "description": ""
          }
        },
        "description": "User invites my invites"
      }
    },
    "/user/invites/request_to_join/": {
      "post": {
        "operationId": "user-invites-request-to-join-create",
        "description": "Allow users to request to join an organization.\nVerifies that user's email domain matches organization's domain_identifiers.",
        "tags": [
          "user"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Invite"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/Invite"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Invite"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Invite"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/user/invites/send_invites/": {
      "post": {
        "operationId": "user-invites-send-invites-create",
        "tags": [
          "user"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Invite"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/Invite"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Invite"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Invite"
                }
              }
            },
            "description": ""
          }
        },
        "description": "User invites send invites"
      }
    },
    "/user/is-active/": {
      "get": {
        "operationId": "user-is-active-retrieve",
        "tags": [
          "user"
        ],
        "security": [
          {
            "supabase_session_inactive_allowed": []
          }
        ],
        "responses": {
          "200": {
            "description": "No response body"
          }
        },
        "description": "User is active"
      }
    },
    "/user/memberships/": {
      "get": {
        "operationId": "user-memberships-list",
        "tags": [
          "user"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/UserMembership"
                  }
                }
              }
            },
            "description": ""
          }
        },
        "description": "List user memberships"
      }
    },
    "/user/memberships/{id}/": {
      "get": {
        "operationId": "user-memberships-retrieve",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this membership.",
            "required": true
          }
        ],
        "tags": [
          "user"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserMembership"
                }
              }
            },
            "description": ""
          }
        },
        "description": "Retrieve an user membership by ID"
      },
      "patch": {
        "operationId": "user-memberships-partial-update",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this membership.",
            "required": true
          }
        ],
        "tags": [
          "user"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchedUserMembership"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/PatchedUserMembership"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/PatchedUserMembership"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserMembership"
                }
              }
            },
            "description": ""
          }
        },
        "description": "Update an user membership"
      },
      "delete": {
        "operationId": "user-memberships-destroy",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this membership.",
            "required": true
          }
        ],
        "tags": [
          "user"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "204": {
            "description": "No response body"
          }
        },
        "description": "Delete an user membership"
      }
    },
    "/user/oauth/authorize/": {
      "get": {
        "operationId": "user-oauth-authorize-retrieve",
        "tags": [
          "user"
        ],
        "responses": {
          "200": {
            "description": "No response body"
          }
        },
        "description": "User oauth authorize"
      }
    },
    "/user/oauth/callback/": {
      "post": {
        "operationId": "user-oauth-callback-create",
        "tags": [
          "user"
        ],
        "security": [
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "200": {
            "description": "No response body"
          }
        },
        "description": "User oauth callback"
      }
    },
    "/user/oauth/register/": {
      "post": {
        "operationId": "user-oauth-register-create",
        "description": "Minimal RFC 7591 Dynamic Client Registration for the public-client / PKCE\nflow. Registration is persisted only so the consent page can recognize a\nknown client from a trusted redirect scheme among its registered\nredirect_uris (e.g. Cursor's cursor://) when the authorize request's\nredirect_uri matches one registered under the same client_id — client_id is\nstill not a credential and grants nothing by itself.",
        "tags": [
          "user"
        ],
        "responses": {
          "200": {
            "description": "No response body"
          }
        }
      }
    },
    "/user/oauth/revoke/": {
      "post": {
        "operationId": "user-oauth-revoke-create",
        "tags": [
          "user"
        ],
        "responses": {
          "200": {
            "description": "No response body"
          }
        },
        "description": "User oauth revoke"
      }
    },
    "/user/oauth/token/": {
      "post": {
        "operationId": "user-oauth-token-create",
        "tags": [
          "user"
        ],
        "responses": {
          "200": {
            "description": "No response body"
          }
        },
        "description": "User oauth token"
      }
    },
    "/user/onboarding/": {
      "get": {
        "operationId": "user-onboarding-retrieve",
        "tags": [
          "user"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "200": {
            "description": "No response body"
          }
        },
        "x-docs-exclude": true,
        "description": "User onboarding"
      },
      "patch": {
        "operationId": "user-onboarding-partial-update",
        "tags": [
          "user"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "200": {
            "description": "No response body"
          }
        },
        "x-docs-exclude": true,
        "description": "User onboarding"
      }
    },
    "/user/organizations/": {
      "get": {
        "operationId": "user-organizations-list",
        "parameters": [
          {
            "name": "search",
            "required": false,
            "in": "query",
            "description": "A search term.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "tags": [
          "user"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Organization"
                  }
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "summary": "List your organizations",
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "user-organizations-list",
            "description": "List your organizations"
          }
        },
        "description": "List your organizations"
      },
      "post": {
        "operationId": "user-organizations-create",
        "description": "Create first organization for user if they are not in any organization.\nReturns 400 if user is already in an organization.",
        "tags": [
          "user"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Organization"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/Organization"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Organization"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Organization"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/user/organizations/{id}/": {
      "get": {
        "operationId": "user-organizations-retrieve",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "tags": [
          "user"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Organization"
                }
              }
            },
            "description": ""
          }
        },
        "description": "Retrieve an user organization by ID"
      },
      "put": {
        "operationId": "user-organizations-update",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "tags": [
          "user"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Organization"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/Organization"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Organization"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Organization"
                }
              }
            },
            "description": ""
          }
        },
        "description": "Update an user organization"
      },
      "patch": {
        "operationId": "user-organizations-partial-update",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "tags": [
          "user"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchedOrganization"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/PatchedOrganization"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/PatchedOrganization"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Organization"
                }
              }
            },
            "description": ""
          }
        },
        "description": "Update an user organization"
      },
      "delete": {
        "operationId": "user-organizations-destroy",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "tags": [
          "user"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "204": {
            "description": "No response body"
          }
        },
        "description": "Delete an user organization"
      }
    },
    "/user/organizations/{id}/onboarding-flow/": {
      "patch": {
        "operationId": "user-organizations-onboarding-flow-partial-update",
        "description": "DEPRECATED — the first user's PATCH /user/onboarding/ ({\"variant\": ...})\nstamps the org flow; this endpoint remains the way to change it later.\nCan be called by any org member or admin.",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "tags": [
          "user"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchedOrganization"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/PatchedOrganization"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/PatchedOrganization"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Organization"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/user/organizations/{id}/onboarding-tasks/": {
      "get": {
        "operationId": "user-organizations-onboarding-tasks-retrieve",
        "description": "DEPRECATED — use GET /user/onboarding/?organization=<id>, which\nreturns these tasks plus the caller's per-user onboarding state.",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "tags": [
          "user"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Organization"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/user/organizations/{id}/overview/": {
      "get": {
        "operationId": "user-organizations-overview-retrieve",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "tags": [
          "user"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Organization"
                }
              }
            },
            "description": ""
          }
        },
        "description": "User organizations overview"
      }
    },
    "/user/organizations/{id}/overview/agents/": {
      "get": {
        "operationId": "user-organizations-overview-agents-retrieve",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "tags": [
          "user"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Organization"
                }
              }
            },
            "description": ""
          }
        },
        "description": "User organizations overview agents"
      }
    },
    "/user/organizations/{id}/overview/call_logs/": {
      "get": {
        "operationId": "user-organizations-overview-call-logs-retrieve",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "tags": [
          "user"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Organization"
                }
              }
            },
            "description": ""
          }
        },
        "description": "User organizations overview call logs"
      }
    },
    "/user/organizations/{id}/skip-onboarding/": {
      "patch": {
        "operationId": "user-organizations-skip-onboarding-partial-update",
        "description": "DEPRECATED — per-user skip lives on PATCH /user/onboarding/\n({\"status\": \"skipped\"}). This org-wide flag remains as a legacy\nsuppressor and ops lever. Can be called by any org member or admin.",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "tags": [
          "user"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchedOrganization"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/PatchedOrganization"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/PatchedOrganization"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Organization"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/user/organizations/{id}/slack-invite/": {
      "post": {
        "operationId": "user-organizations-slack-invite-create",
        "description": "Send Slack community invite to organization admin.\n\nCreates a private Slack channel for the organization and sends an email invite\nto the admin user. Only available for organizations with 10+ members.\n\nPermissions:\n    - Requires authenticated user (no API keys)\n    - Requires organization admin role\n\nReturns:\n    200: Slack invite sent successfully\n    400: Invalid team size or missing admin\n    403: API key authentication or insufficient permissions\n    409: Invite already sent (idempotent)\n    429: Rate limited\n    500: Service error or timeout",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "tags": [
          "user"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Organization"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/Organization"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Organization"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Organization"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/user/organizations/name/": {
      "patch": {
        "operationId": "user-organizations-name-partial-update",
        "description": "Update organization name and team_size.\nSends Slack alert if team_size is 10+ and send_alert flag is true.",
        "tags": [
          "user"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchedOrganization"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/PatchedOrganization"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/PatchedOrganization"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Organization"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/user/organizations/overview/critical-categories/": {
      "get": {
        "operationId": "user-organizations-overview-critical-categories-retrieve",
        "tags": [
          "user"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Organization"
                }
              }
            },
            "description": ""
          }
        },
        "description": "User organizations overview critical categories"
      }
    },
    "/user/phone-otp/send/": {
      "post": {
        "operationId": "user-phone-otp-send-create",
        "description": "Send a phone-verification OTP, metered per account rather than per browser.",
        "tags": [
          "user"
        ],
        "security": [
          {
            "supabase_session_inactive_allowed": []
          }
        ],
        "responses": {
          "200": {
            "description": "No response body"
          }
        }
      }
    },
    "/user/phone-otp/verify/": {
      "post": {
        "operationId": "user-phone-otp-verify-create",
        "description": "Confirm a phone-verification OTP, recording the attempt for the send quota.",
        "tags": [
          "user"
        ],
        "security": [
          {
            "supabase_session_inactive_allowed": []
          }
        ],
        "responses": {
          "200": {
            "description": "No response body"
          }
        }
      }
    },
    "/user/provider-credentials/": {
      "get": {
        "operationId": "user-provider-credentials-list",
        "tags": [
          "user"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ProviderCredentialList"
                  }
                }
              }
            },
            "description": ""
          }
        },
        "description": "List user provider credentials"
      },
      "post": {
        "operationId": "user-provider-credentials-create",
        "tags": [
          "user"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProviderCredentialDetail"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/ProviderCredentialDetail"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/ProviderCredentialDetail"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProviderCredentialDetail"
                }
              }
            },
            "description": ""
          }
        },
        "description": "Create a new user provider credential"
      }
    },
    "/user/provider-credentials/{id}/": {
      "get": {
        "operationId": "user-provider-credentials-retrieve",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this provider credential.",
            "required": true
          }
        ],
        "tags": [
          "user"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProviderCredentialDetail"
                }
              }
            },
            "description": ""
          }
        },
        "description": "Retrieve an user provider credential by ID"
      },
      "put": {
        "operationId": "user-provider-credentials-update",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this provider credential.",
            "required": true
          }
        ],
        "tags": [
          "user"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProviderCredentialDetail"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/ProviderCredentialDetail"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/ProviderCredentialDetail"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProviderCredentialDetail"
                }
              }
            },
            "description": ""
          }
        },
        "description": "Update an user provider credential"
      },
      "patch": {
        "operationId": "user-provider-credentials-partial-update",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this provider credential.",
            "required": true
          }
        ],
        "tags": [
          "user"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchedProviderCredentialDetail"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/PatchedProviderCredentialDetail"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/PatchedProviderCredentialDetail"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProviderCredentialDetail"
                }
              }
            },
            "description": ""
          }
        },
        "description": "Update an user provider credential"
      },
      "delete": {
        "operationId": "user-provider-credentials-destroy",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this provider credential.",
            "required": true
          }
        ],
        "tags": [
          "user"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          }
        ],
        "responses": {
          "204": {
            "description": "No response body"
          }
        },
        "description": "Delete an user provider credential"
      }
    },
    "/user/v1/audit-logs/": {
      "get": {
        "operationId": "audit-logs-list",
        "description": "List audit logs for an organization. Requires admin or organization API key access.",
        "parameters": [
          {
            "name": "page",
            "required": false,
            "in": "query",
            "description": "A page number within the paginated result set.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "page_size",
            "required": false,
            "in": "query",
            "description": "Number of results to return per page.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "organization_id",
            "schema": {
              "type": "string"
            },
            "description": "Organization whose logs are being fetched",
            "required": true
          },
          {
            "in": "query",
            "name": "start_time",
            "schema": {
              "type": "string"
            },
            "description": "Start of the time range for logs (ISO 8601, e.g. 2025-01-01T00:00:00Z). Defaults to 1 week ago. Max duration between start_time and end_time is 30 days."
          },
          {
            "in": "query",
            "name": "end_time",
            "schema": {
              "type": "string"
            },
            "description": "End of the time range for logs (ISO 8601, e.g. 2025-12-31T23:59:59Z). Defaults to now. Max duration between start_time and end_time is 30 days."
          },
          {
            "in": "query",
            "name": "project_id",
            "schema": {
              "type": "string"
            },
            "description": "Filter logs for a specific project"
          },
          {
            "in": "query",
            "name": "user_email",
            "schema": {
              "type": "string"
            },
            "description": "Filter logs for actions performed by a specific user"
          },
          {
            "in": "query",
            "name": "object_type",
            "schema": {
              "type": "string"
            },
            "description": "Type of object being tracked (e.g. aiagent, metric, scenario, api_key)"
          },
          {
            "in": "query",
            "name": "object_id",
            "schema": {
              "type": "string"
            },
            "description": "Unique identifier of the object. Must be used together with object_type"
          },
          {
            "in": "query",
            "name": "action_type",
            "schema": {
              "type": "string"
            },
            "description": "Higher-level classification of the action (e.g. object, run_scenarios)"
          },
          {
            "in": "query",
            "name": "operation_type",
            "schema": {
              "type": "string"
            },
            "description": "Type of operation performed (create, update, delete)"
          }
        ],
        "tags": [
          "user"
        ],
        "security": [
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedAuditLogList"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/user/v1/audit-logs/{id}/": {
      "get": {
        "operationId": "audit-logs-retrieve",
        "description": "Retrieve an audit log by ID",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this Audit Log.",
            "required": true
          }
        ],
        "tags": [
          "user"
        ],
        "security": [
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuditLog"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/user/v1/embedded/login/": {
      "post": {
        "operationId": "embedded-login-create",
        "description": "Takes a set of user credentials and returns an access and refresh JSON web\ntoken pair to prove the authentication of those credentials.",
        "tags": [
          "user"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CustomTokenObtainPair"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/CustomTokenObtainPair"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/CustomTokenObtainPair"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomTokenObtainPair"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/user/v1/embedded/refresh/": {
      "post": {
        "operationId": "embedded-refresh-create",
        "description": "Takes a refresh type JSON web token and returns an access type JSON web\ntoken if the refresh token is valid.",
        "tags": [
          "user"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TokenRefresh"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/TokenRefresh"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/TokenRefresh"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TokenRefresh"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/user/v1/projects/": {
      "get": {
        "operationId": "projects-list",
        "description": "projects_list: Returns every project the caller can access, with nested member records. Optionally filter by `organization_id` to scope to one organisation; otherwise scoped by the caller's API-key org or membership set. There is no pagination — responses can be large in orgs with many projects. Filter client-side after retrieval.",
        "summary": "List projects",
        "parameters": [
          {
            "in": "query",
            "name": "organization_id",
            "schema": {
              "type": "integer"
            },
            "description": "Filter projects by organisation ID"
          },
          {
            "name": "project_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Tenant scope. Supply one of `organization_id`, `project_id` when authenticating with a user session or OAuth bearer token; omit when using an API key already scoped to the tenant."
          }
        ],
        "tags": [
          "user"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Project"
                  }
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "projects-list",
            "description": "projects_list: Returns every project the caller can access, with nested member records. Optionally filter by `organization_id` to scope to one organisation; otherwise scoped by the caller's API-key org or membership set. There is no pagination — responses can be large in orgs with many projects. Filter client-side after retrieval."
          }
        }
      },
      "post": {
        "operationId": "projects-create",
        "tags": [
          "user"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Project"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/Project"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Project"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Project"
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "summary": "Create a project",
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "projects-create",
            "description": "Create a project"
          }
        },
        "description": "Create a project"
      }
    },
    "/user/v1/projects-external/": {
      "get": {
        "operationId": "projects-external-list",
        "description": "projects_list: Returns every project the caller can access, with nested member records. Optionally filter by `organization_id` to scope to one organisation; otherwise scoped by the caller's API-key org or membership set. There is no pagination — responses can be large in orgs with many projects. Filter client-side after retrieval.",
        "summary": "List projects",
        "parameters": [
          {
            "in": "query",
            "name": "organization_id",
            "schema": {
              "type": "integer"
            },
            "description": "Filter projects by organisation ID"
          }
        ],
        "tags": [
          "user"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Project"
                  }
                }
              }
            },
            "description": ""
          }
        }
      },
      "post": {
        "operationId": "projects-external-create",
        "tags": [
          "user"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Project"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/Project"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Project"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Project"
                }
              }
            },
            "description": ""
          }
        },
        "description": "Create a new project"
      }
    },
    "/user/v1/projects-external/{id}/": {
      "get": {
        "operationId": "projects-external-retrieve",
        "description": "Retrieve a single project by ID: its settings, member list, and provider credentials. A project is the workspace scoping an organization's agents, evaluators, metrics, and results.",
        "summary": "Get a project",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this project.",
            "required": true
          }
        ],
        "tags": [
          "user"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Project"
                }
              }
            },
            "description": ""
          }
        }
      },
      "put": {
        "operationId": "projects-external-update",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this project.",
            "required": true
          }
        ],
        "tags": [
          "user"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Project"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/Project"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Project"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Project"
                }
              }
            },
            "description": ""
          }
        },
        "description": "Update a project"
      },
      "patch": {
        "operationId": "projects-external-partial-update",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this project.",
            "required": true
          }
        ],
        "tags": [
          "user"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchedProject"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/PatchedProject"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/PatchedProject"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Project"
                }
              }
            },
            "description": ""
          }
        },
        "description": "Update a project"
      },
      "delete": {
        "operationId": "projects-external-destroy",
        "description": "⚠ Irreversible. Deletes the project and everything scoped to it: agents, evaluators, metrics, results, and runs. The last remaining project in an organization cannot be deleted.",
        "summary": "Delete a project",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this project.",
            "required": true
          }
        ],
        "tags": [
          "user"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "description": "No response body"
          },
          "400": {
            "description": "No response body"
          },
          "403": {
            "description": "No response body"
          },
          "404": {
            "description": "No response body"
          }
        }
      }
    },
    "/user/v1/projects-external/{id}/add_member/": {
      "post": {
        "operationId": "projects-external-add-member-create",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this project.",
            "required": true
          }
        ],
        "tags": [
          "user"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Project"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/Project"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Project"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Project"
                }
              }
            },
            "description": ""
          }
        },
        "description": "Projects add member"
      }
    },
    "/user/v1/projects-external/{id}/daily-report/{date}/pdf/": {
      "get": {
        "operationId": "projects-external-daily-report-pdf-retrieve",
        "description": "Resolve a daily report PDF (sent at `date`) to a fresh presigned S3 URL.",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this project.",
            "required": true
          },
          {
            "in": "path",
            "name": "date",
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            },
            "required": true
          }
        ],
        "tags": [
          "user"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Project"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/user/v1/projects-external/{id}/disable_personalities/": {
      "post": {
        "operationId": "projects-external-disable-personalities-create",
        "description": "Removes one or more personalities from the project's enabled set. Pass a list of personality IDs, or `\"all\"` to disable every personality available for the project (optionally filtered by `language`). Note: disabling all personalities for a language may prevent scenario generation for that language — validation happens at scenario-run time, not here.",
        "summary": "Disable personalities for a project",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this project.",
            "required": true
          }
        ],
        "tags": [
          "user"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DisablePersonalitiesRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/DisablePersonalitiesRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/DisablePersonalitiesRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {},
                  "description": "Unspecified response body"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/user/v1/projects-external/{id}/enable_personalities/": {
      "post": {
        "operationId": "projects-external-enable-personalities-create",
        "description": "Adds one or more personalities to the project's enabled set. Pass a list of personality IDs, or `\"all\"` to enable every personality available for the project (optionally filtered by `language`).",
        "summary": "Enable personalities for a project",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this project.",
            "required": true
          }
        ],
        "tags": [
          "user"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnablePersonalitiesRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/EnablePersonalitiesRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/EnablePersonalitiesRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {},
                  "description": "Unspecified response body"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/user/v1/projects-external/{id}/get-dropoff-names/": {
      "get": {
        "operationId": "projects-external-get-dropoff-names-retrieve",
        "description": "Get unique dropoff names from all agents in the project.\n\nReturns:\n    Response: {\"dropoff_names\": [\"node1\", \"node2\", ...]}\n\nExample:\n    GET /api/projects/1/get-dropoff-names/\n\n    Response:\n    {\n        \"dropoff_names\": [\n            \"Test Agent Introduction\",\n            \"Configure Test Settings\",\n            \"Execute Test Scenarios\",\n            \"Review Test Results\"\n        ]\n    }",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this project.",
            "required": true
          }
        ],
        "tags": [
          "user"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Project"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/user/v1/projects-external/{id}/get-topic-names/": {
      "get": {
        "operationId": "projects-external-get-topic-names-retrieve",
        "description": "Get unique topic names from all agents in the project.\n\nReturns:\n    Response: {\"topic_names\": [\"topic1\", \"topic2\", ...]}\n\nExample:\n    GET /api/projects/1/get-topic-names/\n\n    Response:\n    {\n        \"topic_names\": [\n            \"Appointment Preparation Requirements\",\n            \"Escalating to a Manager\",\n            \"Initial Greeting and Rapport\",\n            \"Scheduling Onboarding Appointment\"\n        ]\n    }",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this project.",
            "required": true
          }
        ],
        "tags": [
          "user"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Project"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/user/v1/projects-external/{id}/overview/": {
      "get": {
        "operationId": "projects-external-overview-retrieve",
        "description": "Get comprehensive project overview with optimized parallel execution.\n\nReturns call statistics, agent counts, latency analysis, critical categories,\nand issues analysis with percentage changes from the previous period.",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this project.",
            "required": true
          }
        ],
        "tags": [
          "user"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Project"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/user/v1/projects-external/{id}/overview/agents/": {
      "get": {
        "operationId": "projects-external-overview-agents-retrieve",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this project.",
            "required": true
          }
        ],
        "tags": [
          "user"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Project"
                }
              }
            },
            "description": ""
          }
        },
        "description": "Projects overview agents"
      }
    },
    "/user/v1/projects-external/{id}/overview/call_logs/": {
      "get": {
        "operationId": "projects-external-overview-call-logs-retrieve",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this project.",
            "required": true
          }
        ],
        "tags": [
          "user"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Project"
                }
              }
            },
            "description": ""
          }
        },
        "description": "Projects overview call logs"
      }
    },
    "/user/v1/projects-external/{id}/overview/critical-categories/": {
      "get": {
        "operationId": "projects-external-overview-critical-categories-retrieve",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this project.",
            "required": true
          }
        ],
        "tags": [
          "user"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Project"
                }
              }
            },
            "description": ""
          }
        },
        "description": "Projects overview critical categories"
      }
    },
    "/user/v1/projects-external/{id}/personalities/": {
      "get": {
        "operationId": "projects-external-personalities-retrieve",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this project.",
            "required": true
          }
        ],
        "tags": [
          "user"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Project"
                }
              }
            },
            "description": ""
          }
        },
        "description": "Projects personalities"
      }
    },
    "/user/v1/projects-external/{id}/preview_daily_report/": {
      "post": {
        "operationId": "projects-external-preview-daily-report-create",
        "description": "Trigger an on-demand render of the daily observability report PDF.\n\nReturns a `task_id` the client can poll via `preview_daily_report_progress`.\nThree short-circuit paths:\n  - `?force=true` skips both warm cache and dedupe lock and always re-runs.\n  - A warm cache hit (within 15 min) returns the cached file_url synchronously.\n  - An in-flight generation for the same project returns the existing task_id.",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this project.",
            "required": true
          }
        ],
        "tags": [
          "user"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Project"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/Project"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Project"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Project"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/user/v1/projects-external/{id}/preview_daily_report_progress/": {
      "get": {
        "operationId": "projects-external-preview-daily-report-progress-retrieve",
        "description": "Poll the state of an in-flight `preview_daily_report` task.",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this project.",
            "required": true
          }
        ],
        "tags": [
          "user"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Project"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/user/v1/projects-external/{id}/remove_member/": {
      "post": {
        "operationId": "projects-external-remove-member-create",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this project.",
            "required": true
          }
        ],
        "tags": [
          "user"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Project"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/Project"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Project"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Project"
                }
              }
            },
            "description": ""
          }
        },
        "description": "Projects remove member"
      }
    },
    "/user/v1/projects-external/{id}/test-webhook/": {
      "post": {
        "operationId": "projects-external-test-webhook-create",
        "description": "Test webhook endpoint that sends mock webhook data to the project's webhook URL",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this project.",
            "required": true
          }
        ],
        "tags": [
          "user"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Project"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/Project"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Project"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Project"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/user/v1/projects-external/members/": {
      "get": {
        "operationId": "projects-external-members-retrieve",
        "tags": [
          "user"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Project"
                }
              }
            },
            "description": ""
          }
        },
        "description": "Projects members"
      }
    },
    "/user/v1/projects/{id}/": {
      "get": {
        "operationId": "projects-retrieve",
        "description": "Retrieve a single project by ID: its settings, member list, and provider credentials. A project is the workspace scoping an organization's agents, evaluators, metrics, and results.",
        "summary": "Get a project",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this project.",
            "required": true
          }
        ],
        "tags": [
          "user"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Project"
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "projects-retrieve",
            "description": "Retrieve a single project by ID: its settings, member list, and provider credentials. A project is the workspace scoping an organization's agents, evaluators, metrics, and results."
          }
        }
      },
      "put": {
        "operationId": "projects-update",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this project.",
            "required": true
          }
        ],
        "tags": [
          "user"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Project"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/Project"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Project"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Project"
                }
              }
            },
            "description": ""
          }
        },
        "description": "Update a project"
      },
      "patch": {
        "operationId": "projects-partial-update",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this project.",
            "required": true
          }
        ],
        "tags": [
          "user"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchedProject"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/PatchedProject"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/PatchedProject"
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Project"
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "summary": "Update a project",
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "projects-partial-update",
            "description": "Update a project"
          }
        },
        "description": "Update a project"
      },
      "delete": {
        "operationId": "projects-destroy",
        "description": "⚠ Irreversible. Deletes the project and everything scoped to it: agents, evaluators, metrics, results, and runs. The last remaining project in an organization cannot be deleted.",
        "summary": "Delete a project",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this project.",
            "required": true
          }
        ],
        "tags": [
          "user"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "description": "No response body"
          },
          "400": {
            "description": "No response body"
          },
          "403": {
            "description": "No response body"
          },
          "404": {
            "description": "No response body"
          }
        },
        "x-mcp-expose": true,
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "projects-destroy",
            "description": "⚠ Irreversible. Deletes the project and everything scoped to it: agents, evaluators, metrics, results, and runs. The last remaining project in an organization cannot be deleted."
          }
        }
      }
    },
    "/user/v1/projects/{id}/add_member/": {
      "post": {
        "operationId": "projects-add-member-create",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this project.",
            "required": true
          }
        ],
        "tags": [
          "user"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Project"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/Project"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Project"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Project"
                }
              }
            },
            "description": ""
          }
        },
        "description": "Projects add member"
      }
    },
    "/user/v1/projects/{id}/daily-report/{date}/pdf/": {
      "get": {
        "operationId": "projects-daily-report-pdf-retrieve",
        "description": "Resolve a daily report PDF (sent at `date`) to a fresh presigned S3 URL.",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this project.",
            "required": true
          },
          {
            "in": "path",
            "name": "date",
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            },
            "required": true
          }
        ],
        "tags": [
          "user"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Project"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/user/v1/projects/{id}/disable_personalities/": {
      "post": {
        "operationId": "projects-disable-personalities-create",
        "description": "Removes one or more personalities from the project's enabled set. Pass a list of personality IDs, or `\"all\"` to disable every personality available for the project (optionally filtered by `language`). Note: disabling all personalities for a language may prevent scenario generation for that language — validation happens at scenario-run time, not here.",
        "summary": "Disable personalities for a project",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this project.",
            "required": true
          }
        ],
        "tags": [
          "user"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DisablePersonalitiesRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/DisablePersonalitiesRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/DisablePersonalitiesRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {},
                  "description": "Unspecified response body"
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "projects-disable-personalities-create",
            "description": "Removes one or more personalities from the project's enabled set. Pass a list of personality IDs, or `\"all\"` to disable every personality available for the project (optionally filtered by `language`). Note: disabling all personalities for a language may prevent scenario generation for that language — validation happens at scenario-run time, not here."
          }
        }
      }
    },
    "/user/v1/projects/{id}/enable_personalities/": {
      "post": {
        "operationId": "projects-enable-personalities-create",
        "description": "Adds one or more personalities to the project's enabled set. Pass a list of personality IDs, or `\"all\"` to enable every personality available for the project (optionally filtered by `language`).",
        "summary": "Enable personalities for a project",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this project.",
            "required": true
          }
        ],
        "tags": [
          "user"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnablePersonalitiesRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/EnablePersonalitiesRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/EnablePersonalitiesRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {},
                  "description": "Unspecified response body"
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "projects-enable-personalities-create",
            "description": "Adds one or more personalities to the project's enabled set. Pass a list of personality IDs, or `\"all\"` to enable every personality available for the project (optionally filtered by `language`)."
          }
        }
      }
    },
    "/user/v1/projects/{id}/get-dropoff-names/": {
      "get": {
        "operationId": "projects-get-dropoff-names-retrieve",
        "description": "Get unique dropoff names from all agents in the project.\n\nReturns:\n    Response: {\"dropoff_names\": [\"node1\", \"node2\", ...]}\n\nExample:\n    GET /api/projects/1/get-dropoff-names/\n\n    Response:\n    {\n        \"dropoff_names\": [\n            \"Test Agent Introduction\",\n            \"Configure Test Settings\",\n            \"Execute Test Scenarios\",\n            \"Review Test Results\"\n        ]\n    }",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this project.",
            "required": true
          }
        ],
        "tags": [
          "user"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Project"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/user/v1/projects/{id}/get-topic-names/": {
      "get": {
        "operationId": "projects-get-topic-names-retrieve",
        "description": "Get unique topic names from all agents in the project.\n\nReturns:\n    Response: {\"topic_names\": [\"topic1\", \"topic2\", ...]}\n\nExample:\n    GET /api/projects/1/get-topic-names/\n\n    Response:\n    {\n        \"topic_names\": [\n            \"Appointment Preparation Requirements\",\n            \"Escalating to a Manager\",\n            \"Initial Greeting and Rapport\",\n            \"Scheduling Onboarding Appointment\"\n        ]\n    }",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this project.",
            "required": true
          }
        ],
        "tags": [
          "user"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Project"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/user/v1/projects/{id}/overview/": {
      "get": {
        "operationId": "projects-overview-retrieve",
        "description": "Get comprehensive project overview with optimized parallel execution.\n\nReturns call statistics, agent counts, latency analysis, critical categories,\nand issues analysis with percentage changes from the previous period.",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this project.",
            "required": true
          }
        ],
        "tags": [
          "user"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Project"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/user/v1/projects/{id}/overview/agents/": {
      "get": {
        "operationId": "projects-overview-agents-retrieve",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this project.",
            "required": true
          }
        ],
        "tags": [
          "user"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Project"
                }
              }
            },
            "description": ""
          }
        },
        "description": "Projects overview agents"
      }
    },
    "/user/v1/projects/{id}/overview/call_logs/": {
      "get": {
        "operationId": "projects-overview-call-logs-retrieve",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this project.",
            "required": true
          }
        ],
        "tags": [
          "user"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Project"
                }
              }
            },
            "description": ""
          }
        },
        "description": "Projects overview call logs"
      }
    },
    "/user/v1/projects/{id}/overview/critical-categories/": {
      "get": {
        "operationId": "projects-overview-critical-categories-retrieve",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this project.",
            "required": true
          }
        ],
        "tags": [
          "user"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Project"
                }
              }
            },
            "description": ""
          }
        },
        "description": "Projects overview critical categories"
      }
    },
    "/user/v1/projects/{id}/personalities/": {
      "get": {
        "operationId": "projects-personalities-retrieve",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this project.",
            "required": true
          }
        ],
        "tags": [
          "user"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Project"
                }
              }
            },
            "description": ""
          }
        },
        "description": "Projects personalities"
      }
    },
    "/user/v1/projects/{id}/preview_daily_report/": {
      "post": {
        "operationId": "projects-preview-daily-report-create",
        "description": "Trigger an on-demand render of the daily observability report PDF.\n\nReturns a `task_id` the client can poll via `preview_daily_report_progress`.\nThree short-circuit paths:\n  - `?force=true` skips both warm cache and dedupe lock and always re-runs.\n  - A warm cache hit (within 15 min) returns the cached file_url synchronously.\n  - An in-flight generation for the same project returns the existing task_id.",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this project.",
            "required": true
          }
        ],
        "tags": [
          "user"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Project"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/Project"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Project"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Project"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/user/v1/projects/{id}/preview_daily_report_progress/": {
      "get": {
        "operationId": "projects-preview-daily-report-progress-retrieve",
        "description": "Poll the state of an in-flight `preview_daily_report` task.",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this project.",
            "required": true
          }
        ],
        "tags": [
          "user"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Project"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/user/v1/projects/{id}/remove_member/": {
      "post": {
        "operationId": "projects-remove-member-create",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this project.",
            "required": true
          }
        ],
        "tags": [
          "user"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Project"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/Project"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Project"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Project"
                }
              }
            },
            "description": ""
          }
        },
        "description": "Projects remove member"
      }
    },
    "/user/v1/projects/{id}/test-webhook/": {
      "post": {
        "operationId": "projects-test-webhook-create",
        "description": "Test webhook endpoint that sends mock webhook data to the project's webhook URL",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this project.",
            "required": true
          }
        ],
        "tags": [
          "user"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Project"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/Project"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Project"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Project"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/user/v1/projects/members/": {
      "get": {
        "operationId": "projects-members-retrieve",
        "tags": [
          "user"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Project"
                }
              }
            },
            "description": ""
          }
        },
        "description": "Projects members"
      }
    },
    "/user/v2/organizations/": {
      "get": {
        "operationId": "user-v2-organizations-list",
        "parameters": [
          {
            "name": "search",
            "required": false,
            "in": "query",
            "description": "A search term.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "required": false,
            "in": "query",
            "description": "A page number within the paginated result set.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "page_size",
            "required": false,
            "in": "query",
            "description": "Number of results to return per page.",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "tags": [
          "user"
        ],
        "security": [
          {
            "oauth2": []
          },
          {
            "supabase_session": []
          },
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedOrganizationList"
                }
              }
            },
            "description": ""
          }
        },
        "x-mcp-expose": true,
        "summary": "List your organizations (v2)",
        "x-mint": {
          "mcp": {
            "enabled": true,
            "name": "user-v2-organizations-list",
            "description": "List your organizations (v2)"
          }
        },
        "description": "List your organizations (v2)"
      }
    }
  },
  "components": {
    "schemas": {
      "AIAgent": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true,
            "description": "Agent ID.\nExample: `2142`"
          },
          "project": {
            "type": "integer",
            "description": "The project this agent belongs to"
          },
          "organization": {
            "type": "integer",
            "writeOnly": true,
            "description": "The organization this agent belongs to"
          },
          "agent_name": {
            "type": "string",
            "description": "\nA descriptive name for your agent\nExample: \n- `\"Customer Service Assistant\"`\n- `\"Sales Bot\"`\n",
            "maxLength": 255
          },
          "contact_number": {
            "type": "string",
            "description": "\nPhone number assigned to this agent for calls (must start with + followed by digits, min 8 chars)\nExample: `\"+1234567890\"`\n",
            "maxLength": 30
          },
          "inbound": {
            "type": "boolean",
            "description": "Whether this agent handles inbound calls.\n- If true, our agent will call you on above number.\n- If false, your agent will have to call our agent.\n\nExample: `true` or `false`\n"
          },
          "description": {
            "type": "string",
            "description": "\nA detailed description of what this agent does and how it should interact\nExample: \n```text\nAI agent for handling customer support inquiries and resolving technical issues\n```\n"
          },
          "language": {
            "enum": [
              "af",
              "ar",
              "bn",
              "bg",
              "zh",
              "cs",
              "da",
              "nl",
              "en",
              "et",
              "fi",
              "fr",
              "de",
              "el",
              "gu",
              "hi",
              "he",
              "hu",
              "id",
              "it",
              "ja",
              "kn",
              "ko",
              "ms",
              "ml",
              "mr",
              "multi",
              "no",
              "pl",
              "pa",
              "pt",
              "ro",
              "ru",
              "sk",
              "es",
              "sv",
              "th",
              "tr",
              "tl",
              "ta",
              "te",
              "uk",
              "vi"
            ],
            "type": "string",
            "x-spec-enum-id": "b822ad429c7b7fec",
            "default": "en",
            "description": "\nThe primary language this agent uses for communication (e.g. 'en' for English)\n\n\n* `af` - Afrikaans\n* `ar` - Arabic\n* `bn` - Bengali\n* `bg` - Bulgarian\n* `zh` - Chinese Simplified\n* `cs` - Czech\n* `da` - Danish\n* `nl` - Dutch\n* `en` - English\n* `et` - Estonian\n* `fi` - Finnish\n* `fr` - French\n* `de` - German\n* `el` - Greek\n* `gu` - Gujarati\n* `hi` - Hindi\n* `he` - Hebrew\n* `hu` - Hungarian\n* `id` - Indonesian\n* `it` - Italian\n* `ja` - Japanese\n* `kn` - Kannada\n* `ko` - Korean\n* `ms` - Malay\n* `ml` - Malayalam\n* `mr` - Marathi\n* `multi` - Multilingual\n* `no` - Norwegian\n* `pl` - Polish\n* `pa` - Punjabi\n* `pt` - Portuguese\n* `ro` - Romanian\n* `ru` - Russian\n* `sk` - Slovak\n* `es` - Spanish\n* `sv` - Swedish\n* `th` - Thai\n* `tr` - Turkish\n* `tl` - Tagalog\n* `ta` - Tamil\n* `te` - Telugu\n* `uk` - Ukrainian\n* `vi` - Vietnamese"
          },
          "assistant_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "\nExternal assistant service identifier (minimum 10 characters).\nExample: `\"asst_abc123xyz\"`.\n\nNote: `assistant_id` alone does NOT substitute for provider credentials. Providers like VAPI, Retell, and Bland still require their respective `*_api_key` to be set.\n",
            "maxLength": 255
          },
          "chat_assistant_id": {
            "type": "string",
            "description": "\nChat / provider-specific assistant identifier (minimum 10 characters).\nExample: `\"chat_asst_abc123xyz\"`.\n\nRequired for `assistant_provider` values:\n- `retell` — the Retell agent id (used for voice too, despite the field name).\n- `bland` — the Bland pathway_id (Bland calls it pathway_id internally).\n- `sms` / `whatsapp` — the text-channel assistant id.\n",
            "maxLength": 255
          },
          "websocket_url": {
            "type": [
              "string",
              "null"
            ],
            "description": "\nWebSocket endpoint URL for real-time communication\nExample: `\"wss://api.example.com/ws\"`\n"
          },
          "websocket_headers": {
            "type": "object",
            "additionalProperties": {},
            "description": "\nHeaders to be sent to the websocket server\n"
          },
          "llm_system_prompt": {
            "type": "string",
            "description": "\nSystem prompt that defines the agent's behavior and personality\nExample: \n```text\nYou are a helpful customer service agent. Always be polite and professional.\n```\n"
          },
          "llm_model": {
            "enum": [
              "gpt-4o",
              "gpt-4o-mini",
              "gpt-4.1",
              "gpt-4.1-mini",
              "claude-sonnet-4-5-20250929"
            ],
            "type": "string",
            "x-spec-enum-id": "50e3b52be1ccac3f",
            "default": "gpt-4o",
            "description": "\nThe LLM model to use for simulating user responses\n\n\n* `gpt-4o` - gpt-4o\n* `gpt-4o-mini` - gpt-4o-mini\n* `gpt-4.1` - gpt-4.1\n* `gpt-4.1-mini` - gpt-4.1-mini\n* `claude-sonnet-4-5-20250929` - claude-sonnet-4-5"
          },
          "llm_temperature": {
            "type": "number",
            "format": "double",
            "default": 0,
            "description": "\nControls randomness in responses (0.0-2.0, lower = more focused)\nExample: `0.5`\n"
          },
          "llm_max_tokens": {
            "type": "integer",
            "default": 4096,
            "description": "\nMaximum length of simulated responses in tokens\nExample: `4096`\n"
          },
          "outbound_auto_call": {
            "type": "boolean",
            "default": false,
            "description": "\nWhether to automatically call the outbound number\nExample: `False` or `True`\n"
          },
          "sip_endpoint": {
            "type": [
              "string",
              "null"
            ],
            "description": "SIP endpoint URL for direct SIP-based phone calls.\nExample: `\"sip:agent@cekura.ai\"` or `\"sip:contact@domain.com\"`\nLeave empty if SIP calling is not configured for this agent.",
            "maxLength": 255
          },
          "sip_auth": {
            "oneOf": [
              {},
              {
                "type": "null"
              }
            ],
            "description": "\nSIP authentication credentials\nExample: `{\"username\": \"user123\", \"password\": \"pass123\"}`\n"
          },
          "websocket_voice_url": {
            "type": [
              "string",
              "null"
            ],
            "description": "Raw-PCM (16kHz 16-bit mono) websocket endpoint for direct websocket-based voice calls",
            "maxLength": 255
          },
          "websocket_auth": {
            "oneOf": [
              {},
              {
                "type": "null"
              }
            ],
            "description": "\nWebsocket Basic Auth credentials\nExample: `{\"username\": \"user123\", \"password\": \"pass123\"}`\n"
          },
          "predefined_metrics": {
            "writeOnly": true,
            "description": "predefined metrics to use for the agent"
          },
          "knowledge_base_files": {
            "type": "string",
            "readOnly": true,
            "description": "\nList of knowledge base files attached to the agent\nExample: `[1, 2, 3]`\n"
          },
          "transcript_provider": {
            "enum": [
              "vapi",
              "retell",
              "synthflow",
              "elevenlabs",
              "bland",
              "livekit",
              "pipecat",
              "koreai",
              "custom",
              "cisco",
              "genesys",
              "agora",
              "amazon_connect",
              "telnyx",
              ""
            ],
            "type": "string",
            "x-spec-enum-id": "2b38755f8404d645",
            "default": "",
            "description": "\nService provider for speech-to-text transcription\n\n\n* `vapi` - Vapi\n* `retell` - Retell\n* `synthflow` - Synthflow\n* `elevenlabs` - Elevenlabs\n* `bland` - Bland\n* `livekit` - Livekit\n* `pipecat` - Pipecat\n* `koreai` - Kore\n* `custom` - Custom\n* `cisco` - Cisco\n* `genesys` - Genesys\n* `agora` - Agora\n* `amazon_connect` - Amazon Connect\n* `telnyx` - Telnyx"
          },
          "assistant_provider": {
            "enum": [
              "vapi",
              "retell",
              "elevenlabs",
              "vocera",
              "sms",
              "whatsapp",
              "self_hosted",
              "agentforce",
              "cisco",
              "bland",
              "livekit",
              "pipecat",
              "synthflow",
              "agora",
              "koreai",
              "genesys",
              "amazon_connect",
              "telnyx",
              "sierra",
              ""
            ],
            "type": "string",
            "x-spec-enum-id": "be289759a77f8b31",
            "default": "",
            "description": "\nService provider for the AI assistant functionality. Valid values (live enum):\n\n- `self_hosted` — websocket or observation-only; no api_key needed. Use `websocket_url` + `websocket_headers` for text-mode runs.\n- `vapi` — requires `vapi_api_key`; optional `assistant_id`, `vapi_data.public_key`.\n- `retell` — requires `retell_api_key` AND `chat_assistant_id` (used for voice too).\n- `bland` — requires `bland_api_key`; `assistant_id` is the Bland persona_id (voice), `chat_assistant_id` the pathway_id (text); `bland_data.encrypted_key` for Twilio.\n- `livekit` — requires `livekit_api_key` + `livekit_data.url`; `livekit_data.api_secret` is needed at run time for WebRTC.\n- `elevenlabs` — requires `elevenlabs_api_key`.\n- `agentforce` — requires `agentforce_client_secret` + `agentforce_data`.\n- `sierra` — requires `sierra_agent_token`; optional `sierra_data` (host, api_secret). Chat/text runs only.\n- `amazon_connect` — requires `amazon_connect_data` with `snippet_id` and `connect_host`; optional `amazon_connect_security_token` and `region`.\n- `cisco` — Cisco Webex.\n- `vocera` — Cekura-hosted.\n- `sms` / `whatsapp` — text-only channels; use `chat_assistant_id`.\n- `\"\"` (empty) — unset; agent is not runnable until a provider is configured.\n\nNote: the serializer also exposes `pipecat_*`, `synthflow_*`, `koreai_*`, `genesys_*`, `custom_provider_*` fields, but those provider values are not currently selectable in this enum.\n\n\n* `vapi` - Vapi\n* `retell` - Retell\n* `elevenlabs` - Elevenlabs\n* `vocera` - Vocera\n* `sms` - Sms\n* `whatsapp` - Whatsapp\n* `self_hosted` - Self Hosted\n* `agentforce` - Agentforce\n* `cisco` - Cisco\n* `bland` - Bland\n* `livekit` - Livekit\n* `pipecat` - Pipecat\n* `synthflow` - Synthflow\n* `agora` - Agora\n* `koreai` - Koreai\n* `genesys` - Genesys\n* `amazon_connect` - Amazon Connect\n* `telnyx` - Telnyx\n* `sierra` - Sierra"
          },
          "vapi_api_key": {
            "type": "string",
            "writeOnly": true,
            "description": "\nAPI key for VAPI service provider. Required when `assistant_provider=\"vapi\"`.\nExample: `\"vapi_api_key_123\"`\n"
          },
          "vapi_api_key_configured": {
            "type": "string",
            "readOnly": true
          },
          "vapi_public_key_configured": {
            "type": "string",
            "readOnly": true
          },
          "retell_api_key": {
            "type": "string",
            "writeOnly": true,
            "description": "\nAPI key for Retell service provider. Required when `assistant_provider=\"retell\"` (along with `chat_assistant_id`).\nExample: `\"retell_api_key_123\"`\n"
          },
          "retell_api_key_configured": {
            "type": "string",
            "readOnly": true
          },
          "elevenlabs_api_key": {
            "type": "string",
            "writeOnly": true,
            "description": "\nAPI key for ElevenLabs voice synthesis service. Required when `assistant_provider=\"elevenlabs\"`.\nExample: `\"elevenlabs_api_key_123\"`\n"
          },
          "elevenlabs_api_key_configured": {
            "type": "string",
            "readOnly": true
          },
          "bland_api_key": {
            "type": "string",
            "writeOnly": true,
            "description": "\nAPI key for Bland service provider. Required when `assistant_provider=\"bland\"`. Pair with `assistant_id` (Bland persona_id) for voice, or `chat_assistant_id` (Bland pathway_id) for text-mode runs.\nExample: `\"bland_api_key_123\"`\n"
          },
          "bland_api_key_configured": {
            "type": "string",
            "readOnly": true
          },
          "bland_data": {
            "type": "string",
            "description": "\nBland additional configuration. Pass `encrypted_key` containing the Twilio credential bundle.\nExample: `{\"encrypted_key\": \"twillio_encrypted_key\"}`\n"
          },
          "livekit_api_key": {
            "type": "string",
            "writeOnly": true,
            "description": "\nAPI key for LiveKit service provider. Required together with `livekit_data.url` when `assistant_provider=\"livekit\"`.\nExample: `\"livekit_api_key_123\"`\n"
          },
          "livekit_api_key_configured": {
            "type": "string",
            "readOnly": true
          },
          "livekit_data": {
            "type": "string",
            "description": "\nLiveKit additional data (api_secret, url, and config). `url` is required alongside `livekit_api_key` when `assistant_provider=\"livekit\"`;\n`api_secret` is optional to save but needed at run time for WebRTC token minting.\nOn response, secrets are masked (the `api_secret` key is stripped and replaced with `api_secret_configured: true`).\n"
          },
          "pipecat_api_key": {
            "type": "string",
            "writeOnly": true,
            "description": "\nAPI key for Pipecat/Daily.co service provider\nExample: `\"pipecat_api_key_123\"`\n"
          },
          "pipecat_api_key_configured": {
            "type": "string",
            "readOnly": true
          },
          "pipecat_data": {
            "type": "string",
            "description": "\nPipecat/Daily.co additional data (webhook_url and config)\n"
          },
          "koreai_client_secret": {
            "type": "string",
            "writeOnly": true,
            "description": "\nClient secret key for Kore.ai service provider\nExample: `\"client_secret_key_123\"`\n"
          },
          "koreai_client_secret_configured": {
            "type": "string",
            "readOnly": true
          },
          "koreai_api_key_configured": {
            "type": "string",
            "readOnly": true
          },
          "koreai_data": {
            "type": "string",
            "description": "\nKore.ai additional data.\nFor the RTM runner: {\"api_secret\": \"<xo-webclient API key>\", \"host\": \"platform.kore.ai\"}\nFor transcript fetch: {\"client_id\": \"cs-...\", \"bot_id\": \"st-...\", \"host\": \"bots.kore.ai\"}\napi_secret is encrypted at rest automatically.\n"
          },
          "genesys_client_secret": {
            "type": "string",
            "writeOnly": true,
            "description": "\nClient secret key for Genesys Cloud service provider\n"
          },
          "genesys_client_secret_configured": {
            "type": "string",
            "readOnly": true
          },
          "genesys_data": {
            "type": "string",
            "description": "\nGenesys Cloud additional data - client_id and region\n"
          },
          "agentforce_client_secret": {
            "type": "string",
            "writeOnly": true,
            "description": "\nClient secret for Salesforce Agentforce OAuth2 authentication\nExample: `\"3EG7HHH...\"`\n"
          },
          "agentforce_client_secret_configured": {
            "type": "string",
            "readOnly": true
          },
          "agentforce_data": {
            "type": "string",
            "description": "\nAgentforce additional data - client_id, domain, and agent_id\nExample: `{\"client_id\": \"sd7a8...\", \"domain\": \"https://example.sandbox.my.salesforce.com\", \"agent_id\": \"0Xx...\"}`\n"
          },
          "sierra_agent_token": {
            "type": "string",
            "writeOnly": true,
            "description": "\nSierra Headless API agent token. Required when `assistant_provider=\"sierra\"`.\n"
          },
          "sierra_agent_token_configured": {
            "type": "string",
            "readOnly": true
          },
          "sierra_data": {
            "type": "string",
            "description": "\nSierra additional configuration. Optional keys: `host` (API host, defaults to api.sierra.chat) and `api_secret` (bearer API key, only needed when the Sierra org enforces Headless API authentication; encrypted at rest).\nExample: `{\"host\": \"api.sierra.chat\"}`\n"
          },
          "amazon_connect_security_token": {
            "type": "string",
            "writeOnly": true,
            "description": "x-amz-security-token for Amazon Connect authenticated chat widgets."
          },
          "amazon_connect_security_token_configured": {
            "type": "string",
            "readOnly": true
          },
          "amazon_connect_data": {
            "type": "string",
            "description": "Amazon Connect config: snippet_id (required), connect_host (required), region (default us-east-1)."
          },
          "custom_provider_api_key": {
            "type": "string",
            "writeOnly": true,
            "description": "\nAPI key for custom service provider\nExample: `\"custom_api_key_123\"`\n"
          },
          "custom_provider_api_key_configured": {
            "type": "string",
            "readOnly": true
          },
          "custom_provider_data": {
            "type": "string",
            "description": "\nAdditional configuration data for custom service provider\n"
          },
          "vapi_data": {
            "type": "string",
            "description": "\nVAPI additional configuration data\nExample: `{\"public_key\": \"your-vapi-public-key\", \"trigger_url\": \"https://example.com/trigger\"}`\n"
          },
          "retell_data": {
            "type": "string",
            "description": "\nRetell additional configuration data\nExample: `{\"trigger_url\": \"https://example.com/trigger\"}`\n"
          },
          "elevenlabs_data": {
            "type": "string",
            "description": "\nElevenLabs additional configuration data\nExample: `{\"trigger_url\": \"https://example.com/trigger\"}`\n"
          },
          "agora_api_key": {
            "type": "string",
            "writeOnly": true,
            "description": "\nSecret sent in the session-endpoint auth header (default `X-Cekura-Secret`) when fetching Agora join details. Write-only.\n"
          },
          "agora_data": {
            "type": "string",
            "description": "\nConfiguration for the Agora session endpoint that mints per-call join details.\nSupported keys:\n  `session_endpoint_url` (required): endpoint Cekura calls per run.\n  `client_id` (required): sent in the request body.\n  `auth_header_name` (optional): header carrying the secret (default `X-Cekura-Secret`).\n  `request_method` (optional): GET or POST (default POST).\nExample: `{\"session_endpoint_url\": \"https://your-host/cekura/v1/sessions\", \"client_id\": \"abc\"}`\n"
          },
          "synthflow_api_key": {
            "type": "string",
            "writeOnly": true,
            "description": "\nAPI key for Synthflow service provider\nExample: `\"synthflow_api_key_123\"`\n"
          },
          "synthflow_api_key_configured": {
            "type": "string",
            "readOnly": true
          },
          "synthflow_data": {
            "type": "string",
            "description": "\nSynthflow additional configuration data\nExample: `{\"synthflow_base_url_override\": \"https://api.synthflow.ai\"}`\n"
          },
          "telnyx_api_key": {
            "type": "string",
            "writeOnly": true,
            "description": "\nAPI key for Telnyx AI Assistants\nExample: `\"telnyx_api_key_123\"`\n"
          },
          "telnyx_api_key_configured": {
            "type": "string",
            "readOnly": true
          },
          "enabled_personalities": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "readOnly": true,
            "description": "\nPersonality profiles enabled for this agent\nExample: `[1, 2, 3]`\n"
          },
          "dropoff_nodes": {
            "description": "Configuration for conversation dropoff points.\nExample: `{\"timeout\": 30, \"max_retries\": 3}`"
          },
          "topic_nodes": {
            "description": "Configuration for topic classification nodes.\nExample: `{\"billing\": \"handle_billing\", \"support\": \"handle_support\"}`"
          },
          "pronunciation_words": {
            "oneOf": [
              {},
              {
                "type": "null"
              }
            ],
            "description": "List of words with phonemes for pronunciation analysis.\nExample: `[[\"hello\", \"HH AH L OW\"], [\"world\", \"W ER L D\"]]`"
          },
          "spelling_word_types": {
            "oneOf": [
              {},
              {
                "type": "null"
              }
            ],
            "description": "List of word types/categories to check for spelling analysis.\nExample: `[\"name\", \"postcode\", \"email\", \"address\"]`"
          },
          "auto_update_dropoff_nodes": {
            "type": "boolean",
            "description": "Whether to automatically update the dropoff nodes based on the agent description"
          },
          "auto_update_topic_nodes": {
            "type": "boolean",
            "description": "Whether to automatically update the topic nodes based on the agent description"
          },
          "hallucination_metric_kb_files": {
            "type": "array",
            "items": {
              "type": [
                "integer",
                "null"
              ]
            },
            "description": "Knowledge base files used for hallucination metric"
          },
          "outbound_numbers": {
            "description": "List of phone numbers authorized to place outbound calls for this agent.\nExample: `[\"+1234567890\", \"+0987654321\"]`\n\nUsed for webhook validation — when an inbound webhook arrives, the system\nchecks whether the calling number is in this list (falls back to\n`contact_number` if the list is empty). Actual call placement for test runs\nuses the scenario's configured phone number or a number allocated from the\norganisation's phone pool."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true,
            "description": "\nTimestamp when the agent was created\nExample: `\"2021-01-01T00:00:00Z\"`\n"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true,
            "description": "\nTimestamp when the agent was last updated\nExample: `\"2021-01-01T00:00:00Z\"`\n"
          },
          "auto_fetch_calls_enabled": {
            "type": "boolean",
            "default": false,
            "description": "Enable automatic fetching of calls every 30 seconds (VAPI/Retell/ElevenLabs/Bland)"
          },
          "auto_sync_prompt_enabled": {
            "type": "boolean",
            "description": "Enable one-way prompt sync from the provider to Cekura on a schedule. Cekura re-fetches the provider prompt and updates the agent description; it does not push Cekura description changes back to the provider. Supported providers: vapi, retell, elevenlabs, synthflow, telnyx, bland."
          },
          "agent_gives_first_message": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Whether the main agent (not the testing agent) will give the first message. True = agent speaks first (testing agent won't generate a first message). False = testing agent speaks first (first message will be generated). None = preference not yet set."
          },
          "webhook_url": {
            "type": "string",
            "format": "uri",
            "description": "Webhook URL for this agent. When set, overrides the project-level webhook URL for events from this agent."
          },
          "webhook_secret": {
            "type": "string",
            "writeOnly": true,
            "description": "Secret sent in X-CEKURA-SECRET header. Applies when agent webhook_url is set. Write-only — never returned in API responses. Use `webhook_secret_configured` to check whether one is set."
          },
          "webhook_secret_configured": {
            "type": "string",
            "readOnly": true
          },
          "email_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "email",
            "description": "Email address this agent receives at. When set, enables email-based test runs.",
            "maxLength": 254
          }
        },
        "required": [
          "agent_name",
          "description",
          "inbound"
        ]
      },
      "AIAgentConfigureFromProviderResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "progress_id": {
            "type": "string",
            "description": "Poll auto-fetch-progress/ with this to follow the staged import."
          }
        },
        "required": [
          "id",
          "progress_id"
        ]
      },
      "AIAgentDynamicVariable": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "name": {
            "type": "string",
            "description": "Variable name exactly as it appears in the agent context (e.g. 'firstName', 'leadId')",
            "maxLength": 255
          },
          "description": {
            "type": "string",
            "description": "What this variable represents and its expected format / type. Example: \"The user's date of birth on file, in YYYY-MM-DD format\""
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          }
        },
        "required": [
          "description",
          "name"
        ]
      },
      "AIAgentHistory": {
        "type": "object",
        "description": "A single AIAgent version: versioned concrete fields + resolved related collections.\n\nManifests store child ``history_id`` lists (tools/dynamic vars) and uploaded-file ids\n(kb). The values are resolved on read. Use ``build_context()`` to batch the resolution\nacross a page of records and pass it as the serializer context (avoids N+1).",
        "properties": {
          "history_id": {
            "type": "integer",
            "readOnly": true
          },
          "history_date": {
            "type": "string",
            "format": "date-time"
          },
          "history_type": {
            "enum": [
              "+",
              "~",
              "-"
            ],
            "type": "string",
            "description": "* `+` - Created\n* `~` - Changed\n* `-` - Deleted",
            "x-spec-enum-id": "c2e35addebb4f5da"
          },
          "history_change_reason": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 100
          },
          "history_user": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/UserInline"
              },
              {
                "type": "null"
              }
            ],
            "readOnly": true
          },
          "version_id": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 12
          },
          "version_name": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255
          },
          "id": {
            "type": "integer",
            "maximum": 9223372036854776000,
            "minimum": -9223372036854776000,
            "format": "int64"
          },
          "agent_name": {
            "type": "string",
            "description": "Name of the AI agent.\nExample: `\"Customer Service Bot\"` or `\"Sales Assistant\"`",
            "maxLength": 255
          },
          "language": {
            "enum": [
              "af",
              "ar",
              "bn",
              "bg",
              "zh",
              "cs",
              "da",
              "nl",
              "en",
              "et",
              "fi",
              "fr",
              "de",
              "el",
              "gu",
              "hi",
              "he",
              "hu",
              "id",
              "it",
              "ja",
              "kn",
              "ko",
              "ms",
              "ml",
              "mr",
              "multi",
              "no",
              "pl",
              "pa",
              "pt",
              "ro",
              "ru",
              "sk",
              "es",
              "sv",
              "th",
              "tr",
              "tl",
              "ta",
              "te",
              "uk",
              "vi"
            ],
            "type": "string",
            "x-spec-enum-id": "b822ad429c7b7fec",
            "description": "Primary language for this agent.\nExample: `\"en\"` or `\"es\"`\n\n* `af` - Afrikaans\n* `ar` - Arabic\n* `bn` - Bengali\n* `bg` - Bulgarian\n* `zh` - Chinese Simplified\n* `cs` - Czech\n* `da` - Danish\n* `nl` - Dutch\n* `en` - English\n* `et` - Estonian\n* `fi` - Finnish\n* `fr` - French\n* `de` - German\n* `el` - Greek\n* `gu` - Gujarati\n* `hi` - Hindi\n* `he` - Hebrew\n* `hu` - Hungarian\n* `id` - Indonesian\n* `it` - Italian\n* `ja` - Japanese\n* `kn` - Kannada\n* `ko` - Korean\n* `ms` - Malay\n* `ml` - Malayalam\n* `mr` - Marathi\n* `multi` - Multilingual\n* `no` - Norwegian\n* `pl` - Polish\n* `pa` - Punjabi\n* `pt` - Portuguese\n* `ro` - Romanian\n* `ru` - Russian\n* `sk` - Slovak\n* `es` - Spanish\n* `sv` - Swedish\n* `th` - Thai\n* `tr` - Turkish\n* `tl` - Tagalog\n* `ta` - Tamil\n* `te` - Telugu\n* `uk` - Ukrainian\n* `vi` - Vietnamese"
          },
          "description": {
            "type": "string",
            "description": "Description of the agent's purpose and capabilities.\nExample: `\"AI agent for handling customer support inquiries and resolving technical issues\"`"
          },
          "mock_tools": {
            "type": "string",
            "readOnly": true
          },
          "dynamic_variables": {
            "type": "string",
            "readOnly": true
          },
          "knowledge_base_files": {
            "type": "string",
            "readOnly": true
          }
        },
        "required": [
          "agent_name",
          "history_date",
          "history_type"
        ]
      },
      "AIAgentList": {
        "type": "object",
        "description": "",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "agent_name": {
            "type": "string",
            "description": "Name of the AI agent.\nExample: `\"Customer Service Bot\"` or `\"Sales Assistant\"`",
            "maxLength": 255
          },
          "project": {
            "type": [
              "integer",
              "null"
            ]
          },
          "organization": {
            "type": "integer"
          },
          "contact_number": {
            "type": "string",
            "description": "\nPhone number assigned to this agent for calls (must start with + followed by digits, min 8 chars)\nExample: `\"+1234567890\"`\n",
            "pattern": "^\\+\\d*$",
            "maxLength": 30,
            "minLength": 8
          },
          "inbound": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Whether this agent handles inbound calls.\n- If true, our agent will call you on above number.\n- If false, your agent will have to call our agent.\n\nExample: `true` or `false`\n"
          },
          "language": {
            "enum": [
              "af",
              "ar",
              "bn",
              "bg",
              "zh",
              "cs",
              "da",
              "nl",
              "en",
              "et",
              "fi",
              "fr",
              "de",
              "el",
              "gu",
              "hi",
              "he",
              "hu",
              "id",
              "it",
              "ja",
              "kn",
              "ko",
              "ms",
              "ml",
              "mr",
              "multi",
              "no",
              "pl",
              "pa",
              "pt",
              "ro",
              "ru",
              "sk",
              "es",
              "sv",
              "th",
              "tr",
              "tl",
              "ta",
              "te",
              "uk",
              "vi"
            ],
            "type": "string",
            "x-spec-enum-id": "b822ad429c7b7fec",
            "description": "Primary language for this agent.\nExample: `\"en\"` or `\"es\"`\n\n* `af` - Afrikaans\n* `ar` - Arabic\n* `bn` - Bengali\n* `bg` - Bulgarian\n* `zh` - Chinese Simplified\n* `cs` - Czech\n* `da` - Danish\n* `nl` - Dutch\n* `en` - English\n* `et` - Estonian\n* `fi` - Finnish\n* `fr` - French\n* `de` - German\n* `el` - Greek\n* `gu` - Gujarati\n* `hi` - Hindi\n* `he` - Hebrew\n* `hu` - Hungarian\n* `id` - Indonesian\n* `it` - Italian\n* `ja` - Japanese\n* `kn` - Kannada\n* `ko` - Korean\n* `ms` - Malay\n* `ml` - Malayalam\n* `mr` - Marathi\n* `multi` - Multilingual\n* `no` - Norwegian\n* `pl` - Polish\n* `pa` - Punjabi\n* `pt` - Portuguese\n* `ro` - Romanian\n* `ru` - Russian\n* `sk` - Slovak\n* `es` - Spanish\n* `sv` - Swedish\n* `th` - Thai\n* `tr` - Turkish\n* `tl` - Tagalog\n* `ta` - Tamil\n* `te` - Telugu\n* `uk` - Ukrainian\n* `vi` - Vietnamese"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true,
            "description": "When this record was created.\nExample: `2024-03-15T10:30:45Z`"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true,
            "description": "When this record was last updated.\nExample: `2024-03-15T10:35:11Z`"
          },
          "agent_gives_first_message": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Whether the main agent (not the testing agent) will give the first message. True = agent speaks first (testing agent won't generate a first message). False = testing agent speaks first (first message will be generated). None = preference not yet set."
          }
        },
        "required": [
          "agent_name",
          "organization"
        ]
      },
      "AIAgentRestoreRequest": {
        "type": "object",
        "properties": {
          "history_id": {
            "type": "integer"
          }
        },
        "required": [
          "history_id"
        ]
      },
      "AIAgentTestProfile": {
        "type": "object",
        "description": "",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "project": {
            "type": [
              "integer",
              "null"
            ]
          },
          "agent": {
            "type": [
              "integer",
              "null"
            ]
          },
          "agent_name": {
            "type": "string",
            "readOnly": true,
            "description": "\nName of the agent associated with this test profile\nExample: `\"Customer Support Agent\"`\n"
          },
          "name": {
            "type": "string",
            "maxLength": 255
          },
          "information": {
            "description": "\nVariables for the test profile, split by which agent receives them.\n```json\n{\n    \"main_agent_variables\": {\"user_id\": \"U-123\"},\n    \"testing_agent_variables\": {\"user_name\": \"John Doe\", \"user_email\": \"john.doe@example.com\"}\n}\n```\n`main_agent_variables` are sent to the agent under test as dynamic variables. `testing_agent_variables` shape the simulated caller's persona. A legacy flat dict (no section keys) is accepted for backward compatibility and is sent to both agents.\n\nKeys in `main_agent_variables` starting with `X-` are additionally sent as custom SIP headers (SIP runs) or connection headers (WebSocket runs) to the agent under test. For SIP runs this is the only way to pass custom headers; `X-Run-Id`, `X-Scenario-Id`, and `X-Result-Id` are reserved and always set by Cekura.\n"
          },
          "created_by": {
            "type": "integer",
            "readOnly": true,
            "description": "ID of the user who created this test profile"
          },
          "last_updated_by": {
            "type": "integer",
            "readOnly": true,
            "description": "ID of the user who last updated this test profile"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true,
            "description": "Timestamp when the test profile was created"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true,
            "description": "Timestamp when the test profile was last updated"
          }
        },
        "required": [
          "name"
        ]
      },
      "AIAgentTestProfileList": {
        "type": "object",
        "description": "List variant that also embeds the scenarios attached to each profile.\n\nOnly used by `TestProfileViewSet.list` — retrieve/create/update and any\nnested usage (e.g. `ScenarioSerializer.test_profile_data`) should keep\nusing `AIAgentTestProfileSerializer`.",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "project": {
            "type": [
              "integer",
              "null"
            ]
          },
          "agent": {
            "type": [
              "integer",
              "null"
            ]
          },
          "agent_name": {
            "type": "string",
            "readOnly": true,
            "description": "\nName of the agent associated with this test profile\nExample: `\"Customer Support Agent\"`\n"
          },
          "name": {
            "type": "string",
            "maxLength": 255
          },
          "information": {
            "description": "\nVariables for the test profile, split by which agent receives them.\n```json\n{\n    \"main_agent_variables\": {\"user_id\": \"U-123\"},\n    \"testing_agent_variables\": {\"user_name\": \"John Doe\", \"user_email\": \"john.doe@example.com\"}\n}\n```\n`main_agent_variables` are sent to the agent under test as dynamic variables. `testing_agent_variables` shape the simulated caller's persona. A legacy flat dict (no section keys) is accepted for backward compatibility and is sent to both agents.\n\nKeys in `main_agent_variables` starting with `X-` are additionally sent as custom SIP headers (SIP runs) or connection headers (WebSocket runs) to the agent under test. For SIP runs this is the only way to pass custom headers; `X-Run-Id`, `X-Scenario-Id`, and `X-Result-Id` are reserved and always set by Cekura.\n"
          },
          "created_by": {
            "type": "integer",
            "readOnly": true,
            "description": "ID of the user who created this test profile"
          },
          "last_updated_by": {
            "type": "integer",
            "readOnly": true,
            "description": "ID of the user who last updated this test profile"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true,
            "description": "Timestamp when the test profile was created"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true,
            "description": "Timestamp when the test profile was last updated"
          },
          "scenarios": {
            "type": "string",
            "readOnly": true,
            "description": "List of scenarios using this test profile"
          }
        },
        "required": [
          "name"
        ]
      },
      "AIAgentV2": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true,
            "description": "Agent ID.\nExample: `2142`"
          },
          "name": {
            "type": "string",
            "description": "Agent name. Optional when configure_from_provider is set — it's fetched from the provider.",
            "maxLength": 255
          },
          "description": {
            "type": "string",
            "description": "\nA detailed description of what this agent does and how it should interact\nExample: \n```text\nAI agent for handling customer support inquiries and resolving technical issues\n```\n"
          },
          "project": {
            "type": "integer",
            "description": "The project this agent belongs to"
          },
          "language": {
            "enum": [
              "af",
              "ar",
              "bn",
              "bg",
              "zh",
              "cs",
              "da",
              "nl",
              "en",
              "et",
              "fi",
              "fr",
              "de",
              "el",
              "gu",
              "hi",
              "he",
              "hu",
              "id",
              "it",
              "ja",
              "kn",
              "ko",
              "ms",
              "ml",
              "mr",
              "multi",
              "no",
              "pl",
              "pa",
              "pt",
              "ro",
              "ru",
              "sk",
              "es",
              "sv",
              "th",
              "tr",
              "tl",
              "ta",
              "te",
              "uk",
              "vi"
            ],
            "type": "string",
            "x-spec-enum-id": "b822ad429c7b7fec",
            "default": "en",
            "description": "\nThe primary language this agent uses for communication (e.g. 'en' for English)\n\n\n* `af` - Afrikaans\n* `ar` - Arabic\n* `bn` - Bengali\n* `bg` - Bulgarian\n* `zh` - Chinese Simplified\n* `cs` - Czech\n* `da` - Danish\n* `nl` - Dutch\n* `en` - English\n* `et` - Estonian\n* `fi` - Finnish\n* `fr` - French\n* `de` - German\n* `el` - Greek\n* `gu` - Gujarati\n* `hi` - Hindi\n* `he` - Hebrew\n* `hu` - Hungarian\n* `id` - Indonesian\n* `it` - Italian\n* `ja` - Japanese\n* `kn` - Kannada\n* `ko` - Korean\n* `ms` - Malay\n* `ml` - Malayalam\n* `mr` - Marathi\n* `multi` - Multilingual\n* `no` - Norwegian\n* `pl` - Polish\n* `pa` - Punjabi\n* `pt` - Portuguese\n* `ro` - Romanian\n* `ru` - Russian\n* `sk` - Slovak\n* `es` - Spanish\n* `sv` - Swedish\n* `th` - Thai\n* `tr` - Turkish\n* `tl` - Tagalog\n* `ta` - Tamil\n* `te` - Telugu\n* `uk` - Ukrainian\n* `vi` - Vietnamese"
          },
          "telephony": {
            "allOf": [
              {
                "$ref": "#/components/schemas/AgentTelephony"
              }
            ],
            "readOnly": true,
            "description": "Phone and SIP/websocket channel configuration."
          },
          "provider": {
            "allOf": [
              {
                "$ref": "#/components/schemas/AgentProvider"
              }
            ],
            "readOnly": true,
            "description": "AI platform integration (provider type, agent id, credential status, chat config)."
          },
          "agent_speaks_first": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "True = agent speaks first; False = test user speaks first; null = auto-detect."
          },
          "predefined_metrics": {
            "writeOnly": true,
            "description": "predefined metrics to use for the agent"
          },
          "knowledge_base_files": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/KnowledgeBaseFile"
            },
            "readOnly": true,
            "description": "Knowledge base files attached to the agent."
          },
          "enabled_personalities": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "readOnly": true,
            "description": "\nPersonality profiles enabled for this agent\nExample: `[1, 2, 3]`\n"
          },
          "webhook_url": {
            "type": "string",
            "format": "uri",
            "description": "Webhook URL for this agent. When set, overrides the project-level webhook URL for events from this agent."
          },
          "webhook_secret": {
            "type": "string",
            "writeOnly": true,
            "description": "Secret sent in X-CEKURA-SECRET header. Applies when agent webhook_url is set. Write-only — never returned in API responses. Use `webhook_secret_configured` to check whether one is set."
          },
          "webhook_secret_configured": {
            "type": "string",
            "readOnly": true
          },
          "mock_tools": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AgentMockToolRead"
            },
            "readOnly": true,
            "description": "Mock tools registered on the agent, each with its mock data and runtime access (served_via)."
          },
          "mock_tools_enabled": {
            "type": "boolean",
            "description": "Whether mock tools should be selected by default when configuring a run."
          },
          "mock_tools_provider": {
            "type": [
              "string",
              "null"
            ],
            "readOnly": true,
            "description": "Provider the mock tools were fetched from (vapi, retell, elevenlabs, custom). Null until auto-fetch has been run."
          },
          "dynamic_variables": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AgentDynamicVariableRead"
            },
            "readOnly": true,
            "description": "Dynamic variable definitions for the agent, ordered by name."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true,
            "description": "\nTimestamp when the agent was created\nExample: `\"2021-01-01T00:00:00Z\"`\n"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true,
            "description": "\nTimestamp when the agent was last updated\nExample: `\"2021-01-01T00:00:00Z\"`\n"
          },
          "email_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "email",
            "description": "Email address this agent receives at. When set, enables email-based test runs.",
            "maxLength": 254
          }
        },
        "required": [
          "description"
        ]
      },
      "ActiveMessageStatus": {
        "type": "object",
        "description": "Slim status view of a conversation's latest assistant message.\n\nUsed by the polling recovery endpoint: carries just enough for the client\nto converge on server truth after a dropped SSE stream — the run status,\nthe (possibly partial) content, and any error. Clarification chips are\nsurfaced only while the turn is parked awaiting a reply, so routine polls\nof streaming/terminal turns stay small (no tool-call audit trail, etc.).",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "status": {
            "enum": [
              "complete",
              "streaming",
              "failed",
              "cancelled",
              "needs_clarification"
            ],
            "type": "string",
            "description": "* `complete` - Complete\n* `streaming` - Streaming\n* `failed` - Failed\n* `cancelled` - Cancelled\n* `needs_clarification` - Needs Clarification",
            "x-spec-enum-id": "c5be2d08d42db9aa",
            "readOnly": true
          },
          "content": {
            "type": "string",
            "readOnly": true
          },
          "error": {
            "type": "string",
            "readOnly": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          }
        }
      },
      "AgentAutoFetchErrorResponse": {
        "type": "object",
        "properties": {
          "detail": {
            "type": "string"
          }
        },
        "required": [
          "detail"
        ]
      },
      "AgentAutoFetchProgressErrorResponse": {
        "type": "object",
        "properties": {
          "detail": {
            "type": "string"
          }
        },
        "required": [
          "detail"
        ]
      },
      "AgentAutoFetchProgressResponse": {
        "type": "object",
        "properties": {
          "agent_id": {
            "type": "integer"
          },
          "status": {
            "enum": [
              "in_progress",
              "completed",
              "failed"
            ],
            "type": "string",
            "description": "* `in_progress` - in_progress\n* `completed` - completed\n* `failed` - failed",
            "x-spec-enum-id": "6e9575e5767aaee0"
          },
          "current_stage": {
            "type": "string"
          },
          "stages": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": {}
            }
          },
          "error": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "agent_id",
          "current_stage",
          "error",
          "stages",
          "status"
        ]
      },
      "AgentAutoFetchResponse": {
        "type": "object",
        "properties": {
          "progress_id": {
            "type": "string"
          }
        },
        "required": [
          "progress_id"
        ]
      },
      "AgentCredentials": {
        "type": "object",
        "description": "Nested credentials block inside the provider object.",
        "properties": {
          "api_key": {
            "type": "string",
            "writeOnly": true,
            "description": "API key or client secret for the provider (write-only — never returned). Required for: vapi, retell, elevenlabs, bland, livekit, pipecat, synthflow. koreai uses client_secret (passed as api_key). Not needed for: cisco, self_hosted."
          },
          "config": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ProviderCredentialsConfig"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "AgentDynamicVariableRead": {
        "type": "object",
        "description": "One dynamic variable in the v2 agent response (`dynamic_variables[]`).",
        "properties": {
          "id": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          }
        },
        "required": [
          "description",
          "id",
          "name"
        ]
      },
      "AgentDynamicVariableWrite": {
        "type": "object",
        "description": "One dynamic variable entry in the v2 agent write payload (request side of `dynamic_variables`).",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Ignored on write — variables are matched by name."
          },
          "name": {
            "type": "string",
            "description": "Variable name exactly as it appears in the agent context.",
            "maxLength": 255
          },
          "description": {
            "type": "string",
            "description": "What the variable represents and its expected format."
          }
        },
        "required": [
          "description",
          "name"
        ]
      },
      "AgentImprovementSession": {
        "type": "object",
        "description": "Read view of an Improve-Agent session — what the frontend polls to\ntrack progress. `provider_key` and other secrets are never serialized.",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "project": {
            "type": "integer",
            "readOnly": true
          },
          "agent": {
            "type": [
              "integer",
              "null"
            ],
            "readOnly": true
          },
          "provider": {
            "type": "string",
            "readOnly": true
          },
          "source": {
            "enum": [
              "call_log",
              "scenario",
              "run"
            ],
            "type": "string",
            "description": "* `call_log` - Call Log\n* `scenario` - Scenario\n* `run` - Run",
            "x-spec-enum-id": "7a464211ef729f6c",
            "readOnly": true
          },
          "insights": {
            "readOnly": true
          },
          "call_log_ids": {
            "readOnly": true
          },
          "run_ids": {
            "readOnly": true
          },
          "scenario_ids": {
            "readOnly": true
          },
          "clone_assistant_id": {
            "type": "string",
            "readOnly": true
          },
          "scenario_validation_result_ids": {
            "readOnly": true
          },
          "current_phase": {
            "type": "string",
            "readOnly": true
          },
          "status": {
            "enum": [
              "pending",
              "running",
              "succeeded",
              "failed",
              "cancelled"
            ],
            "type": "string",
            "description": "* `pending` - Pending\n* `running` - Running\n* `succeeded` - Succeeded\n* `failed` - Failed\n* `cancelled` - Cancelled",
            "x-spec-enum-id": "ea8144caab6e77c3",
            "readOnly": true
          },
          "conversation_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "readOnly": true
          },
          "message_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "readOnly": true
          },
          "error_message": {
            "type": "string",
            "readOnly": true
          },
          "reproduction_summary": {
            "readOnly": true
          },
          "summary_json": {
            "readOnly": true
          },
          "slack_notification_status": {
            "enum": [
              "not_attempted",
              "sending",
              "sent",
              "skipped_no_channel",
              "failed"
            ],
            "type": "string",
            "description": "* `not_attempted` - Not Attempted\n* `sending` - Sending\n* `sent` - Sent\n* `skipped_no_channel` - Skipped No Channel\n* `failed` - Failed",
            "x-spec-enum-id": "f90ffa468a33b565",
            "readOnly": true
          },
          "routed_to": {
            "type": "string",
            "readOnly": true
          },
          "slack_channel_id": {
            "type": "string",
            "readOnly": true
          },
          "slack_message_ts": {
            "type": "string",
            "readOnly": true
          },
          "slack_message_text": {
            "type": "string",
            "readOnly": true
          },
          "slack_error": {
            "type": "string",
            "readOnly": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          }
        }
      },
      "AgentKnowledgeBaseFileWrite": {
        "type": "object",
        "description": "One knowledge base file entry in the v2 agent write payload (request side of `knowledge_base_files`).",
        "properties": {
          "id": {
            "type": "integer",
            "description": "ID of an existing file to keep. Files omitted from the list are deleted."
          },
          "file_name": {
            "type": "string",
            "description": "Name for a new file, including extension (pdf, txt, json, csv, xml, md)."
          },
          "name": {
            "type": "string",
            "description": "Alias for file_name."
          },
          "content_base64": {
            "type": "string",
            "description": "Base64-encoded content for a new file. A data-URI prefix is accepted."
          }
        }
      },
      "AgentMockToolRead": {
        "type": "object",
        "description": "One mock tool in the v2 agent response (`mock_tools[]`).",
        "properties": {
          "id": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "mock_data": {
            "description": "List of {input, output} mappings returned when the tool is called in mock mode."
          },
          "served_via": {
            "$ref": "#/components/schemas/AgentMockToolServedVia"
          },
          "mcp_server": {
            "oneOf": [
              {},
              {
                "type": "null"
              }
            ],
            "description": "MCP server this tool was fetched from, as {name, key}. Null for standalone tools. Server-managed — ignored on writes."
          }
        },
        "required": [
          "description",
          "id",
          "mock_data",
          "name",
          "served_via"
        ]
      },
      "AgentMockToolServedVia": {
        "type": "object",
        "description": "How a mock tool is reached at runtime (response side of `mock_tools[].served_via`).",
        "properties": {
          "type": {
            "enum": [
              "direct",
              "mcp"
            ],
            "type": "string",
            "x-spec-enum-id": "b34eaed2d733c895",
            "description": "'direct' = per-tool webhook URL; 'mcp' = served through the agent's MCP endpoint.\n\n* `direct` - direct\n* `mcp` - mcp"
          },
          "url": {
            "type": "string",
            "description": "Runtime URL the agent calls to reach this tool."
          },
          "mock_index": {
            "type": "integer",
            "description": "MCP endpoint index. Present only when type='mcp'."
          }
        },
        "required": [
          "type",
          "url"
        ]
      },
      "AgentMockToolServedViaWrite": {
        "type": "object",
        "description": "Runtime routing for a mock tool on write (request side of `mock_tools[].served_via`).",
        "properties": {
          "type": {
            "enum": [
              "direct",
              "mcp"
            ],
            "type": "string",
            "x-spec-enum-id": "b34eaed2d733c895",
            "default": "direct",
            "description": "'direct' = per-tool webhook URL (default). 'mcp' = served through an MCP endpoint; requires mock_index.\n\n* `direct` - direct\n* `mcp` - mcp"
          },
          "mock_index": {
            "type": "integer",
            "minimum": 1,
            "description": "MCP endpoint index (1-based). Tools sharing an index are served by the same MCP endpoint. Required when type='mcp'."
          }
        }
      },
      "AgentMockToolWrite": {
        "type": "object",
        "description": "One mock tool entry in the v2 agent write payload (request side of `mock_tools`).",
        "properties": {
          "id": {
            "type": "integer",
            "description": "ID of an existing mock tool to update. Omit to create a new tool (or update by matching name)."
          },
          "name": {
            "type": "string",
            "description": "Tool name. Required for new tools. Alphanumerics, underscores and hyphens only; under 64 characters.",
            "maxLength": 255
          },
          "description": {
            "type": "string",
            "description": "What the tool does."
          },
          "mock_data": {
            "description": "List of {input, output} mappings returned when the tool is called in mock mode."
          },
          "freetext_params": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Parameter names skipped during mock matching because they are free-text (e.g. [\"notes\", \"reason\"])."
          },
          "served_via": {
            "allOf": [
              {
                "$ref": "#/components/schemas/AgentMockToolServedViaWrite"
              }
            ],
            "description": "How the agent reaches this tool at runtime. Omit for a direct per-tool URL; set type='mcp' with a mock_index to group tools under a shared MCP endpoint."
          }
        }
      },
      "AgentProvider": {
        "type": "object",
        "properties": {
          "type": {
            "enum": [
              "vapi",
              "retell",
              "elevenlabs",
              "cisco",
              "bland",
              "livekit",
              "pipecat",
              "synthflow",
              "agora",
              "koreai",
              "genesys",
              "amazon_connect",
              "telnyx",
              "custom",
              ""
            ],
            "type": "string",
            "x-spec-enum-id": "3f5fcc0e5ae82793",
            "description": "Voice/inbound platform provider type. Valid values: vapi, retell, elevenlabs, bland, livekit, cisco, synthflow, koreai, genesys, amazon_connect, pipecat, custom. Use 'custom' (or omit) for chat-only agents with no voice provider — the chat channel goes in chat_agent_details.type. For a raw-PCM websocket voice agent you host yourself, use type='custom' and put the endpoint in telephony.websocket_url. Text-only channels (sms, whatsapp, agentforce, sierra) belong in chat_agent_details.type, not here.\n\n* `vapi` - Vapi\n* `retell` - Retell\n* `elevenlabs` - Elevenlabs\n* `cisco` - Cisco\n* `bland` - Bland\n* `livekit` - Livekit\n* `pipecat` - Pipecat\n* `synthflow` - Synthflow\n* `agora` - Agora\n* `koreai` - Koreai\n* `genesys` - Genesys\n* `amazon_connect` - Amazon Connect\n* `telnyx` - Telnyx\n* `custom` - Custom (chat-only, no voice provider)"
          },
          "agent_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Agent ID for voice/inbound runs on the provider's platform. For vapi, elevenlabs, retell, synthflow, and bland this is the voice agent ID (for bland it's the persona_id). Bland's pathway_id and retell's chat agent ID go in chat_agent_details.config.agent_id."
          },
          "credentials": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/AgentCredentials"
              },
              {
                "type": "null"
              }
            ]
          },
          "chat_agent_details": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ChatAgentDetails"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional chat/text-mode configuration. Defines which provider handles text-mode test runs. The allowed chat type depends on the voice provider.type."
          },
          "auto_dial_outbound": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Auto-dial the outbound number when running outbound scenarios. Supported for: vapi, retell, elevenlabs, bland, livekit."
          },
          "auto_import_calls": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Auto-import calls from the provider every 30s. Supported for: vapi, retell, elevenlabs."
          },
          "auto_sync_prompt": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Enable one-way prompt sync from the provider to Cekura on a schedule. Cekura re-fetches the provider prompt and updates the agent description; it does not push Cekura description changes back to the provider. Supported for: vapi, retell, elevenlabs, synthflow, telnyx, bland."
          },
          "send_post_conversation_metadata": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Enable Cekura to accept call transcripts pushed by your agent via POST /custom-provider-webhook/. Only for self-hosted (custom) providers."
          }
        }
      },
      "AgentTelephony": {
        "type": "object",
        "description": "Phone / SIP / websocket voice channel configuration for the agent.",
        "properties": {
          "phone_number": {
            "type": "string",
            "description": "E.164 phone number for inbound calls, e.g. +14155551234."
          },
          "inbound": {
            "type": "boolean",
            "default": false,
            "description": "True = agent receives inbound calls; False = outbound only."
          },
          "sip_uri": {
            "type": [
              "string",
              "null"
            ],
            "description": "SIP URI, e.g. sip:user@domain.com."
          },
          "sip_auth": {
            "oneOf": [
              {},
              {
                "type": "null"
              }
            ],
            "description": "SIP credentials: {username, password}."
          },
          "websocket_url": {
            "type": [
              "string",
              "null"
            ],
            "description": "Raw-PCM (16kHz 16-bit mono) websocket endpoint Cekura dials to run the whole call over a websocket you host, e.g. wss://your-host/voice."
          },
          "websocket_auth": {
            "oneOf": [
              {},
              {
                "type": "null"
              }
            ],
            "description": "HTTP Basic Auth credentials for the websocket upgrade: {username, password}."
          },
          "outbound_numbers": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Phone numbers authorized for outbound calls (E.164 format). Example: `[\"+14155551234\", \"+14155550000\"]`"
          }
        }
      },
      "AgentforceChatConfig": {
        "type": "object",
        "description": "Agentforce (Salesforce) chat configuration.",
        "properties": {
          "client_secret": {
            "type": "string",
            "description": "OAuth2 client secret for Salesforce authentication."
          },
          "client_id": {
            "type": "string",
            "description": "OAuth2 client ID for Salesforce authentication."
          },
          "domain": {
            "type": "string",
            "description": "Salesforce domain, e.g. https://example.sandbox.my.salesforce.com."
          },
          "agent_id": {
            "type": "string",
            "description": "Agentforce agent ID (0Xx...)."
          }
        },
        "required": [
          "agent_id",
          "client_id",
          "client_secret",
          "domain"
        ],
        "title": "Agentforce"
      },
      "AlertCreate": {
        "type": "object",
        "description": "",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "name": {
            "type": "string",
            "description": "Alert name",
            "maxLength": 255
          },
          "enabled": {
            "type": "boolean",
            "description": "Enable/disable alert"
          },
          "project": {
            "type": "integer",
            "description": "Project this alert belongs to"
          },
          "source_type": {
            "enum": [
              "metric"
            ],
            "type": "string",
            "x-spec-enum-id": "2713692dc60667c9",
            "description": "Type of data source: metric, duration, call_volume, etc.\n\n* `metric` - Metric"
          },
          "source_id": {
            "type": [
              "integer",
              "null"
            ],
            "maximum": 2147483647,
            "minimum": 0,
            "description": "ID of monitored object"
          },
          "source": {
            "description": "Source config keyed on `sub_type`. `normal`: {sub_type, filters?}. `significant_change`: {sub_type, window_size, filters?}. `threshold`: {sub_type, window_size, filters?}. `insight_new_mode`: {sub_type, min_calls?} — fires when a new failure mode is detected for the metric. `insight_uptick`: {sub_type, window_hours, baseline_hours} — fires when a failure mode's recent volume spikes vs its baseline. `filters` is an optional CallLogQueryFilter expression."
          },
          "threshold": {
            "description": "Threshold config keyed on the source's `sub_type`. `normal`: {} (fires on every failing eval). `significant_change`: {std_multiplier, ewma_alpha, direction}. `threshold`: {operator (gt|lt|outside), value (number | {low, high}), min_breaches}. `insight_new_mode`: {} (fires when a new failure mode appears). `insight_uptick`: {min_count, multiplier}."
          },
          "notifications": {
            "description": "Notification routing. `{slack: {workspace_id, channel_id?}}` to send to a specific workspace/channel. Empty fans out to every project workspace; empty + no project workspaces means the alert is silent."
          },
          "preset": {
            "enum": [
              "conservative",
              "balanced",
              "aggressive"
            ],
            "type": "string",
            "x-spec-enum-id": "a6fd953985219e0b",
            "writeOnly": true,
            "description": "Optional shorthand for trend alerts: 'conservative' | 'balanced' | 'aggressive'. Expands to std_multiplier / ewma_alpha / window_size. Explicit values in `source` or `threshold` override the preset. Ignored unless sub_type == 'significant_change'.\n\n* `conservative` - conservative\n* `balanced` - balanced\n* `aggressive` - aggressive"
          }
        },
        "required": [
          "name",
          "project",
          "source_type"
        ]
      },
      "AlertDetail": {
        "type": "object",
        "description": "Detailed serializer for alert retrieval",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "name": {
            "type": "string",
            "description": "Alert name",
            "maxLength": 255
          },
          "enabled": {
            "type": "boolean",
            "description": "Enable/disable alert"
          },
          "project": {
            "type": "integer",
            "description": "Project this alert belongs to"
          },
          "project_name": {
            "type": "string",
            "readOnly": true
          },
          "source_type": {
            "enum": [
              "metric"
            ],
            "type": "string",
            "x-spec-enum-id": "2713692dc60667c9",
            "description": "Type of data source: metric, duration, call_volume, etc.\n\n* `metric` - Metric"
          },
          "source_id": {
            "type": [
              "integer",
              "null"
            ],
            "maximum": 2147483647,
            "minimum": 0,
            "description": "ID of monitored object"
          },
          "source_object_name": {
            "type": "string",
            "readOnly": true
          },
          "source_object_details": {
            "type": "object",
            "additionalProperties": {},
            "description": "Get basic details about the source object",
            "readOnly": true
          },
          "source": {
            "description": "Source config keyed on `sub_type`. `normal`: {sub_type, filters?}. `significant_change`: {sub_type, window_size, filters?}. `threshold`: {sub_type, window_size, filters?}. `insight_new_mode`: {sub_type, min_calls?} — fires when a new failure mode is detected for the metric. `insight_uptick`: {sub_type, window_hours, baseline_hours} — fires when a failure mode's recent volume spikes vs its baseline. `filters` is an optional CallLogQueryFilter expression."
          },
          "threshold": {
            "description": "Threshold config keyed on the source's `sub_type`. `normal`: {} (fires on every failing eval). `significant_change`: {std_multiplier, ewma_alpha, direction}. `threshold`: {operator (gt|lt|outside), value (number | {low, high}), min_breaches}. `insight_new_mode`: {} (fires when a new failure mode appears). `insight_uptick`: {min_count, multiplier}."
          },
          "notifications": {
            "description": "Notification routing. `{slack: {workspace_id, channel_id?}}` to send to a specific workspace/channel. Empty fans out to every project workspace; empty + no project workspaces means the alert is silent."
          },
          "last_triggered_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "readOnly": true,
            "description": "Last trigger timestamp"
          },
          "trigger_count": {
            "type": "integer",
            "readOnly": true,
            "description": "Total triggers count"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "last_updated_by": {
            "type": [
              "integer",
              "null"
            ],
            "readOnly": true,
            "description": "User who last updated this alert"
          },
          "last_updated_by_email": {
            "type": "string",
            "readOnly": true
          }
        },
        "required": [
          "name",
          "project",
          "source_type"
        ]
      },
      "AlertList": {
        "type": "object",
        "description": "Lightweight serializer for alert listing",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "name": {
            "type": "string",
            "description": "Alert name",
            "maxLength": 255
          },
          "enabled": {
            "type": "boolean",
            "description": "Enable/disable alert"
          },
          "project": {
            "type": "integer",
            "description": "Project this alert belongs to"
          },
          "source_type": {
            "enum": [
              "metric"
            ],
            "type": "string",
            "x-spec-enum-id": "2713692dc60667c9",
            "description": "Type of data source: metric, duration, call_volume, etc.\n\n* `metric` - Metric"
          },
          "source_id": {
            "type": [
              "integer",
              "null"
            ],
            "maximum": 2147483647,
            "minimum": 0,
            "description": "ID of monitored object"
          },
          "source_object_name": {
            "type": "string",
            "readOnly": true
          },
          "source_object_eval_type": {
            "type": "string",
            "readOnly": true
          },
          "source": {
            "description": "Source config keyed on `sub_type`. `normal`: {sub_type, filters?}. `significant_change`: {sub_type, window_size, filters?}. `threshold`: {sub_type, window_size, filters?}. `insight_new_mode`: {sub_type, min_calls?} — fires when a new failure mode is detected for the metric. `insight_uptick`: {sub_type, window_hours, baseline_hours} — fires when a failure mode's recent volume spikes vs its baseline. `filters` is an optional CallLogQueryFilter expression."
          },
          "threshold": {
            "description": "Threshold config keyed on the source's `sub_type`. `normal`: {} (fires on every failing eval). `significant_change`: {std_multiplier, ewma_alpha, direction}. `threshold`: {operator (gt|lt|outside), value (number | {low, high}), min_breaches}. `insight_new_mode`: {} (fires when a new failure mode appears). `insight_uptick`: {min_count, multiplier}."
          },
          "notifications": {
            "description": "Notification routing. `{slack: {workspace_id, channel_id?}}` to send to a specific workspace/channel. Empty fans out to every project workspace; empty + no project workspaces means the alert is silent."
          },
          "trigger_count": {
            "type": "integer",
            "readOnly": true,
            "description": "Total triggers count"
          },
          "last_triggered_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "readOnly": true,
            "description": "Last trigger timestamp"
          },
          "last_triggered_at_formatted": {
            "type": "string",
            "description": "Return human-readable last triggered time",
            "readOnly": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          }
        },
        "required": [
          "name",
          "project",
          "source_type"
        ]
      },
      "AlertUpdate": {
        "type": "object",
        "description": "",
        "properties": {
          "name": {
            "type": "string",
            "description": "Alert name",
            "maxLength": 255
          },
          "enabled": {
            "type": "boolean",
            "description": "Enable/disable alert"
          },
          "source": {
            "description": "Source config keyed on `sub_type`. `normal`: {sub_type, filters?}. `significant_change`: {sub_type, window_size, filters?}. `threshold`: {sub_type, window_size, filters?}. `insight_new_mode`: {sub_type, min_calls?} — fires when a new failure mode is detected for the metric. `insight_uptick`: {sub_type, window_hours, baseline_hours} — fires when a failure mode's recent volume spikes vs its baseline. `filters` is an optional CallLogQueryFilter expression."
          },
          "threshold": {
            "description": "Threshold config keyed on the source's `sub_type`. `normal`: {} (fires on every failing eval). `significant_change`: {std_multiplier, ewma_alpha, direction}. `threshold`: {operator (gt|lt|outside), value (number | {low, high}), min_breaches}. `insight_new_mode`: {} (fires when a new failure mode appears). `insight_uptick`: {min_count, multiplier}."
          },
          "notifications": {
            "description": "Notification routing. `{slack: {workspace_id, channel_id?}}` to send to a specific workspace/channel. Empty fans out to every project workspace; empty + no project workspaces means the alert is silent."
          },
          "preset": {
            "enum": [
              "conservative",
              "balanced",
              "aggressive"
            ],
            "type": "string",
            "x-spec-enum-id": "a6fd953985219e0b",
            "writeOnly": true,
            "description": "Optional shorthand for trend alerts: 'conservative' | 'balanced' | 'aggressive'. Expands to std_multiplier / ewma_alpha / window_size. Explicit values in `source` or `threshold` override the preset. Ignored unless the alert's sub_type == 'significant_change'.\n\n* `conservative` - conservative\n* `balanced` - balanced\n* `aggressive` - aggressive"
          }
        },
        "required": [
          "name"
        ]
      },
      "AmazonConnectChatConfig": {
        "type": "object",
        "description": "Amazon Connect chat-widget configuration.",
        "properties": {
          "widget_id": {
            "type": "string",
            "description": "Chat-widget UUID from the Amazon Connect console."
          },
          "snippet_id": {
            "type": "string",
            "description": "Base64-encoded KMS snippet from your Amazon Connect chat widget."
          },
          "connect_host": {
            "type": "string",
            "description": "Amazon Connect instance host, e.g. acme.my.connect.aws."
          },
          "region": {
            "type": "string",
            "description": "AWS region for the Connect instance. Defaults to us-east-1."
          }
        },
        "required": [
          "connect_host",
          "snippet_id",
          "widget_id"
        ]
      },
      "AmazonConnectConfig": {
        "type": "object",
        "description": "Amazon Connect provider configuration.",
        "properties": {
          "widget_id": {
            "type": "string",
            "description": "Chat widget UUID from the Amazon Connect console."
          },
          "snippet_id": {
            "type": "string",
            "description": "Base64-encoded KMS snippet from your Amazon Connect chat widget."
          },
          "connect_host": {
            "type": "string",
            "description": "Amazon Connect instance host, e.g. acme.my.connect.aws."
          },
          "region": {
            "type": "string",
            "description": "AWS region for the Connect instance. Defaults to us-east-1."
          }
        }
      },
      "ApiChatFinish": {
        "type": "object",
        "description": "Request body for POST /runs/{run_id}/end-chat/ (finish the chat).",
        "properties": {
          "reason": {
            "type": "string",
            "description": "Optional end reason, e.g. 'main_agent_ended_call'."
          }
        }
      },
      "ApiChatFinishResponse": {
        "type": "object",
        "description": "Response for POST /runs/{run_id}/end-chat/.",
        "properties": {
          "run_id": {
            "type": "integer"
          },
          "result_id": {
            "type": "integer"
          },
          "status": {
            "type": "string"
          }
        },
        "required": [
          "result_id",
          "run_id",
          "status"
        ]
      },
      "ApiChatTurn": {
        "type": "object",
        "description": "Request body for POST /runs/{run_id}/chat/ (submit one turn). Same message shape\nas the websocket chat integration: a normal message (`content`), optional `metadata`\nmerged into the run, and/or a function call (`role` + `data`).",
        "properties": {
          "content": {
            "type": "string",
            "description": "Your agent-under-test's latest message. Submitting it returns a `turn_id`; poll GET /runs/{run_id}/chat/{turn_id}/ for the simulated user's reply."
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {},
            "description": "Optional metadata merged into the run (last-write-wins). Can be sent alone."
          },
          "role": {
            "enum": [
              "Function Call",
              "Function Call Result"
            ],
            "type": "string",
            "x-spec-enum-id": "96979c0bc176b860",
            "description": "Set to record a tool call instead of a message (no reply is generated).\n\n* `Function Call` - Function Call\n* `Function Call Result` - Function Call Result"
          },
          "data": {
            "type": "object",
            "additionalProperties": {},
            "description": "Function-call payload: {id, name, arguments} for a call, {id, result} for a result."
          }
        }
      },
      "ApiChatTurnPollResponse": {
        "type": "object",
        "description": "Response for GET /runs/{run_id}/chat/{turn_id}/ (poll for the reply).",
        "properties": {
          "run_id": {
            "type": "integer"
          },
          "result_id": {
            "type": "integer"
          },
          "turn_id": {
            "type": "integer"
          },
          "status": {
            "type": "string",
            "description": "'generating' until ready, then 'ready' (or 'error')."
          },
          "message": {
            "type": [
              "string",
              "null"
            ],
            "description": "The simulated user's reply; null until status is 'ready'."
          },
          "ended": {
            "type": "boolean",
            "description": "True when the conversation has ended."
          },
          "ended_reason": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "ended",
          "ended_reason",
          "message",
          "result_id",
          "run_id",
          "status",
          "turn_id"
        ]
      },
      "ApiChatTurnSubmitResponse": {
        "type": "object",
        "description": "Response for POST /runs/{run_id}/chat/ (turn accepted).",
        "properties": {
          "run_id": {
            "type": "integer"
          },
          "result_id": {
            "type": "integer"
          },
          "turn_id": {
            "type": "integer",
            "description": "Poll this turn for the simulated user's reply."
          },
          "status": {
            "type": "string",
            "description": "Turn status; poll for the reply if 'generating'."
          }
        },
        "required": [
          "result_id",
          "run_id",
          "status",
          "turn_id"
        ]
      },
      "AskAboutFailuresReportsRequest": {
        "type": "object",
        "properties": {
          "result_ids": {
            "type": "string",
            "description": "Comma-separated list of result IDs"
          },
          "question": {
            "type": "string",
            "description": "Natural language question about failures"
          }
        },
        "required": [
          "question",
          "result_ids"
        ]
      },
      "AskAboutFailuresRequest": {
        "type": "object",
        "properties": {
          "question": {
            "type": "string",
            "description": "Natural language question about test failures",
            "maxLength": 2000
          }
        },
        "required": [
          "question"
        ]
      },
      "AuditLog": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "organization": {
            "type": [
              "integer",
              "null"
            ],
            "readOnly": true,
            "description": "Organization this audit log belongs to"
          },
          "organization_name": {
            "type": [
              "string",
              "null"
            ],
            "readOnly": true
          },
          "project": {
            "type": [
              "integer",
              "null"
            ],
            "readOnly": true,
            "description": "Project this audit log belongs to (if applicable)"
          },
          "project_name": {
            "type": [
              "string",
              "null"
            ],
            "readOnly": true
          },
          "user": {
            "type": [
              "integer",
              "null"
            ],
            "readOnly": true,
            "description": "User who performed the action (if authenticated user request)"
          },
          "user_email": {
            "type": [
              "string",
              "null"
            ],
            "readOnly": true
          },
          "api_key_name": {
            "type": [
              "string",
              "null"
            ],
            "readOnly": true
          },
          "action_type": {
            "enum": [
              "object",
              "run_scenarios",
              "run_scenarios_text",
              "generate_scenarios",
              "observability",
              null
            ],
            "type": [
              "string",
              "null"
            ],
            "x-spec-enum-id": "cf4776ff93c477b3",
            "readOnly": true,
            "description": "Type of action performed\n\n* `object` - Object\n* `run_scenarios` - Run Scenarios\n* `run_scenarios_text` - Run Scenarios Text\n* `generate_scenarios` - Generate Scenarios\n* `observability` - Observability"
          },
          "operation_type": {
            "enum": [
              "create",
              "update",
              "delete",
              null
            ],
            "type": [
              "string",
              "null"
            ],
            "x-spec-enum-id": "776deda675315ff7",
            "readOnly": true,
            "description": "Type of operation performed\n\n* `create` - Create\n* `update` - Update\n* `delete` - Delete"
          },
          "object_type": {
            "type": [
              "string",
              "null"
            ],
            "readOnly": true
          },
          "object_id": {
            "type": [
              "integer",
              "null"
            ],
            "readOnly": true
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "readOnly": true,
            "description": "When the action was performed"
          }
        }
      },
      "AutoFetchErrorResponse": {
        "type": "object",
        "properties": {
          "detail": {
            "type": "string"
          }
        },
        "required": [
          "detail"
        ]
      },
      "AutoFetchProgressErrorResponse": {
        "type": "object",
        "properties": {
          "detail": {
            "type": "string"
          }
        },
        "required": [
          "detail"
        ]
      },
      "AutoFetchProgressResponse": {
        "type": "object",
        "properties": {
          "status": {
            "enum": [
              "in_progress",
              "completed",
              "failed"
            ],
            "type": "string",
            "description": "* `in_progress` - in_progress\n* `completed` - completed\n* `failed` - failed",
            "x-spec-enum-id": "6e9575e5767aaee0"
          },
          "tools_created": {
            "type": [
              "integer",
              "null"
            ]
          },
          "tools_updated": {
            "type": [
              "integer",
              "null"
            ]
          },
          "message": {
            "type": [
              "string",
              "null"
            ]
          },
          "error": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "error",
          "message",
          "status",
          "tools_created",
          "tools_updated"
        ]
      },
      "AutoFetchToolsRequest": {
        "type": "object",
        "properties": {
          "provider": {
            "enum": [
              "vapi",
              "retell",
              "elevenlabs",
              "custom"
            ],
            "type": "string",
            "x-spec-enum-id": "e3f60d118bb06f46",
            "description": "Provider to fetch tools from. Use \"custom\" for self-hosted agents that expose an MCP server directly.\n\n* `vapi` - vapi\n* `retell` - retell\n* `elevenlabs` - elevenlabs\n* `custom` - custom"
          },
          "assistant_id": {
            "type": "string",
            "description": "Provider assistant/agent ID. Required for vapi/retell/elevenlabs; ignored for custom."
          },
          "api_key": {
            "type": "string",
            "description": "Optional API key for the managed provider. Ignored for custom. If not provided, stored credentials are used."
          },
          "mcp_server_url": {
            "type": "string",
            "description": "Required when provider=\"custom\". URL of the customer-hosted MCP server (JSON-RPC 2.0)."
          },
          "mcp_server_headers": {
            "type": "object",
            "additionalProperties": {},
            "description": "Optional auth/custom headers forwarded to the MCP server during tool discovery (provider=\"custom\" only)."
          }
        },
        "required": [
          "provider"
        ]
      },
      "AutoFetchToolsResponse": {
        "type": "object",
        "properties": {
          "progress_id": {
            "type": "string",
            "description": "Poll auto-fetch-progress/?progress_id=<value> to track completion"
          }
        },
        "required": [
          "progress_id"
        ]
      },
      "Billing": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "organization": {
            "type": "integer",
            "readOnly": true
          },
          "balance": {
            "type": "string",
            "format": "decimal",
            "pattern": "^-?\\d{0,8}(?:\\.\\d{0,2})?$",
            "readOnly": true
          },
          "extra_balance": {
            "type": "string",
            "format": "decimal",
            "pattern": "^-?\\d{0,8}(?:\\.\\d{0,2})?$",
            "readOnly": true,
            "description": "Never expiry balance"
          },
          "total_balance": {
            "type": "string",
            "readOnly": true
          },
          "text_runs_count": {
            "type": "string",
            "readOnly": true
          },
          "non_text_runs_minutes": {
            "type": "string",
            "readOnly": true
          },
          "call_logs_count": {
            "type": "string",
            "readOnly": true
          },
          "runs_count": {
            "type": "string",
            "readOnly": true
          },
          "concurrency_status": {
            "type": "string",
            "readOnly": true
          },
          "runs_balance": {
            "type": "integer",
            "readOnly": true
          },
          "call_logs_balance": {
            "type": "integer",
            "readOnly": true
          },
          "num_test_cases": {
            "type": "integer",
            "readOnly": true
          },
          "total_run_minutes": {
            "type": "string",
            "readOnly": true
          },
          "total_call_log_minutes": {
            "type": "string",
            "readOnly": true
          },
          "balance_expiry": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "is_indian_payment_method": {
            "type": "string",
            "readOnly": true
          },
          "requires_mandate_setup": {
            "type": "string",
            "readOnly": true
          },
          "type": {
            "enum": [
              "subscription",
              "self_serve"
            ],
            "type": "string",
            "x-spec-enum-id": "31820255025544ce",
            "description": "Billing type for the organization\n\n* `subscription` - Subscription\n* `self_serve` - Self Serve"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          }
        }
      },
      "BillingInfo": {
        "type": "object",
        "properties": {
          "organization": {
            "type": "integer",
            "readOnly": true,
            "description": "Organization ID this billing record belongs to.\nExample: `37`"
          },
          "credits_remaining": {
            "type": "string",
            "readOnly": true,
            "description": "Credits currently available to spend on runs and calls.\nExample: `7436.08`"
          },
          "credits_used": {
            "type": "string",
            "readOnly": true,
            "description": "Credits consumed in the current billing cycle, calculated from that cycle's billing-cycle aggregate (`run_credits + calllog_credits`). Returns `0` until the cycle's aggregate is created and may lag usage by up to 30 minutes.\nExample: `36462.14`"
          },
          "initial_balance": {
            "type": "string",
            "readOnly": true,
            "description": "Credits granted by the current pack at the start of the billing period (before any usage).\nExample: `50000.00`"
          },
          "balance_expiry": {
            "type": "string",
            "format": "date-time",
            "description": "Date the current credit balance expires (null if no expiry is set).\nExample: `2026-06-23T10:00:00Z`"
          },
          "subscription_status": {
            "allOf": [
              {
                "$ref": "#/components/schemas/SubscriptionStatus"
              }
            ],
            "readOnly": true,
            "description": "\nCurrent subscription state for the org plus the active pack's max-allowed plan caps. `status` is one of `active`, `trial`, `expired`, `inactive`. `days_until_expiry` is negative when `expire_at` is in the past. Nested `pack` caps are the plan's ceilings — the org's currently configured limits may be lower. All fields are null/false when there is no active subscription.\n\nExample:\n```json\n{\n  \"status\": \"active\",\n  \"is_active\": true,\n  \"is_trial\": false,\n  \"pack_name\": \"Enterprise\",\n  \"expire_at\": \"2026-06-15T10:00:00Z\",\n  \"last_payment_at\": \"2026-05-15T10:00:00Z\",\n  \"days_until_expiry\": 34,\n  \"created_at\": \"2025-08-01T09:00:00Z\",\n  \"pack\": {\n    \"name\": \"Enterprise\",\n    \"max_concurrent_runs_limit\": 50,\n    \"max_concurrent_chat_runs_limit\": 50,\n    \"max_agents_limit\": 20,\n    \"max_members_limit\": 10,\n    \"max_projects_limit\": 10,\n    \"billing_type\": \"subscription\",\n    \"subscription_overage\": \"0.08\"\n  }\n}\n```\n"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true,
            "description": "When this billing record was first created.\nExample: `2024-01-15T10:30:00Z`"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true,
            "description": "When this billing record was last modified.\nExample: `2026-05-12T14:25:30Z`"
          }
        },
        "required": [
          "balance_expiry"
        ]
      },
      "BlandChatConfig": {
        "type": "object",
        "description": "Bland chat configuration.",
        "properties": {
          "agent_id": {
            "type": "string",
            "description": "The Bland pathway_id to use for text-mode test runs."
          }
        },
        "required": [
          "agent_id"
        ],
        "title": "Bland"
      },
      "BlandConfig": {
        "type": "object",
        "description": "Bland AI provider configuration.",
        "properties": {
          "encrypted_key": {
            "type": "string",
            "description": "Twilio credential bundle for Bland outbound calls. Required when using Bland with Twilio telephony."
          }
        },
        "title": "Bland"
      },
      "BulkAgentAssignment": {
        "type": "object",
        "properties": {
          "project_id": {
            "type": "integer",
            "description": "Project ID for permission checks and validation"
          },
          "metric_ids": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "List of metric IDs to update"
          },
          "agent_ids": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "List of agent IDs to enable or disable"
          },
          "mode": {
            "enum": [
              "enable",
              "disable"
            ],
            "type": "string",
            "x-spec-enum-id": "f3beff35f566287e",
            "description": "Mode: 'enable' to add agents, 'disable' to remove agents\n\n* `enable` - enable\n* `disable` - disable"
          }
        },
        "required": [
          "agent_ids",
          "metric_ids",
          "mode",
          "project_id"
        ]
      },
      "BulkAgentAssignmentResponse": {
        "type": "object",
        "properties": {
          "updated_count": {
            "type": "integer",
            "description": "Number of metrics updated"
          },
          "message": {
            "type": "string",
            "description": "Success message"
          }
        },
        "required": [
          "message",
          "updated_count"
        ]
      },
      "BulkImportPlivoNumber": {
        "type": "object",
        "properties": {
          "plivo_auth_id": {
            "type": "string",
            "description": "Plivo Auth ID (applies to all numbers unless overridden)"
          },
          "plivo_auth_token": {
            "type": "string",
            "writeOnly": true,
            "description": "Plivo Auth Token (applies to all numbers unless overridden)"
          },
          "phone_numbers": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": {}
            },
            "description": "List of phone number configurations to import"
          }
        },
        "required": [
          "phone_numbers",
          "plivo_auth_id",
          "plivo_auth_token"
        ]
      },
      "BulkImportPlivoResponse": {
        "type": "object",
        "properties": {
          "successful": {
            "type": "array",
            "items": {}
          },
          "failed": {
            "type": "array",
            "items": {}
          },
          "summary": {
            "type": "object",
            "additionalProperties": {}
          }
        },
        "required": [
          "failed",
          "successful",
          "summary"
        ]
      },
      "BulkImportResponse": {
        "type": "object",
        "properties": {
          "successful": {
            "type": "array",
            "items": {}
          },
          "failed": {
            "type": "array",
            "items": {}
          },
          "summary": {
            "type": "object",
            "additionalProperties": {}
          }
        },
        "required": [
          "failed",
          "successful",
          "summary"
        ]
      },
      "BulkImportTelnyxNumber": {
        "type": "object",
        "description": "",
        "properties": {
          "telnyx_api_key": {
            "type": "string",
            "description": "Telnyx API Key (applies to all numbers unless overridden)"
          },
          "phone_numbers": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": {}
            },
            "description": "List of phone number configurations to import"
          }
        },
        "required": [
          "phone_numbers",
          "telnyx_api_key"
        ]
      },
      "BulkImportTelnyxResponse": {
        "type": "object",
        "properties": {
          "successful": {
            "type": "array",
            "items": {}
          },
          "failed": {
            "type": "array",
            "items": {}
          },
          "summary": {
            "type": "object",
            "additionalProperties": {}
          }
        },
        "required": [
          "failed",
          "successful",
          "summary"
        ]
      },
      "BulkImportTwilioNumber": {
        "type": "object",
        "description": "",
        "properties": {
          "twilio_account_sid": {
            "type": "string",
            "description": "Twilio Account SID (applies to all numbers unless overridden)"
          },
          "twilio_auth_token": {
            "type": "string",
            "writeOnly": true,
            "description": "Twilio Auth Token (applies to all numbers unless overridden)"
          },
          "phone_numbers": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": {}
            },
            "description": "List of phone number configurations to import"
          }
        },
        "required": [
          "phone_numbers",
          "twilio_account_sid",
          "twilio_auth_token"
        ]
      },
      "BulkWidgetDataRequest": {
        "type": "object",
        "properties": {
          "widget_ids": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "List of widget IDs to get data for"
          },
          "filters": {
            "type": "object",
            "description": "Optional override filters for all widgets. Filter conditions to scope the data. See the [Dashboards guide](https://docs.cekura.ai/documentation/guides/dashboards#filters) for supported fields, operators, and syntax.",
            "properties": {
              "field": {
                "type": "string",
                "description": "Field name to filter on",
                "examples": [
                  "success",
                  "duration",
                  "timestamp",
                  "metadata.region",
                  "metric_evaluations.value"
                ]
              },
              "op": {
                "type": "string",
                "enum": [
                  "eq",
                  "neq",
                  "gt",
                  "gte",
                  "lt",
                  "lte",
                  "contains",
                  "startswith",
                  "endswith",
                  "in",
                  "isnull",
                  "regex"
                ],
                "description": "Comparison operator"
              },
              "value": {
                "description": "Value to compare against. Type depends on the field and operator."
              },
              "operator": {
                "type": "string",
                "enum": [
                  "and",
                  "or",
                  "same_row"
                ],
                "description": "Logical operator to combine conditions"
              },
              "conditions": {
                "type": "array",
                "description": "List of filter conditions or nested groups",
                "items": {}
              }
            },
            "examples": [
              {
                "field": "success",
                "op": "eq",
                "value": true
              },
              {
                "operator": "and",
                "conditions": [
                  {
                    "field": "timestamp",
                    "op": "gte",
                    "value": "today-7d"
                  },
                  {
                    "field": "duration",
                    "op": "gte",
                    "value": 60
                  }
                ]
              }
            ]
          }
        },
        "required": [
          "widget_ids"
        ]
      },
      "BulkWidgetOperationRequest": {
        "type": "object",
        "description": "",
        "properties": {
          "create": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": {}
            },
            "description": "List of widget data objects to create"
          },
          "update": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": {}
            },
            "description": "List of widget objects with 'id' field for updates"
          },
          "delete": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "List of widget IDs to delete"
          }
        }
      },
      "BulkWidgetOperationResponse": {
        "type": "object",
        "description": "Response serializer for bulk widget operations.\n\nReturns the created, updated, and deleted widgets.",
        "properties": {
          "created": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Widget"
            },
            "description": "List of created widgets"
          },
          "updated": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Widget"
            },
            "description": "List of updated widgets"
          },
          "deleted": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "List of deleted widget IDs"
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": {}
            },
            "description": "List of errors that occurred during operations"
          }
        },
        "required": [
          "created",
          "deleted",
          "updated"
        ]
      },
      "CallLogCriticalCategories": {
        "type": "object",
        "properties": {
          "category_id": {
            "type": "integer",
            "description": "Category ID"
          },
          "category": {
            "type": "string",
            "description": "Category name"
          },
          "deviation": {
            "type": "number",
            "format": "double",
            "description": "Deviation"
          },
          "wrongly_marked": {
            "type": "boolean",
            "description": "Whether the category was wrongly marked"
          },
          "feedback": {
            "type": "string",
            "description": "Feedback"
          },
          "priority": {
            "enum": [
              "critical",
              "non-critical",
              "not_a_bug"
            ],
            "type": "string",
            "x-spec-enum-id": "6b5f38576e0a1903",
            "description": "Priority\n\n* `critical` - Critical\n* `non-critical` - Non Critical\n* `not_a_bug` - Not A Bug"
          }
        },
        "required": [
          "category",
          "category_id",
          "deviation",
          "feedback",
          "priority",
          "wrongly_marked"
        ]
      },
      "CallLogDetail": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "duration": {
            "type": "string",
            "readOnly": true,
            "description": "Call duration in minutes in MM:SS format.\nExample: `01:10`"
          },
          "voice_recording_url": {
            "type": "string",
            "readOnly": true,
            "description": "URL to access the voice recording.\nExample: `\"https://storage.example.com/recordings/call_123_20240315.mp3\"`"
          },
          "critical_categories": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CallLogCriticalCategories"
            },
            "readOnly": true,
            "description": "Critical categories from call evaluation"
          },
          "transcript_object": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CallLogTranscriptObject"
            },
            "readOnly": true,
            "description": "Structured transcript data with timestamps.\nExample: \n```json\n[\n    {\n        \"role\": \"Testing Agent\",\n        \"content\": \"Hello\",\n        \"start_time\": 1.2,\n        \"end_time\": 1.8\n    },\n    {\n        \"role\": \"Main Agent\",\n        \"content\": \"Hello, how can I help you today?\",\n        \"start_time\": 1.8,\n        \"end_time\": 2.5\n    }\n]`"
          },
          "status": {
            "enum": [
              "success",
              "failure",
              "reviewed_success",
              "reviewed_failure"
            ],
            "type": "string",
            "description": "* `success` - Success\n* `failure` - Failure\n* `reviewed_success` - Reviewed Success\n* `reviewed_failure` - Reviewed Failure",
            "x-spec-enum-id": "a5dfbbcee6f2a6ce"
          },
          "agent_id": {
            "type": "string",
            "description": "Agent ID.\nExample: `2142`"
          },
          "agent_name": {
            "type": "string",
            "readOnly": true,
            "description": "Agent name"
          },
          "evaluation": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Evaluation"
              }
            ],
            "readOnly": true,
            "description": "Evaluation results for the call.\nExample: \n```json\n{\n    \"metrics\": [\n        {\n            \"id\": 35,\n            \"name\": \"Instruction Follow\",\n            \"type\": \"binary\",\n            \"score\": 0,\n            \"explanation\": [\"Agent failed to follow the opening script\", \"Missed key product information\"],\n            \"vocera_defined_metric_code\": \"5dedc41b\",\n            \"function_name\": \"check_critical_deviations\",\n            \"extra\": {\n                \"categories\": [\n                    {\n                        \"category_id\": 5,\n                        \"category\": \"Script Adherence Issue\",\n                        \"deviation\": \"Agent deviated from required script\",\n                        \"priority\": \"critical\"\n                    }\n                ]\n            }\n        },\n        {\n            \"id\": 18,\n            \"name\": \"Customer Satisfaction\",\n            \"type\": \"binary\",\n            \"score\": 5,\n            \"explanation\": [\"Customer expressed satisfaction with service\"]\n        }\n    ]\n}\n```"
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {},
            "readOnly": true,
            "description": "Additional call metadata.\nExample: \n```json\n{\n    \"ended_reason\": \"customer-ended-call\",\n    \"ringing_duration\": 3.941,\n    \"call_type\": \"inbound\"\n}\n```"
          },
          "dynamic_variables": {
            "type": "object",
            "additionalProperties": {},
            "readOnly": true,
            "description": "Dynamic Variables used in the call.\nExample: \n```json\n{\n    \"customer_name\": \"John Doe\",\n    \"order_id\": \"ORD-12345\",\n    \"product_type\": \"premium\"\n}\n```"
          },
          "testing_channel_index": {
            "type": [
              "integer",
              "null"
            ],
            "readOnly": true,
            "description": "The channel index of the testing agent in the audio recording"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "description": "When the call occurred.\nExample: `2024-03-15T10:15:45Z`"
          },
          "success": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Whether the call was successful.\nExample: `true` or `false`"
          },
          "is_reviewed": {
            "type": "boolean",
            "description": "Whether the call has been reviewed.\nExample: `true` or `false`"
          },
          "feedback": {
            "type": "string",
            "description": "Feedback about the call.\nExample: `\"Great Call\"`"
          },
          "rubric": {
            "oneOf": [
              {},
              {
                "type": "null"
              }
            ],
            "description": "\nDetailed rubric evaluation data\nExample:\n```json\n[\n    {\n        \"metric_id\": 100,\n        \"metric_name\": \"Call Quality\",\n        \"value\": 5,\n        \"explanation\": [\"The response was accurate\"],\n        \"passed\": true,\n        \"conditions\": \"score gte 5\",\n        \"expected_conditions\": {\"operator\": \"and\", \"conditions\": [{\"field\": \"score\", \"op\": \"gte\", \"value\": 5}]}\n    }\n]\n```\n"
          },
          "transcript": {
            "type": "string",
            "description": "Full text transcript of the call.\nExample: \n```text\n[00:01] Testing Agent: Hello. \n[00:02] Main Agent: Hello, how can I help you today?\n[00:03] Testing Agent: Well, I mean, sure. What time exactly are we talking about here\n[00:04] Main Agent: 6 PM.\n[00:05] Testing Agent: Great. I'll book that for you. Just a sec.\n[00:06] Main Agent: Okay.\n```\n"
          },
          "call_ended_reason": {
            "type": "string",
            "description": "Reason why the call ended.\nExample: \n- `\"customer-ended-call\"`\n- `\"agent-ended-call\"`\n",
            "maxLength": 100
          },
          "dropoff_point": {
            "type": "string",
            "description": "Point in conversation where user disengaged.\nExample: `\"end of conversation as no queries remaining\"`",
            "maxLength": 1000
          },
          "topic": {
            "type": "string",
            "description": "Topic of the call.\nExample: \n- `\"product_inquiry\"`\n- `\"technical_support\"`\n",
            "maxLength": 1000
          },
          "customer_number": {
            "type": "string",
            "description": "Customer's phone number or identifier.\nExample: \n- `\"+1234567890\"`\n- `\"customer_abc123\"`\n",
            "maxLength": 100
          },
          "user_generated_transcript": {
            "oneOf": [
              {},
              {
                "type": "null"
              }
            ],
            "description": "Manually created or corrected transcript data.\nExample: \n```json\n[\n    {\n        \"role\": \"Testing Agent\",\n        \"content\": \"I need help with my order\",\n        \"timestamp\": \"00:15\"\n    }\n]`"
          },
          "error_message": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true,
            "description": "When this record was created.\nExample: `2024-03-15T10:30:45Z`"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true,
            "description": "When this record was last updated.\nExample: `2024-03-15T10:35:11Z`"
          },
          "call_id": {
            "type": "string",
            "description": "Unique identifier for the call.\nExample: \n- `\"call_abc123xyz\"`\n- `\"stereo_audio_session_456\"`",
            "maxLength": 100
          },
          "trace_id": {
            "type": "string",
            "description": "OpenTelemetry trace ID (32-char hex). Set when OTel tracing is enabled.",
            "maxLength": 32
          },
          "agent": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Agent ID"
          },
          "project": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Project ID (denormalized from agent for query performance)"
          }
        },
        "required": [
          "call_id"
        ]
      },
      "CallLogList": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "duration": {
            "type": "string",
            "readOnly": true,
            "description": "Call duration in minutes in MM:SS format.\nExample: `01:10`"
          },
          "success": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Whether the call was successful.\nExample: `true` or `false`"
          },
          "is_reviewed": {
            "type": "boolean",
            "description": "Whether the call has been reviewed.\nExample: `true` or `false`"
          },
          "status": {
            "enum": [
              "success",
              "failure",
              "reviewed_success",
              "reviewed_failure"
            ],
            "type": "string",
            "x-spec-enum-id": "a5dfbbcee6f2a6ce",
            "description": "Status of the call or conversation.\nExample: `\"completed\"` or `\"failed\"`\n\n* `success` - Success\n* `failure` - Failure\n* `reviewed_success` - Reviewed Success\n* `reviewed_failure` - Reviewed Failure"
          },
          "feedback": {
            "type": "string",
            "description": "Feedback about the call.\nExample: `\"Great Call\"`"
          },
          "metrics": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CallLogListSerializerMetrics"
            },
            "readOnly": true,
            "description": "Metrics of the call"
          },
          "call_ended_reason": {
            "type": "string",
            "description": "Reason why the call ended.\nExample: \n- `\"customer-ended-call\"`\n- `\"agent-ended-call\"`\n",
            "maxLength": 100
          },
          "customer_number": {
            "type": "string",
            "description": "Customer's phone number or identifier.\nExample: \n- `\"+1234567890\"`\n- `\"customer_abc123\"`\n",
            "maxLength": 100
          },
          "agent": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Agent ID"
          },
          "agent_name": {
            "type": "string",
            "readOnly": true,
            "description": "Agent name"
          },
          "call_id": {
            "type": "string",
            "description": "Unique identifier for the call.\nExample: \n- `\"call_abc123xyz\"`\n- `\"stereo_audio_session_456\"`",
            "maxLength": 100
          },
          "trace_id": {
            "type": "string",
            "description": "OpenTelemetry trace ID (32-char hex). Set when OTel tracing is enabled.",
            "maxLength": 32
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "description": "When the call occurred.\nExample: `2024-03-15T10:15:45Z`"
          },
          "error_message": {
            "type": [
              "string",
              "null"
            ]
          },
          "dropoff_point": {
            "type": "string",
            "description": "Point in conversation where user disengaged.\nExample: `\"end of conversation as no queries remaining\"`",
            "maxLength": 1000
          },
          "topic": {
            "type": "string",
            "description": "Topic of the call.\nExample: \n- `\"product_inquiry\"`\n- `\"technical_support\"`\n",
            "maxLength": 1000
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true,
            "description": "When this record was created.\nExample: `2024-03-15T10:30:45Z`"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true,
            "description": "When this record was last updated.\nExample: `2024-03-15T10:35:11Z`"
          },
          "transcript": {
            "type": "string",
            "description": "Full text transcript of the call.\nExample: \n```text\n[00:01] Testing Agent: Hello. \n[00:02] Main Agent: Hello, how can I help you today?\n[00:03] Testing Agent: Well, I mean, sure. What time exactly are we talking about here\n[00:04] Main Agent: 6 PM.\n[00:05] Testing Agent: Great. I'll book that for you. Just a sec.\n[00:06] Main Agent: Okay.\n```\n"
          },
          "transcript_object": {
            "type": "string",
            "readOnly": true,
            "description": "Structured transcript data with timestamps.\nExample: \n```json\n[\n    {\n        \"role\": \"Testing Agent\",\n        \"content\": \"Hello\",\n        \"start_time\": 1.2,\n        \"end_time\": 1.8\n    },\n    {\n        \"role\": \"Main Agent\",\n        \"content\": \"Hello, how can I help you today?\",\n        \"start_time\": 1.8,\n        \"end_time\": 2.5\n    }\n]`"
          },
          "evaluation": {
            "type": "string",
            "readOnly": true,
            "description": "Evaluation of the call"
          }
        },
        "required": [
          "call_id"
        ]
      },
      "CallLogListSerializerMetrics": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Metric ID"
          },
          "name": {
            "type": "string",
            "description": "Metric name"
          },
          "type": {
            "type": "string",
            "description": "Metric type"
          },
          "score": {
            "type": "number",
            "format": "double",
            "description": "Evaluated metric score, Present if metrictype is not enum"
          },
          "enum": {
            "type": "string",
            "description": "Metric enum, Present if type is enum"
          },
          "value": {
            "type": "string",
            "description": "Evaluated metric value, Present if metric type is enum"
          }
        },
        "required": [
          "enum",
          "id",
          "name",
          "score",
          "type",
          "value"
        ]
      },
      "CallLogListSerializerMetricsWithExplanation": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Metric ID"
          },
          "name": {
            "type": "string",
            "description": "Metric name"
          },
          "type": {
            "type": "string",
            "description": "Metric type"
          },
          "score": {
            "type": "number",
            "format": "double",
            "description": "Evaluated metric score, Present if metrictype is not enum"
          },
          "enum": {
            "type": "string",
            "description": "Metric enum, Present if type is enum"
          },
          "value": {
            "type": "string",
            "description": "Evaluated metric value, Present if metric type is enum"
          },
          "explanation": {
            "type": "array",
            "items": {
              "type": "string",
              "description": "Explanation of the metric"
            }
          },
          "extra": {
            "type": "object",
            "additionalProperties": {},
            "description": "Evaluated metric extra data"
          }
        },
        "required": [
          "enum",
          "explanation",
          "extra",
          "id",
          "name",
          "score",
          "type",
          "value"
        ]
      },
      "CallLogTraceResponse": {
        "type": "object",
        "properties": {
          "trace_id": {
            "type": "string",
            "description": "OpenTelemetry trace ID associated with the call log."
          },
          "spans": {
            "description": "Raw OpenTelemetry trace data returned by the trace backend."
          }
        },
        "required": [
          "spans",
          "trace_id"
        ]
      },
      "CallLogTranscriptObject": {
        "type": "object",
        "properties": {
          "role": {
            "type": "string",
            "description": "Role of the message"
          },
          "content": {
            "type": "string",
            "description": "Content of the message"
          },
          "timestamp": {
            "type": "number",
            "format": "double",
            "description": "Timestamp of the message"
          }
        },
        "required": [
          "content",
          "role",
          "timestamp"
        ]
      },
      "ChatAgentConfig": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/RetellChatConfig"
          },
          {
            "$ref": "#/components/schemas/BlandChatConfig"
          },
          {
            "$ref": "#/components/schemas/AgentforceChatConfig"
          },
          {
            "$ref": "#/components/schemas/SelfHostedChatConfig"
          },
          {
            "$ref": "#/components/schemas/AmazonConnectChatConfig"
          },
          {
            "$ref": "#/components/schemas/SierraChatConfig"
          }
        ]
      },
      "ChatAgentDetails": {
        "type": "object",
        "description": "Chat-mode provider configuration nested inside the provider block.",
        "properties": {
          "type": {
            "enum": [
              "retell",
              "bland",
              "vapi",
              "elevenlabs",
              "livekit",
              "agora",
              "sms",
              "whatsapp",
              "self_hosted",
              "agentforce",
              "amazon_connect",
              "koreai",
              "sierra",
              ""
            ],
            "type": "string",
            "x-spec-enum-id": "4bb6f6bcfa9e6240",
            "description": "Chat provider type. Must be compatible with the voice provider.type. Valid values: retell, bland, vapi, elevenlabs, livekit, agora, sms, whatsapp, self_hosted, agentforce, amazon_connect, koreai, sierra. Pass an empty string \"\" (or send chat_agent_details: null) to clear the chat overlay.\n\n* `retell` - retell\n* `bland` - bland\n* `vapi` - vapi\n* `elevenlabs` - elevenlabs\n* `livekit` - livekit\n* `agora` - agora\n* `sms` - sms\n* `whatsapp` - whatsapp\n* `self_hosted` - self_hosted\n* `agentforce` - agentforce\n* `amazon_connect` - amazon_connect\n* `koreai` - koreai\n* `sierra` - sierra"
          },
          "config": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ChatAgentConfig"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "ChatMessage": {
        "type": "object",
        "description": "",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "role": {
            "enum": [
              "user",
              "assistant"
            ],
            "type": "string",
            "x-spec-enum-id": "8217825fa46b4030",
            "description": "Role of the message sender.\nExample: `\"user\"` or `\"assistant\"`\n\n* `user` - User\n* `assistant` - Assistant"
          },
          "content": {
            "type": "string",
            "description": "Content of the message (encrypted for privacy).\nExample: `\"Which 3 calls have the highest latency?\"`"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true,
            "description": "When this record was created.\nExample: `2024-03-15T10:30:45Z`"
          }
        },
        "required": [
          "content",
          "role"
        ]
      },
      "ChatSessionCreate": {
        "type": "object",
        "description": "",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "readOnly": true,
            "description": "Unique identifier for the chat session.\nExample: `550e8400-e29b-41d4-a716-446655440000`"
          },
          "project": {
            "type": [
              "integer",
              "null"
            ],
            "readOnly": true,
            "description": "Project this chat session belongs to.\nExample: `42`"
          },
          "title": {
            "type": "string",
            "description": "Auto-generated title from first question.\nExample: `\"Which calls had the highest latency?\"`",
            "maxLength": 255
          },
          "agent_id": {
            "type": "integer",
            "writeOnly": true,
            "description": "Agent ID to create session for"
          }
        }
      },
      "ChatSessionDetail": {
        "type": "object",
        "description": "",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "readOnly": true,
            "description": "Unique identifier for the chat session.\nExample: `550e8400-e29b-41d4-a716-446655440000`"
          },
          "title": {
            "type": "string",
            "description": "Auto-generated title from first question.\nExample: `\"Which calls had the highest latency?\"`",
            "maxLength": 255
          },
          "project": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Project this chat session belongs to.\nExample: `42`"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true,
            "description": "When this record was created.\nExample: `2024-03-15T10:30:45Z`"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true,
            "description": "When this record was last updated.\nExample: `2024-03-15T10:35:11Z`"
          },
          "messages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ChatMessage"
            },
            "readOnly": true
          }
        }
      },
      "ChatSessionList": {
        "type": "object",
        "description": "",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "readOnly": true,
            "description": "Unique identifier for the chat session.\nExample: `550e8400-e29b-41d4-a716-446655440000`"
          },
          "title": {
            "type": "string",
            "description": "Auto-generated title from first question.\nExample: `\"Which calls had the highest latency?\"`",
            "maxLength": 255
          },
          "project": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Project this chat session belongs to.\nExample: `42`"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true,
            "description": "When this record was created.\nExample: `2024-03-15T10:30:45Z`"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true,
            "description": "When this record was last updated.\nExample: `2024-03-15T10:35:11Z`"
          },
          "message_count": {
            "type": "string",
            "readOnly": true
          }
        }
      },
      "CheckoutTokenRequest": {
        "type": "object",
        "properties": {
          "repo": {
            "type": "string",
            "description": "Short repository name to check out."
          }
        },
        "required": [
          "repo"
        ]
      },
      "CleanMetricDescriptionRequest": {
        "type": "object",
        "properties": {
          "agent": {
            "type": "integer"
          },
          "metric_description": {
            "type": "string"
          },
          "eval_type": {
            "enum": [
              "boolean",
              "numeric",
              "rating",
              "enum"
            ],
            "type": "string",
            "description": "* `boolean` - boolean\n* `numeric` - numeric\n* `rating` - rating\n* `enum` - enum",
            "x-spec-enum-id": "ae756482f906eddf"
          }
        },
        "required": [
          "agent",
          "eval_type",
          "metric_description"
        ]
      },
      "Condition": {
        "type": "object",
        "description": "One entry in a ConditionalActions flow.",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Sequential identifier. Start at 0 for the first condition."
          },
          "condition": {
            "type": "string",
            "description": "Trigger expression. Special values:\n- `\"FIRST_MESSAGE\"` — fires at conversation start (use for `id: 0`)\n- `\"contains \\\"<word>\\\"\"` — fires when the agent utterance contains the substring\n- `\"contains \\\"<a>\\\" OR contains \\\"<b>\\\"\"` — OR-combined substrings\n- `\"contains \\\"<a>\\\" AND contains \\\"<b>\\\"\"` — AND-combined substrings\n- Integer (e.g. `2`) — references another condition id for sequential follow-up"
          },
          "action": {
            "type": "string",
            "description": "What the simulated caller says or does. Supports:\n- SSML pauses: `<silence time=\"1.5s\" />` (interruptible) or `<hold time=\"2s\" />` (not interruptible)\n- Emotion markers: `[laughter]`, `[sigh]`\n- Call control: `<endcall />`"
          },
          "type": {
            "enum": [
              "standard",
              "action_followup"
            ],
            "type": "string",
            "x-spec-enum-id": "adcfc876f3a8758f",
            "default": "standard",
            "description": "`standard` — normal response to the matched condition. `action_followup` — fires on the testing agent's next turn after the referenced condition was executed (one main-agent reply elapses in between). Firing is deterministic and does not depend on the reply's content; it never fires in the same turn as its parent.\n\n* `standard` - standard\n* `action_followup` - action_followup"
          },
          "fixed_message": {
            "type": "boolean",
            "default": false,
            "description": "If `true`, deliver `action` verbatim (no LLM paraphrasing). Use for exact-phrasing tests."
          }
        },
        "required": [
          "action",
          "condition",
          "id"
        ]
      },
      "ConditionAudioEntry": {
        "type": "object",
        "description": "Read serializer for one Scenario.condition_audio entry (a plain dict).\n\nThe caller passes each entry dict with `audio_id` injected; fields are\ntolerant of missing keys. `words` is intentionally not exposed (runtime-only\nplayback timing data).",
        "properties": {
          "audio_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "action": {
            "type": [
              "string",
              "null"
            ]
          },
          "condition_id": {
            "type": [
              "integer",
              "null"
            ]
          },
          "status": {
            "type": [
              "string",
              "null"
            ]
          },
          "transcript": {
            "type": [
              "string",
              "null"
            ]
          },
          "duration": {
            "type": [
              "number",
              "null"
            ],
            "format": "double"
          },
          "filename": {
            "type": [
              "string",
              "null"
            ]
          },
          "timing_source": {
            "type": [
              "string",
              "null"
            ]
          },
          "error": {
            "type": [
              "string",
              "null"
            ]
          },
          "updated_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "playback_url": {
            "type": "string",
            "readOnly": true,
            "description": "S3 URL of the recorded audio clip"
          }
        }
      },
      "ConditionalActions": {
        "type": "object",
        "description": "Structured conditional-actions object for `scenario_type=\"conditional_actions\"`.\n\nUse either `conditional_actions` (structured) or `instructions` (plain text)\non a scenario — not both.",
        "properties": {
          "role": {
            "type": "string",
            "description": "Caller role / persona for this scenario. Example: `\"You are a frustrated patient calling about a billing error\"`."
          },
          "conditions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Condition"
            },
            "description": "Ordered list of conditions and their actions."
          }
        },
        "required": [
          "conditions",
          "role"
        ]
      },
      "ConversationContextItem": {
        "type": "object",
        "properties": {
          "role": {
            "enum": [
              "user",
              "assistant"
            ],
            "type": "string",
            "x-spec-enum-id": "0376a589d982d83c",
            "description": "Message role - either 'user' or 'assistant'\n\n* `user` - user\n* `assistant` - assistant"
          },
          "content": {
            "type": "string",
            "description": "Message content"
          }
        },
        "required": [
          "content",
          "role"
        ]
      },
      "ConversationStatus": {
        "type": "object",
        "description": "Body of GET /v2/product-chat/conversations/:id/status/.\n\n`active_message` is null when the conversation has no assistant turns yet.",
        "properties": {
          "conversation_id": {
            "type": "string",
            "format": "uuid"
          },
          "active_message": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ActiveMessageStatus"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "active_message",
          "conversation_id"
        ]
      },
      "CreateCallLog": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "call_id": {
            "type": "string",
            "description": "Unique identifier for the call.\nExample: \n- `\"call_abc123xyz\"`\n- `\"stereo_audio_session_456\"`",
            "maxLength": 100
          },
          "trace_id": {
            "type": "string",
            "default": "",
            "description": "OpenTelemetry trace ID (32-char hex string). Example: \"4bf92f3577b34da6a3ce929d0e0e4736\"",
            "maxLength": 32
          },
          "agent": {
            "type": "integer",
            "description": "\nAgent ID, required if assistant_id not provided\nExample: `2421`\n"
          },
          "assistant_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "\nProvider's Assistant ID, required if agent not provided\nExample: \n- `\"asst_abc123xyz\"`\n- `\"agent_xyz789\"`\n"
          },
          "voice_recording": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri",
            "description": "Audio recording file of the call.\nExample: Binary data `\"recordings/call_123_20240315.mp3\"`"
          },
          "voice_recording_url": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri",
            "description": "\nURL to call recording audio file\nExample: `\"https://storage.example.com/recordings/call_123.mp3\"`\n"
          },
          "transcript_type": {
            "enum": [
              "cekura",
              "vocera",
              "vapi",
              "retell",
              "deepgram",
              "pipecat",
              "livekit",
              "elevenlabs",
              "none-mono"
            ],
            "type": "string",
            "x-spec-enum-id": "cf3e002831f464f4",
            "writeOnly": true,
            "description": "Format of the `transcript_json` payload. Tells Cekura how to parse roles and timestamps.\n\n- `vapi` — Vapi webhook format: `[{\"role\": \"bot\"|\"user\", \"message\": \"...\", \"time\": 0.0}]`\n- `retell` — Retell webhook format\n- `elevenlabs` — ElevenLabs format\n- `livekit` — LiveKit format\n- `pipecat` — Pipecat format\n- `deepgram` — Deepgram format\n- `cekura` (default) — `[{\"role\": \"Testing Agent\"|\"Main Agent\", \"content\": \"...\", \"start_time\": 0.0, \"end_time\": 2.5}]`. **Valid roles are `\"Testing Agent\"` and `\"Main Agent\"` only** — using `\"agent\"` or `\"user\"` will return a validation error.\n- `none-mono` — mono audio with no transcript; Cekura generates the transcript automatically.\n\nOmit this field to use the default Cekura format.\n\n* `cekura` - cekura\n* `vocera` - vocera\n* `vapi` - vapi\n* `retell` - retell\n* `deepgram` - deepgram\n* `pipecat` - pipecat\n* `livekit` - livekit\n* `elevenlabs` - elevenlabs\n* `none-mono` - none-mono"
          },
          "transcript_json": {
            "description": "\nCall transcript in supported format (Vapi, Retell, Deepgram, ElevenLabs, Cekura)\n\nCheck the [Transcript Format](/documentation/advanced/transcript-format) documentation for more details.\n\nCekura Transcript Format Example:\n```json\n[\n   {\n      \"role\": \"Testing Agent\",\n      \"content\": \"Hello.\",\n      \"end_time\": 1.9399999,\n      \"start_time\": 1.4399999\n   },\n   {\n      \"role\": \"Main Agent\",\n      \"content\": \"Hello. I want to book appointment today. My name is John.\",\n      \"end_time\": 7.539999511718751,\n      \"start_time\": 3.1\n   },\n   {\n      \"role\": \"Testing Agent\",\n      \"content\": \"Well, I mean, sure. What time exactly are we talking about here\",\n      \"end_time\": 15.71,\n      \"start_time\": 12.01\n   },\n   {\n      \"role\": \"Main Agent\",\n      \"content\": \"6 PM.\",\n      \"end_time\": 18.269999,\n      \"start_time\": 17.609999\n   }\n]\n```\n"
          },
          "call_ended_reason": {
            "type": [
              "string",
              "null"
            ],
            "description": "\nReason why the call ended\nExample: \n- `\"customer-ended-call\"`\n- `\"agent-ended-call\"`\n"
          },
          "customer_number": {
            "type": [
              "string",
              "null"
            ],
            "description": "\nCustomer's phone number or identifier\nExample: \n- `\"+1234567890\"`\n- `\"customer_abc123\"`\n"
          },
          "metadata": {
            "description": "\nAdditional call metadata\nExample:\n```json\n{\n    \"customer_id\": \"123\",\n    \"order_id\": \"ORD-12345\",\n    \"name\": \"John Doe\"\n}\n```\n"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "description": "When the call occurred.\nExample: `2024-03-15T10:15:45Z`"
          },
          "dynamic_variables": {
            "description": "\nDynamic variables used to replace {{variables}} in agent description.\nExample:\n```json\n{\n    \"subscription_id\": \"SUB-12345\",\n    \"product_type\": \"premium\"\n}\n```\n"
          },
          "feedback": {
            "type": [
              "string",
              "null"
            ],
            "description": "\nFeedback about the call\nExample: `\"Great call\"`\n"
          },
          "redact_fields": {
            "type": "array",
            "items": {
              "enum": [
                "person_name",
                "age",
                "phone_number",
                "email_address",
                "date",
                "time",
                "location",
                "origin",
                "gender_sexuality",
                "physical_attribute",
                "occupation",
                "username",
                "password",
                "ip_address",
                "url",
                "filename",
                "event",
                "vehicle_id",
                "dob",
                "healthcare_number",
                "medical_professional",
                "credit_card",
                "account_number",
                "bank_account",
                "money",
                "ssn",
                "passport_number",
                "driver_license",
                "numerical_pii"
              ],
              "type": "string",
              "description": "* `person_name` - person_name\n* `age` - age\n* `phone_number` - phone_number\n* `email_address` - email_address\n* `date` - date\n* `time` - time\n* `location` - location\n* `origin` - origin\n* `gender_sexuality` - gender_sexuality\n* `physical_attribute` - physical_attribute\n* `occupation` - occupation\n* `username` - username\n* `password` - password\n* `ip_address` - ip_address\n* `url` - url\n* `filename` - filename\n* `event` - event\n* `vehicle_id` - vehicle_id\n* `dob` - dob\n* `healthcare_number` - healthcare_number\n* `medical_professional` - medical_professional\n* `credit_card` - credit_card\n* `account_number` - account_number\n* `bank_account` - bank_account\n* `money` - money\n* `ssn` - ssn\n* `passport_number` - passport_number\n* `driver_license` - driver_license\n* `numerical_pii` - numerical_pii",
              "x-spec-enum-id": "99d2b7efd95189c4"
            },
            "description": "\nOptional list of sensitive fields to redact from the transcript and audio. If not provided, no redaction will occur.\nAvailable fields include: phone_number, email_address, credit_card, ssn, dob, healthcare_number, etc.\nNote: Redacting any fields incurs a cost of 0.4 credits per minute, regardless of how many fields are selected.\nExample: `[\"phone_number\", \"email_address\", \"credit_card\"]`\n"
          },
          "metric_ids": {
            "type": "string",
            "writeOnly": true,
            "description": "Comma-separated metric IDs to evaluate for this call. Example: \"118,119\". To run metrics after the call is created, use the evaluate_metrics endpoint instead."
          },
          "main_agent_channel_index": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Channel index (0 or 1) of the main agent in stereo recordings. When provided, skips automatic channel detection. Example: `0` means channel 0 is the main agent, channel 1 is the customer/testing agent."
          }
        },
        "required": [
          "call_id"
        ]
      },
      "CreateFromRunsRequest": {
        "type": "object",
        "properties": {
          "runs": {
            "description": "Can be 'all', a positive integer (number of runs), or a list of run IDs"
          },
          "agent": {
            "type": "integer",
            "description": "ID of the agent that owns the runs"
          },
          "project": {
            "type": "integer",
            "description": "ID of the project that owns the runs"
          },
          "metrics": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MetricWithFeedback"
            },
            "description": "List of metrics with optional notes to include in the test set"
          }
        },
        "required": [
          "metrics",
          "runs"
        ]
      },
      "CreatePersonality": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "project": {
            "type": "integer",
            "description": "\nProject that will own the personality. Optional when using a project-scoped API key\n(it is inferred from the key); required otherwise.\nExample: `1`\n"
          },
          "name": {
            "type": "string",
            "description": "\nName of the personality\nExample: `\"Customer Service\"`\n",
            "maxLength": 255
          },
          "prompt": {
            "type": "string",
            "description": "\nPrompt of the personality\nExample: `\"You are a friendly and helpful customer service agent who is always willing to help\"`\n"
          },
          "language": {
            "enum": [
              "af",
              "ar",
              "bn",
              "bg",
              "zh",
              "cs",
              "da",
              "nl",
              "en",
              "et",
              "fi",
              "fr",
              "de",
              "el",
              "gu",
              "hi",
              "he",
              "hu",
              "id",
              "it",
              "ja",
              "kn",
              "ko",
              "ms",
              "ml",
              "mr",
              "multi",
              "no",
              "pl",
              "pa",
              "pt",
              "ro",
              "ru",
              "sk",
              "es",
              "sv",
              "th",
              "tr",
              "tl",
              "ta",
              "te",
              "uk",
              "vi"
            ],
            "type": "string",
            "x-spec-enum-id": "b822ad429c7b7fec",
            "description": "\nLanguage of the personality\n\n\n* `af` - Afrikaans\n* `ar` - Arabic\n* `bn` - Bengali\n* `bg` - Bulgarian\n* `zh` - Chinese Simplified\n* `cs` - Czech\n* `da` - Danish\n* `nl` - Dutch\n* `en` - English\n* `et` - Estonian\n* `fi` - Finnish\n* `fr` - French\n* `de` - German\n* `el` - Greek\n* `gu` - Gujarati\n* `hi` - Hindi\n* `he` - Hebrew\n* `hu` - Hungarian\n* `id` - Indonesian\n* `it` - Italian\n* `ja` - Japanese\n* `kn` - Kannada\n* `ko` - Korean\n* `ms` - Malay\n* `ml` - Malayalam\n* `mr` - Marathi\n* `multi` - Multilingual\n* `no` - Norwegian\n* `pl` - Polish\n* `pa` - Punjabi\n* `pt` - Portuguese\n* `ro` - Romanian\n* `ru` - Russian\n* `sk` - Slovak\n* `es` - Spanish\n* `sv` - Swedish\n* `th` - Thai\n* `tr` - Turkish\n* `tl` - Tagalog\n* `ta` - Tamil\n* `te` - Telugu\n* `uk` - Ukrainian\n* `vi` - Vietnamese"
          },
          "accent": {
            "type": "string",
            "description": "\nAccent of the personality\nExample: `\"American\"`\n",
            "maxLength": 255
          },
          "background_noise": {
            "type": "string",
            "description": "\nBackground noise\n"
          },
          "voice_model": {
            "type": "string",
            "description": "\nVoice model name\n"
          },
          "voice_id": {
            "type": "string",
            "description": "\nVoice ID\nExample: `\"TX3LPaxmHKxFdv7VOQHJ\"`\n"
          },
          "interruption_level": {
            "type": "string",
            "description": "\nInterruption level\n"
          },
          "speed": {
            "type": "string",
            "description": "\nSpeed of the voice\n"
          },
          "generation_config": {
            "type": "string",
            "description": "\nGeneration config for Cartesia Sonic-3 voice model.\nOnly valid when provider is \"cartesia\" and voice_model is \"sonic-3.5\".\nSupports volume and emotion\nExample: {\"volume\": 1.5, \"emotion\": \"happy\"}\n"
          },
          "network_simulation": {
            "type": "string",
            "description": "\nNetwork simulation configuration for testing network impairments.\n"
          },
          "message_plan": {
            "type": "string",
            "description": "\nMessage plan configuration for idle timeout behavior.\nSupports idle_timeout_seconds (positive int) and idle_message_max_spoken_count (positive int).\nExample: {\"idle_timeout_seconds\": 15, \"idle_message_max_spoken_count\": 2}\n"
          },
          "start_speaking_plan": {
            "type": "string",
            "description": "\nWait seconds before the bot starts speaking (float >= 0).\nIgnored if interruption_level is also set in the same request (preset takes precedence).\nExample: 0.7\n"
          },
          "stop_speaking_plan": {
            "type": [
              "string",
              "null"
            ],
            "description": "\nStop speaking plan configuration. Controls when the bot stops speaking.\nSupports num_words (int >= 0), voice_seconds (float >= 0), backoff_seconds (float >= 0).\nIgnored if interruption_level is also set in the same request (preset takes precedence).\nExample: {\"num_words\": 3, \"voice_seconds\": 0.3, \"backoff_seconds\": 0}\n"
          },
          "background_sound_volume": {
            "type": [
              "string",
              "null"
            ],
            "description": "\nBackground sound volume levels (0.0 to 1.0). base sets both the base and normal volume; reduced sets the quieter level during bot speech.\nExample: {\"base\": 0.05, \"reduced\": 0.02}\n"
          },
          "patronus_settings": {
            "oneOf": [
              {},
              {
                "type": "null"
              }
            ],
            "readOnly": true
          },
          "provider_agent_id": {
            "type": "string",
            "readOnly": true,
            "description": "\nProvider agent ID\nExample: `\"assistant_123\"`\n"
          },
          "end_call_enabled": {
            "type": "boolean",
            "default": true,
            "description": "\nWhether the end call is enabled\n"
          },
          "provider": {
            "enum": [
              "11labs",
              "cartesia"
            ],
            "type": "string",
            "x-spec-enum-id": "82a968d406c39bf3",
            "description": "\nProvider of the voice\n\n\n* `11labs` - Elevenlabs\n* `cartesia` - Cartesia"
          }
        },
        "required": [
          "background_noise",
          "name",
          "voice_model"
        ]
      },
      "CriticalMetricCategory": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "metric": {
            "type": "integer",
            "readOnly": true
          },
          "agent": {
            "type": [
              "integer",
              "null"
            ],
            "readOnly": true
          },
          "category": {
            "type": "string",
            "readOnly": true
          },
          "priority": {
            "enum": [
              "critical",
              "non-critical",
              "not_a_bug"
            ],
            "type": "string",
            "description": "* `critical` - Critical\n* `non-critical` - Non Critical\n* `not_a_bug` - Not A Bug",
            "x-spec-enum-id": "6b5f38576e0a1903"
          },
          "result": {
            "type": "integer",
            "writeOnly": true
          },
          "run": {
            "type": "integer",
            "writeOnly": true
          },
          "call_log": {
            "type": "integer",
            "writeOnly": true
          }
        }
      },
      "CriticalMetricScenario": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "scenario": {
            "type": "string",
            "readOnly": true,
            "description": "Name of the scenario"
          },
          "priority": {
            "enum": [
              "critical",
              "non-critical",
              "not_a_bug"
            ],
            "type": "string",
            "x-spec-enum-id": "6b5f38576e0a1903",
            "description": "Priority of the Critical Metric Scenario\n\n* `critical` - Critical\n* `non-critical` - Non Critical\n* `not_a_bug` - Not A Bug"
          },
          "result": {
            "type": "integer",
            "writeOnly": true
          },
          "call_log": {
            "type": "integer",
            "writeOnly": true
          }
        }
      },
      "CronJob": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "agent": {
            "type": "integer",
            "description": "\nAgent ID for the cron job\nExample: `123`\n"
          },
          "name": {
            "type": "string",
            "description": "Name for the cronjob",
            "maxLength": 255
          },
          "crontab_expression": {
            "type": "string",
            "description": "\nCrontab expression for the cron job\nExample: \n- `\"0 9 * * 1-5\"`\n- `\"0 0 * * 0\"`\n",
            "maxLength": 255
          },
          "timezone": {
            "type": "string",
            "description": "\nTimezone for the cron job\nExample: `\"America/Los_Angeles\"`\n"
          },
          "scenarios": {
            "writeOnly": true,
            "description": "\nList of scenario IDs for the cron job\nExample: `[123, 456, 789]`\n"
          },
          "scenario_ids": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "readOnly": true,
            "description": "\nList of scenario IDs for the cron job\nExample: `[123, 456, 789]`\n"
          },
          "scenarios_data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ScenarioInline"
            },
            "readOnly": true
          },
          "personality": {
            "type": [
              "integer",
              "null"
            ],
            "description": "\n(Deprecated) Use personalities field instead.\nExample: `1` (personality ID)\n"
          },
          "personalities": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "\nList of personalities to use for test execution. Multiple personalities can be assigned to run tests with different configurations.\nExample: `[1, 2, 3]` (personality IDs)\n"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "\nList of tags for the cron job\nExample: `[\"tag1\", \"tag2\", \"tag3\"]`\n"
          },
          "frequency": {
            "type": "integer",
            "maximum": 100,
            "minimum": 1,
            "description": "\nFrequency for the cron job\nExample: `1`\n"
          },
          "concurrency_limit": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 1,
            "writeOnly": true,
            "description": "\nMax number of parallel conversations to run per execution.\nLeave unset for no cap (uses default capacity).\nExample: `3`\n"
          },
          "run_as_text": {
            "type": "boolean",
            "description": "\nDEPRECATED: Use execution_mode instead. Kept for backward compatibility.\nRun the cron job as text\nExample: `true` or `false`\n"
          },
          "execution_mode": {
            "enum": [
              "voice",
              "text",
              "sip",
              "vapi_webrtc",
              "retell_webrtc",
              "elevenlabs",
              "ello",
              "livekit_v2",
              "pipecat_v2",
              "agora"
            ],
            "type": "string",
            "x-spec-enum-id": "aef421315acd0ca3",
            "description": "\nExecution mode for the cron job\nChoices: voice, text, sip, vapi_webrtc, elevenlabs, pipecat_v2, livekit_v2, retell_webrtc, ello, agora\nExample: `\"voice\"`, `\"text\"`, `\"sip\"`, `\"pipecat_v2\"`, `\"elevenlabs\"`, or `\"livekit_v2\"`\n\n\n* `voice` - Voice\n* `text` - Text\n* `sip` - SIP\n* `vapi_webrtc` - VAPI WebRTC\n* `retell_webrtc` - Retell WebRTC\n* `elevenlabs` - ElevenLabs\n* `ello` - Ello\n* `livekit_v2` - LiveKit\n* `pipecat_v2` - Pipecat\n* `agora` - Agora"
          },
          "notify_on": {
            "enum": [
              "never",
              "success",
              "failure",
              "both"
            ],
            "type": "string",
            "x-spec-enum-id": "d06ae6855e4121c0",
            "description": "\nSelect when to notify \n\n\n* `never` - Never\n* `success` - Success\n* `failure` - Failure\n* `both` - Both"
          },
          "is_active": {
            "type": "boolean"
          },
          "created_by": {
            "type": "integer",
            "readOnly": true
          },
          "created_via": {
            "enum": [
              "user",
              "api",
              "mcp",
              "cli",
              "sdk",
              null
            ],
            "type": [
              "string",
              "null"
            ],
            "x-spec-enum-id": "360ac7f2b69a95cc",
            "readOnly": true,
            "description": "How the cron job was created: user (UI), api (API key), or mcp (MCP client)\n\n* `user` - User\n* `api` - API\n* `mcp` - MCP\n* `cli` - CLI\n* `sdk` - SDK"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true,
            "description": "\nTimestamp when the cron job was created\nExample: `2021-01-01 00:00:00`\n"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true,
            "description": "\nTimestamp when the cron job was last updated\nExample: `2021-01-01 00:00:00`\n"
          }
        },
        "required": [
          "crontab_expression"
        ]
      },
      "CustomTokenObtainPair": {
        "type": "object",
        "properties": {
          "api_key": {
            "type": "string"
          },
          "agent_id": {
            "type": "integer"
          }
        },
        "required": [
          "agent_id",
          "api_key"
        ]
      },
      "Dashboard": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Name of the dashboard",
            "maxLength": 255
          },
          "project": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Project this dashboard belongs to"
          },
          "filters": {
            "type": [
              "object",
              "null"
            ],
            "description": "Filter conditions to scope the data. See the [Dashboards guide](https://docs.cekura.ai/documentation/guides/dashboards#filters) for supported fields, operators, and syntax.",
            "properties": {
              "field": {
                "type": "string",
                "description": "Field name to filter on",
                "examples": [
                  "success",
                  "duration",
                  "timestamp",
                  "metadata.region",
                  "metric_evaluations.value"
                ]
              },
              "op": {
                "type": "string",
                "enum": [
                  "eq",
                  "neq",
                  "gt",
                  "gte",
                  "lt",
                  "lte",
                  "contains",
                  "startswith",
                  "endswith",
                  "in",
                  "isnull",
                  "regex"
                ],
                "description": "Comparison operator"
              },
              "value": {
                "description": "Value to compare against. Type depends on the field and operator."
              },
              "operator": {
                "type": "string",
                "enum": [
                  "and",
                  "or",
                  "same_row"
                ],
                "description": "Logical operator to combine conditions"
              },
              "conditions": {
                "type": "array",
                "description": "List of filter conditions or nested groups",
                "items": {}
              }
            },
            "examples": [
              {
                "field": "success",
                "op": "eq",
                "value": true
              },
              {
                "operator": "and",
                "conditions": [
                  {
                    "field": "timestamp",
                    "op": "gte",
                    "value": "today-7d"
                  },
                  {
                    "field": "duration",
                    "op": "gte",
                    "value": 60
                  }
                ]
              }
            ]
          },
          "widgets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Widget"
            },
            "readOnly": true
          },
          "widget_count": {
            "type": "string",
            "readOnly": true,
            "description": "Number of widgets in the dashboard"
          },
          "created_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "readOnly": true,
            "description": "When the dashboard was created"
          },
          "updated_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "readOnly": true,
            "description": "When the dashboard was last updated"
          }
        }
      },
      "DashboardList": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Name of the dashboard",
            "maxLength": 255
          },
          "project": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Project this dashboard belongs to"
          },
          "filters": {
            "type": [
              "object",
              "null"
            ],
            "description": "Filter conditions to scope the data. See the [Dashboards guide](https://docs.cekura.ai/documentation/guides/dashboards#filters) for supported fields, operators, and syntax.",
            "properties": {
              "field": {
                "type": "string",
                "description": "Field name to filter on",
                "examples": [
                  "success",
                  "duration",
                  "timestamp",
                  "metadata.region",
                  "metric_evaluations.value"
                ]
              },
              "op": {
                "type": "string",
                "enum": [
                  "eq",
                  "neq",
                  "gt",
                  "gte",
                  "lt",
                  "lte",
                  "contains",
                  "startswith",
                  "endswith",
                  "in",
                  "isnull",
                  "regex"
                ],
                "description": "Comparison operator"
              },
              "value": {
                "description": "Value to compare against. Type depends on the field and operator."
              },
              "operator": {
                "type": "string",
                "enum": [
                  "and",
                  "or",
                  "same_row"
                ],
                "description": "Logical operator to combine conditions"
              },
              "conditions": {
                "type": "array",
                "description": "List of filter conditions or nested groups",
                "items": {}
              }
            },
            "examples": [
              {
                "field": "success",
                "op": "eq",
                "value": true
              },
              {
                "operator": "and",
                "conditions": [
                  {
                    "field": "timestamp",
                    "op": "gte",
                    "value": "today-7d"
                  },
                  {
                    "field": "duration",
                    "op": "gte",
                    "value": 60
                  }
                ]
              }
            ]
          },
          "widget_count": {
            "type": "string",
            "readOnly": true,
            "description": "Number of widgets in the dashboard"
          },
          "created_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "readOnly": true,
            "description": "When the dashboard was created"
          },
          "updated_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "readOnly": true,
            "description": "When the dashboard was last updated"
          }
        }
      },
      "DeepResearchInsight": {
        "type": "object",
        "description": "Project-level Deep Research audit row exposed to the Insights tab.\n\n`failure_modes` is filtered against the project's dismissed mode\ntitles — a thumbs-down on a mode hides it from every subsequent\nrender of every insight in the project (project-scoped, not\ninsight-scoped).",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "project": {
            "type": "integer",
            "readOnly": true
          },
          "window_start": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "window_end": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "num_calls_analyzed": {
            "type": "integer",
            "readOnly": true
          },
          "status": {
            "enum": [
              "pending",
              "running",
              "succeeded",
              "failed",
              "skipped_not_enough_data"
            ],
            "type": "string",
            "description": "* `pending` - Pending\n* `running` - Running\n* `succeeded` - Succeeded\n* `failed` - Failed\n* `skipped_not_enough_data` - Skipped Not Enough Data",
            "x-spec-enum-id": "128862fca689ae44",
            "readOnly": true
          },
          "focus": {
            "type": "string",
            "readOnly": true
          },
          "focus_fallback": {
            "type": "boolean",
            "readOnly": true
          },
          "failure_modes": {
            "type": "string",
            "readOnly": true
          },
          "error_message": {
            "type": "string",
            "readOnly": true
          },
          "duration_seconds": {
            "type": [
              "number",
              "null"
            ],
            "format": "double",
            "readOnly": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          }
        }
      },
      "DeepResearchInsightGenerate": {
        "type": "object",
        "description": "Request body for ``POST /deep-research-insights/generate/``.",
        "properties": {
          "project": {
            "type": "integer",
            "description": "Project ID to generate Deep Research for."
          },
          "window_days": {
            "type": "integer",
            "maximum": 30,
            "minimum": 1,
            "default": 7
          },
          "max_calls": {
            "type": "integer",
            "maximum": 1000,
            "minimum": 10,
            "default": 500
          },
          "focus": {
            "type": "string",
            "default": "",
            "description": "Optional research focus, stored and passed to the audit verbatim. If it cannot be understood, the audit falls back to a full audit.",
            "maxLength": 2000
          }
        },
        "required": [
          "project"
        ]
      },
      "DeepResearchModeDismissalCreate": {
        "type": "object",
        "description": "Request body for thumbs-down submission.",
        "properties": {
          "project": {
            "type": "integer",
            "description": "Project ID the dismissal applies to."
          },
          "insight": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Optional Deep Research insight ID the mode was seen on."
          },
          "mode_title": {
            "type": "string",
            "description": "Exact title of the failure mode to suppress.",
            "maxLength": 200
          },
          "mode_details": {
            "type": "string",
            "default": "",
            "description": "Optional detail text of the failure mode, stored with the dismissal."
          },
          "mode_severity": {
            "type": "string",
            "default": "",
            "description": "Optional severity label of the failure mode, stored with the dismissal.",
            "maxLength": 20
          },
          "note": {
            "type": "string",
            "default": "",
            "description": "Optional reason. Empty is fine — a bare thumbs-down still dismisses."
          }
        },
        "required": [
          "mode_title",
          "project"
        ]
      },
      "DeleteCallLogs": {
        "type": "object",
        "properties": {
          "agent_id": {
            "type": "integer",
            "description": "Agent ID to filter call logs"
          },
          "call_logs": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "List of call log IDs to delete"
          },
          "retain_evaluations": {
            "type": "boolean",
            "default": false,
            "description": "If true, metric evaluations are retained and the calls are not soft-deleted. Default: false."
          }
        },
        "required": [
          "call_logs"
        ]
      },
      "DeleteFolderRequest": {
        "type": "object",
        "properties": {
          "path": {
            "type": "string",
            "description": "Folder path to delete. Example: \"Sales.Inbound\""
          },
          "project_id": {
            "type": "integer",
            "description": "Project ID the folder belongs to"
          }
        },
        "required": [
          "path",
          "project_id"
        ]
      },
      "DisablePersonalitiesRequest": {
        "type": "object",
        "properties": {
          "personalities": {
            "description": "List of personality IDs, e.g. `[1, 2, 3]`, or the string `\"all\"`"
          },
          "language": {
            "type": "string",
            "description": "ISO 639-1 language code to filter personalities, e.g. `\"en\"`, `\"es\"`"
          }
        },
        "required": [
          "personalities"
        ]
      },
      "DisablePersonalitiesResponse": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string"
          }
        },
        "required": [
          "message"
        ]
      },
      "DiscordServer": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "server_name": {
            "type": "string",
            "maxLength": 255
          },
          "channel_id": {
            "type": "string",
            "maxLength": 255
          },
          "organization": {
            "type": "integer"
          },
          "project": {
            "type": [
              "integer",
              "null"
            ]
          },
          "is_verified": {
            "type": "boolean",
            "readOnly": true
          }
        },
        "required": [
          "channel_id",
          "project",
          "server_name"
        ]
      },
      "DuplicateDashboardRequest": {
        "type": "object",
        "description": "Request serializer for duplicating a dashboard.\n\nOptionally accepts a new name for the duplicated dashboard.",
        "properties": {
          "name": {
            "type": "string",
            "description": "Optional name for the duplicated dashboard. If not provided, defaults to 'Copy of <original_name>'",
            "maxLength": 255
          }
        }
      },
      "DuplicateScenariosRequest": {
        "type": "object",
        "properties": {
          "project": {
            "type": "integer",
            "description": "Project ID containing the source evaluators."
          },
          "copy_to_project": {
            "type": "integer",
            "description": "Destination project ID in the same organization."
          },
          "scenarios": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "IDs of the evaluators to duplicate."
          },
          "scenario_agent": {
            "type": "integer",
            "description": "Optional destination agent ID. It must belong to the destination project."
          },
          "folder_path": {
            "type": "string",
            "description": "Destination folder path. Created when it does not already exist."
          }
        },
        "required": [
          "copy_to_project",
          "project",
          "scenarios"
        ]
      },
      "ElevenLabsConfig": {
        "type": "object",
        "description": "ElevenLabs provider configuration.",
        "properties": {
          "trigger_url": {
            "type": "string",
            "description": "URL Cekura calls to create outbound ElevenLabs phone calls."
          },
          "trigger_secret": {
            "type": "string",
            "writeOnly": true,
            "description": "Optional shared secret sent as the X-CEKURA-SECRET header on trigger URL requests, so your endpoint can reject calls it didn't expect. Write-only — responses expose trigger_secret_configured instead."
          },
          "elevenlabs_region": {
            "enum": [
              "us",
              "eu"
            ],
            "type": "string",
            "x-spec-enum-id": "450cf1402ab1a3c6",
            "description": "ElevenLabs API region. 'us' uses api.elevenlabs.io, 'eu' uses api.eu.residency.elevenlabs.io. Defaults to 'us'.\n\n* `us` - us\n* `eu` - eu"
          },
          "elevenlabs_base_url_override": {
            "type": "string",
            "description": "Optional custom base URL for ElevenLabs API. Takes precedence over elevenlabs_region if set."
          }
        },
        "title": "ElevenLabs"
      },
      "EnableDisablePersonalities": {
        "type": "object",
        "properties": {
          "personalities": {
            "description": "List of personality IDs to enable/disable, or the string 'all'."
          },
          "language": {
            "type": [
              "string",
              "null"
            ],
            "description": "Language filter. Only used when personalities='all'."
          }
        },
        "required": [
          "personalities"
        ]
      },
      "EnablePersonalitiesRequest": {
        "type": "object",
        "properties": {
          "personalities": {
            "description": "List of personality IDs, e.g. `[1, 2, 3]`, or the string `\"all\"`"
          },
          "language": {
            "type": "string",
            "description": "ISO 639-1 language code to filter personalities, e.g. `\"en\"`, `\"es\"`"
          }
        },
        "required": [
          "personalities"
        ]
      },
      "EvaluateLlmJudgeMetricRequest": {
        "type": "object",
        "properties": {
          "description": {
            "type": "string",
            "description": "Evaluation prompt for the LLM judge."
          },
          "data": {
            "description": "Per-call payload (transcript, metadata, voice_recording, etc.) the metric runs against."
          },
          "eval_type": {
            "type": [
              "string",
              "null"
            ],
            "description": "One of binary, numeric, continuous_qualitative, enum. Legacy values (binary_workflow_adherence, binary_qualitative) are accepted and mapped to binary."
          },
          "enum_values": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "Required when eval_type='enum'."
          },
          "audio": {
            "type": "boolean",
            "description": "When true, the LLM judge analyzes the voice recording instead of (or in addition to) the transcript."
          },
          "audio_start_time": {
            "type": [
              "number",
              "null"
            ],
            "format": "double",
            "description": "Optional clip start (seconds from call start) when audio=true."
          },
          "audio_end_time": {
            "type": [
              "number",
              "null"
            ],
            "format": "double",
            "description": "Optional clip end (seconds from call start) when audio=true."
          }
        },
        "required": [
          "data",
          "description"
        ]
      },
      "EvaluateLlmJudgeMetricResponse": {
        "type": "object",
        "properties": {
          "progress_id": {
            "type": "string",
            "description": "Poll evaluate_metric_progress with this ID."
          }
        },
        "required": [
          "progress_id"
        ]
      },
      "EvaluateMetrics": {
        "type": "object",
        "properties": {
          "agent_id": {
            "type": "integer",
            "description": "Cekura agent ID. Provide this or `project_id`. Example: `224`"
          },
          "project_id": {
            "type": "integer",
            "description": "Project ID. Provide this or `agent_id`. Example: `456`"
          },
          "call_logs": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "IDs of the call logs to evaluate. Example: `[123, 456]`"
          },
          "metrics": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "IDs of the metrics to run. Must belong to the agent/project. Example: `[789, 790]`"
          }
        },
        "required": [
          "call_logs",
          "metrics"
        ]
      },
      "Evaluation": {
        "type": "object",
        "properties": {
          "metrics": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CallLogListSerializerMetricsWithExplanation"
            }
          }
        },
        "required": [
          "metrics"
        ]
      },
      "ExpectedOutcome": {
        "type": "object",
        "properties": {
          "score": {
            "type": "number",
            "format": "double",
            "description": "Score of the expected outcome"
          },
          "explanation": {
            "type": "array",
            "items": {
              "type": "string",
              "description": "Explanation of the expected outcome"
            }
          },
          "outcome_alignments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OutcomeAlignment"
            }
          }
        },
        "required": [
          "explanation",
          "outcome_alignments",
          "score"
        ]
      },
      "FailureCategoryCallsResponse": {
        "type": "object",
        "properties": {
          "count": {
            "type": "integer"
          },
          "call_log_ids": {
            "type": "array",
            "items": {
              "type": "integer"
            }
          }
        },
        "required": [
          "call_log_ids",
          "count"
        ]
      },
      "GenerateClarifyAnswer": {
        "type": "object",
        "description": "Body for POST /scenarios/generate-clarify-answer/.",
        "properties": {
          "progress_id": {
            "type": "string",
            "description": "UUID progress_id returned by the generate-bg endpoint."
          },
          "answer": {
            "type": "string",
            "description": "User's answer to the clarification question(s) asked by the agent.",
            "maxLength": 10000
          }
        },
        "required": [
          "answer",
          "progress_id"
        ]
      },
      "GenerateCleanDescriptionBgResponse": {
        "type": "object",
        "properties": {
          "progress_id": {
            "type": "string"
          }
        },
        "required": [
          "progress_id"
        ]
      },
      "GenerateCleanDescriptionProgressResponse": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string"
          },
          "clean_description": {
            "type": "string"
          },
          "thinking": {
            "type": "string"
          },
          "error": {
            "type": "string"
          }
        },
        "required": [
          "status"
        ]
      },
      "GenesysConfig": {
        "type": "object",
        "description": "Genesys Cloud provider configuration.",
        "properties": {
          "client_id": {
            "type": "string",
            "description": "Genesys Cloud OAuth2 Client ID."
          },
          "region": {
            "type": "string",
            "description": "Genesys Cloud region, e.g. us-east-1."
          }
        },
        "required": [
          "client_id",
          "region"
        ],
        "title": "Genesys"
      },
      "ImportPlivoNumber": {
        "type": "object",
        "properties": {
          "plivo_phone_number": {
            "type": "string",
            "description": "Phone number in E.164 format (e.g., +14156021922)",
            "maxLength": 15
          },
          "plivo_auth_id": {
            "type": "string",
            "description": "Plivo Auth ID",
            "maxLength": 255
          },
          "plivo_auth_token": {
            "type": "string",
            "writeOnly": true,
            "description": "Plivo Auth Token",
            "maxLength": 255
          },
          "name": {
            "type": "string",
            "description": "Optional name for this phone number",
            "maxLength": 255
          },
          "is_sms_enabled": {
            "type": "boolean",
            "default": false,
            "description": "Enable SMS for this phone number"
          }
        },
        "required": [
          "plivo_auth_id",
          "plivo_auth_token",
          "plivo_phone_number"
        ]
      },
      "ImportTelnyxNumber": {
        "type": "object",
        "description": "",
        "properties": {
          "telnyx_phone_number": {
            "type": "string",
            "description": "Phone number in E.164 format (e.g., +14156021922)",
            "maxLength": 15
          },
          "telnyx_api_key": {
            "type": "string",
            "writeOnly": true,
            "description": "Telnyx API Key (V2)",
            "maxLength": 255
          },
          "name": {
            "type": "string",
            "description": "Optional name for this phone number",
            "maxLength": 255
          },
          "is_sms_enabled": {
            "type": "boolean",
            "default": false,
            "description": "Enable SMS for this phone number"
          }
        },
        "required": [
          "telnyx_api_key",
          "telnyx_phone_number"
        ]
      },
      "ImportTwilioNumber": {
        "type": "object",
        "description": "",
        "properties": {
          "twilio_phone_number": {
            "type": "string",
            "description": "Phone number in E.164 format (e.g., +14156021922)",
            "maxLength": 15
          },
          "twilio_account_sid": {
            "type": "string",
            "description": "Twilio Account SID",
            "maxLength": 255
          },
          "twilio_auth_token": {
            "type": "string",
            "writeOnly": true,
            "description": "Twilio Auth Token",
            "maxLength": 255
          },
          "name": {
            "type": "string",
            "description": "Optional name for this phone number",
            "maxLength": 255
          },
          "is_sms_enabled": {
            "type": "boolean",
            "default": false,
            "description": "Enable SMS for this phone number"
          }
        },
        "required": [
          "twilio_account_sid",
          "twilio_auth_token",
          "twilio_phone_number"
        ]
      },
      "ImproveInstructionsResponse": {
        "type": "object",
        "properties": {
          "progress_id": {
            "type": "string"
          },
          "project_id": {
            "type": "integer"
          }
        },
        "required": [
          "progress_id",
          "project_id"
        ]
      },
      "InsightReproductionRequest": {
        "type": "object",
        "description": "Request body for\n``POST /metric-failure-mode-insights/<id>/reproduce/``.\n\nKicks off the full reproduction loop for one failure mode: draft a\nscenario, then run it against the agent — on the same channel the cited\ncall logs used — until a run fails the insight's metric or the attempt\nbudget is spent. Returns a ``reproduction_session_id`` to poll.",
        "properties": {
          "failure_mode_index": {
            "type": "integer",
            "minimum": 0,
            "description": "Zero-based index of the failure mode within the insight's failure_modes list."
          },
          "agent": {
            "type": "integer",
            "description": "ID of the agent to reproduce the failure against (resolved from the failure mode's example calls on the frontend)."
          },
          "max_attempts": {
            "type": "integer",
            "maximum": 25,
            "minimum": 1,
            "default": 10,
            "description": "How many times to run the scenario before giving up. The loop stops early as soon as one run reproduces the failure. Defaults to 10."
          },
          "redact_transcripts": {
            "type": "boolean",
            "default": false,
            "description": "If true, strip personal identifiers from the example call transcripts before they are used to draft the reproducing scenario. Semantic context is preserved. Defaults to false."
          }
        },
        "required": [
          "agent",
          "failure_mode_index"
        ]
      },
      "InsightReproductionSession": {
        "type": "object",
        "description": "Read view of a reproduction session — what the frontend polls to track\nprogress and, once done, link to the run that reproduced the failure.",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "insight": {
            "type": "integer"
          },
          "project": {
            "type": "integer"
          },
          "agent": {
            "type": "integer"
          },
          "failure_mode_index": {
            "type": "integer",
            "maximum": 2147483647,
            "minimum": -2147483648
          },
          "failure_mode_title": {
            "type": "string",
            "maxLength": 255
          },
          "metric": {
            "type": [
              "integer",
              "null"
            ]
          },
          "predefined_metric": {
            "type": [
              "integer",
              "null"
            ]
          },
          "metric_name": {
            "type": "string",
            "maxLength": 255
          },
          "execution_mode": {
            "type": "string",
            "maxLength": 32
          },
          "status": {
            "enum": [
              "pending",
              "generating_scenario",
              "running",
              "reproduced",
              "exhausted",
              "failed"
            ],
            "type": "string",
            "description": "* `pending` - Pending\n* `generating_scenario` - Generating Scenario\n* `running` - Running\n* `reproduced` - Reproduced\n* `exhausted` - Exhausted\n* `failed` - Failed",
            "x-spec-enum-id": "cd33c9bed092472e"
          },
          "scenario_ids": {},
          "max_attempts": {
            "type": "integer",
            "maximum": 2147483647,
            "minimum": -2147483648
          },
          "attempts_made": {
            "type": "integer",
            "maximum": 2147483647,
            "minimum": -2147483648
          },
          "reproduced": {
            "type": "boolean"
          },
          "current_result": {
            "type": [
              "integer",
              "null"
            ]
          },
          "reproducing_run": {
            "type": [
              "integer",
              "null"
            ]
          },
          "reproducing_result": {
            "type": [
              "integer",
              "null"
            ]
          },
          "error_message": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          }
        },
        "required": [
          "agent",
          "failure_mode_index",
          "insight",
          "project"
        ]
      },
      "Invite": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "organization": {
            "type": "integer",
            "readOnly": true
          },
          "organization_name": {
            "type": "string",
            "readOnly": true
          },
          "email": {
            "type": "string",
            "format": "email",
            "readOnly": true
          },
          "role": {
            "enum": [
              "admin",
              "member",
              "view_only",
              "labs",
              "labs_view_only",
              "insights_view"
            ],
            "type": "string",
            "description": "* `admin` - Admin\n* `member` - Member\n* `view_only` - View Only\n* `labs` - Labs\n* `labs_view_only` - Labs View Only\n* `insights_view` - Insights View Only",
            "x-spec-enum-id": "dc933c4519c4289a"
          },
          "status": {
            "enum": [
              "pending",
              "accepted",
              "rejected"
            ],
            "type": "string",
            "description": "* `pending` - Pending\n* `accepted` - Accepted\n* `rejected` - Rejected",
            "x-spec-enum-id": "4874309ac8d0a714",
            "readOnly": true
          },
          "invite_type": {
            "enum": [
              "invite",
              "request"
            ],
            "type": "string",
            "description": "* `invite` - Admin Invite\n* `request` - User Request",
            "x-spec-enum-id": "6516c16eaa0594d4",
            "readOnly": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "projects": {
            "type": "string",
            "readOnly": true
          }
        }
      },
      "KnowledgeBaseConnector": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "agent": {
            "type": "integer",
            "description": "Agent this connector belongs to"
          },
          "name": {
            "type": "string",
            "description": "Friendly name for this BigQuery connector",
            "maxLength": 255
          },
          "connector_type": {
            "enum": [
              "bigquery",
              "website"
            ],
            "type": "string",
            "x-spec-enum-id": "41b646a5b769059c",
            "description": "Type of connector\n\n* `bigquery` - Google BigQuery\n* `website` - Website Scraper"
          },
          "credentials": {
            "description": "\nEncrypted credentials containing BigQuery service account JSON as a string.\nExample: `{\"service_account_json\": \"{\\\"type\\\": \\\"service_account\\\", \\\"project_id\\\": \\\"...\\\", ...}\"}`\n"
          },
          "config": {
            "description": "\nConfiguration for the BigQuery connector (non-sensitive data).\nExample: `{\"query\": \"SELECT * FROM dataset.table WHERE date > CURRENT_DATE() - 7\"}`\n"
          },
          "sync_interval_minutes": {
            "type": "integer",
            "maximum": 2147483647,
            "minimum": -2147483648,
            "description": "Interval in minutes between automatic syncs (default: 1440 = daily)"
          },
          "sync_enabled": {
            "type": "boolean",
            "description": "Whether automatic syncing is enabled for this connector"
          },
          "last_sync_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "readOnly": true,
            "description": "Timestamp of the last successful sync"
          },
          "last_sync_status": {
            "type": "string",
            "readOnly": true,
            "description": "Status of the last sync: pending, success, failed"
          },
          "last_sync_error": {
            "type": "string",
            "readOnly": true,
            "description": "Error message from the last failed sync"
          },
          "files": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "readOnly": true,
            "description": "The KnowledgeBaseFiles that this connector manages"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true,
            "description": "When this record was created.\nExample: `2024-03-15T10:30:45Z`"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true,
            "description": "When this record was last updated.\nExample: `2024-03-15T10:35:11Z`"
          }
        },
        "required": [
          "agent",
          "name"
        ]
      },
      "KnowledgeBaseConnectorList": {
        "type": "object",
        "description": "Simplified serializer for listing connectors (excludes sensitive credentials).",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "agent": {
            "type": "integer",
            "readOnly": true,
            "description": "Agent this connector belongs to"
          },
          "name": {
            "type": "string",
            "readOnly": true,
            "description": "Friendly name for this BigQuery connector"
          },
          "connector_type": {
            "enum": [
              "bigquery",
              "website"
            ],
            "type": "string",
            "x-spec-enum-id": "41b646a5b769059c",
            "readOnly": true,
            "description": "Type of connector\n\n* `bigquery` - Google BigQuery\n* `website` - Website Scraper"
          },
          "config": {
            "readOnly": true,
            "description": "\nConfiguration for the BigQuery connector (non-sensitive data).\nExample: `{\"query\": \"SELECT * FROM dataset.table WHERE date > CURRENT_DATE() - 7\"}`\n"
          },
          "sync_interval_minutes": {
            "type": "integer",
            "readOnly": true,
            "description": "Interval in minutes between automatic syncs (default: 1440 = daily)"
          },
          "sync_enabled": {
            "type": "boolean",
            "readOnly": true,
            "description": "Whether automatic syncing is enabled for this connector"
          },
          "last_sync_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "readOnly": true,
            "description": "Timestamp of the last successful sync"
          },
          "last_sync_status": {
            "type": "string",
            "readOnly": true,
            "description": "Status of the last sync: pending, success, failed"
          },
          "last_sync_error": {
            "type": "string",
            "readOnly": true,
            "description": "Error message from the last failed sync"
          },
          "files": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "readOnly": true,
            "description": "The KnowledgeBaseFiles that this connector manages"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true,
            "description": "When this record was created.\nExample: `2024-03-15T10:30:45Z`"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true,
            "description": "When this record was last updated.\nExample: `2024-03-15T10:35:11Z`"
          }
        }
      },
      "KnowledgeBaseFile": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "agent": {
            "type": "integer"
          },
          "file": {
            "type": "string",
            "format": "uri",
            "writeOnly": true,
            "description": "Knowledge base file",
            "pattern": "(?:pdf|txt|json|csv|xml|md)$"
          },
          "file_url": {
            "type": "string",
            "readOnly": true,
            "description": "URL of the Knowledge file"
          },
          "file_name": {
            "type": "string",
            "readOnly": true,
            "description": "Name of the Knowledge file"
          },
          "file_type": {
            "type": "string",
            "readOnly": true,
            "description": "MIME type of the Knowledge file"
          },
          "file_size": {
            "type": "integer",
            "readOnly": true,
            "description": "Size in bytes.\nExample: `1048576`"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true,
            "description": "When this record was created.\nExample: `2024-03-15T10:30:45Z`"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true,
            "description": "When this record was last updated.\nExample: `2024-03-15T10:35:11Z`"
          }
        },
        "required": [
          "agent",
          "file"
        ]
      },
      "KoreAiConfig": {
        "type": "object",
        "description": "Kore.ai provider configuration.",
        "properties": {
          "client_id": {
            "type": "string",
            "description": "KoreAI OAuth2 Client ID."
          },
          "bot_id": {
            "type": "string",
            "description": "KoreAI Bot ID to connect to."
          },
          "host": {
            "type": "string",
            "description": "KoreAI host URL. Defaults to https://bots.kore.ai."
          }
        },
        "required": [
          "bot_id",
          "client_id"
        ],
        "title": "Kore.ai"
      },
      "LiveKitConfig": {
        "type": "object",
        "description": "LiveKit provider configuration.",
        "properties": {
          "api_secret": {
            "type": "string",
            "description": "LiveKit API secret. Required alongside api_key."
          },
          "url": {
            "type": "string",
            "description": "LiveKit server WebSocket URL, e.g. wss://acme.livekit.cloud."
          },
          "agent_name": {
            "type": "string",
            "description": "LiveKit agent name to connect to."
          },
          "config": {
            "description": "Additional LiveKit configuration as a JSON object."
          },
          "tracing_enabled": {
            "type": "boolean",
            "description": "Enable LiveKit tracing (requires Cekura SDK integrated in your LiveKit agent)."
          },
          "trigger_url": {
            "type": "string",
            "description": "URL Cekura calls to create outbound phone calls."
          },
          "trigger_secret": {
            "type": "string",
            "writeOnly": true,
            "description": "Optional shared secret sent as the X-CEKURA-SECRET header on trigger URL requests, so your endpoint can reject calls it didn't expect. Write-only — responses expose trigger_secret_configured instead."
          }
        },
        "required": [
          "api_secret",
          "url"
        ],
        "title": "LiveKit"
      },
      "LivekitRunDataOverride": {
        "type": "object",
        "description": "Per-run LiveKit overrides. Credentials (api_key/api_secret) are never taken here — they are read from the agent/project ProviderCredential.",
        "properties": {
          "config": {
            "description": "Room configuration to use for this run (e.g. empty_timeout, max_participants). Fully replaces the agent/project saved config — no merge."
          },
          "agent_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "LiveKit agent name for explicit dispatch. Overrides the agent/project saved agent_name."
          },
          "url": {
            "type": [
              "string",
              "null"
            ],
            "description": "LiveKit server URL override. Falls back to the agent/project saved url when omitted."
          }
        }
      },
      "LivekitScenario": {
        "type": "object",
        "description": "",
        "properties": {
          "scenario": {
            "type": "integer"
          },
          "publish_data_message": {}
        },
        "required": [
          "scenario"
        ]
      },
      "MarkMetricVote": {
        "type": "object",
        "properties": {
          "metric_id": {
            "type": "integer",
            "description": "ID of the metric to vote on"
          },
          "thumbs_up": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "True for thumbs up, False for thumbs down"
          },
          "expected_value": {
            "oneOf": [
              {},
              {
                "type": "null"
              }
            ],
            "description": "Expected value for the metric"
          },
          "feedback": {
            "type": [
              "string",
              "null"
            ],
            "description": "Feedback for the metric review"
          }
        },
        "required": [
          "expected_value",
          "metric_id",
          "thumbs_up"
        ]
      },
      "MarkMetricVoteCallLogResponse": {
        "type": "object",
        "properties": {
          "detail": {
            "type": "string"
          }
        },
        "required": [
          "detail"
        ]
      },
      "MarkMetricVoteRunResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "success"
        ]
      },
      "MembershipInline": {
        "type": "object",
        "description": "",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "user": {
            "allOf": [
              {
                "$ref": "#/components/schemas/UserInline"
              }
            ],
            "readOnly": true
          },
          "role": {
            "enum": [
              "admin",
              "member",
              "view_only",
              "labs",
              "labs_view_only",
              "insights_view"
            ],
            "type": "string",
            "description": "* `admin` - Admin\n* `member` - Member\n* `view_only` - View Only\n* `labs` - Labs\n* `labs_view_only` - Labs View Only\n* `insights_view` - Insights View Only",
            "x-spec-enum-id": "dc933c4519c4289a"
          },
          "is_email_notify_enabled": {
            "type": "boolean"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          }
        }
      },
      "MetricBasicList": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "slug": {
            "type": [
              "string",
              "null"
            ],
            "description": "URL-friendly unique identifier in snake_case format. Example: \"customer_satisfaction_1562\"",
            "maxLength": 255
          },
          "name": {
            "type": "string",
            "description": "\nName of the metric.\nExample: `\"Customer Satisfaction\"` or `\"Appointment Booking\"`\n        ",
            "maxLength": 255
          },
          "eval_type": {
            "enum": [
              "binary",
              "continuous_qualitative",
              "numeric",
              "enum"
            ],
            "type": "string",
            "x-spec-enum-id": "b40eac6824409cc2",
            "description": "\nType of evaluation\n\n\n* `binary` - Binary\n* `continuous_qualitative` - Continuous Qualitative\n* `numeric` - Numeric\n* `enum` - Enum"
          },
          "enum_values": {
            "description": "\nList of possible enum values for enum type metrics.\nExample: `[\"satisfied\", \"unsatisfied\"]`\n"
          },
          "observability_enabled": {
            "type": "boolean",
            "description": "\nEnable this metric for observability.\nExample: `true` or `false`\n        "
          },
          "simulation_enabled": {
            "type": "boolean",
            "description": "\nEnable this metric for simulations.\nExample: `true` or `false`\n        "
          },
          "sampling_enabled": {
            "type": "boolean",
            "description": "Enable sampling for this metric using project-level sample rate"
          },
          "alert_type": {
            "enum": [
              "disabled",
              "normal",
              "significant_change"
            ],
            "type": "string",
            "x-spec-enum-id": "9e2661f1aeca64cf",
            "description": "\nAlert type: disabled, normal alerts, or significant change alerts.\n\n\n* `disabled` - Alerts Disabled\n* `normal` - Normal Alerts\n* `significant_change` - Significant Change Alerts"
          },
          "function_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "\nPredefined function name\nExample: `\"get_latency\"` or `\"check_critical_deviations\"`\n",
            "maxLength": 255
          },
          "vocera_defined_metric_code": {
            "type": "string",
            "description": "\nVocera defined metric code for the metric.\nExample: `\"7fd534f5\"`\n",
            "maxLength": 255
          },
          "agents": {
            "type": "array",
            "items": {
              "type": [
                "integer",
                "null"
              ]
            }
          },
          "project": {
            "type": [
              "integer",
              "null"
            ]
          }
        },
        "required": [
          "alert_type",
          "name"
        ]
      },
      "MetricDetailSerializerV2": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "slug": {
            "type": [
              "string",
              "null"
            ],
            "description": "URL-friendly unique identifier in snake_case format. Example: \"customer_satisfaction_1562\"",
            "maxLength": 255
          },
          "project": {
            "type": [
              "integer",
              "null"
            ]
          },
          "agents": {
            "type": "array",
            "items": {
              "type": [
                "integer",
                "null"
              ]
            }
          },
          "name": {
            "type": "string",
            "description": "\nName of the metric.\nExample: `\"Customer Satisfaction\"` or `\"Appointment Booking\"`\n        ",
            "maxLength": 255
          },
          "description": {
            "type": "string",
            "description": "\nDescription of what the metric measures.\nExample: `\"Measures how satisfied customers are with the service provided\"`\n        "
          },
          "type": {
            "enum": [
              "basic",
              "custom_prompt",
              "custom_code",
              "llm_judge"
            ],
            "type": "string",
            "x-spec-enum-id": "b44700c0a6443b40",
            "description": "\nType of metric\n\n\n* `basic` - Basic (Deprecated in favor of LLM Judge)\n* `custom_prompt` - Custom Prompt ( Deprecated in favor of LLM Judge)\n* `custom_code` - Custom Code\n* `llm_judge` - LLM Judge"
          },
          "eval_type": {
            "enum": [
              "binary",
              "continuous_qualitative",
              "numeric",
              "enum"
            ],
            "type": "string",
            "description": "* `binary` - Binary\n* `continuous_qualitative` - Continuous Qualitative\n* `numeric` - Numeric\n* `enum` - Enum",
            "x-spec-enum-id": "b40eac6824409cc2"
          },
          "enum_values": {
            "description": "\nList of possible enum values for enum type metrics.\nExample: `[\"satisfied\", \"unsatisfied\"]`\n"
          },
          "audio_enabled": {
            "type": "boolean",
            "description": "\nWhether this metric requires audio analysis.\nExample: `true` or `false`\n        "
          },
          "prompt": {
            "type": "string",
            "description": "\nEvaluation prompt for the metric.\nExample: `\"Evaluate customer satisfaction based on conversation\"`\n"
          },
          "evaluation_trigger": {
            "enum": [
              "always",
              "automatic",
              "custom"
            ],
            "type": "string",
            "description": "* `always` - Always\n* `automatic` - Automatic\n* `custom` - Custom",
            "x-spec-enum-id": "ecd3c02e0e393ef5"
          },
          "trigger_type": {
            "enum": [
              "llm_judge",
              "custom_code"
            ],
            "type": "string",
            "x-spec-enum-id": "2adad4b8df61914f",
            "description": "\nType of trigger evaluation: LLM judge or custom code.\nOnly used when evaluation_trigger is CUSTOM.\nExample: `\"llm_judge\"` or `\"custom_code\"`\n\n\n* `llm_judge` - LLM Judge\n* `custom_code` - Custom Code"
          },
          "evaluation_trigger_prompt": {
            "type": "string",
            "description": "\nEvaluation trigger prompt for the metric.\nExample: `\"Evaluate metric only if call ended reason is main-agent-ended-call\"`\n"
          },
          "evaluation_trigger_custom_code": {
            "type": "string",
            "description": "\nPython custom code to determine metric relevance. Code should set _result (bool) and _explanation (str).\nExample:\n```python\n_result = True\n_explanation = \"Metric is relevant\"\nif \"call_end_reason\" in data and data[\"call_end_reason\"] == \"customer-hung-up\":\n    _result = False\n    _explanation = \"Customer hung up, metric not applicable\"\n```\n"
          },
          "priority_assignment_prompt": {
            "type": "string",
            "description": "\nPriority assignment prompt for the metric.\n"
          },
          "configuration": {
            "description": "\nCustom configuration parameters for specific metrics if metric supports it.\nExample:\n- For Infrastructure issues\n```json\n{\n    \"infra_issues_timeout\": 10\n}\n```\n"
          },
          "overall_score": {
            "type": "string",
            "readOnly": true,
            "description": "The overall score for this metric across all test sets"
          },
          "total_score": {
            "type": "string",
            "readOnly": true,
            "description": "The total score for this metric"
          },
          "knowledge_base_files": {
            "type": "string",
            "readOnly": true,
            "description": "Knowledge base files associated with this metric"
          },
          "observability_enabled": {
            "type": "boolean",
            "description": "\nEnable this metric for observability.\nExample: `true` or `false`\n        "
          },
          "simulation_enabled": {
            "type": "boolean",
            "description": "\nEnable this metric for simulations.\nExample: `true` or `false`\n        "
          },
          "sampling_enabled": {
            "type": "boolean",
            "description": "Enable sampling for this metric using project-level sample rate"
          },
          "alert_enabled": {
            "type": "boolean",
            "description": "\nEnable alerts for this metric when it fails (value=false).\nOnly applicable to binary metrics (eval_type=binary).\nFor other metric types, use significant_change_alert_status instead.\nExample: `true` or `false`\n        "
          },
          "alert_type": {
            "enum": [
              "disabled",
              "normal",
              "significant_change"
            ],
            "type": "string",
            "description": "* `disabled` - Alerts Disabled\n* `normal` - Normal Alerts\n* `significant_change` - Significant Change Alerts",
            "x-spec-enum-id": "9e2661f1aeca64cf",
            "default": "disabled"
          },
          "alert_filters": {
            "oneOf": [
              {},
              {
                "type": "null"
              }
            ],
            "description": "Filters to apply before computing alerts (CallLogQueryFilter format)"
          },
          "slack_workspace": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Slack workspace to send alerts to"
          },
          "slack_channel_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Override channel ID for this metric's alerts",
            "maxLength": 255
          },
          "significant_change_alert_status": {
            "enum": [
              "enabled",
              "disabled"
            ],
            "type": "string",
            "x-spec-enum-id": "6d6f4d361b4ea1fb",
            "description": "\nAlert status: enabled or disabled.\n\n\n* `enabled` - Enabled\n* `disabled` - Disabled"
          },
          "significant_change_alert_direction": {
            "enum": [
              "",
              "increase",
              "decrease"
            ],
            "type": "string",
            "x-spec-enum-id": "1e86e60ca5cfba12",
            "description": "Alert direction: increase only, decrease only, or both (empty = both).\nExample: `\"increase\"`, `\"decrease\"`, or `\"both\"`\n\n* `` - Both (Increase and Decrease)\n* `increase` - Increase Only\n* `decrease` - Decrease Only"
          },
          "function_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "\nPredefined function name\nExample: `\"get_latency\"` or `\"check_critical_deviations\"`\n",
            "maxLength": 255
          },
          "custom_code": {
            "type": "string",
            "description": "\nPython custom code for the metric.\nExample:\n```python\n_resul = True\n_explanation = None\nif  \"call_end_reason\" in data and data[\"call_end_reason\"] == \"customer_satisfaction\":\n    _result = True\n    _explanation = \"Customer expressed satisfaction with service\"\n```\n"
          },
          "vocera_defined_metric_code": {
            "type": "string",
            "description": "\nVocera defined metric code for the metric.\nExample: `\"7fd534f5\"`\n",
            "maxLength": 255
          },
          "scenarios": {
            "writeOnly": true
          },
          "reviews": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MetricReviewDetail"
            },
            "readOnly": true,
            "description": "Reviews associated with the metric"
          },
          "window_size": {
            "type": "integer",
            "readOnly": true,
            "description": "\nWindow size for rolling statistics calculation.\nExample: `50`\n"
          },
          "std_multiplier": {
            "type": "number",
            "format": "double",
            "readOnly": true,
            "description": "\nStandard deviation multiplier for threshold calculation.\nExample: `2.0`\n"
          },
          "ewma_alpha": {
            "type": "number",
            "format": "double",
            "readOnly": true,
            "description": "\nAlpha value for exponentially weighted moving average (EWMA) calculation.\nExample: `0.1`\n"
          },
          "add_to_new_agents": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "When enabled, this metric is automatically assigned to new agents created in the project."
          },
          "pending_optimisation_proposal": {
            "oneOf": [
              {},
              {
                "type": "null"
              }
            ],
            "readOnly": true,
            "description": "Unsaved proposal from a metric-optimiser cron run. Shape: {description, evaluation_trigger, type, custom_code, score, baseline_score, cron_job_id, cron_job_name, proposed_at}."
          }
        },
        "required": [
          "eval_type",
          "name"
        ]
      },
      "MetricDetailV2": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "slug": {
            "type": [
              "string",
              "null"
            ],
            "description": "URL-friendly unique identifier in snake_case format. Example: \"customer_satisfaction_1562\"",
            "maxLength": 255
          },
          "project": {
            "type": [
              "integer",
              "null"
            ]
          },
          "agents": {
            "type": "array",
            "items": {
              "type": [
                "integer",
                "null"
              ]
            }
          },
          "name": {
            "type": "string",
            "description": "\nName of the metric.\nExample: `\"Customer Satisfaction\"` or `\"Appointment Booking\"`\n        ",
            "maxLength": 255
          },
          "description": {
            "type": "string",
            "description": "\nDescription of what the metric measures.\nExample: `\"Measures how satisfied customers are with the service provided\"`\n        "
          },
          "type": {
            "enum": [
              "basic",
              "custom_prompt",
              "custom_code",
              "llm_judge"
            ],
            "type": "string",
            "x-spec-enum-id": "b44700c0a6443b40",
            "description": "\nType of metric\n\n\n* `basic` - Basic (Deprecated in favor of LLM Judge)\n* `custom_prompt` - Custom Prompt ( Deprecated in favor of LLM Judge)\n* `custom_code` - Custom Code\n* `llm_judge` - LLM Judge"
          },
          "eval_type": {
            "enum": [
              "binary",
              "continuous_qualitative",
              "numeric",
              "enum"
            ],
            "type": "string",
            "description": "* `binary` - Binary\n* `continuous_qualitative` - Continuous Qualitative\n* `numeric` - Numeric\n* `enum` - Enum",
            "x-spec-enum-id": "b40eac6824409cc2"
          },
          "enum_values": {
            "description": "\nList of possible enum values for enum type metrics.\nExample: `[\"satisfied\", \"unsatisfied\"]`\n"
          },
          "audio_enabled": {
            "type": "boolean",
            "description": "\nWhether this metric requires audio analysis.\nExample: `true` or `false`\n        "
          },
          "prompt": {
            "type": "string",
            "description": "\nEvaluation prompt for the metric.\nExample: `\"Evaluate customer satisfaction based on conversation\"`\n"
          },
          "evaluation_trigger": {
            "enum": [
              "always",
              "automatic",
              "custom"
            ],
            "type": "string",
            "description": "* `always` - Always\n* `automatic` - Automatic\n* `custom` - Custom",
            "x-spec-enum-id": "ecd3c02e0e393ef5"
          },
          "trigger_type": {
            "enum": [
              "llm_judge",
              "custom_code"
            ],
            "type": "string",
            "x-spec-enum-id": "2adad4b8df61914f",
            "description": "\nType of trigger evaluation: LLM judge or custom code.\nOnly used when evaluation_trigger is CUSTOM.\nExample: `\"llm_judge\"` or `\"custom_code\"`\n\n\n* `llm_judge` - LLM Judge\n* `custom_code` - Custom Code"
          },
          "evaluation_trigger_prompt": {
            "type": "string",
            "description": "\nEvaluation trigger prompt for the metric.\nExample: `\"Evaluate metric only if call ended reason is main-agent-ended-call\"`\n"
          },
          "evaluation_trigger_custom_code": {
            "type": "string",
            "description": "\nPython custom code to determine metric relevance. Code should set _result (bool) and _explanation (str).\nExample:\n```python\n_result = True\n_explanation = \"Metric is relevant\"\nif \"call_end_reason\" in data and data[\"call_end_reason\"] == \"customer-hung-up\":\n    _result = False\n    _explanation = \"Customer hung up, metric not applicable\"\n```\n"
          },
          "priority_assignment_prompt": {
            "type": "string",
            "description": "\nPriority assignment prompt for the metric.\n"
          },
          "configuration": {
            "description": "\nCustom configuration parameters for specific metrics if metric supports it.\nExample:\n- For Infrastructure issues\n```json\n{\n    \"infra_issues_timeout\": 10\n}\n```\n"
          },
          "overall_score": {
            "type": "string",
            "readOnly": true,
            "description": "The overall score for this metric across all test sets"
          },
          "total_score": {
            "type": "string",
            "readOnly": true,
            "description": "The total score for this metric"
          },
          "knowledge_base_files": {
            "type": "string",
            "readOnly": true,
            "description": "Knowledge base files associated with this metric"
          },
          "observability_enabled": {
            "type": "boolean",
            "description": "\nEnable this metric for observability.\nExample: `true` or `false`\n        "
          },
          "simulation_enabled": {
            "type": "boolean",
            "description": "\nEnable this metric for simulations.\nExample: `true` or `false`\n        "
          },
          "sampling_enabled": {
            "type": "boolean",
            "description": "Enable sampling for this metric using project-level sample rate"
          },
          "alert_enabled": {
            "type": "boolean",
            "description": "\nEnable alerts for this metric when it fails (value=false).\nOnly applicable to binary metrics (eval_type=binary).\nFor other metric types, use significant_change_alert_status instead.\nExample: `true` or `false`\n        "
          },
          "alert_type": {
            "enum": [
              "disabled",
              "normal",
              "significant_change"
            ],
            "type": "string",
            "description": "* `disabled` - Alerts Disabled\n* `normal` - Normal Alerts\n* `significant_change` - Significant Change Alerts",
            "x-spec-enum-id": "9e2661f1aeca64cf",
            "default": "disabled"
          },
          "alert_filters": {
            "oneOf": [
              {},
              {
                "type": "null"
              }
            ],
            "description": "Filters to apply before computing alerts (CallLogQueryFilter format)"
          },
          "slack_workspace": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Slack workspace to send alerts to"
          },
          "slack_channel_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Override channel ID for this metric's alerts",
            "maxLength": 255
          },
          "significant_change_alert_status": {
            "enum": [
              "enabled",
              "disabled"
            ],
            "type": "string",
            "x-spec-enum-id": "6d6f4d361b4ea1fb",
            "description": "\nAlert status: enabled or disabled.\n\n\n* `enabled` - Enabled\n* `disabled` - Disabled"
          },
          "significant_change_alert_direction": {
            "enum": [
              "",
              "increase",
              "decrease"
            ],
            "type": "string",
            "x-spec-enum-id": "1e86e60ca5cfba12",
            "description": "Alert direction: increase only, decrease only, or both (empty = both).\nExample: `\"increase\"`, `\"decrease\"`, or `\"both\"`\n\n* `` - Both (Increase and Decrease)\n* `increase` - Increase Only\n* `decrease` - Decrease Only"
          },
          "function_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "\nPredefined function name\nExample: `\"get_latency\"` or `\"check_critical_deviations\"`\n",
            "maxLength": 255
          },
          "custom_code": {
            "type": "string",
            "description": "\nPython custom code for the metric.\nExample:\n```python\n_resul = True\n_explanation = None\nif  \"call_end_reason\" in data and data[\"call_end_reason\"] == \"customer_satisfaction\":\n    _result = True\n    _explanation = \"Customer expressed satisfaction with service\"\n```\n"
          },
          "vocera_defined_metric_code": {
            "type": "string",
            "description": "\nVocera defined metric code for the metric.\nExample: `\"7fd534f5\"`\n",
            "maxLength": 255
          },
          "scenarios": {
            "writeOnly": true
          },
          "reviews": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MetricReviewDetail"
            },
            "readOnly": true,
            "description": "Reviews associated with the metric"
          },
          "window_size": {
            "type": "integer",
            "readOnly": true,
            "description": "\nWindow size for rolling statistics calculation.\nExample: `50`\n"
          },
          "std_multiplier": {
            "type": "number",
            "format": "double",
            "readOnly": true,
            "description": "\nStandard deviation multiplier for threshold calculation.\nExample: `2.0`\n"
          },
          "ewma_alpha": {
            "type": "number",
            "format": "double",
            "readOnly": true,
            "description": "\nAlpha value for exponentially weighted moving average (EWMA) calculation.\nExample: `0.1`\n"
          },
          "add_to_new_agents": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "When enabled, this metric is automatically assigned to new agents created in the project."
          },
          "pending_optimisation_proposal": {
            "oneOf": [
              {},
              {
                "type": "null"
              }
            ],
            "readOnly": true,
            "description": "Unsaved proposal from a metric-optimiser cron run. Shape: {description, evaluation_trigger, type, custom_code, score, baseline_score, cron_job_id, cron_job_name, proposed_at}."
          }
        },
        "required": [
          "eval_type",
          "name"
        ]
      },
      "MetricEditSerializerV2": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "slug": {
            "type": [
              "string",
              "null"
            ],
            "description": "URL-friendly unique identifier in snake_case format",
            "maxLength": 255
          },
          "project": {
            "type": [
              "integer",
              "null"
            ]
          },
          "agent": {
            "type": [
              "integer",
              "null"
            ]
          },
          "agents": {
            "type": "array",
            "items": {
              "type": [
                "integer",
                "null"
              ]
            }
          },
          "assistant_id": {
            "type": "string",
            "writeOnly": true
          },
          "name": {
            "type": "string",
            "description": "\nName of the metric.\nExample: `\"Customer Satisfaction\"` or `\"Appointment Booking\"`\n        ",
            "maxLength": 255
          },
          "description": {
            "type": "string",
            "description": "\nDescription of what the metric measures.\nExample: `\"Measures how satisfied customers are with the service provided\"`\n        "
          },
          "type": {
            "enum": [
              "basic",
              "custom_prompt",
              "custom_code",
              "llm_judge"
            ],
            "type": "string",
            "x-spec-enum-id": "b44700c0a6443b40",
            "description": "\nType of metric\n\n\n* `basic` - Basic (Deprecated in favor of LLM Judge)\n* `custom_prompt` - Custom Prompt ( Deprecated in favor of LLM Judge)\n* `custom_code` - Custom Code\n* `llm_judge` - LLM Judge"
          },
          "eval_type": {
            "enum": [
              "binary",
              "continuous_qualitative",
              "numeric",
              "enum"
            ],
            "type": "string",
            "description": "* `binary` - Binary\n* `continuous_qualitative` - Continuous Qualitative\n* `numeric` - Numeric\n* `enum` - Enum",
            "x-spec-enum-id": "b40eac6824409cc2"
          },
          "audio_enabled": {
            "type": "boolean",
            "readOnly": true,
            "description": "\nWhether this metric requires audio analysis.\nExample: `true` or `false`\n        "
          },
          "observability_enabled": {
            "type": "boolean",
            "description": "\nEnable this metric for observability.\nExample: `true` or `false`\n        "
          },
          "simulation_enabled": {
            "type": "boolean",
            "description": "\nEnable this metric for simulations.\nExample: `true` or `false`\n        "
          },
          "sampling_enabled": {
            "type": "boolean",
            "description": "Enable sampling for this metric using project-level sample rate"
          },
          "prompt": {
            "type": "string",
            "description": "\nEvaluation prompt for the metric.\nExample: `\"Evaluate customer satisfaction based on conversation\"`\n"
          },
          "function_name": {
            "type": [
              "string",
              "null"
            ],
            "readOnly": true,
            "description": "\nPredefined function name\nExample: `\"get_latency\"` or `\"check_critical_deviations\"`\n"
          },
          "enum_values": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "display_order": {
            "type": "integer",
            "maximum": 2147483647,
            "minimum": -2147483648,
            "description": "\nDisplay order for the metric.\nExample: `1`\n"
          },
          "custom_code": {
            "type": "string",
            "description": "\nPython custom code for the metric.\nExample:\n```python\n_resul = True\n_explanation = None\nif  \"call_end_reason\" in data and data[\"call_end_reason\"] == \"customer_satisfaction\":\n    _result = True\n    _explanation = \"Customer expressed satisfaction with service\"\n```\n"
          },
          "evaluation_trigger": {
            "enum": [
              "always",
              "automatic",
              "custom"
            ],
            "type": "string",
            "description": "* `always` - Always\n* `automatic` - Automatic\n* `custom` - Custom",
            "x-spec-enum-id": "ecd3c02e0e393ef5"
          },
          "trigger_type": {
            "enum": [
              "llm_judge",
              "custom_code"
            ],
            "type": "string",
            "description": "* `llm_judge` - LLM Judge\n* `custom_code` - Custom Code",
            "x-spec-enum-id": "2adad4b8df61914f"
          },
          "evaluation_trigger_prompt": {
            "type": "string",
            "description": "\nEvaluation trigger prompt for the metric.\nExample: `\"Evaluate metric only if call ended reason is main-agent-ended-call\"`\n"
          },
          "evaluation_trigger_custom_code": {
            "type": "string",
            "description": "\nPython custom code to determine metric relevance. Code should set _result (bool) and _explanation (str).\nExample:\n```python\n_result = True\n_explanation = \"Metric is relevant\"\nif \"call_end_reason\" in data and data[\"call_end_reason\"] == \"customer-hung-up\":\n    _result = False\n    _explanation = \"Customer hung up, metric not applicable\"\n```\n"
          },
          "llm_provider": {
            "enum": [
              "openai",
              "gemini",
              "dspy-gepa-gemini-flash",
              "deepseek-v4-flash"
            ],
            "type": "string",
            "description": "* `openai` - OpenAI\n* `gemini` - Gemini\n* `dspy-gepa-gemini-flash` - Dspy Gepa Gemini Flash\n* `deepseek-v4-flash` - DeepSeek V4 Flash",
            "x-spec-enum-id": "6d1d2e77c71d1721",
            "writeOnly": true
          },
          "relevance_llm_provider": {
            "enum": [
              "openai",
              "gemini",
              "dspy-gepa-gemini-flash",
              "deepseek-v4-flash"
            ],
            "type": "string",
            "description": "* `openai` - OpenAI\n* `gemini` - Gemini\n* `dspy-gepa-gemini-flash` - Dspy Gepa Gemini Flash\n* `deepseek-v4-flash` - DeepSeek V4 Flash",
            "x-spec-enum-id": "6d1d2e77c71d1721",
            "writeOnly": true
          },
          "vocera_defined_metric_code": {
            "type": "string",
            "readOnly": true,
            "description": "\nVocera defined metric code for the metric.\nExample: `\"7fd534f5\"`\n"
          },
          "priority_assignment_prompt": {
            "type": "string",
            "description": "\nPriority assignment prompt for the metric.\n"
          },
          "configuration": {
            "description": "\nCustom configuration parameters for specific metrics if metric supports it.\nExample:\n- For Infrastructure issues\n```json\n{\n    \"infra_issues_timeout\": 10\n}\n```\n"
          },
          "scenarios": {
            "writeOnly": true
          },
          "overall_score": {
            "type": "string",
            "readOnly": true
          },
          "total_score": {
            "type": "string",
            "readOnly": true
          },
          "kb_file_ids": {
            "description": "\nList of knowledge base file IDs for the metric.\nExample: `[123, 456]`\n"
          },
          "knowledge_base_files": {
            "type": "string",
            "readOnly": true
          },
          "metric_description_program": {},
          "metric_description_variables": {
            "type": "array",
            "items": {}
          },
          "evaluation_trigger_program": {},
          "evaluation_trigger_variables": {
            "type": "array",
            "items": {}
          },
          "alert_enabled": {
            "type": "boolean",
            "description": "\nEnable alerts for this metric when it fails (value=false).\nOnly applicable to binary metrics (eval_type=binary).\nFor other metric types, use significant_change_alert_status instead.\nExample: `true` or `false`\n        "
          },
          "alert_type": {
            "enum": [
              "disabled",
              "normal",
              "significant_change"
            ],
            "type": "string",
            "description": "* `disabled` - Alerts Disabled\n* `normal` - Normal Alerts\n* `significant_change` - Significant Change Alerts",
            "x-spec-enum-id": "9e2661f1aeca64cf",
            "default": "disabled"
          },
          "window_size": {
            "type": "integer",
            "default": 50
          },
          "std_multiplier": {
            "type": "number",
            "format": "double",
            "default": 2
          },
          "ewma_alpha": {
            "type": "number",
            "format": "double",
            "default": 0.1
          },
          "significant_change_alert_status": {
            "enum": [
              "enabled",
              "disabled"
            ],
            "type": "string",
            "x-spec-enum-id": "6d6f4d361b4ea1fb",
            "description": "\nAlert status: enabled or disabled.\n\n\n* `enabled` - Enabled\n* `disabled` - Disabled"
          },
          "significant_change_alert_direction": {
            "enum": [
              "",
              "increase",
              "decrease"
            ],
            "type": "string",
            "x-spec-enum-id": "1e86e60ca5cfba12",
            "description": "Alert direction: increase only, decrease only, or both (empty = both).\nExample: `\"increase\"`, `\"decrease\"`, or `\"both\"`\n\n* `` - Both (Increase and Decrease)\n* `increase` - Increase Only\n* `decrease` - Decrease Only"
          },
          "add_to_new_agents": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "When enabled, this metric is automatically assigned to new agents created in the project."
          },
          "alert_filters": {
            "oneOf": [
              {},
              {
                "type": "null"
              }
            ],
            "description": "Filters to apply before computing alerts (CallLogQueryFilter format)"
          },
          "slack_workspace": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Slack workspace to send alerts to"
          },
          "slack_channel_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Override channel ID for this metric's alerts",
            "maxLength": 255
          },
          "apply_to_all_agents": {
            "type": "boolean",
            "writeOnly": true,
            "default": false,
            "description": "For observability_dropoff: when true, copies the dropoff_nodes from configuration to every other agent in the project."
          },
          "add_to_rubric": {
            "type": "boolean",
            "writeOnly": true,
            "default": false,
            "description": "If true, this metric is added to the project's call-success rubric on save (a sensible default rule is chosen by `eval_type`). If false on an existing rubric metric, it's removed from the rubric."
          }
        },
        "required": [
          "name"
        ]
      },
      "MetricFailureModeFixMetric": {
        "type": "object",
        "description": "Request body for ``POST /metric-failure-mode-insights/{id}/fix_metric/``.\n\nSamples a few of one failure mode's example calls and adds them to Labs\nfor the insight's metric, carrying the user's feedback as the note and\n``expected_value`` as the corrected label.",
        "properties": {
          "failure_mode_index": {
            "type": "integer",
            "minimum": 0,
            "description": "Index into the insight's failure_modes list to act on."
          },
          "feedback": {
            "type": "string",
            "description": "Human note attached to each sampled call's metric review in Labs."
          },
          "expected_value": {
            "oneOf": [
              {},
              {
                "type": "null"
              }
            ],
            "description": "Corrected label to record for each sampled call in Labs: true/false for binary metrics, a 0-5 score for ratings, a number for numeric metrics, or null for N/A. Defaults to a passing value when omitted."
          }
        },
        "required": [
          "failure_mode_index",
          "feedback"
        ]
      },
      "MetricFailureModeInsight": {
        "type": "object",
        "description": "Insight row exposed to the Observability → Insights UI.",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "project": {
            "type": "integer",
            "readOnly": true
          },
          "metric": {
            "type": [
              "integer",
              "null"
            ],
            "readOnly": true
          },
          "predefined_metric": {
            "type": [
              "integer",
              "null"
            ],
            "readOnly": true
          },
          "metric_name": {
            "type": "string",
            "readOnly": true
          },
          "is_triage": {
            "type": "boolean",
            "description": "Derived live from the metric's current `triage_enabled` + rubric\nmembership (not persisted) — the FE renders the triage section only\nwhen this is true.",
            "readOnly": true
          },
          "window_start": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "window_end": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "num_calls_analyzed": {
            "type": "integer",
            "readOnly": true
          },
          "total_failures_in_window": {
            "type": "integer",
            "readOnly": true
          },
          "status": {
            "enum": [
              "pending",
              "running",
              "succeeded",
              "failed",
              "skipped_no_failures"
            ],
            "type": "string",
            "description": "* `pending` - Pending\n* `running` - Running\n* `succeeded` - Succeeded\n* `failed` - Failed\n* `skipped_no_failures` - Skipped No Failures",
            "x-spec-enum-id": "7052652d8ca01a2a",
            "readOnly": true
          },
          "headline": {
            "type": "string",
            "readOnly": true
          },
          "overall_status_emoji": {
            "type": "string",
            "readOnly": true
          },
          "failure_modes": {
            "readOnly": true
          },
          "error_message": {
            "type": "string",
            "readOnly": true
          },
          "duration_seconds": {
            "type": [
              "number",
              "null"
            ],
            "format": "double",
            "readOnly": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          }
        }
      },
      "MetricFailureModeInsightBulkGenerate": {
        "type": "object",
        "description": "Request body for ``POST /metric-failure-mode-insights/bulk_generate/``.\n\nTriggers an insight audit for every eligible metric in the project\nusing a sliding T-24h to T window. Returns the new insight rows so\nthe FE can poll them.",
        "properties": {
          "project": {
            "type": "integer",
            "description": "Project ID — fan out audits to every eligible metric in it."
          },
          "metric_names": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string",
              "maxLength": 255
            },
            "description": "Optional metric-name allowlist. If provided, only those metrics are audited (used by the FE to keep the toast count aligned with the cards on screen when a view filter is applied)."
          }
        },
        "required": [
          "project"
        ]
      },
      "MetricFailureModeInsightGenerate": {
        "type": "object",
        "description": "Request body for ``POST /metric-failure-mode-insights/generate/``.",
        "properties": {
          "project": {
            "type": "integer",
            "description": "Project ID to generate insights for."
          },
          "metric": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Custom Metric ID (omit for predefined metric)."
          },
          "predefined_metric": {
            "type": [
              "integer",
              "null"
            ],
            "description": "PredefinedMetric ID (omit for custom metric)."
          },
          "metric_name": {
            "type": "string",
            "description": "Metric display name — must match call_log.evaluation.metrics[].name.",
            "maxLength": 255
          },
          "window_days": {
            "type": "integer",
            "maximum": 90,
            "minimum": 1,
            "default": 1,
            "description": "Deprecated — audits now always use the last 24 hours."
          },
          "max_calls": {
            "type": [
              "integer",
              "null"
            ],
            "maximum": 500,
            "minimum": 1,
            "description": "Upper-bound ceiling on failing calls fed to the agent. Omit to audit every failing call in the 24h window up to 500. If the window exceeds the cap a random sample is taken."
          }
        },
        "required": [
          "metric_name",
          "project"
        ]
      },
      "MetricFailureModeInsightGenerateScenario": {
        "type": "object",
        "description": "Request body for\n``POST /metric-failure-mode-insights/<id>/generate-scenario/``.\n\nTurns one failure mode of an insight into a test scenario for the\ngiven agent. The agent is resolved on the frontend from the failure\nmode's example calls (see the ``failure-mode-agents`` action), so when\na failure mode spans several agents the UI posts once per agent.",
        "properties": {
          "failure_mode_index": {
            "type": "integer",
            "minimum": 0,
            "description": "Zero-based index of the failure mode within the insight's failure_modes list."
          },
          "agent": {
            "type": "integer",
            "description": "ID of the agent the generated scenario should target."
          },
          "redact_transcripts": {
            "type": "boolean",
            "default": false,
            "description": "If true, strip personal identifiers (names, contact details, financial, credentials, ID/health numbers) from the example call transcripts before they are used to draft the scenario. Semantic context (dates, locations, amounts, intent) is preserved. Defaults to false."
          }
        },
        "required": [
          "agent",
          "failure_mode_index"
        ]
      },
      "MetricHistory": {
        "type": "object",
        "properties": {
          "history_id": {
            "type": "integer",
            "readOnly": true
          },
          "history_date": {
            "type": "string",
            "format": "date-time"
          },
          "history_type": {
            "enum": [
              "+",
              "~",
              "-"
            ],
            "type": "string",
            "description": "* `+` - Created\n* `~` - Changed\n* `-` - Deleted",
            "x-spec-enum-id": "c2e35addebb4f5da"
          },
          "history_change_reason": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 100
          },
          "history_user": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/UserInline"
              },
              {
                "type": "null"
              }
            ],
            "readOnly": true
          },
          "version_id": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 12
          },
          "version_name": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255
          },
          "agents_snapshot": {
            "oneOf": [
              {},
              {
                "type": "null"
              }
            ]
          },
          "id": {
            "type": "integer",
            "maximum": 9223372036854776000,
            "minimum": -9223372036854776000,
            "format": "int64"
          },
          "slug": {
            "type": [
              "string",
              "null"
            ],
            "description": "URL-friendly unique identifier in snake_case format. Example: \"customer_satisfaction_1562\"",
            "maxLength": 255
          },
          "project": {
            "type": [
              "integer",
              "null"
            ]
          },
          "agent": {
            "type": [
              "integer",
              "null"
            ]
          },
          "name": {
            "type": "string",
            "description": "\nName of the metric.\nExample: `\"Customer Satisfaction\"` or `\"Appointment Booking\"`\n        ",
            "maxLength": 255
          },
          "description": {
            "type": "string",
            "description": "\nDescription of what the metric measures.\nExample: `\"Measures how satisfied customers are with the service provided\"`\n        "
          },
          "function_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "\nPredefined function name\nExample: `\"get_latency\"` or `\"check_critical_deviations\"`\n",
            "maxLength": 255
          },
          "type": {
            "enum": [
              "basic",
              "custom_prompt",
              "custom_code",
              "llm_judge"
            ],
            "type": "string",
            "x-spec-enum-id": "b44700c0a6443b40",
            "description": "\nType of metric\n\n\n* `basic` - Basic (Deprecated in favor of LLM Judge)\n* `custom_prompt` - Custom Prompt ( Deprecated in favor of LLM Judge)\n* `custom_code` - Custom Code\n* `llm_judge` - LLM Judge"
          },
          "eval_type": {
            "enum": [
              "binary",
              "continuous_qualitative",
              "numeric",
              "enum"
            ],
            "type": "string",
            "x-spec-enum-id": "b40eac6824409cc2",
            "description": "\nType of evaluation\n\n\n* `binary` - Binary\n* `continuous_qualitative` - Continuous Qualitative\n* `numeric` - Numeric\n* `enum` - Enum"
          },
          "enum_values": {
            "description": "\nList of possible enum values for enum type metrics.\nExample: `[\"satisfied\", \"unsatisfied\"]`\n"
          },
          "audio_enabled": {
            "type": "boolean",
            "description": "\nWhether this metric requires audio analysis.\nExample: `true` or `false`\n        "
          },
          "observability_enabled": {
            "type": "boolean",
            "description": "\nEnable this metric for observability.\nExample: `true` or `false`\n        "
          },
          "simulation_enabled": {
            "type": "boolean",
            "description": "\nEnable this metric for simulations.\nExample: `true` or `false`\n        "
          },
          "sampling_enabled": {
            "type": "boolean",
            "description": "Enable sampling for this metric using project-level sample rate"
          },
          "alert_enabled": {
            "type": "boolean",
            "description": "\nEnable alerts for this metric when it fails (value=false).\nOnly applicable to binary metrics (eval_type=binary).\nFor other metric types, use significant_change_alert_status instead.\nExample: `true` or `false`\n        "
          },
          "prompt": {
            "type": "string",
            "description": "\nEvaluation prompt for the metric.\nExample: `\"Evaluate customer satisfaction based on conversation\"`\n"
          },
          "display_order": {
            "type": "integer",
            "maximum": 2147483647,
            "minimum": -2147483648,
            "description": "\nDisplay order for the metric.\nExample: `1`\n"
          },
          "evaluation_trigger": {
            "enum": [
              "always",
              "automatic",
              "custom"
            ],
            "type": "string",
            "description": "* `always` - Always\n* `automatic` - Automatic\n* `custom` - Custom",
            "x-spec-enum-id": "ecd3c02e0e393ef5"
          },
          "trigger_type": {
            "enum": [
              "llm_judge",
              "custom_code"
            ],
            "type": "string",
            "x-spec-enum-id": "2adad4b8df61914f",
            "description": "\nType of trigger evaluation: LLM judge or custom code.\nOnly used when evaluation_trigger is CUSTOM.\nExample: `\"llm_judge\"` or `\"custom_code\"`\n\n\n* `llm_judge` - LLM Judge\n* `custom_code` - Custom Code"
          },
          "evaluation_trigger_prompt": {
            "type": "string",
            "description": "\nEvaluation trigger prompt for the metric.\nExample: `\"Evaluate metric only if call ended reason is main-agent-ended-call\"`\n"
          },
          "evaluation_trigger_custom_code": {
            "type": "string",
            "description": "\nPython custom code to determine metric relevance. Code should set _result (bool) and _explanation (str).\nExample:\n```python\n_result = True\n_explanation = \"Metric is relevant\"\nif \"call_end_reason\" in data and data[\"call_end_reason\"] == \"customer-hung-up\":\n    _result = False\n    _explanation = \"Customer hung up, metric not applicable\"\n```\n"
          },
          "priority_assignment_prompt": {
            "type": "string",
            "description": "\nPriority assignment prompt for the metric.\n"
          },
          "configuration": {
            "description": "\nCustom configuration parameters for specific metrics if metric supports it.\nExample:\n- For Infrastructure issues\n```json\n{\n    \"infra_issues_timeout\": 10\n}\n```\n"
          },
          "alert_type": {
            "enum": [
              "disabled",
              "normal",
              "significant_change"
            ],
            "type": "string",
            "x-spec-enum-id": "9e2661f1aeca64cf",
            "description": "\nAlert type: disabled, normal alerts, or significant change alerts.\n\n\n* `disabled` - Alerts Disabled\n* `normal` - Normal Alerts\n* `significant_change` - Significant Change Alerts"
          },
          "significant_change_alert_status": {
            "enum": [
              "enabled",
              "disabled"
            ],
            "type": "string",
            "x-spec-enum-id": "6d6f4d361b4ea1fb",
            "description": "\nAlert status: enabled or disabled.\n\n\n* `enabled` - Enabled\n* `disabled` - Disabled"
          },
          "significant_change_alert_direction": {
            "enum": [
              "",
              "increase",
              "decrease"
            ],
            "type": "string",
            "x-spec-enum-id": "1e86e60ca5cfba12",
            "description": "Alert direction: increase only, decrease only, or both (empty = both).\nExample: `\"increase\"`, `\"decrease\"`, or `\"both\"`\n\n* `` - Both (Increase and Decrease)\n* `increase` - Increase Only\n* `decrease` - Decrease Only"
          },
          "window_size": {
            "type": "integer",
            "maximum": 2147483647,
            "minimum": 0,
            "description": "\nWindow size for rolling statistics calculation.\nExample: `50`\n"
          },
          "std_multiplier": {
            "type": "number",
            "format": "double",
            "description": "\nStandard deviation multiplier for threshold calculation.\nExample: `2.0`\n"
          },
          "ewma_alpha": {
            "type": "number",
            "format": "double",
            "description": "\nAlpha value for exponentially weighted moving average (EWMA) calculation.\nExample: `0.1`\n"
          },
          "add_to_new_agents": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "When enabled, this metric is automatically assigned to new agents created in the project."
          },
          "alert_filters": {
            "oneOf": [
              {},
              {
                "type": "null"
              }
            ],
            "description": "Filters to apply before computing alerts (CallLogQueryFilter format)"
          },
          "slack_workspace": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Slack workspace to send alerts to"
          },
          "slack_channel_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Override channel ID for this metric's alerts",
            "maxLength": 255
          },
          "custom_code": {
            "type": "string",
            "description": "\nPython custom code for the metric.\nExample:\n```python\n_resul = True\n_explanation = None\nif  \"call_end_reason\" in data and data[\"call_end_reason\"] == \"customer_satisfaction\":\n    _result = True\n    _explanation = \"Customer expressed satisfaction with service\"\n```\n"
          },
          "vocera_defined_metric_code": {
            "type": "string",
            "description": "\nVocera defined metric code for the metric.\nExample: `\"7fd534f5\"`\n",
            "maxLength": 255
          },
          "llm_provider": {
            "enum": [
              "openai",
              "gemini",
              "dspy-gepa-gemini-flash",
              "deepseek-v4-flash"
            ],
            "type": "string",
            "x-spec-enum-id": "6d1d2e77c71d1721",
            "description": "LLM provider for this metric evaluation.\nExample: \n- `\"gemini\"`\n- `\"openai\"`\n\n\n* `openai` - OpenAI\n* `gemini` - Gemini\n* `dspy-gepa-gemini-flash` - Dspy Gepa Gemini Flash\n* `deepseek-v4-flash` - DeepSeek V4 Flash"
          },
          "relevance_llm_provider": {
            "enum": [
              "openai",
              "gemini",
              "dspy-gepa-gemini-flash",
              "deepseek-v4-flash"
            ],
            "type": "string",
            "x-spec-enum-id": "6d1d2e77c71d1721",
            "description": "LLM provider for this metric relevance.\nExample: \n- `\"gemini\"`\n- `\"openai\"`\n\n\n* `openai` - OpenAI\n* `gemini` - Gemini\n* `dspy-gepa-gemini-flash` - Dspy Gepa Gemini Flash\n* `deepseek-v4-flash` - DeepSeek V4 Flash"
          },
          "metric_description_variables": {
            "description": "Dynamic variables for this metric evaluation using DSPy GEPA.\nExample: \n```json\n[\"customer_sentiment\", \"response_time\", \"issue_resolved\"]\n```\n"
          },
          "evaluation_trigger_variables": {
            "description": "Dynamic variables for this metric relevance using DSPy GEPA.\nExample: \n```json\n[\"call_type\", \"customer_tier\", \"issue_complexity\"]\n```\n"
          }
        },
        "required": [
          "alert_type",
          "ewma_alpha",
          "history_date",
          "history_type",
          "name",
          "std_multiplier",
          "window_size"
        ]
      },
      "MetricList": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "slug": {
            "type": [
              "string",
              "null"
            ],
            "description": "URL-friendly unique identifier in snake_case format. Example: \"customer_satisfaction_1562\"",
            "maxLength": 255
          },
          "project": {
            "type": [
              "integer",
              "null"
            ]
          },
          "agents": {
            "type": "array",
            "items": {
              "type": [
                "integer",
                "null"
              ]
            }
          },
          "agent_names": {
            "type": "string",
            "readOnly": true
          },
          "name": {
            "type": "string",
            "description": "\nName of the metric.\nExample: `\"Customer Satisfaction\"` or `\"Appointment Booking\"`\n        ",
            "maxLength": 255
          },
          "description": {
            "type": "string",
            "description": "\nDescription of what the metric measures.\nExample: `\"Measures how satisfied customers are with the service provided\"`\n        "
          },
          "function_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "\nPredefined function name\nExample: `\"get_latency\"` or `\"check_critical_deviations\"`\n",
            "maxLength": 255
          },
          "type": {
            "enum": [
              "basic",
              "custom_prompt",
              "custom_code",
              "llm_judge"
            ],
            "type": "string",
            "x-spec-enum-id": "b44700c0a6443b40",
            "description": "\nType of metric\n\n\n* `basic` - Basic (Deprecated in favor of LLM Judge)\n* `custom_prompt` - Custom Prompt ( Deprecated in favor of LLM Judge)\n* `custom_code` - Custom Code\n* `llm_judge` - LLM Judge"
          },
          "eval_type": {
            "enum": [
              "binary",
              "continuous_qualitative",
              "numeric",
              "enum"
            ],
            "type": "string",
            "description": "* `binary` - Binary\n* `continuous_qualitative` - Continuous Qualitative\n* `numeric` - Numeric\n* `enum` - Enum",
            "x-spec-enum-id": "b40eac6824409cc2"
          },
          "enum_values": {
            "description": "\nList of possible enum values for enum type metrics.\nExample: `[\"satisfied\", \"unsatisfied\"]`\n"
          },
          "audio_enabled": {
            "type": "boolean",
            "description": "\nWhether this metric requires audio analysis.\nExample: `true` or `false`\n        "
          },
          "observability_enabled": {
            "type": "boolean",
            "description": "\nEnable this metric for observability.\nExample: `true` or `false`\n        "
          },
          "simulation_enabled": {
            "type": "boolean",
            "description": "\nEnable this metric for simulations.\nExample: `true` or `false`\n        "
          },
          "sampling_enabled": {
            "type": "boolean",
            "description": "Enable sampling for this metric using project-level sample rate"
          },
          "prompt": {
            "type": "string",
            "description": "\nEvaluation prompt for the metric.\nExample: `\"Evaluate customer satisfaction based on conversation\"`\n"
          },
          "display_order": {
            "type": "integer",
            "maximum": 2147483647,
            "minimum": -2147483648,
            "description": "\nDisplay order for the metric.\nExample: `1`\n"
          },
          "evaluation_trigger": {
            "enum": [
              "always",
              "automatic",
              "custom"
            ],
            "type": "string",
            "description": "* `always` - Always\n* `automatic` - Automatic\n* `custom` - Custom",
            "x-spec-enum-id": "ecd3c02e0e393ef5"
          },
          "trigger_type": {
            "enum": [
              "llm_judge",
              "custom_code"
            ],
            "type": "string",
            "description": "* `llm_judge` - LLM Judge\n* `custom_code` - Custom Code",
            "x-spec-enum-id": "2adad4b8df61914f"
          },
          "evaluation_trigger_prompt": {
            "type": "string",
            "description": "\nEvaluation trigger prompt for the metric.\nExample: `\"Evaluate metric only if call ended reason is main-agent-ended-call\"`\n"
          },
          "evaluation_trigger_custom_code": {
            "type": "string",
            "description": "\nPython custom code to determine metric relevance. Code should set _result (bool) and _explanation (str).\nExample:\n```python\n_result = True\n_explanation = \"Metric is relevant\"\nif \"call_end_reason\" in data and data[\"call_end_reason\"] == \"customer-hung-up\":\n    _result = False\n    _explanation = \"Customer hung up, metric not applicable\"\n```\n"
          },
          "priority_assignment_prompt": {
            "type": "string",
            "description": "\nPriority assignment prompt for the metric.\n"
          },
          "vocera_defined_metric_code": {
            "type": "string",
            "description": "\nVocera defined metric code for the metric.\nExample: `\"7fd534f5\"`\n",
            "maxLength": 255
          },
          "configuration": {
            "description": "\nCustom configuration parameters for specific metrics if metric supports it.\nExample:\n- For Infrastructure issues\n```json\n{\n    \"infra_issues_timeout\": 10\n}\n```\n"
          },
          "kb_file_ids": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "\nList of knowledge base file IDs for the metric.\nExample: `[123, 456]`\n"
          },
          "knowledge_base_files": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/KnowledgeBaseFile"
            },
            "readOnly": true
          },
          "scenarios": {
            "writeOnly": true,
            "description": "Either \"all\" or a list of scenario IDs to attach to this metric"
          },
          "custom_code": {
            "type": "string",
            "writeOnly": true
          },
          "metric_cost": {
            "type": "number",
            "format": "double",
            "description": "\nMetric Cost\nExample: `0.10`\n",
            "readOnly": true
          },
          "alert_type": {
            "enum": [
              "disabled",
              "normal",
              "significant_change"
            ],
            "type": "string",
            "description": "* `disabled` - Alerts Disabled\n* `normal` - Normal Alerts\n* `significant_change` - Significant Change Alerts",
            "x-spec-enum-id": "9e2661f1aeca64cf",
            "default": "disabled"
          },
          "significant_change_alert_status": {
            "enum": [
              "enabled",
              "disabled"
            ],
            "type": "string",
            "x-spec-enum-id": "6d6f4d361b4ea1fb",
            "description": "\nAlert status: enabled or disabled.\n\n\n* `enabled` - Enabled\n* `disabled` - Disabled"
          },
          "significant_change_alert_direction": {
            "enum": [
              "",
              "increase",
              "decrease"
            ],
            "type": "string",
            "x-spec-enum-id": "1e86e60ca5cfba12",
            "description": "Alert direction: increase only, decrease only, or both (empty = both).\nExample: `\"increase\"`, `\"decrease\"`, or `\"both\"`\n\n* `` - Both (Increase and Decrease)\n* `increase` - Increase Only\n* `decrease` - Decrease Only"
          },
          "window_size": {
            "type": "integer",
            "readOnly": true,
            "description": "\nWindow size for rolling statistics calculation.\nExample: `50`\n"
          },
          "std_multiplier": {
            "type": "number",
            "format": "double",
            "readOnly": true,
            "description": "\nStandard deviation multiplier for threshold calculation.\nExample: `2.0`\n"
          },
          "ewma_alpha": {
            "type": "number",
            "format": "double",
            "readOnly": true,
            "description": "\nAlpha value for exponentially weighted moving average (EWMA) calculation.\nExample: `0.1`\n"
          },
          "add_to_new_agents": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "When enabled, this metric is automatically assigned to new agents created in the project."
          },
          "alert_filters": {
            "oneOf": [
              {},
              {
                "type": "null"
              }
            ],
            "description": "Filters to apply before computing alerts (CallLogQueryFilter format)"
          },
          "slack_workspace": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Slack workspace to send alerts to"
          },
          "slack_channel_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Override channel ID for this metric's alerts",
            "maxLength": 255
          },
          "uses_llm_judge": {
            "type": "string",
            "readOnly": true,
            "description": "\nWhether this metric produces an LLM-judge narrative: a `custom_code` metric whose\ncode delegates to the LLM judge internally. Computed server-side because the\n`custom_code` body is write-only and not exposed on read.\nExample: `true`\n"
          }
        },
        "required": [
          "eval_type",
          "name"
        ]
      },
      "MetricListSerializerV2": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "slug": {
            "type": [
              "string",
              "null"
            ],
            "description": "URL-friendly unique identifier in snake_case format. Example: \"customer_satisfaction_1562\"",
            "maxLength": 255
          },
          "project": {
            "type": [
              "integer",
              "null"
            ]
          },
          "agents": {
            "type": "array",
            "items": {
              "type": [
                "integer",
                "null"
              ]
            }
          },
          "agent_names": {
            "type": "string",
            "readOnly": true
          },
          "name": {
            "type": "string",
            "description": "\nName of the metric.\nExample: `\"Customer Satisfaction\"` or `\"Appointment Booking\"`\n        ",
            "maxLength": 255
          },
          "description": {
            "type": "string",
            "description": "\nDescription of what the metric measures.\nExample: `\"Measures how satisfied customers are with the service provided\"`\n        "
          },
          "function_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "\nPredefined function name\nExample: `\"get_latency\"` or `\"check_critical_deviations\"`\n",
            "maxLength": 255
          },
          "type": {
            "enum": [
              "basic",
              "custom_prompt",
              "custom_code",
              "llm_judge"
            ],
            "type": "string",
            "x-spec-enum-id": "b44700c0a6443b40",
            "description": "\nType of metric\n\n\n* `basic` - Basic (Deprecated in favor of LLM Judge)\n* `custom_prompt` - Custom Prompt ( Deprecated in favor of LLM Judge)\n* `custom_code` - Custom Code\n* `llm_judge` - LLM Judge"
          },
          "eval_type": {
            "enum": [
              "binary",
              "continuous_qualitative",
              "numeric",
              "enum"
            ],
            "type": "string",
            "description": "* `binary` - Binary\n* `continuous_qualitative` - Continuous Qualitative\n* `numeric` - Numeric\n* `enum` - Enum",
            "x-spec-enum-id": "b40eac6824409cc2"
          },
          "enum_values": {
            "description": "\nList of possible enum values for enum type metrics.\nExample: `[\"satisfied\", \"unsatisfied\"]`\n"
          },
          "audio_enabled": {
            "type": "boolean",
            "description": "\nWhether this metric requires audio analysis.\nExample: `true` or `false`\n        "
          },
          "observability_enabled": {
            "type": "boolean",
            "description": "\nEnable this metric for observability.\nExample: `true` or `false`\n        "
          },
          "simulation_enabled": {
            "type": "boolean",
            "description": "\nEnable this metric for simulations.\nExample: `true` or `false`\n        "
          },
          "sampling_enabled": {
            "type": "boolean",
            "description": "Enable sampling for this metric using project-level sample rate"
          },
          "prompt": {
            "type": "string",
            "description": "\nEvaluation prompt for the metric.\nExample: `\"Evaluate customer satisfaction based on conversation\"`\n"
          },
          "display_order": {
            "type": "integer",
            "maximum": 2147483647,
            "minimum": -2147483648,
            "description": "\nDisplay order for the metric.\nExample: `1`\n"
          },
          "evaluation_trigger": {
            "enum": [
              "always",
              "automatic",
              "custom"
            ],
            "type": "string",
            "description": "* `always` - Always\n* `automatic` - Automatic\n* `custom` - Custom",
            "x-spec-enum-id": "ecd3c02e0e393ef5"
          },
          "trigger_type": {
            "enum": [
              "llm_judge",
              "custom_code"
            ],
            "type": "string",
            "description": "* `llm_judge` - LLM Judge\n* `custom_code` - Custom Code",
            "x-spec-enum-id": "2adad4b8df61914f"
          },
          "evaluation_trigger_prompt": {
            "type": "string",
            "description": "\nEvaluation trigger prompt for the metric.\nExample: `\"Evaluate metric only if call ended reason is main-agent-ended-call\"`\n"
          },
          "evaluation_trigger_custom_code": {
            "type": "string",
            "description": "\nPython custom code to determine metric relevance. Code should set _result (bool) and _explanation (str).\nExample:\n```python\n_result = True\n_explanation = \"Metric is relevant\"\nif \"call_end_reason\" in data and data[\"call_end_reason\"] == \"customer-hung-up\":\n    _result = False\n    _explanation = \"Customer hung up, metric not applicable\"\n```\n"
          },
          "priority_assignment_prompt": {
            "type": "string",
            "description": "\nPriority assignment prompt for the metric.\n"
          },
          "vocera_defined_metric_code": {
            "type": "string",
            "description": "\nVocera defined metric code for the metric.\nExample: `\"7fd534f5\"`\n",
            "maxLength": 255
          },
          "configuration": {
            "description": "\nCustom configuration parameters for specific metrics if metric supports it.\nExample:\n- For Infrastructure issues\n```json\n{\n    \"infra_issues_timeout\": 10\n}\n```\n"
          },
          "overall_score": {
            "type": "string",
            "readOnly": true
          },
          "total_score": {
            "type": "string",
            "readOnly": true
          },
          "kb_file_ids": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "\nList of knowledge base file IDs for the metric.\nExample: `[123, 456]`\n"
          },
          "knowledge_base_files": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/KnowledgeBaseFile"
            },
            "readOnly": true
          },
          "scenarios": {
            "writeOnly": true,
            "description": "Either \"all\" or a list of scenario IDs to attach to this metric"
          },
          "custom_code": {
            "type": "string",
            "writeOnly": true
          },
          "metric_cost": {
            "type": "number",
            "format": "double",
            "description": "\nMetric Cost\nExample: `0.10`\n",
            "readOnly": true
          },
          "alert_type": {
            "enum": [
              "disabled",
              "normal",
              "significant_change"
            ],
            "type": "string",
            "description": "* `disabled` - Alerts Disabled\n* `normal` - Normal Alerts\n* `significant_change` - Significant Change Alerts",
            "x-spec-enum-id": "9e2661f1aeca64cf",
            "default": "disabled"
          },
          "significant_change_alert_status": {
            "enum": [
              "enabled",
              "disabled"
            ],
            "type": "string",
            "x-spec-enum-id": "6d6f4d361b4ea1fb",
            "description": "\nAlert status: enabled or disabled.\n\n\n* `enabled` - Enabled\n* `disabled` - Disabled"
          },
          "significant_change_alert_direction": {
            "enum": [
              "",
              "increase",
              "decrease"
            ],
            "type": "string",
            "x-spec-enum-id": "1e86e60ca5cfba12",
            "description": "Alert direction: increase only, decrease only, or both (empty = both).\nExample: `\"increase\"`, `\"decrease\"`, or `\"both\"`\n\n* `` - Both (Increase and Decrease)\n* `increase` - Increase Only\n* `decrease` - Decrease Only"
          },
          "window_size": {
            "type": "integer",
            "readOnly": true,
            "description": "\nWindow size for rolling statistics calculation.\nExample: `50`\n"
          },
          "std_multiplier": {
            "type": "number",
            "format": "double",
            "readOnly": true,
            "description": "\nStandard deviation multiplier for threshold calculation.\nExample: `2.0`\n"
          },
          "ewma_alpha": {
            "type": "number",
            "format": "double",
            "readOnly": true,
            "description": "\nAlpha value for exponentially weighted moving average (EWMA) calculation.\nExample: `0.1`\n"
          },
          "add_to_new_agents": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "When enabled, this metric is automatically assigned to new agents created in the project."
          },
          "alert_filters": {
            "oneOf": [
              {},
              {
                "type": "null"
              }
            ],
            "description": "Filters to apply before computing alerts (CallLogQueryFilter format)"
          },
          "slack_workspace": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Slack workspace to send alerts to"
          },
          "slack_channel_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Override channel ID for this metric's alerts",
            "maxLength": 255
          },
          "uses_llm_judge": {
            "type": "string",
            "readOnly": true,
            "description": "\nWhether this metric produces an LLM-judge narrative: a `custom_code` metric whose\ncode delegates to the LLM judge internally. Computed server-side because the\n`custom_code` body is write-only and not exposed on read.\nExample: `true`\n"
          }
        },
        "required": [
          "eval_type",
          "name"
        ]
      },
      "MetricOptimiserCronJob": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "project": {
            "type": "integer",
            "description": "Project ID this cron job belongs to."
          },
          "name": {
            "type": "string",
            "description": "Display name for the cronjob.",
            "maxLength": 255
          },
          "metrics": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "Metric IDs the cron job will optimise on each firing."
          },
          "crontab_expression": {
            "type": "string",
            "description": "Standard 5-field cron expression (minute hour dom mon dow).",
            "maxLength": 255
          },
          "timezone": {
            "type": "string",
            "description": "IANA timezone name (e.g. America/Los_Angeles). Defaults to UTC."
          },
          "auto_apply": {
            "type": "boolean",
            "description": "If true, overwrite the live metric prompt with the optimised one whenever the optimised score is >= baseline on the labelled set. Defaults to false (read-only)."
          },
          "skip_evaluation": {
            "type": "boolean",
            "description": "Skip the post-optimisation evaluation pass to speed up the cron."
          },
          "is_active": {
            "type": "boolean"
          },
          "notify_on": {
            "enum": [
              "never",
              "success",
              "failure",
              "both"
            ],
            "type": "string",
            "x-spec-enum-id": "d06ae6855e4121c0",
            "description": "When to email project members about the run outcome.\n\n* `never` - Never\n* `success` - Success\n* `failure` - Failure\n* `both` - Both"
          },
          "created_by": {
            "type": "integer",
            "readOnly": true
          },
          "created_via": {
            "enum": [
              "user",
              "api",
              "mcp",
              "cli",
              "sdk",
              null
            ],
            "type": [
              "string",
              "null"
            ],
            "description": "* `user` - User\n* `api` - API\n* `mcp` - MCP\n* `cli` - CLI\n* `sdk` - SDK",
            "x-spec-enum-id": "360ac7f2b69a95cc",
            "readOnly": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          }
        },
        "required": [
          "crontab_expression",
          "metrics",
          "project"
        ]
      },
      "MetricOptimizerChatSession": {
        "type": "object",
        "description": "Read-only serializer for the post-optimization review chat session.",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "metric": {
            "type": "integer",
            "readOnly": true
          },
          "project": {
            "type": [
              "integer",
              "null"
            ],
            "readOnly": true
          },
          "agent": {
            "type": [
              "integer",
              "null"
            ],
            "readOnly": true
          },
          "status": {
            "enum": [
              "awaiting_user",
              "agent_running",
              "regression_running",
              "reoptimizing",
              "completed",
              "cancelled",
              "failed"
            ],
            "type": "string",
            "description": "* `awaiting_user` - Awaiting User\n* `agent_running` - Agent Running\n* `regression_running` - Regression Running\n* `reoptimizing` - Reoptimizing\n* `completed` - Completed\n* `cancelled` - Cancelled\n* `failed` - Failed",
            "x-spec-enum-id": "8b33c50cd513306a",
            "readOnly": true
          },
          "conversation_history": {
            "readOnly": true,
            "description": "[{role, content, timestamp, message_type?, payload?, questions?}]"
          },
          "proposal": {
            "readOnly": true,
            "description": "Snapshot of the latest process_feedbacks output (the optimized proposal)"
          },
          "regression_results": {
            "readOnly": true,
            "description": "Latest regression check: {samples: [...], summary: {...}, run_at}"
          },
          "active_progress": {
            "readOnly": true,
            "description": "In-flight progress ids: {chat_turn?, regression?, reoptimize?}"
          },
          "test_set_ids": {
            "readOnly": true,
            "description": "Eval-set test_set ids for the optimization run; grows when samples are added"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          }
        }
      },
      "MetricPreview": {
        "type": "object",
        "properties": {
          "agent_id": {
            "type": "integer",
            "description": "Agent ID - all call logs/runs must belong to this agent"
          },
          "project_id": {
            "type": "integer",
            "description": "Project ID - all call logs/runs must belong to this project"
          },
          "call_log_ids": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "List of call log IDs to evaluate (maximum 10, required if run_ids not provided)",
            "maxItems": 10,
            "minItems": 1
          },
          "run_ids": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "List of run IDs to evaluate (maximum 10, required if call_log_ids not provided)",
            "maxItems": 10,
            "minItems": 1
          },
          "metric_data": {
            "allOf": [
              {
                "$ref": "#/components/schemas/MetricPreviewData"
              }
            ],
            "description": "Metric configuration to evaluate"
          }
        },
        "required": [
          "metric_data"
        ]
      },
      "MetricPreviewData": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Name of the metric",
            "maxLength": 255
          },
          "type": {
            "enum": [
              "basic",
              "custom_prompt",
              "custom_code",
              "llm_judge"
            ],
            "type": "string",
            "x-spec-enum-id": "b44700c0a6443b40",
            "description": "Type of metric: basic, custom_prompt, or custom_code\n\n* `basic` - Basic (Deprecated in favor of LLM Judge)\n* `custom_prompt` - Custom Prompt ( Deprecated in favor of LLM Judge)\n* `custom_code` - Custom Code\n* `llm_judge` - LLM Judge"
          },
          "eval_type": {
            "enum": [
              "binary",
              "continuous_qualitative",
              "numeric",
              "enum"
            ],
            "type": "string",
            "x-spec-enum-id": "b40eac6824409cc2",
            "description": "Evaluation type: binary, continuous_qualitative, numeric, or enum. Legacy values (binary_workflow_adherence, binary_qualitative) are accepted and mapped to binary.\n\n* `binary` - Binary\n* `continuous_qualitative` - Continuous Qualitative\n* `numeric` - Numeric\n* `enum` - Enum"
          },
          "evaluation_trigger": {
            "enum": [
              "always",
              "automatic",
              "custom"
            ],
            "type": "string",
            "x-spec-enum-id": "ecd3c02e0e393ef5",
            "default": "always",
            "description": "When to trigger evaluation: always, automatic, or custom\n\n* `always` - Always\n* `automatic` - Automatic\n* `custom` - Custom"
          },
          "trigger_type": {
            "enum": [
              "llm_judge",
              "custom_code"
            ],
            "type": "string",
            "x-spec-enum-id": "2adad4b8df61914f",
            "default": "llm_judge",
            "description": "Type of trigger evaluation: llm_judge or custom_code (only used when evaluation_trigger is custom)\n\n* `llm_judge` - LLM Judge\n* `custom_code` - Custom Code"
          },
          "evaluation_trigger_prompt": {
            "type": "string",
            "default": "",
            "description": "Prompt for evaluation trigger (required for custom trigger with llm_judge)"
          },
          "evaluation_trigger_custom_code": {
            "type": "string",
            "default": "",
            "description": "Python code for trigger evaluation (required for custom trigger with custom_code)"
          },
          "description": {
            "type": "string",
            "default": "",
            "description": "Description of what the metric measures (required for basic type)"
          },
          "prompt": {
            "type": "string",
            "default": "",
            "description": "Custom prompt for evaluation (required for custom_prompt type)"
          },
          "custom_code": {
            "type": "string",
            "default": "",
            "description": "Python code for custom evaluation (required for custom_code type)"
          },
          "enum_values": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "List of possible enum values (required when eval_type is enum)"
          }
        },
        "required": [
          "eval_type",
          "name",
          "type"
        ]
      },
      "MetricRestoreRequest": {
        "type": "object",
        "properties": {
          "history_id": {
            "type": "integer"
          }
        },
        "required": [
          "history_id"
        ]
      },
      "MetricReviewDetail": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "test_set": {
            "allOf": [
              {
                "$ref": "#/components/schemas/TestSetInline"
              }
            ],
            "readOnly": true
          },
          "metric": {
            "type": "integer"
          },
          "expected_value": {
            "oneOf": [
              {},
              {
                "type": "null"
              }
            ],
            "description": "\nMetric expected value\nExample:\n- `5` or `0`\n- `one`, `two` or `three` [ enum type ]\n"
          },
          "actual_value": {
            "oneOf": [
              {},
              {
                "type": "null"
              }
            ],
            "description": "\nMetric actual value\nExample:\n- `5` or `0`\n- `one`, `two` or `three` [ enum type ]\n"
          },
          "explanation": {
            "description": "\nMetric explanation\nExample:\n```json\n[\"Agent failed to follow the opening script\", \"Missed key product information\"]\n```\n"
          },
          "feedback": {
            "type": "string",
            "description": "\nMetric feedback\nExample:\n- `\"Great Call\"`\n"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true,
            "description": "\nTimestamp when the metric review was created\nExample: `\"2021-01-01T00:00:00Z\"`\n"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true,
            "description": "\nTimestamp when the metric review was last updated\nExample: `\"2021-01-01T00:00:00Z\"`\n"
          }
        },
        "required": [
          "metric"
        ]
      },
      "MetricReviewInline": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "metric": {
            "type": "integer",
            "readOnly": true
          },
          "metric_name": {
            "type": "string",
            "readOnly": true
          },
          "metric_enum_values": {
            "readOnly": true
          },
          "eval_type": {
            "type": "string",
            "readOnly": true
          },
          "expected_value": {
            "oneOf": [
              {},
              {
                "type": "null"
              }
            ],
            "description": "\nMetric expected value\nExample:\n- `5` or `0`\n- `one`, `two` or `three` [ enum type ]\n"
          },
          "explanation": {
            "readOnly": true,
            "description": "\nMetric explanation\nExample:\n```json\n[\"Agent failed to follow the opening script\", \"Missed key product information\"]\n```\n"
          },
          "feedback": {
            "type": "string",
            "description": "\nMetric feedback\nExample:\n- `\"Great Call\"`\n"
          },
          "metric_function_name": {
            "type": "string",
            "readOnly": true
          },
          "metric_vocera_defined_metric_code": {
            "type": "string",
            "readOnly": true
          }
        },
        "required": [
          "id"
        ]
      },
      "MetricRollingStats": {
        "type": "object",
        "description": "Read-only serializer for MetricRollingStats model.\nUsed to verify that rolling stats objects are created when alerts are enabled.",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "metric": {
            "type": "integer",
            "readOnly": true
          },
          "metric_name": {
            "type": "string",
            "readOnly": true
          },
          "agent": {
            "type": "integer",
            "readOnly": true
          },
          "agent_name": {
            "type": "string",
            "readOnly": true
          },
          "alert": {
            "type": [
              "integer",
              "null"
            ],
            "readOnly": true,
            "description": "Alert object this rolling stats is tracking"
          },
          "window_size": {
            "type": "integer",
            "readOnly": true
          },
          "calls_count": {
            "type": "integer",
            "readOnly": true
          },
          "std_multiplier": {
            "type": "number",
            "format": "double",
            "readOnly": true
          },
          "ewma_alpha": {
            "type": "number",
            "format": "double",
            "readOnly": true
          },
          "last_significant_change_detected": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "readOnly": true
          },
          "last_alert_sent_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "readOnly": true,
            "description": "Timestamp of when the last metric failure alert was sent"
          },
          "alert_count": {
            "type": "integer",
            "readOnly": true,
            "description": "Number of metric failure alerts sent"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          }
        }
      },
      "MetricRollingStatsPatch": {
        "type": "object",
        "description": "",
        "properties": {
          "window_size": {
            "type": "integer",
            "maximum": 2147483647,
            "minimum": 0
          },
          "std_multiplier": {
            "type": "number",
            "format": "double"
          },
          "ewma_alpha": {
            "type": "number",
            "format": "double"
          }
        }
      },
      "MetricWithFeedback": {
        "type": "object",
        "properties": {
          "metric": {
            "type": "integer",
            "description": "ID of the metric"
          },
          "feedback": {
            "type": "string",
            "default": "",
            "description": "Optional note/feedback for the metric"
          },
          "expected_value": {
            "oneOf": [
              {},
              {
                "type": "null"
              }
            ],
            "description": "Optional expected value for the metric"
          }
        },
        "required": [
          "metric"
        ]
      },
      "MockStatusMCPEndpoint": {
        "type": "object",
        "properties": {
          "mock_index": {
            "type": "integer"
          },
          "url": {
            "type": "string"
          },
          "tool_names": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "mock_index",
          "tool_names",
          "url"
        ]
      },
      "MockStatusResponse": {
        "type": "object",
        "properties": {
          "mock_enabled": {
            "type": "boolean"
          },
          "provider": {
            "type": [
              "string",
              "null"
            ]
          },
          "assistant_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "mcp_endpoints": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MockStatusMCPEndpoint"
            },
            "description": "MCP JSON-RPC endpoints registered on the agent. Empty if no MCP-typed tools are mocked."
          },
          "tool_endpoints": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MockStatusToolEndpoint"
            },
            "description": "Per-tool webhook endpoints for standalone (non-MCP) tools. Excludes MCP sub-tools, which are listed under mcp_endpoints[].tool_names."
          }
        },
        "required": [
          "assistant_id",
          "mcp_endpoints",
          "mock_enabled",
          "provider",
          "tool_endpoints"
        ]
      },
      "MockStatusToolEndpoint": {
        "type": "object",
        "properties": {
          "tool_name": {
            "type": "string"
          },
          "url": {
            "type": "string"
          }
        },
        "required": [
          "tool_name",
          "url"
        ]
      },
      "MoveFolderRequest": {
        "type": "object",
        "properties": {
          "path": {
            "type": "string",
            "description": "Current folder path to move. Example: \"Sales.Inbound\""
          },
          "project_id": {
            "type": "integer",
            "description": "Project ID the folder belongs to"
          },
          "new_parent_path": {
            "type": [
              "string",
              "null"
            ],
            "description": "New parent folder path. Empty or null to move to root. Example: \"Marketing\""
          }
        },
        "required": [
          "path",
          "project_id"
        ]
      },
      "Notification": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "event_type": {
            "type": "string",
            "readOnly": true
          },
          "title": {
            "type": "string",
            "readOnly": true
          },
          "body": {
            "type": "string",
            "readOnly": true
          },
          "deep_link": {
            "type": "string",
            "readOnly": true
          },
          "payload": {
            "readOnly": true
          },
          "severity": {
            "enum": [
              "info",
              "success",
              "warning",
              "error"
            ],
            "type": "string",
            "description": "* `info` - Info\n* `success` - Success\n* `warning` - Warning\n* `error` - Error",
            "x-spec-enum-id": "0307c5efa9f93e91",
            "readOnly": true
          },
          "is_read": {
            "type": "boolean",
            "readOnly": true
          },
          "read_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "readOnly": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          }
        }
      },
      "OpenPRRequest": {
        "type": "object",
        "properties": {
          "repo": {
            "type": "string",
            "description": "Short repository name to open the PR against."
          },
          "title": {
            "type": "string",
            "description": "Pull request title (also the commit message)."
          },
          "body": {
            "type": "string",
            "default": ""
          },
          "base": {
            "type": "string",
            "description": "Base branch to target; defaults to the repo's default branch."
          },
          "files": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/_PRFile"
            },
            "description": "Files to create, update, or delete."
          }
        },
        "required": [
          "files",
          "repo",
          "title"
        ]
      },
      "OptimizerChatMessageRequest": {
        "type": "object",
        "properties": {
          "session_id": {
            "type": "integer"
          },
          "user_message": {
            "type": "string",
            "default": ""
          },
          "review_payload": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OptimizerChatRegressionReviewItem"
            },
            "description": "Structured verdicts for regression-diff samples the user reviewed"
          }
        },
        "required": [
          "session_id"
        ]
      },
      "OptimizerChatRegressionReviewItem": {
        "type": "object",
        "properties": {
          "source_type": {
            "enum": [
              "call_log",
              "run"
            ],
            "type": "string",
            "description": "* `call_log` - call_log\n* `run` - run",
            "x-spec-enum-id": "6a2f1f0669817ff1"
          },
          "source_id": {
            "type": "integer"
          },
          "new_label_correct": {
            "type": "boolean"
          },
          "correct_label": {
            "oneOf": [
              {},
              {
                "type": "null"
              }
            ]
          },
          "feedback": {
            "type": "string",
            "default": ""
          }
        },
        "required": [
          "new_label_correct",
          "source_id",
          "source_type"
        ]
      },
      "OptimizerChatReoptimizeRequest": {
        "type": "object",
        "properties": {
          "session_id": {
            "type": "integer"
          }
        },
        "required": [
          "session_id"
        ]
      },
      "OptimizerChatStartRequest": {
        "type": "object",
        "properties": {
          "metric_id": {
            "type": "integer",
            "description": "Metric whose optimization proposal the chat reviews"
          },
          "progress_id": {
            "type": "string",
            "description": "process_feedbacks progress_id whose output seeds the session. If omitted, falls back to the metric's pending optimisation proposal."
          }
        },
        "required": [
          "metric_id"
        ]
      },
      "Organization": {
        "type": "object",
        "description": "",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "name": {
            "type": "string",
            "maxLength": 255
          },
          "team_size": {
            "enum": [
              "1",
              "<10",
              "10-100",
              "100-500",
              "500+"
            ],
            "type": "string",
            "x-spec-enum-id": "2e4d8382426c5017",
            "description": "Number of people/employees in the organization\n\n* `1` - 1\n* `<10` - Less than 10\n* `10-100` - 10 - 100\n* `100-500` - 100 - 500\n* `500+` - More than 500"
          },
          "discovery_source": {
            "type": [
              "string",
              "null"
            ],
            "description": "How the user discovered the platform (e.g., LinkedIn, Google, ChatGPT, Friends, etc.)"
          },
          "outbound_timeout": {
            "type": "integer",
            "maximum": 2147483647,
            "minimum": -2147483648
          },
          "max_agents_limit": {
            "type": "integer",
            "readOnly": true
          },
          "max_members_limit": {
            "type": "integer",
            "readOnly": true
          },
          "max_concurrent_runs_limit": {
            "type": "integer",
            "maximum": 2147483647,
            "minimum": -2147483648
          },
          "max_concurrent_chat_runs_limit": {
            "type": "integer",
            "maximum": 2147483647,
            "minimum": -2147483648
          },
          "max_call_duration": {
            "type": "integer",
            "maximum": 2147483647,
            "minimum": -2147483648
          },
          "evaluate_relevant_metrics_enabled": {
            "type": "boolean"
          },
          "end_call_enabled": {
            "type": "boolean"
          },
          "generate_scenario_auto_assign_numbers_enabled": {
            "type": "boolean"
          },
          "show_custom_dashboards": {
            "type": "boolean",
            "readOnly": true
          },
          "notify_daily_report": {
            "type": "boolean"
          },
          "notify_cron_failure": {
            "type": "boolean"
          },
          "notify_cron_success": {
            "type": "boolean"
          },
          "notify_no_calls": {
            "type": "boolean"
          },
          "notify_result_webhook": {
            "type": "boolean"
          },
          "notify_cronjob_webhook": {
            "type": "boolean"
          },
          "notify_call_log_webhook": {
            "type": "boolean"
          },
          "forward_vapi_webhook": {
            "type": "boolean"
          },
          "forward_retell_webhook": {
            "type": "boolean"
          },
          "is_send_emails_enabled": {
            "type": "boolean"
          },
          "notify_frequent_calls_for_number": {
            "type": "boolean"
          },
          "frequent_calls_threshold": {
            "type": "integer",
            "maximum": 2147483647,
            "minimum": -2147483648
          },
          "frequent_calls_time_period": {
            "type": "integer",
            "maximum": 2147483647,
            "minimum": -2147483648
          },
          "frequent_calls_cooldown": {
            "type": "integer",
            "maximum": 2147483647,
            "minimum": -2147483648
          },
          "notify_metric_significant_shift": {
            "type": "boolean"
          },
          "notify_low_credits": {
            "type": "boolean",
            "description": "Enable email notifications when credits remaining falls below threshold"
          },
          "low_credits_threshold": {
            "type": "string",
            "format": "decimal",
            "pattern": "^-?\\d{0,8}(?:\\.\\d{0,2})?$",
            "description": "Dollar amount threshold - notify when credits remaining is below this value. Example: 100.00"
          },
          "cronjob_low_balance_mute_days": {
            "enum": [
              "0",
              "3",
              "7",
              "14"
            ],
            "type": "string",
            "x-spec-enum-id": "c17552f0870cd395",
            "description": "Mute cronjob low balance notifications for selected number of days\n\n* `0` - Disabled\n* `3` - 3 Days\n* `7` - 7 Days\n* `14` - 14 Days"
          },
          "limit_to_exclusive_numbers": {
            "type": "boolean",
            "description": "When enabled, only phone numbers with organization field set to this organization will be visible. When disabled, all unassigned phone numbers are also visible."
          },
          "allow_duplicate_call_ids": {
            "type": "boolean",
            "description": "When enabled, Allow uploading calls with the same call_id"
          },
          "allow_join_requests": {
            "type": "boolean",
            "description": "When enabled, users with matching email domain can discover and request to join this organization"
          },
          "conditional_actions_generation_enabled": {
            "type": "boolean",
            "description": "When enabled, auto-generated scenarios use conditional actions format instead of instructions"
          },
          "vapi_api_key": {
            "type": "string",
            "writeOnly": true
          },
          "vapi_api_key_configured": {
            "type": "string",
            "readOnly": true
          },
          "vapi_public_key_configured": {
            "type": "string",
            "readOnly": true
          },
          "retell_api_key": {
            "type": "string",
            "writeOnly": true
          },
          "retell_api_key_configured": {
            "type": "string",
            "readOnly": true
          },
          "syntflow_api_key": {
            "type": "string",
            "writeOnly": true
          },
          "syntflow_api_key_configured": {
            "type": "string",
            "readOnly": true
          },
          "members": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MembershipInline"
            },
            "readOnly": true
          },
          "projects": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProjectInline"
            },
            "readOnly": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "timezone": {
            "enum": [
              "Africa/Abidjan",
              "Africa/Accra",
              "Africa/Addis_Ababa",
              "Africa/Algiers",
              "Africa/Asmara",
              "Africa/Bamako",
              "Africa/Bangui",
              "Africa/Banjul",
              "Africa/Bissau",
              "Africa/Blantyre",
              "Africa/Brazzaville",
              "Africa/Bujumbura",
              "Africa/Cairo",
              "Africa/Casablanca",
              "Africa/Ceuta",
              "Africa/Conakry",
              "Africa/Dakar",
              "Africa/Dar_es_Salaam",
              "Africa/Djibouti",
              "Africa/Douala",
              "Africa/El_Aaiun",
              "Africa/Freetown",
              "Africa/Gaborone",
              "Africa/Harare",
              "Africa/Johannesburg",
              "Africa/Juba",
              "Africa/Kampala",
              "Africa/Khartoum",
              "Africa/Kigali",
              "Africa/Kinshasa",
              "Africa/Lagos",
              "Africa/Libreville",
              "Africa/Lome",
              "Africa/Luanda",
              "Africa/Lubumbashi",
              "Africa/Lusaka",
              "Africa/Malabo",
              "Africa/Maputo",
              "Africa/Maseru",
              "Africa/Mbabane",
              "Africa/Mogadishu",
              "Africa/Monrovia",
              "Africa/Nairobi",
              "Africa/Ndjamena",
              "Africa/Niamey",
              "Africa/Nouakchott",
              "Africa/Ouagadougou",
              "Africa/Porto-Novo",
              "Africa/Sao_Tome",
              "Africa/Tripoli",
              "Africa/Tunis",
              "Africa/Windhoek",
              "America/Adak",
              "America/Anchorage",
              "America/Chicago",
              "America/Denver",
              "America/Los_Angeles",
              "America/New_York",
              "America/Phoenix",
              "America/Sao_Paulo",
              "Asia/Dubai",
              "Asia/Hong_Kong",
              "Asia/Kolkata",
              "Asia/Seoul",
              "Asia/Shanghai",
              "Asia/Singapore",
              "Asia/Tokyo",
              "Australia/Melbourne",
              "Australia/Perth",
              "Australia/Sydney",
              "Europe/Amsterdam",
              "Europe/Berlin",
              "Europe/London",
              "Europe/Madrid",
              "Europe/Moscow",
              "Europe/Paris",
              "Europe/Rome",
              "Pacific/Auckland",
              "Pacific/Honolulu",
              "US/Central",
              "US/Eastern",
              "US/Mountain",
              "US/Pacific",
              "UTC"
            ],
            "type": "string",
            "description": "* `Africa/Abidjan` - Africa/Abidjan\n* `Africa/Accra` - Africa/Accra\n* `Africa/Addis_Ababa` - Africa/Addis_Ababa\n* `Africa/Algiers` - Africa/Algiers\n* `Africa/Asmara` - Africa/Asmara\n* `Africa/Bamako` - Africa/Bamako\n* `Africa/Bangui` - Africa/Bangui\n* `Africa/Banjul` - Africa/Banjul\n* `Africa/Bissau` - Africa/Bissau\n* `Africa/Blantyre` - Africa/Blantyre\n* `Africa/Brazzaville` - Africa/Brazzaville\n* `Africa/Bujumbura` - Africa/Bujumbura\n* `Africa/Cairo` - Africa/Cairo\n* `Africa/Casablanca` - Africa/Casablanca\n* `Africa/Ceuta` - Africa/Ceuta\n* `Africa/Conakry` - Africa/Conakry\n* `Africa/Dakar` - Africa/Dakar\n* `Africa/Dar_es_Salaam` - Africa/Dar_es_Salaam\n* `Africa/Djibouti` - Africa/Djibouti\n* `Africa/Douala` - Africa/Douala\n* `Africa/El_Aaiun` - Africa/El_Aaiun\n* `Africa/Freetown` - Africa/Freetown\n* `Africa/Gaborone` - Africa/Gaborone\n* `Africa/Harare` - Africa/Harare\n* `Africa/Johannesburg` - Africa/Johannesburg\n* `Africa/Juba` - Africa/Juba\n* `Africa/Kampala` - Africa/Kampala\n* `Africa/Khartoum` - Africa/Khartoum\n* `Africa/Kigali` - Africa/Kigali\n* `Africa/Kinshasa` - Africa/Kinshasa\n* `Africa/Lagos` - Africa/Lagos\n* `Africa/Libreville` - Africa/Libreville\n* `Africa/Lome` - Africa/Lome\n* `Africa/Luanda` - Africa/Luanda\n* `Africa/Lubumbashi` - Africa/Lubumbashi\n* `Africa/Lusaka` - Africa/Lusaka\n* `Africa/Malabo` - Africa/Malabo\n* `Africa/Maputo` - Africa/Maputo\n* `Africa/Maseru` - Africa/Maseru\n* `Africa/Mbabane` - Africa/Mbabane\n* `Africa/Mogadishu` - Africa/Mogadishu\n* `Africa/Monrovia` - Africa/Monrovia\n* `Africa/Nairobi` - Africa/Nairobi\n* `Africa/Ndjamena` - Africa/Ndjamena\n* `Africa/Niamey` - Africa/Niamey\n* `Africa/Nouakchott` - Africa/Nouakchott\n* `Africa/Ouagadougou` - Africa/Ouagadougou\n* `Africa/Porto-Novo` - Africa/Porto-Novo\n* `Africa/Sao_Tome` - Africa/Sao_Tome\n* `Africa/Tripoli` - Africa/Tripoli\n* `Africa/Tunis` - Africa/Tunis\n* `Africa/Windhoek` - Africa/Windhoek\n* `America/Adak` - America/Adak\n* `America/Anchorage` - America/Anchorage\n* `America/Chicago` - America/Chicago\n* `America/Denver` - America/Denver\n* `America/Los_Angeles` - America/Los_Angeles\n* `America/New_York` - America/New_York\n* `America/Phoenix` - America/Phoenix\n* `America/Sao_Paulo` - America/Sao_Paulo\n* `Asia/Dubai` - Asia/Dubai\n* `Asia/Hong_Kong` - Asia/Hong_Kong\n* `Asia/Kolkata` - Asia/Kolkata\n* `Asia/Seoul` - Asia/Seoul\n* `Asia/Shanghai` - Asia/Shanghai\n* `Asia/Singapore` - Asia/Singapore\n* `Asia/Tokyo` - Asia/Tokyo\n* `Australia/Melbourne` - Australia/Melbourne\n* `Australia/Perth` - Australia/Perth\n* `Australia/Sydney` - Australia/Sydney\n* `Europe/Amsterdam` - Europe/Amsterdam\n* `Europe/Berlin` - Europe/Berlin\n* `Europe/London` - Europe/London\n* `Europe/Madrid` - Europe/Madrid\n* `Europe/Moscow` - Europe/Moscow\n* `Europe/Paris` - Europe/Paris\n* `Europe/Rome` - Europe/Rome\n* `Pacific/Auckland` - Pacific/Auckland\n* `Pacific/Honolulu` - Pacific/Honolulu\n* `US/Central` - US/Central\n* `US/Eastern` - US/Eastern\n* `US/Mountain` - US/Mountain\n* `US/Pacific` - US/Pacific\n* `UTC` - UTC",
            "x-spec-enum-id": "6e7339d971185fa9"
          },
          "is_2fa_required": {
            "type": "boolean"
          },
          "skip_onboarding": {
            "type": "boolean"
          },
          "onboarding_flow": {
            "enum": [
              "simulation",
              "observability"
            ],
            "type": "string",
            "description": "* `simulation` - Simulation\n* `observability` - Observability",
            "x-spec-enum-id": "bd0a2727bbf39892"
          },
          "user_onboarding": {
            "type": "string",
            "readOnly": true
          },
          "phone_number_verified": {
            "type": "boolean",
            "readOnly": true
          },
          "slack_invite_sent": {
            "type": "boolean",
            "readOnly": true,
            "description": "Whether Slack community invite has been sent to this organization"
          },
          "auto_refill": {
            "type": "boolean"
          },
          "auto_refill_threshold": {
            "type": "string",
            "format": "decimal",
            "pattern": "^-?\\d{0,8}(?:\\.\\d{0,2})?$"
          },
          "auto_refill_amount": {
            "type": "string",
            "format": "decimal",
            "pattern": "^-?\\d{0,8}(?:\\.\\d{0,2})?$"
          },
          "auto_refill_max_cap": {
            "type": [
              "string",
              "null"
            ],
            "format": "decimal",
            "pattern": "^-?\\d{0,8}(?:\\.\\d{0,2})?$",
            "description": "Maximum total amount that can be auto-refilled in a billing cycle. None for no limit."
          }
        },
        "required": [
          "limit_to_exclusive_numbers",
          "name"
        ]
      },
      "OrganizationInline": {
        "type": "object",
        "description": "",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "name": {
            "type": "string",
            "maxLength": 255
          },
          "members": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MembershipInline"
            },
            "readOnly": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          }
        },
        "required": [
          "name"
        ]
      },
      "OutcomeAlignment": {
        "type": "object",
        "properties": {
          "outcome": {
            "type": "string",
            "description": "Outcome of the expected outcome"
          },
          "prompt_part": {
            "type": "string",
            "description": "Prompt part of the expected outcome"
          },
          "aligned": {
            "type": "boolean",
            "description": "Whether the outcome aligns with the prompt part"
          }
        },
        "required": [
          "aligned",
          "outcome",
          "prompt_part"
        ]
      },
      "OverallEvaluation": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "evaluation": {
            "oneOf": [
              {},
              {
                "type": "null"
              }
            ],
            "description": "Overall evaluation results across all calls.\nExample:\n```json\n{\n    \"metrics\": [\n        {\n            \"id\": 1,\n            \"name\": \"Average Response Time\",\n            \"value\": 2.8,\n            \"explanation\": [\n                \"Average response time improved by 15%\",\n                \"Peak performance during business hours\"\n            ]\n        },\n        {\n            \"id\": 2,\n            \"name\": \"Success Rate\",\n            \"value\": 0.92,\n            \"explanation\": [\n                \"92% of calls completed successfully\",\n                \"Higher success rate in technical support\"\n            ]\n        }\n    ]\n}\n```"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true,
            "description": "When this record was created.\nExample: `2024-03-15T10:30:45Z`"
          },
          "agent": {
            "type": "integer",
            "description": "Agent ID"
          }
        },
        "required": [
          "agent"
        ]
      },
      "Pack": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "name": {
            "type": "string",
            "maxLength": 100
          },
          "code": {
            "type": "string",
            "maxLength": 100
          },
          "description": {
            "type": "string"
          },
          "price": {
            "type": "string",
            "format": "decimal",
            "pattern": "^-?\\d{0,8}(?:\\.\\d{0,2})?$"
          },
          "interval": {
            "enum": [
              "month",
              "quarter",
              "year"
            ],
            "type": "string",
            "description": "* `month` - Monthly\n* `quarter` - Quarterly\n* `year` - Yearly",
            "x-spec-enum-id": "493dc6126f399b59"
          },
          "trial_period_days": {
            "type": "string",
            "readOnly": true
          },
          "balance": {
            "type": "string",
            "format": "decimal",
            "pattern": "^-?\\d{0,8}(?:\\.\\d{0,2})?$"
          },
          "runs_balance": {
            "type": "integer",
            "maximum": 2147483647,
            "minimum": -2147483648
          },
          "call_logs_balance": {
            "type": "integer",
            "maximum": 2147483647,
            "minimum": -2147483648
          },
          "max_members_limit": {
            "type": "integer",
            "maximum": 2147483647,
            "minimum": -2147483648
          },
          "max_agents_limit": {
            "type": "integer",
            "maximum": 2147483647,
            "minimum": -2147483648
          },
          "max_projects_limit": {
            "type": "integer",
            "maximum": 2147483647,
            "minimum": -2147483648
          },
          "max_concurrent_runs_limit": {
            "type": "integer",
            "maximum": 2147483647,
            "minimum": -2147483648
          },
          "max_concurrent_chat_runs_limit": {
            "type": "integer",
            "maximum": 2147483647,
            "minimum": -2147483648
          },
          "monitoring_minutes": {
            "type": "integer",
            "maximum": 2147483647,
            "minimum": -2147483648
          },
          "premium_slack_support": {
            "type": "boolean"
          },
          "custom_api_integrations": {
            "type": "boolean"
          },
          "dedicated_support_engineer": {
            "type": "boolean"
          },
          "sla_hours": {
            "type": "integer",
            "maximum": 2147483647,
            "minimum": -2147483648
          },
          "custom_feature_requests": {
            "type": "boolean"
          },
          "simulate_scenarios": {
            "type": "boolean"
          },
          "downloadable_reports": {
            "type": "boolean"
          },
          "slack_alerts": {
            "type": "boolean"
          },
          "custom_sso": {
            "type": "boolean"
          },
          "dedicated_cloud_instance": {
            "type": "boolean"
          },
          "on_prem_deployment": {
            "type": "boolean"
          },
          "multiple_organizations": {
            "type": "boolean"
          },
          "hippa_compliance": {
            "type": "boolean"
          },
          "display_order": {
            "type": "integer",
            "maximum": 2147483647,
            "minimum": -2147483648
          },
          "billing_type": {
            "enum": [
              "subscription",
              "self_serve"
            ],
            "type": "string",
            "x-spec-enum-id": "31820255025544ce",
            "description": "Billing type for the pack\n\n* `subscription` - Subscription\n* `self_serve` - Self Serve"
          },
          "allow_view_only_role": {
            "type": "boolean",
            "description": "Allow VIEW_ONLY role for memberships/invites on this pack. When False, view-only seats are blocked."
          },
          "data_retention_days": {
            "type": [
              "integer",
              "null"
            ],
            "maximum": 2147483647,
            "minimum": -2147483648,
            "description": "Data retention period in days. Leave blank to skip archival for this plan."
          },
          "free_members_count": {
            "type": "integer",
            "maximum": 2147483647,
            "minimum": -2147483648,
            "description": "Number of members included for free (e.g. 1 = first user free). <b>Only applies to self-serve billing.</b> Self-serve packs with free members never expire: the base plan is free and only the seats beyond this count are billed through Stripe."
          },
          "one_time_credits": {
            "type": "string",
            "format": "decimal",
            "pattern": "^-?\\d{0,8}(?:\\.\\d{0,2})?$",
            "description": "One-time complimentary credits granted when the pack is provisioned. Added to the never-expiring extra balance; they do not recur."
          },
          "allow_switch_to_plan": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Plan that can be offered as a one-time switch when this plan reaches its first paid member seat. Leave blank to disable the offer."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          }
        },
        "required": [
          "price"
        ]
      },
      "PackAccessRequest": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "user": {
            "type": "integer",
            "readOnly": true,
            "description": "User who requested pack access"
          },
          "user_email": {
            "type": "string",
            "readOnly": true
          },
          "organization": {
            "type": "integer",
            "description": "Organization requesting pack access"
          },
          "organization_name": {
            "type": "string",
            "readOnly": true
          },
          "pack": {
            "type": "integer",
            "readOnly": true,
            "description": "Pack being requested (typically sandbox)"
          },
          "pack_name": {
            "type": "string",
            "readOnly": true
          },
          "status": {
            "enum": [
              "pending",
              "accepted",
              "declined"
            ],
            "type": "string",
            "x-spec-enum-id": "2b675166afd83db4",
            "readOnly": true,
            "default": "pending",
            "description": "Request status\n\n* `pending` - Pending\n* `accepted` - Accepted\n* `declined` - Declined"
          },
          "requested_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "reviewed_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "readOnly": true
          },
          "reviewed_by": {
            "type": [
              "integer",
              "null"
            ],
            "readOnly": true,
            "description": "Admin who reviewed the request"
          },
          "admin_notes": {
            "type": "string",
            "readOnly": true,
            "description": "Optional notes from admin during review"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          }
        },
        "required": [
          "organization"
        ]
      },
      "PackInline": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "name": {
            "type": "string",
            "maxLength": 100
          },
          "code": {
            "type": "string",
            "maxLength": 100
          },
          "price": {
            "type": "string",
            "format": "decimal",
            "pattern": "^-?\\d{0,8}(?:\\.\\d{0,2})?$"
          },
          "balance": {
            "type": "string",
            "format": "decimal",
            "pattern": "^-?\\d{0,8}(?:\\.\\d{0,2})?$"
          },
          "subscription_overage": {
            "type": "string",
            "format": "decimal",
            "pattern": "^-?\\d{0,3}(?:\\.\\d{0,2})?$",
            "description": "Price per credit for overage/extra purchases. Set to -1 to disallow purchasing extra credits."
          },
          "billing_type": {
            "enum": [
              "subscription",
              "self_serve"
            ],
            "type": "string",
            "x-spec-enum-id": "31820255025544ce",
            "description": "Billing type for the pack\n\n* `subscription` - Subscription\n* `self_serve` - Self Serve"
          },
          "interval": {
            "enum": [
              "month",
              "quarter",
              "year"
            ],
            "type": "string",
            "description": "* `month` - Monthly\n* `quarter` - Quarterly\n* `year` - Yearly",
            "x-spec-enum-id": "493dc6126f399b59"
          },
          "max_members_limit": {
            "type": "integer",
            "maximum": 2147483647,
            "minimum": -2147483648
          },
          "max_concurrent_runs_limit": {
            "type": "integer",
            "maximum": 2147483647,
            "minimum": -2147483648
          },
          "max_concurrent_chat_runs_limit": {
            "type": "integer",
            "maximum": 2147483647,
            "minimum": -2147483648
          },
          "allow_cancellation": {
            "type": "boolean",
            "description": "Allow users to cancel subscription"
          },
          "allow_view_only_role": {
            "type": "boolean",
            "description": "Allow VIEW_ONLY role for memberships/invites on this pack. When False, view-only seats are blocked."
          },
          "data_retention_days": {
            "type": [
              "integer",
              "null"
            ],
            "maximum": 2147483647,
            "minimum": -2147483648,
            "description": "Data retention period in days. Leave blank to skip archival for this plan."
          },
          "extra_member_price": {
            "type": "string",
            "readOnly": true
          },
          "free_members_count": {
            "type": "integer",
            "maximum": 2147483647,
            "minimum": -2147483648,
            "description": "Number of members included for free (e.g. 1 = first user free). <b>Only applies to self-serve billing.</b> Self-serve packs with free members never expire: the base plan is free and only the seats beyond this count are billed through Stripe."
          },
          "one_time_credits": {
            "type": "string",
            "format": "decimal",
            "pattern": "^-?\\d{0,8}(?:\\.\\d{0,2})?$",
            "description": "One-time complimentary credits granted when the pack is provisioned. Added to the never-expiring extra balance; they do not recur."
          }
        },
        "required": [
          "price"
        ]
      },
      "PaginatedAIAgentHistoryList": {
        "type": "object",
        "required": [
          "count",
          "results"
        ],
        "properties": {
          "count": {
            "type": "integer",
            "example": 123
          },
          "next": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "example": "https://api.cekura.ai/example/v1/example-external/?page=4"
          },
          "previous": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "example": "https://api.cekura.ai/example/v1/example-external/?page=3"
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AIAgentHistory"
            }
          }
        }
      },
      "PaginatedAIAgentList": {
        "type": "object",
        "required": [
          "count",
          "results"
        ],
        "properties": {
          "count": {
            "type": "integer",
            "example": 123
          },
          "next": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "example": "https://api.cekura.ai/example/v1/example-external/?page=4"
          },
          "previous": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "example": "https://api.cekura.ai/example/v1/example-external/?page=3"
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AIAgent"
            }
          }
        }
      },
      "PaginatedAIAgentListList": {
        "type": "object",
        "required": [
          "count",
          "results"
        ],
        "properties": {
          "count": {
            "type": "integer",
            "example": 123
          },
          "next": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "example": "https://api.cekura.ai/example/v1/example-external/?page=4"
          },
          "previous": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "example": "https://api.cekura.ai/example/v1/example-external/?page=3"
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AIAgentList"
            }
          }
        }
      },
      "PaginatedAIAgentV2List": {
        "type": "object",
        "required": [
          "count",
          "results"
        ],
        "properties": {
          "count": {
            "type": "integer",
            "example": 123
          },
          "next": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "example": "https://api.cekura.ai/example/v1/example-external/?page=4"
          },
          "previous": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "example": "https://api.cekura.ai/example/v1/example-external/?page=3"
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AIAgentV2"
            }
          }
        }
      },
      "PaginatedAuditLogList": {
        "type": "object",
        "required": [
          "count",
          "results"
        ],
        "properties": {
          "count": {
            "type": "integer",
            "example": 123
          },
          "next": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "example": "https://api.cekura.ai/example/v1/example-external/?page=4"
          },
          "previous": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "example": "https://api.cekura.ai/example/v1/example-external/?page=3"
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AuditLog"
            }
          }
        }
      },
      "PaginatedCallLogListList": {
        "type": "object",
        "required": [
          "count",
          "results"
        ],
        "properties": {
          "count": {
            "type": "integer",
            "example": 123
          },
          "next": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "example": "http://api.example.org/accounts/?page=4"
          },
          "previous": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "example": "http://api.example.org/accounts/?page=2"
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CallLogList"
            }
          }
        }
      },
      "PaginatedChatSessionListList": {
        "type": "object",
        "required": [
          "count",
          "results"
        ],
        "properties": {
          "count": {
            "type": "integer",
            "example": 123
          },
          "next": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "example": "https://api.cekura.ai/example/v1/example-external/?page=4"
          },
          "previous": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "example": "https://api.cekura.ai/example/v1/example-external/?page=3"
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ChatSessionList"
            }
          }
        }
      },
      "PaginatedConditionAudioEntryList": {
        "type": "object",
        "required": [
          "count",
          "results"
        ],
        "properties": {
          "count": {
            "type": "integer",
            "example": 123
          },
          "next": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "example": "https://api.cekura.ai/example/v1/example-external/?page=4"
          },
          "previous": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "example": "https://api.cekura.ai/example/v1/example-external/?page=3"
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ConditionAudioEntry"
            }
          }
        }
      },
      "PaginatedCriticalMetricCategoryList": {
        "type": "object",
        "required": [
          "count",
          "results"
        ],
        "properties": {
          "count": {
            "type": "integer",
            "example": 123
          },
          "next": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "example": "https://api.cekura.ai/example/v1/example-external/?page=4"
          },
          "previous": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "example": "https://api.cekura.ai/example/v1/example-external/?page=3"
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CriticalMetricCategory"
            }
          }
        }
      },
      "PaginatedCriticalMetricScenarioList": {
        "type": "object",
        "required": [
          "count",
          "results"
        ],
        "properties": {
          "count": {
            "type": "integer",
            "example": 123
          },
          "next": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "example": "https://api.cekura.ai/example/v1/example-external/?page=4"
          },
          "previous": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "example": "https://api.cekura.ai/example/v1/example-external/?page=3"
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CriticalMetricScenario"
            }
          }
        }
      },
      "PaginatedDashboardListList": {
        "type": "object",
        "required": [
          "count",
          "results"
        ],
        "properties": {
          "count": {
            "type": "integer",
            "example": 123
          },
          "next": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "example": "https://api.cekura.ai/example/v1/example-external/?page=4"
          },
          "previous": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "example": "https://api.cekura.ai/example/v1/example-external/?page=3"
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DashboardList"
            }
          }
        }
      },
      "PaginatedKnowledgeBaseFileList": {
        "type": "object",
        "required": [
          "count",
          "results"
        ],
        "properties": {
          "count": {
            "type": "integer",
            "example": 123
          },
          "next": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "example": "https://api.cekura.ai/example/v1/example-external/?page=4"
          },
          "previous": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "example": "https://api.cekura.ai/example/v1/example-external/?page=3"
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/KnowledgeBaseFile"
            }
          }
        }
      },
      "PaginatedMetricHistoryList": {
        "type": "object",
        "required": [
          "count",
          "results"
        ],
        "properties": {
          "count": {
            "type": "integer",
            "example": 123
          },
          "next": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "example": "https://api.cekura.ai/example/v1/example-external/?page=4"
          },
          "previous": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "example": "https://api.cekura.ai/example/v1/example-external/?page=3"
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MetricHistory"
            }
          }
        }
      },
      "PaginatedMetricRollingStatsList": {
        "type": "object",
        "required": [
          "count",
          "results"
        ],
        "properties": {
          "count": {
            "type": "integer",
            "example": 123
          },
          "next": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "example": "https://api.cekura.ai/example/v1/example-external/?page=4"
          },
          "previous": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "example": "https://api.cekura.ai/example/v1/example-external/?page=3"
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MetricRollingStats"
            }
          }
        }
      },
      "PaginatedNotificationList": {
        "type": "object",
        "required": [
          "count",
          "results"
        ],
        "properties": {
          "count": {
            "type": "integer",
            "example": 123
          },
          "next": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "example": "http://api.example.org/accounts/?page=4"
          },
          "previous": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "example": "http://api.example.org/accounts/?page=2"
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Notification"
            }
          }
        }
      },
      "PaginatedOrganizationList": {
        "type": "object",
        "required": [
          "count",
          "results"
        ],
        "properties": {
          "count": {
            "type": "integer",
            "example": 123
          },
          "next": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "example": "https://api.cekura.ai/example/v1/example-external/?page=4"
          },
          "previous": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "example": "https://api.cekura.ai/example/v1/example-external/?page=3"
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Organization"
            }
          }
        }
      },
      "PaginatedPersonalityList": {
        "type": "object",
        "required": [
          "count",
          "results"
        ],
        "properties": {
          "count": {
            "type": "integer",
            "example": 123
          },
          "next": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "example": "https://api.cekura.ai/example/v1/example-external/?page=4"
          },
          "previous": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "example": "https://api.cekura.ai/example/v1/example-external/?page=3"
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Personality"
            }
          }
        }
      },
      "PaginatedResultList": {
        "type": "object",
        "required": [
          "count",
          "results"
        ],
        "properties": {
          "count": {
            "type": "integer",
            "example": 123
          },
          "next": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "example": "http://api.example.org/accounts/?page=4"
          },
          "previous": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "example": "http://api.example.org/accounts/?page=2"
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Result"
            }
          }
        }
      },
      "PaginatedRunListList": {
        "type": "object",
        "required": [
          "count",
          "results"
        ],
        "properties": {
          "count": {
            "type": "integer",
            "example": 123
          },
          "next": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "example": "http://api.example.org/accounts/?page=4"
          },
          "previous": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "example": "http://api.example.org/accounts/?page=2"
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RunList"
            }
          }
        }
      },
      "PaginatedScenarioFolderList": {
        "type": "object",
        "required": [
          "count",
          "results"
        ],
        "properties": {
          "count": {
            "type": "integer",
            "example": 123
          },
          "next": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "example": "https://api.cekura.ai/example/v1/example-external/?page=4"
          },
          "previous": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "example": "https://api.cekura.ai/example/v1/example-external/?page=3"
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ScenarioFolder"
            }
          }
        }
      },
      "PaginatedScenarioHistoryList": {
        "type": "object",
        "required": [
          "count",
          "results"
        ],
        "properties": {
          "count": {
            "type": "integer",
            "example": 123
          },
          "next": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "example": "https://api.cekura.ai/example/v1/example-external/?page=4"
          },
          "previous": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "example": "https://api.cekura.ai/example/v1/example-external/?page=3"
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ScenarioHistory"
            }
          }
        }
      },
      "PaginatedScenarioList": {
        "type": "object",
        "required": [
          "count",
          "results"
        ],
        "properties": {
          "count": {
            "type": "integer",
            "example": 123
          },
          "next": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "example": "https://api.cekura.ai/example/v1/example-external/?page=4"
          },
          "previous": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "example": "https://api.cekura.ai/example/v1/example-external/?page=3"
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Scenario"
            }
          }
        }
      },
      "PaginatedScenarioListList": {
        "type": "object",
        "required": [
          "count",
          "results"
        ],
        "properties": {
          "count": {
            "type": "integer",
            "example": 123
          },
          "next": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "example": "https://api.cekura.ai/example/v1/example-external/?page=4"
          },
          "previous": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "example": "https://api.cekura.ai/example/v1/example-external/?page=3"
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ScenarioList"
            }
          }
        }
      },
      "PaginatedUserConfigurationList": {
        "type": "object",
        "required": [
          "count",
          "results"
        ],
        "properties": {
          "count": {
            "type": "integer",
            "example": 123
          },
          "next": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "example": "https://api.cekura.ai/example/v1/example-external/?page=4"
          },
          "previous": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "example": "https://api.cekura.ai/example/v1/example-external/?page=3"
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UserConfiguration"
            }
          }
        }
      },
      "PaginatedViewList": {
        "type": "object",
        "required": [
          "count",
          "results"
        ],
        "properties": {
          "count": {
            "type": "integer",
            "example": 123
          },
          "next": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "example": "https://api.cekura.ai/example/v1/example-external/?page=4"
          },
          "previous": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "example": "https://api.cekura.ai/example/v1/example-external/?page=3"
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/View"
            }
          }
        }
      },
      "PaginatedWidgetDataResponseList": {
        "type": "object",
        "required": [
          "count",
          "results"
        ],
        "properties": {
          "count": {
            "type": "integer",
            "example": 123
          },
          "next": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "example": "https://api.cekura.ai/example/v1/example-external/?page=4"
          },
          "previous": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "example": "https://api.cekura.ai/example/v1/example-external/?page=3"
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WidgetDataResponse"
            }
          }
        }
      },
      "PaginatedWidgetList": {
        "type": "object",
        "required": [
          "count",
          "results"
        ],
        "properties": {
          "count": {
            "type": "integer",
            "example": 123
          },
          "next": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "example": "https://api.cekura.ai/example/v1/example-external/?page=4"
          },
          "previous": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "example": "https://api.cekura.ai/example/v1/example-external/?page=3"
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Widget"
            }
          }
        }
      },
      "PatchedAIAgentDynamicVariable": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "name": {
            "type": "string",
            "description": "Variable name exactly as it appears in the agent context (e.g. 'firstName', 'leadId')",
            "maxLength": 255
          },
          "description": {
            "type": "string",
            "description": "What this variable represents and its expected format / type. Example: \"The user's date of birth on file, in YYYY-MM-DD format\""
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          }
        }
      },
      "PatchedAIAgentEditHistoryRequest": {
        "type": "object",
        "properties": {
          "history_id": {
            "type": "integer"
          },
          "version_name": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "PatchedAlertUpdate": {
        "type": "object",
        "description": "",
        "properties": {
          "name": {
            "type": "string",
            "description": "Alert name",
            "maxLength": 255
          },
          "enabled": {
            "type": "boolean",
            "description": "Enable/disable alert"
          },
          "source": {
            "description": "Source config keyed on `sub_type`. `normal`: {sub_type, filters?}. `significant_change`: {sub_type, window_size, filters?}. `threshold`: {sub_type, window_size, filters?}. `insight_new_mode`: {sub_type, min_calls?} — fires when a new failure mode is detected for the metric. `insight_uptick`: {sub_type, window_hours, baseline_hours} — fires when a failure mode's recent volume spikes vs its baseline. `filters` is an optional CallLogQueryFilter expression."
          },
          "threshold": {
            "description": "Threshold config keyed on the source's `sub_type`. `normal`: {} (fires on every failing eval). `significant_change`: {std_multiplier, ewma_alpha, direction}. `threshold`: {operator (gt|lt|outside), value (number | {low, high}), min_breaches}. `insight_new_mode`: {} (fires when a new failure mode appears). `insight_uptick`: {min_count, multiplier}."
          },
          "notifications": {
            "description": "Notification routing. `{slack: {workspace_id, channel_id?}}` to send to a specific workspace/channel. Empty fans out to every project workspace; empty + no project workspaces means the alert is silent."
          },
          "preset": {
            "enum": [
              "conservative",
              "balanced",
              "aggressive"
            ],
            "type": "string",
            "x-spec-enum-id": "a6fd953985219e0b",
            "writeOnly": true,
            "description": "Optional shorthand for trend alerts: 'conservative' | 'balanced' | 'aggressive'. Expands to std_multiplier / ewma_alpha / window_size. Explicit values in `source` or `threshold` override the preset. Ignored unless the alert's sub_type == 'significant_change'.\n\n* `conservative` - conservative\n* `balanced` - balanced\n* `aggressive` - aggressive"
          }
        }
      },
      "PatchedChatSessionDetail": {
        "type": "object",
        "description": "",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "readOnly": true,
            "description": "Unique identifier for the chat session.\nExample: `550e8400-e29b-41d4-a716-446655440000`"
          },
          "title": {
            "type": "string",
            "description": "Auto-generated title from first question.\nExample: `\"Which calls had the highest latency?\"`",
            "maxLength": 255
          },
          "project": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Project this chat session belongs to.\nExample: `42`"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true,
            "description": "When this record was created.\nExample: `2024-03-15T10:30:45Z`"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true,
            "description": "When this record was last updated.\nExample: `2024-03-15T10:35:11Z`"
          },
          "messages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ChatMessage"
            },
            "readOnly": true
          }
        }
      },
      "PatchedCreatePersonality": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "project": {
            "type": "integer",
            "description": "\nProject that will own the personality. Optional when using a project-scoped API key\n(it is inferred from the key); required otherwise.\nExample: `1`\n"
          },
          "name": {
            "type": "string",
            "description": "\nName of the personality\nExample: `\"Customer Service\"`\n",
            "maxLength": 255
          },
          "prompt": {
            "type": "string",
            "description": "\nPrompt of the personality\nExample: `\"You are a friendly and helpful customer service agent who is always willing to help\"`\n"
          },
          "language": {
            "enum": [
              "af",
              "ar",
              "bn",
              "bg",
              "zh",
              "cs",
              "da",
              "nl",
              "en",
              "et",
              "fi",
              "fr",
              "de",
              "el",
              "gu",
              "hi",
              "he",
              "hu",
              "id",
              "it",
              "ja",
              "kn",
              "ko",
              "ms",
              "ml",
              "mr",
              "multi",
              "no",
              "pl",
              "pa",
              "pt",
              "ro",
              "ru",
              "sk",
              "es",
              "sv",
              "th",
              "tr",
              "tl",
              "ta",
              "te",
              "uk",
              "vi"
            ],
            "type": "string",
            "x-spec-enum-id": "b822ad429c7b7fec",
            "description": "\nLanguage of the personality\n\n\n* `af` - Afrikaans\n* `ar` - Arabic\n* `bn` - Bengali\n* `bg` - Bulgarian\n* `zh` - Chinese Simplified\n* `cs` - Czech\n* `da` - Danish\n* `nl` - Dutch\n* `en` - English\n* `et` - Estonian\n* `fi` - Finnish\n* `fr` - French\n* `de` - German\n* `el` - Greek\n* `gu` - Gujarati\n* `hi` - Hindi\n* `he` - Hebrew\n* `hu` - Hungarian\n* `id` - Indonesian\n* `it` - Italian\n* `ja` - Japanese\n* `kn` - Kannada\n* `ko` - Korean\n* `ms` - Malay\n* `ml` - Malayalam\n* `mr` - Marathi\n* `multi` - Multilingual\n* `no` - Norwegian\n* `pl` - Polish\n* `pa` - Punjabi\n* `pt` - Portuguese\n* `ro` - Romanian\n* `ru` - Russian\n* `sk` - Slovak\n* `es` - Spanish\n* `sv` - Swedish\n* `th` - Thai\n* `tr` - Turkish\n* `tl` - Tagalog\n* `ta` - Tamil\n* `te` - Telugu\n* `uk` - Ukrainian\n* `vi` - Vietnamese"
          },
          "accent": {
            "type": "string",
            "description": "\nAccent of the personality\nExample: `\"American\"`\n",
            "maxLength": 255
          },
          "background_noise": {
            "type": "string",
            "description": "\nBackground noise\n"
          },
          "voice_model": {
            "type": "string",
            "description": "\nVoice model name\n"
          },
          "voice_id": {
            "type": "string",
            "description": "\nVoice ID\nExample: `\"TX3LPaxmHKxFdv7VOQHJ\"`\n"
          },
          "interruption_level": {
            "type": "string",
            "description": "\nInterruption level\n"
          },
          "speed": {
            "type": "string",
            "description": "\nSpeed of the voice\n"
          },
          "generation_config": {
            "type": "string",
            "description": "\nGeneration config for Cartesia Sonic-3 voice model.\nOnly valid when provider is \"cartesia\" and voice_model is \"sonic-3.5\".\nSupports volume and emotion\nExample: {\"volume\": 1.5, \"emotion\": \"happy\"}\n"
          },
          "network_simulation": {
            "type": "string",
            "description": "\nNetwork simulation configuration for testing network impairments.\n"
          },
          "message_plan": {
            "type": "string",
            "description": "\nMessage plan configuration for idle timeout behavior.\nSupports idle_timeout_seconds (positive int) and idle_message_max_spoken_count (positive int).\nExample: {\"idle_timeout_seconds\": 15, \"idle_message_max_spoken_count\": 2}\n"
          },
          "start_speaking_plan": {
            "type": "string",
            "description": "\nWait seconds before the bot starts speaking (float >= 0).\nIgnored if interruption_level is also set in the same request (preset takes precedence).\nExample: 0.7\n"
          },
          "stop_speaking_plan": {
            "type": [
              "string",
              "null"
            ],
            "description": "\nStop speaking plan configuration. Controls when the bot stops speaking.\nSupports num_words (int >= 0), voice_seconds (float >= 0), backoff_seconds (float >= 0).\nIgnored if interruption_level is also set in the same request (preset takes precedence).\nExample: {\"num_words\": 3, \"voice_seconds\": 0.3, \"backoff_seconds\": 0}\n"
          },
          "background_sound_volume": {
            "type": [
              "string",
              "null"
            ],
            "description": "\nBackground sound volume levels (0.0 to 1.0). base sets both the base and normal volume; reduced sets the quieter level during bot speech.\nExample: {\"base\": 0.05, \"reduced\": 0.02}\n"
          },
          "patronus_settings": {
            "oneOf": [
              {},
              {
                "type": "null"
              }
            ],
            "readOnly": true
          },
          "provider_agent_id": {
            "type": "string",
            "readOnly": true,
            "description": "\nProvider agent ID\nExample: `\"assistant_123\"`\n"
          },
          "end_call_enabled": {
            "type": "boolean",
            "default": true,
            "description": "\nWhether the end call is enabled\n"
          },
          "provider": {
            "enum": [
              "11labs",
              "cartesia"
            ],
            "type": "string",
            "x-spec-enum-id": "82a968d406c39bf3",
            "description": "\nProvider of the voice\n\n\n* `11labs` - Elevenlabs\n* `cartesia` - Cartesia"
          }
        }
      },
      "PatchedCriticalMetricCategory": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "metric": {
            "type": "integer",
            "readOnly": true
          },
          "agent": {
            "type": [
              "integer",
              "null"
            ],
            "readOnly": true
          },
          "category": {
            "type": "string",
            "readOnly": true
          },
          "priority": {
            "enum": [
              "critical",
              "non-critical",
              "not_a_bug"
            ],
            "type": "string",
            "description": "* `critical` - Critical\n* `non-critical` - Non Critical\n* `not_a_bug` - Not A Bug",
            "x-spec-enum-id": "6b5f38576e0a1903"
          },
          "result": {
            "type": "integer",
            "writeOnly": true
          },
          "run": {
            "type": "integer",
            "writeOnly": true
          },
          "call_log": {
            "type": "integer",
            "writeOnly": true
          }
        }
      },
      "PatchedDashboard": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Name of the dashboard",
            "maxLength": 255
          },
          "project": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Project this dashboard belongs to"
          },
          "filters": {
            "type": [
              "object",
              "null"
            ],
            "description": "Filter conditions to scope the data. See the [Dashboards guide](https://docs.cekura.ai/documentation/guides/dashboards#filters) for supported fields, operators, and syntax.",
            "properties": {
              "field": {
                "type": "string",
                "description": "Field name to filter on",
                "examples": [
                  "success",
                  "duration",
                  "timestamp",
                  "metadata.region",
                  "metric_evaluations.value"
                ]
              },
              "op": {
                "type": "string",
                "enum": [
                  "eq",
                  "neq",
                  "gt",
                  "gte",
                  "lt",
                  "lte",
                  "contains",
                  "startswith",
                  "endswith",
                  "in",
                  "isnull",
                  "regex"
                ],
                "description": "Comparison operator"
              },
              "value": {
                "description": "Value to compare against. Type depends on the field and operator."
              },
              "operator": {
                "type": "string",
                "enum": [
                  "and",
                  "or",
                  "same_row"
                ],
                "description": "Logical operator to combine conditions"
              },
              "conditions": {
                "type": "array",
                "description": "List of filter conditions or nested groups",
                "items": {}
              }
            },
            "examples": [
              {
                "field": "success",
                "op": "eq",
                "value": true
              },
              {
                "operator": "and",
                "conditions": [
                  {
                    "field": "timestamp",
                    "op": "gte",
                    "value": "today-7d"
                  },
                  {
                    "field": "duration",
                    "op": "gte",
                    "value": 60
                  }
                ]
              }
            ]
          },
          "widgets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Widget"
            },
            "readOnly": true
          },
          "widget_count": {
            "type": "string",
            "readOnly": true,
            "description": "Number of widgets in the dashboard"
          },
          "created_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "readOnly": true,
            "description": "When the dashboard was created"
          },
          "updated_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "readOnly": true,
            "description": "When the dashboard was last updated"
          }
        }
      },
      "PatchedDiscordServer": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "server_name": {
            "type": "string",
            "maxLength": 255
          },
          "channel_id": {
            "type": "string",
            "maxLength": 255
          },
          "organization": {
            "type": "integer"
          },
          "project": {
            "type": [
              "integer",
              "null"
            ]
          },
          "is_verified": {
            "type": "boolean",
            "readOnly": true
          }
        }
      },
      "PatchedInvite": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "organization": {
            "type": "integer",
            "readOnly": true
          },
          "organization_name": {
            "type": "string",
            "readOnly": true
          },
          "email": {
            "type": "string",
            "format": "email",
            "readOnly": true
          },
          "role": {
            "enum": [
              "admin",
              "member",
              "view_only",
              "labs",
              "labs_view_only",
              "insights_view"
            ],
            "type": "string",
            "description": "* `admin` - Admin\n* `member` - Member\n* `view_only` - View Only\n* `labs` - Labs\n* `labs_view_only` - Labs View Only\n* `insights_view` - Insights View Only",
            "x-spec-enum-id": "dc933c4519c4289a"
          },
          "status": {
            "enum": [
              "pending",
              "accepted",
              "rejected"
            ],
            "type": "string",
            "description": "* `pending` - Pending\n* `accepted` - Accepted\n* `rejected` - Rejected",
            "x-spec-enum-id": "4874309ac8d0a714",
            "readOnly": true
          },
          "invite_type": {
            "enum": [
              "invite",
              "request"
            ],
            "type": "string",
            "description": "* `invite` - Admin Invite\n* `request` - User Request",
            "x-spec-enum-id": "6516c16eaa0594d4",
            "readOnly": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "projects": {
            "type": "string",
            "readOnly": true
          }
        }
      },
      "PatchedKnowledgeBaseConnector": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "agent": {
            "type": "integer",
            "description": "Agent this connector belongs to"
          },
          "name": {
            "type": "string",
            "description": "Friendly name for this BigQuery connector",
            "maxLength": 255
          },
          "connector_type": {
            "enum": [
              "bigquery",
              "website"
            ],
            "type": "string",
            "x-spec-enum-id": "41b646a5b769059c",
            "description": "Type of connector\n\n* `bigquery` - Google BigQuery\n* `website` - Website Scraper"
          },
          "credentials": {
            "description": "\nEncrypted credentials containing BigQuery service account JSON as a string.\nExample: `{\"service_account_json\": \"{\\\"type\\\": \\\"service_account\\\", \\\"project_id\\\": \\\"...\\\", ...}\"}`\n"
          },
          "config": {
            "description": "\nConfiguration for the BigQuery connector (non-sensitive data).\nExample: `{\"query\": \"SELECT * FROM dataset.table WHERE date > CURRENT_DATE() - 7\"}`\n"
          },
          "sync_interval_minutes": {
            "type": "integer",
            "maximum": 2147483647,
            "minimum": -2147483648,
            "description": "Interval in minutes between automatic syncs (default: 1440 = daily)"
          },
          "sync_enabled": {
            "type": "boolean",
            "description": "Whether automatic syncing is enabled for this connector"
          },
          "last_sync_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "readOnly": true,
            "description": "Timestamp of the last successful sync"
          },
          "last_sync_status": {
            "type": "string",
            "readOnly": true,
            "description": "Status of the last sync: pending, success, failed"
          },
          "last_sync_error": {
            "type": "string",
            "readOnly": true,
            "description": "Error message from the last failed sync"
          },
          "files": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "readOnly": true,
            "description": "The KnowledgeBaseFiles that this connector manages"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true,
            "description": "When this record was created.\nExample: `2024-03-15T10:30:45Z`"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true,
            "description": "When this record was last updated.\nExample: `2024-03-15T10:35:11Z`"
          }
        }
      },
      "PatchedMetricEditHistoryRequest": {
        "type": "object",
        "properties": {
          "history_id": {
            "type": "integer"
          },
          "version_name": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "PatchedMetricEditSerializerV2": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "slug": {
            "type": [
              "string",
              "null"
            ],
            "description": "URL-friendly unique identifier in snake_case format",
            "maxLength": 255
          },
          "project": {
            "type": [
              "integer",
              "null"
            ]
          },
          "agent": {
            "type": [
              "integer",
              "null"
            ]
          },
          "agents": {
            "type": "array",
            "items": {
              "type": [
                "integer",
                "null"
              ]
            }
          },
          "assistant_id": {
            "type": "string",
            "writeOnly": true
          },
          "name": {
            "type": "string",
            "description": "\nName of the metric.\nExample: `\"Customer Satisfaction\"` or `\"Appointment Booking\"`\n        ",
            "maxLength": 255
          },
          "description": {
            "type": "string",
            "description": "\nDescription of what the metric measures.\nExample: `\"Measures how satisfied customers are with the service provided\"`\n        "
          },
          "type": {
            "enum": [
              "basic",
              "custom_prompt",
              "custom_code",
              "llm_judge"
            ],
            "type": "string",
            "x-spec-enum-id": "b44700c0a6443b40",
            "description": "\nType of metric\n\n\n* `basic` - Basic (Deprecated in favor of LLM Judge)\n* `custom_prompt` - Custom Prompt ( Deprecated in favor of LLM Judge)\n* `custom_code` - Custom Code\n* `llm_judge` - LLM Judge"
          },
          "eval_type": {
            "enum": [
              "binary",
              "continuous_qualitative",
              "numeric",
              "enum"
            ],
            "type": "string",
            "description": "* `binary` - Binary\n* `continuous_qualitative` - Continuous Qualitative\n* `numeric` - Numeric\n* `enum` - Enum",
            "x-spec-enum-id": "b40eac6824409cc2"
          },
          "audio_enabled": {
            "type": "boolean",
            "readOnly": true,
            "description": "\nWhether this metric requires audio analysis.\nExample: `true` or `false`\n        "
          },
          "observability_enabled": {
            "type": "boolean",
            "description": "\nEnable this metric for observability.\nExample: `true` or `false`\n        "
          },
          "simulation_enabled": {
            "type": "boolean",
            "description": "\nEnable this metric for simulations.\nExample: `true` or `false`\n        "
          },
          "sampling_enabled": {
            "type": "boolean",
            "description": "Enable sampling for this metric using project-level sample rate"
          },
          "prompt": {
            "type": "string",
            "description": "\nEvaluation prompt for the metric.\nExample: `\"Evaluate customer satisfaction based on conversation\"`\n"
          },
          "function_name": {
            "type": [
              "string",
              "null"
            ],
            "readOnly": true,
            "description": "\nPredefined function name\nExample: `\"get_latency\"` or `\"check_critical_deviations\"`\n"
          },
          "enum_values": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "display_order": {
            "type": "integer",
            "maximum": 2147483647,
            "minimum": -2147483648,
            "description": "\nDisplay order for the metric.\nExample: `1`\n"
          },
          "custom_code": {
            "type": "string",
            "description": "\nPython custom code for the metric.\nExample:\n```python\n_resul = True\n_explanation = None\nif  \"call_end_reason\" in data and data[\"call_end_reason\"] == \"customer_satisfaction\":\n    _result = True\n    _explanation = \"Customer expressed satisfaction with service\"\n```\n"
          },
          "evaluation_trigger": {
            "enum": [
              "always",
              "automatic",
              "custom"
            ],
            "type": "string",
            "description": "* `always` - Always\n* `automatic` - Automatic\n* `custom` - Custom",
            "x-spec-enum-id": "ecd3c02e0e393ef5"
          },
          "trigger_type": {
            "enum": [
              "llm_judge",
              "custom_code"
            ],
            "type": "string",
            "description": "* `llm_judge` - LLM Judge\n* `custom_code` - Custom Code",
            "x-spec-enum-id": "2adad4b8df61914f"
          },
          "evaluation_trigger_prompt": {
            "type": "string",
            "description": "\nEvaluation trigger prompt for the metric.\nExample: `\"Evaluate metric only if call ended reason is main-agent-ended-call\"`\n"
          },
          "evaluation_trigger_custom_code": {
            "type": "string",
            "description": "\nPython custom code to determine metric relevance. Code should set _result (bool) and _explanation (str).\nExample:\n```python\n_result = True\n_explanation = \"Metric is relevant\"\nif \"call_end_reason\" in data and data[\"call_end_reason\"] == \"customer-hung-up\":\n    _result = False\n    _explanation = \"Customer hung up, metric not applicable\"\n```\n"
          },
          "llm_provider": {
            "enum": [
              "openai",
              "gemini",
              "dspy-gepa-gemini-flash",
              "deepseek-v4-flash"
            ],
            "type": "string",
            "description": "* `openai` - OpenAI\n* `gemini` - Gemini\n* `dspy-gepa-gemini-flash` - Dspy Gepa Gemini Flash\n* `deepseek-v4-flash` - DeepSeek V4 Flash",
            "x-spec-enum-id": "6d1d2e77c71d1721",
            "writeOnly": true
          },
          "relevance_llm_provider": {
            "enum": [
              "openai",
              "gemini",
              "dspy-gepa-gemini-flash",
              "deepseek-v4-flash"
            ],
            "type": "string",
            "description": "* `openai` - OpenAI\n* `gemini` - Gemini\n* `dspy-gepa-gemini-flash` - Dspy Gepa Gemini Flash\n* `deepseek-v4-flash` - DeepSeek V4 Flash",
            "x-spec-enum-id": "6d1d2e77c71d1721",
            "writeOnly": true
          },
          "vocera_defined_metric_code": {
            "type": "string",
            "readOnly": true,
            "description": "\nVocera defined metric code for the metric.\nExample: `\"7fd534f5\"`\n"
          },
          "priority_assignment_prompt": {
            "type": "string",
            "description": "\nPriority assignment prompt for the metric.\n"
          },
          "configuration": {
            "description": "\nCustom configuration parameters for specific metrics if metric supports it.\nExample:\n- For Infrastructure issues\n```json\n{\n    \"infra_issues_timeout\": 10\n}\n```\n"
          },
          "scenarios": {
            "writeOnly": true
          },
          "overall_score": {
            "type": "string",
            "readOnly": true
          },
          "total_score": {
            "type": "string",
            "readOnly": true
          },
          "kb_file_ids": {
            "description": "\nList of knowledge base file IDs for the metric.\nExample: `[123, 456]`\n"
          },
          "knowledge_base_files": {
            "type": "string",
            "readOnly": true
          },
          "metric_description_program": {},
          "metric_description_variables": {
            "type": "array",
            "items": {}
          },
          "evaluation_trigger_program": {},
          "evaluation_trigger_variables": {
            "type": "array",
            "items": {}
          },
          "alert_enabled": {
            "type": "boolean",
            "description": "\nEnable alerts for this metric when it fails (value=false).\nOnly applicable to binary metrics (eval_type=binary).\nFor other metric types, use significant_change_alert_status instead.\nExample: `true` or `false`\n        "
          },
          "alert_type": {
            "enum": [
              "disabled",
              "normal",
              "significant_change"
            ],
            "type": "string",
            "description": "* `disabled` - Alerts Disabled\n* `normal` - Normal Alerts\n* `significant_change` - Significant Change Alerts",
            "x-spec-enum-id": "9e2661f1aeca64cf",
            "default": "disabled"
          },
          "window_size": {
            "type": "integer",
            "default": 50
          },
          "std_multiplier": {
            "type": "number",
            "format": "double",
            "default": 2
          },
          "ewma_alpha": {
            "type": "number",
            "format": "double",
            "default": 0.1
          },
          "significant_change_alert_status": {
            "enum": [
              "enabled",
              "disabled"
            ],
            "type": "string",
            "x-spec-enum-id": "6d6f4d361b4ea1fb",
            "description": "\nAlert status: enabled or disabled.\n\n\n* `enabled` - Enabled\n* `disabled` - Disabled"
          },
          "significant_change_alert_direction": {
            "enum": [
              "",
              "increase",
              "decrease"
            ],
            "type": "string",
            "x-spec-enum-id": "1e86e60ca5cfba12",
            "description": "Alert direction: increase only, decrease only, or both (empty = both).\nExample: `\"increase\"`, `\"decrease\"`, or `\"both\"`\n\n* `` - Both (Increase and Decrease)\n* `increase` - Increase Only\n* `decrease` - Decrease Only"
          },
          "add_to_new_agents": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "When enabled, this metric is automatically assigned to new agents created in the project."
          },
          "alert_filters": {
            "oneOf": [
              {},
              {
                "type": "null"
              }
            ],
            "description": "Filters to apply before computing alerts (CallLogQueryFilter format)"
          },
          "slack_workspace": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Slack workspace to send alerts to"
          },
          "slack_channel_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Override channel ID for this metric's alerts",
            "maxLength": 255
          },
          "apply_to_all_agents": {
            "type": "boolean",
            "writeOnly": true,
            "default": false,
            "description": "For observability_dropoff: when true, copies the dropoff_nodes from configuration to every other agent in the project."
          },
          "add_to_rubric": {
            "type": "boolean",
            "writeOnly": true,
            "default": false,
            "description": "If true, this metric is added to the project's call-success rubric on save (a sensible default rule is chosen by `eval_type`). If false on an existing rubric metric, it's removed from the rubric."
          }
        }
      },
      "PatchedMetricOptimiserCronJob": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "project": {
            "type": "integer",
            "description": "Project ID this cron job belongs to."
          },
          "name": {
            "type": "string",
            "description": "Display name for the cronjob.",
            "maxLength": 255
          },
          "metrics": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "Metric IDs the cron job will optimise on each firing."
          },
          "crontab_expression": {
            "type": "string",
            "description": "Standard 5-field cron expression (minute hour dom mon dow).",
            "maxLength": 255
          },
          "timezone": {
            "type": "string",
            "description": "IANA timezone name (e.g. America/Los_Angeles). Defaults to UTC."
          },
          "auto_apply": {
            "type": "boolean",
            "description": "If true, overwrite the live metric prompt with the optimised one whenever the optimised score is >= baseline on the labelled set. Defaults to false (read-only)."
          },
          "skip_evaluation": {
            "type": "boolean",
            "description": "Skip the post-optimisation evaluation pass to speed up the cron."
          },
          "is_active": {
            "type": "boolean"
          },
          "notify_on": {
            "enum": [
              "never",
              "success",
              "failure",
              "both"
            ],
            "type": "string",
            "x-spec-enum-id": "d06ae6855e4121c0",
            "description": "When to email project members about the run outcome.\n\n* `never` - Never\n* `success` - Success\n* `failure` - Failure\n* `both` - Both"
          },
          "created_by": {
            "type": "integer",
            "readOnly": true
          },
          "created_via": {
            "enum": [
              "user",
              "api",
              "mcp",
              "cli",
              "sdk",
              null
            ],
            "type": [
              "string",
              "null"
            ],
            "description": "* `user` - User\n* `api` - API\n* `mcp` - MCP\n* `cli` - CLI\n* `sdk` - SDK",
            "x-spec-enum-id": "360ac7f2b69a95cc",
            "readOnly": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          }
        }
      },
      "PatchedMetricReviewInline": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "metric": {
            "type": "integer",
            "readOnly": true
          },
          "metric_name": {
            "type": "string",
            "readOnly": true
          },
          "metric_enum_values": {
            "readOnly": true
          },
          "eval_type": {
            "type": "string",
            "readOnly": true
          },
          "expected_value": {
            "oneOf": [
              {},
              {
                "type": "null"
              }
            ],
            "description": "\nMetric expected value\nExample:\n- `5` or `0`\n- `one`, `two` or `three` [ enum type ]\n"
          },
          "explanation": {
            "readOnly": true,
            "description": "\nMetric explanation\nExample:\n```json\n[\"Agent failed to follow the opening script\", \"Missed key product information\"]\n```\n"
          },
          "feedback": {
            "type": "string",
            "description": "\nMetric feedback\nExample:\n- `\"Great Call\"`\n"
          },
          "metric_function_name": {
            "type": "string",
            "readOnly": true
          },
          "metric_vocera_defined_metric_code": {
            "type": "string",
            "readOnly": true
          }
        }
      },
      "PatchedMetricRollingStatsPatch": {
        "type": "object",
        "description": "",
        "properties": {
          "window_size": {
            "type": "integer",
            "maximum": 2147483647,
            "minimum": 0
          },
          "std_multiplier": {
            "type": "number",
            "format": "double"
          },
          "ewma_alpha": {
            "type": "number",
            "format": "double"
          }
        }
      },
      "PatchedOrganization": {
        "type": "object",
        "description": "",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "name": {
            "type": "string",
            "maxLength": 255
          },
          "team_size": {
            "enum": [
              "1",
              "<10",
              "10-100",
              "100-500",
              "500+"
            ],
            "type": "string",
            "x-spec-enum-id": "2e4d8382426c5017",
            "description": "Number of people/employees in the organization\n\n* `1` - 1\n* `<10` - Less than 10\n* `10-100` - 10 - 100\n* `100-500` - 100 - 500\n* `500+` - More than 500"
          },
          "discovery_source": {
            "type": [
              "string",
              "null"
            ],
            "description": "How the user discovered the platform (e.g., LinkedIn, Google, ChatGPT, Friends, etc.)"
          },
          "outbound_timeout": {
            "type": "integer",
            "maximum": 2147483647,
            "minimum": -2147483648
          },
          "max_agents_limit": {
            "type": "integer",
            "readOnly": true
          },
          "max_members_limit": {
            "type": "integer",
            "readOnly": true
          },
          "max_concurrent_runs_limit": {
            "type": "integer",
            "maximum": 2147483647,
            "minimum": -2147483648
          },
          "max_concurrent_chat_runs_limit": {
            "type": "integer",
            "maximum": 2147483647,
            "minimum": -2147483648
          },
          "max_call_duration": {
            "type": "integer",
            "maximum": 2147483647,
            "minimum": -2147483648
          },
          "evaluate_relevant_metrics_enabled": {
            "type": "boolean"
          },
          "end_call_enabled": {
            "type": "boolean"
          },
          "generate_scenario_auto_assign_numbers_enabled": {
            "type": "boolean"
          },
          "show_custom_dashboards": {
            "type": "boolean",
            "readOnly": true
          },
          "notify_daily_report": {
            "type": "boolean"
          },
          "notify_cron_failure": {
            "type": "boolean"
          },
          "notify_cron_success": {
            "type": "boolean"
          },
          "notify_no_calls": {
            "type": "boolean"
          },
          "notify_result_webhook": {
            "type": "boolean"
          },
          "notify_cronjob_webhook": {
            "type": "boolean"
          },
          "notify_call_log_webhook": {
            "type": "boolean"
          },
          "forward_vapi_webhook": {
            "type": "boolean"
          },
          "forward_retell_webhook": {
            "type": "boolean"
          },
          "is_send_emails_enabled": {
            "type": "boolean"
          },
          "notify_frequent_calls_for_number": {
            "type": "boolean"
          },
          "frequent_calls_threshold": {
            "type": "integer",
            "maximum": 2147483647,
            "minimum": -2147483648
          },
          "frequent_calls_time_period": {
            "type": "integer",
            "maximum": 2147483647,
            "minimum": -2147483648
          },
          "frequent_calls_cooldown": {
            "type": "integer",
            "maximum": 2147483647,
            "minimum": -2147483648
          },
          "notify_metric_significant_shift": {
            "type": "boolean"
          },
          "notify_low_credits": {
            "type": "boolean",
            "description": "Enable email notifications when credits remaining falls below threshold"
          },
          "low_credits_threshold": {
            "type": "string",
            "format": "decimal",
            "pattern": "^-?\\d{0,8}(?:\\.\\d{0,2})?$",
            "description": "Dollar amount threshold - notify when credits remaining is below this value. Example: 100.00"
          },
          "cronjob_low_balance_mute_days": {
            "enum": [
              "0",
              "3",
              "7",
              "14"
            ],
            "type": "string",
            "x-spec-enum-id": "c17552f0870cd395",
            "description": "Mute cronjob low balance notifications for selected number of days\n\n* `0` - Disabled\n* `3` - 3 Days\n* `7` - 7 Days\n* `14` - 14 Days"
          },
          "limit_to_exclusive_numbers": {
            "type": "boolean",
            "description": "When enabled, only phone numbers with organization field set to this organization will be visible. When disabled, all unassigned phone numbers are also visible."
          },
          "allow_duplicate_call_ids": {
            "type": "boolean",
            "description": "When enabled, Allow uploading calls with the same call_id"
          },
          "allow_join_requests": {
            "type": "boolean",
            "description": "When enabled, users with matching email domain can discover and request to join this organization"
          },
          "conditional_actions_generation_enabled": {
            "type": "boolean",
            "description": "When enabled, auto-generated scenarios use conditional actions format instead of instructions"
          },
          "vapi_api_key": {
            "type": "string",
            "writeOnly": true
          },
          "vapi_api_key_configured": {
            "type": "string",
            "readOnly": true
          },
          "vapi_public_key_configured": {
            "type": "string",
            "readOnly": true
          },
          "retell_api_key": {
            "type": "string",
            "writeOnly": true
          },
          "retell_api_key_configured": {
            "type": "string",
            "readOnly": true
          },
          "syntflow_api_key": {
            "type": "string",
            "writeOnly": true
          },
          "syntflow_api_key_configured": {
            "type": "string",
            "readOnly": true
          },
          "members": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MembershipInline"
            },
            "readOnly": true
          },
          "projects": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProjectInline"
            },
            "readOnly": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "timezone": {
            "enum": [
              "Africa/Abidjan",
              "Africa/Accra",
              "Africa/Addis_Ababa",
              "Africa/Algiers",
              "Africa/Asmara",
              "Africa/Bamako",
              "Africa/Bangui",
              "Africa/Banjul",
              "Africa/Bissau",
              "Africa/Blantyre",
              "Africa/Brazzaville",
              "Africa/Bujumbura",
              "Africa/Cairo",
              "Africa/Casablanca",
              "Africa/Ceuta",
              "Africa/Conakry",
              "Africa/Dakar",
              "Africa/Dar_es_Salaam",
              "Africa/Djibouti",
              "Africa/Douala",
              "Africa/El_Aaiun",
              "Africa/Freetown",
              "Africa/Gaborone",
              "Africa/Harare",
              "Africa/Johannesburg",
              "Africa/Juba",
              "Africa/Kampala",
              "Africa/Khartoum",
              "Africa/Kigali",
              "Africa/Kinshasa",
              "Africa/Lagos",
              "Africa/Libreville",
              "Africa/Lome",
              "Africa/Luanda",
              "Africa/Lubumbashi",
              "Africa/Lusaka",
              "Africa/Malabo",
              "Africa/Maputo",
              "Africa/Maseru",
              "Africa/Mbabane",
              "Africa/Mogadishu",
              "Africa/Monrovia",
              "Africa/Nairobi",
              "Africa/Ndjamena",
              "Africa/Niamey",
              "Africa/Nouakchott",
              "Africa/Ouagadougou",
              "Africa/Porto-Novo",
              "Africa/Sao_Tome",
              "Africa/Tripoli",
              "Africa/Tunis",
              "Africa/Windhoek",
              "America/Adak",
              "America/Anchorage",
              "America/Chicago",
              "America/Denver",
              "America/Los_Angeles",
              "America/New_York",
              "America/Phoenix",
              "America/Sao_Paulo",
              "Asia/Dubai",
              "Asia/Hong_Kong",
              "Asia/Kolkata",
              "Asia/Seoul",
              "Asia/Shanghai",
              "Asia/Singapore",
              "Asia/Tokyo",
              "Australia/Melbourne",
              "Australia/Perth",
              "Australia/Sydney",
              "Europe/Amsterdam",
              "Europe/Berlin",
              "Europe/London",
              "Europe/Madrid",
              "Europe/Moscow",
              "Europe/Paris",
              "Europe/Rome",
              "Pacific/Auckland",
              "Pacific/Honolulu",
              "US/Central",
              "US/Eastern",
              "US/Mountain",
              "US/Pacific",
              "UTC"
            ],
            "type": "string",
            "description": "* `Africa/Abidjan` - Africa/Abidjan\n* `Africa/Accra` - Africa/Accra\n* `Africa/Addis_Ababa` - Africa/Addis_Ababa\n* `Africa/Algiers` - Africa/Algiers\n* `Africa/Asmara` - Africa/Asmara\n* `Africa/Bamako` - Africa/Bamako\n* `Africa/Bangui` - Africa/Bangui\n* `Africa/Banjul` - Africa/Banjul\n* `Africa/Bissau` - Africa/Bissau\n* `Africa/Blantyre` - Africa/Blantyre\n* `Africa/Brazzaville` - Africa/Brazzaville\n* `Africa/Bujumbura` - Africa/Bujumbura\n* `Africa/Cairo` - Africa/Cairo\n* `Africa/Casablanca` - Africa/Casablanca\n* `Africa/Ceuta` - Africa/Ceuta\n* `Africa/Conakry` - Africa/Conakry\n* `Africa/Dakar` - Africa/Dakar\n* `Africa/Dar_es_Salaam` - Africa/Dar_es_Salaam\n* `Africa/Djibouti` - Africa/Djibouti\n* `Africa/Douala` - Africa/Douala\n* `Africa/El_Aaiun` - Africa/El_Aaiun\n* `Africa/Freetown` - Africa/Freetown\n* `Africa/Gaborone` - Africa/Gaborone\n* `Africa/Harare` - Africa/Harare\n* `Africa/Johannesburg` - Africa/Johannesburg\n* `Africa/Juba` - Africa/Juba\n* `Africa/Kampala` - Africa/Kampala\n* `Africa/Khartoum` - Africa/Khartoum\n* `Africa/Kigali` - Africa/Kigali\n* `Africa/Kinshasa` - Africa/Kinshasa\n* `Africa/Lagos` - Africa/Lagos\n* `Africa/Libreville` - Africa/Libreville\n* `Africa/Lome` - Africa/Lome\n* `Africa/Luanda` - Africa/Luanda\n* `Africa/Lubumbashi` - Africa/Lubumbashi\n* `Africa/Lusaka` - Africa/Lusaka\n* `Africa/Malabo` - Africa/Malabo\n* `Africa/Maputo` - Africa/Maputo\n* `Africa/Maseru` - Africa/Maseru\n* `Africa/Mbabane` - Africa/Mbabane\n* `Africa/Mogadishu` - Africa/Mogadishu\n* `Africa/Monrovia` - Africa/Monrovia\n* `Africa/Nairobi` - Africa/Nairobi\n* `Africa/Ndjamena` - Africa/Ndjamena\n* `Africa/Niamey` - Africa/Niamey\n* `Africa/Nouakchott` - Africa/Nouakchott\n* `Africa/Ouagadougou` - Africa/Ouagadougou\n* `Africa/Porto-Novo` - Africa/Porto-Novo\n* `Africa/Sao_Tome` - Africa/Sao_Tome\n* `Africa/Tripoli` - Africa/Tripoli\n* `Africa/Tunis` - Africa/Tunis\n* `Africa/Windhoek` - Africa/Windhoek\n* `America/Adak` - America/Adak\n* `America/Anchorage` - America/Anchorage\n* `America/Chicago` - America/Chicago\n* `America/Denver` - America/Denver\n* `America/Los_Angeles` - America/Los_Angeles\n* `America/New_York` - America/New_York\n* `America/Phoenix` - America/Phoenix\n* `America/Sao_Paulo` - America/Sao_Paulo\n* `Asia/Dubai` - Asia/Dubai\n* `Asia/Hong_Kong` - Asia/Hong_Kong\n* `Asia/Kolkata` - Asia/Kolkata\n* `Asia/Seoul` - Asia/Seoul\n* `Asia/Shanghai` - Asia/Shanghai\n* `Asia/Singapore` - Asia/Singapore\n* `Asia/Tokyo` - Asia/Tokyo\n* `Australia/Melbourne` - Australia/Melbourne\n* `Australia/Perth` - Australia/Perth\n* `Australia/Sydney` - Australia/Sydney\n* `Europe/Amsterdam` - Europe/Amsterdam\n* `Europe/Berlin` - Europe/Berlin\n* `Europe/London` - Europe/London\n* `Europe/Madrid` - Europe/Madrid\n* `Europe/Moscow` - Europe/Moscow\n* `Europe/Paris` - Europe/Paris\n* `Europe/Rome` - Europe/Rome\n* `Pacific/Auckland` - Pacific/Auckland\n* `Pacific/Honolulu` - Pacific/Honolulu\n* `US/Central` - US/Central\n* `US/Eastern` - US/Eastern\n* `US/Mountain` - US/Mountain\n* `US/Pacific` - US/Pacific\n* `UTC` - UTC",
            "x-spec-enum-id": "6e7339d971185fa9"
          },
          "is_2fa_required": {
            "type": "boolean"
          },
          "skip_onboarding": {
            "type": "boolean"
          },
          "onboarding_flow": {
            "enum": [
              "simulation",
              "observability"
            ],
            "type": "string",
            "description": "* `simulation` - Simulation\n* `observability` - Observability",
            "x-spec-enum-id": "bd0a2727bbf39892"
          },
          "user_onboarding": {
            "type": "string",
            "readOnly": true
          },
          "phone_number_verified": {
            "type": "boolean",
            "readOnly": true
          },
          "slack_invite_sent": {
            "type": "boolean",
            "readOnly": true,
            "description": "Whether Slack community invite has been sent to this organization"
          },
          "auto_refill": {
            "type": "boolean"
          },
          "auto_refill_threshold": {
            "type": "string",
            "format": "decimal",
            "pattern": "^-?\\d{0,8}(?:\\.\\d{0,2})?$"
          },
          "auto_refill_amount": {
            "type": "string",
            "format": "decimal",
            "pattern": "^-?\\d{0,8}(?:\\.\\d{0,2})?$"
          },
          "auto_refill_max_cap": {
            "type": [
              "string",
              "null"
            ],
            "format": "decimal",
            "pattern": "^-?\\d{0,8}(?:\\.\\d{0,2})?$",
            "description": "Maximum total amount that can be auto-refilled in a billing cycle. None for no limit."
          }
        }
      },
      "PatchedOverallEvaluation": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "evaluation": {
            "oneOf": [
              {},
              {
                "type": "null"
              }
            ],
            "description": "Overall evaluation results across all calls.\nExample:\n```json\n{\n    \"metrics\": [\n        {\n            \"id\": 1,\n            \"name\": \"Average Response Time\",\n            \"value\": 2.8,\n            \"explanation\": [\n                \"Average response time improved by 15%\",\n                \"Peak performance during business hours\"\n            ]\n        },\n        {\n            \"id\": 2,\n            \"name\": \"Success Rate\",\n            \"value\": 0.92,\n            \"explanation\": [\n                \"92% of calls completed successfully\",\n                \"Higher success rate in technical support\"\n            ]\n        }\n    ]\n}\n```"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true,
            "description": "When this record was created.\nExample: `2024-03-15T10:30:45Z`"
          },
          "agent": {
            "type": "integer",
            "description": "Agent ID"
          }
        }
      },
      "PatchedPredefinedMetric": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "name": {
            "type": "string",
            "description": "Name of the metric.\nExample: \n- `\"Customer Satisfaction\"`\n- `\"Response Time\"`",
            "maxLength": 255
          },
          "description": {
            "type": "string",
            "description": "Description of what the metric measures.\nExample: `\"Measures how satisfied customers are with the service provided\"`"
          },
          "code": {
            "type": "string",
            "readOnly": true,
            "description": "Unique code identifier for the metric"
          },
          "slug": {
            "type": [
              "string",
              "null"
            ],
            "description": "URL-friendly unique identifier in snake_case format",
            "maxLength": 255
          },
          "type": {
            "enum": [
              "basic",
              "custom_prompt",
              "custom_code",
              "llm_judge"
            ],
            "type": "string",
            "description": "* `basic` - Basic (Deprecated in favor of LLM Judge)\n* `custom_prompt` - Custom Prompt ( Deprecated in favor of LLM Judge)\n* `custom_code` - Custom Code\n* `llm_judge` - LLM Judge",
            "x-spec-enum-id": "b44700c0a6443b40"
          },
          "eval_type": {
            "enum": [
              "binary",
              "continuous_qualitative",
              "numeric",
              "enum"
            ],
            "type": "string",
            "description": "* `binary` - Binary\n* `continuous_qualitative` - Continuous Qualitative\n* `numeric` - Numeric\n* `enum` - Enum",
            "x-spec-enum-id": "b40eac6824409cc2"
          },
          "audio_enabled": {
            "type": "boolean",
            "readOnly": true,
            "description": "Whether this metric requires audio analysis"
          },
          "prompt": {
            "type": "string",
            "description": "Evaluation prompt for the metric"
          },
          "function_name": {
            "type": [
              "string",
              "null"
            ],
            "readOnly": true,
            "description": "Python function name for custom metric evaluation"
          },
          "enum_values": {
            "description": "List of possible enum values for enum type metrics"
          },
          "custom_code": {
            "type": "string",
            "description": "Custom evaluation code for the metric"
          },
          "simulation_enabled": {
            "type": "boolean",
            "description": "Enable this metric for simulations.\nExample: `true` or `false`"
          },
          "observability_enabled": {
            "type": "boolean",
            "description": "Enable this metric for observability.\nExample: `true` or `false`"
          },
          "configuration": {
            "description": "Custom configuration parameters for metric.\nExample: ```json\n{\n    \n}\n```\n```"
          },
          "cost": {
            "type": "string",
            "format": "decimal",
            "pattern": "^-?\\d{0,4}(?:\\.\\d{0,6})?$",
            "readOnly": true,
            "description": "Cost in credits for evaluating this metric.\nExample: `0.005000`"
          },
          "evaluation_trigger": {
            "enum": [
              "always",
              "automatic",
              "custom"
            ],
            "type": "string",
            "x-spec-enum-id": "ecd3c02e0e393ef5",
            "description": "When to trigger this metric evaluation\n\n* `always` - Always\n* `automatic` - Automatic\n* `custom` - Custom"
          },
          "evaluation_trigger_prompt": {
            "type": "string",
            "description": "Prompt to determine when to trigger metric evaluation"
          },
          "category": {
            "enum": [
              "Speech Quality",
              "Conversation Quality",
              "Accuracy",
              "Customer Experience",
              null
            ],
            "type": [
              "string",
              "null"
            ],
            "x-spec-enum-id": "27e47be2b5ffc09e",
            "readOnly": true,
            "description": "Category of the metric\n\n* `Speech Quality` - Speech Quality\n* `Conversation Quality` - Conversation Quality\n* `Accuracy` - Accuracy\n* `Customer Experience` - Customer Experience"
          },
          "sub_category": {
            "type": [
              "string",
              "null"
            ],
            "readOnly": true,
            "description": "Sub category of the metric"
          },
          "organization": {
            "type": [
              "integer",
              "null"
            ],
            "readOnly": true
          }
        }
      },
      "PatchedProject": {
        "type": "object",
        "description": "",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "name": {
            "type": "string",
            "description": "\nName of the project\nExample: `\"Default Project\"`\n"
          },
          "members": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MembershipInline"
            },
            "readOnly": true
          },
          "organization": {
            "allOf": [
              {
                "$ref": "#/components/schemas/OrganizationInline"
              }
            ],
            "readOnly": true
          },
          "organization_id": {
            "type": "integer",
            "writeOnly": true,
            "description": "ID of the organization to create the project under. Required when authenticating as a user (you must be an admin of that organization); omit it when using an organization-scoped API key, where the organization is inferred from the key."
          },
          "outbound_timeout": {
            "type": "integer",
            "description": "\nOutbound timeout in seconds\nExample: `300`\n"
          },
          "max_call_duration": {
            "type": "integer",
            "description": "\nMax call duration in seconds\nExample: `300`\n"
          },
          "min_call_duration": {
            "type": "integer",
            "description": "\nMin call duration in seconds\nExample: `30`\n"
          },
          "sample_rate": {
            "type": "number",
            "format": "double",
            "description": "\nMetric sampling rate (0.0 to 1.0). Default is 1.0 (100% of calls).\nExample: `0.5` (50%), `0.1` (10%), `0.001` (0.1%)\n"
          },
          "max_messages_chat_runs_limit": {
            "type": "integer",
            "description": "\nMax messages chat runs limit\nExample: `100`\n"
          },
          "webhook_url": {
            "type": "string",
            "format": "uri",
            "description": "\nWebhook URL\nExample: `\"https://yourdomain.com/webhook\"`\n"
          },
          "webhook_secret": {
            "type": "string",
            "writeOnly": true,
            "description": "\nWebhook secret. Sent in `X-CEKURA-SECRET` header when invoking `webhook_url`.\nWrite-only — never returned in API responses. Use `webhook_secret_configured`\nto check whether one is set.\nExample: `\"your-webhook-secret\"`\n"
          },
          "webhook_secret_configured": {
            "type": "string",
            "readOnly": true
          },
          "evaluate_relevant_metrics_enabled": {
            "type": "boolean",
            "description": "\nEvaluate relevant metrics enabled\nExample: `true` or `false`\n"
          },
          "end_call_enabled": {
            "type": "boolean",
            "description": "\nEnd call enabled\nExample: `true` or `false`\n"
          },
          "generate_scenario_auto_assign_numbers_enabled": {
            "type": "boolean",
            "description": "\nGenerate scenario auto assign numbers enabled\nExample: `true` or `false`\n"
          },
          "enable_client_side_testing": {
            "type": "boolean",
            "description": "\nEnable client side testing\nExample: `true` or `false`\n"
          },
          "use_provider_transcript": {
            "type": "boolean",
            "description": "When true, evaluations use the provider transcript instead of Cekura transcript with provider side tool calls. Defaults to false."
          },
          "should_show_powered_by": {
            "type": "boolean",
            "description": "\nShould show powered by\nExample: `true` or `false`\n"
          },
          "notify_results_completion": {
            "type": "boolean",
            "description": "\nNotify on result completion\nExample: `true` or `false`\n"
          },
          "notify_daily_report": {
            "type": "boolean",
            "description": "\nNotify daily report\nExample: `true` or `false`\n"
          },
          "notify_daily_report_no_calls": {
            "type": "boolean",
            "description": "\nNotify daily report even if there are no calls\nExample: `true` or `false`\n"
          },
          "daily_report_ai_summary_enabled": {
            "type": "boolean",
            "description": "\nReplace the default daily report data dump with an AI-narrated Top Issues\nsection in Slack and email. Off by default. When on, Slack also exposes a\n\"Show more\" button that opens a modal with the legacy detail sections.\nExample: `true` or `false`\n"
          },
          "notify_cron_failure": {
            "type": "boolean",
            "description": "\nNotify cron failure\nExample: `true` or `false`\n"
          },
          "notify_cron_success": {
            "type": "boolean",
            "description": "\nNotify cron success\nExample: `true` or `false`\n"
          },
          "notify_no_calls": {
            "type": "boolean",
            "description": "\nNotify no calls\nExample: `true` or `false`\n"
          },
          "no_calls_notify_time_period": {
            "description": "\nConfiguration for no calls notification time periods, timeframes, exception numbers, and agents to exclude\nExample:\n```json\n{\n    \"time_zone\": \"America/New_York\",\n    \"time_periods\": [\n        {\n            \"start_time\": \"09:00\",\n            \"end_time\": \"17:00\",\n            \"time_frame\": 30\n        },\n        {\n            \"start_time\": \"18:00\",\n            \"end_time\": \"23:59\",\n            \"time_frame\": 60\n        }\n    ],\n    \"exception_numbers\": [\"+15551234567\", \"+14155552671\"],\n    \"agents\": [1, 10, 90]\n}\n```\nNote:\n- Calls with customer_number in exception_numbers list will be ignored when checking for no calls alert.\n- If agents list is provided and not empty, those specific agents will be excluded from monitoring. All other agents in the project will be monitored. If omitted or empty, all agents in the project will be monitored.\n"
          },
          "notify_daily_report_webhook": {
            "type": "boolean",
            "description": "\nNotify daily report webhook\nExample: `true` or `false`\n"
          },
          "notify_pre_run_webhook": {
            "type": "boolean",
            "description": "\nSend a webhook at the start of a run (before calls dispatch) to configure the external test sandbox\nExample: `true` or `false`\n"
          },
          "daily_report_dashboard_ids": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "\nDashboard IDs to include as visual snapshots in the daily report\nExample: `[1, 2, 3]`\n"
          },
          "notify_result_webhook_failed": {
            "type": "boolean",
            "description": "\nNotify result webhook failed\nExample: `true` or `false`\n"
          },
          "notify_result_webhook_success": {
            "type": "boolean",
            "description": "\nNotify result webhook success\nExample: `true` or `false`\n"
          },
          "notify_result_webhook_error": {
            "type": "boolean",
            "description": "\nNotify result webhook for error runs (runs with error_message)\nExample: `true` or `false`\n"
          },
          "notify_cronjob_webhook_failed": {
            "type": "boolean",
            "description": "\nNotify cronjob webhook failed\nExample: `true` or `false`\n"
          },
          "notify_cronjob_webhook_success": {
            "type": "boolean",
            "description": "\nNotify cronjob webhook success\nExample: `true` or `false`\n"
          },
          "notify_cronjob_webhook_error": {
            "type": "boolean",
            "description": "\nNotify cronjob webhook for error runs (runs with error_message)\nExample: `true` or `false`\n"
          },
          "notify_call_log_webhook_failed": {
            "type": "boolean",
            "description": "\nNotify call log webhook failed\nExample: `true` or `false`\n"
          },
          "notify_call_log_webhook_success": {
            "type": "boolean",
            "description": "\nNotify call log webhook success\nExample: `true` or `false`\n"
          },
          "notify_frequent_calls_for_number": {
            "type": "boolean"
          },
          "frequent_calls_threshold": {
            "type": "integer",
            "maximum": 2147483647,
            "minimum": -2147483648
          },
          "frequent_calls_time_period": {
            "type": "integer",
            "maximum": 2147483647,
            "minimum": -2147483648
          },
          "frequent_calls_cooldown": {
            "type": "integer",
            "maximum": 2147483647,
            "minimum": -2147483648
          },
          "forward_vapi_webhook": {
            "type": "boolean",
            "description": "\nForward vapi webhook\nExample: `true` or `false`\n"
          },
          "forward_retell_webhook": {
            "type": "boolean",
            "description": "\nForward retell webhook\nExample: `true` or `false`\n"
          },
          "is_send_emails_enabled": {
            "type": "boolean",
            "description": "\nIs send emails enabled\nExample: `true` or `false`\n"
          },
          "rubric_config": {
            "description": "\nProject-level scoring rubric for evaluating call success. Each call log produced under this project is run against the rubric and gets a single pass/fail outcome based on its metric results.\n\nIMPORTANT (read before writing):\n- NEVER blindly overwrite this field. Always first GET the project, read the existing `rubric_config`, then merge in only the rule(s) you intend to add/update, and PATCH the full merged value. Sending a partial value will silently delete every rule you did not include.\n\nStructure:\n- `evaluation_logic`: MUST be `\"and\"`. All rules have to pass for a call to be marked successful. (Other values are not supported by the product currently.)\n- `rules`: List of rules. Use one rule per (metric, condition) — keep each rule simple, with a single condition inside.\n\nEach rule shape:\n```json\n{\n    \"metric_id\": <metric id>,\n    \"conditions\": {\n        \"operator\": \"and\",\n        \"conditions\": [\n            {\"field\": <field>, \"op\": <op>, \"value\": <value>}\n        ]\n    }\n}\n```\n\nWhat `field`, `op`, and `value` to use depends on the metric type. The three supported cases:\n\n1. Numeric / score metrics (qualitative scores, numeric metrics, workflow adherence with a score, etc.):\n   - `field`: `\"score\"`\n   - `op`: one of `\"gt\"`, `\"gte\"`, `\"lt\"`, `\"lte\"`, `\"eq\"`\n   - `value`: a number (qualitative scores are on a 0–5 scale)\n   - Example (score must be at least 4): `{\"field\": \"score\", \"op\": \"gte\", \"value\": 4}`\n\n2. Boolean / binary metrics (eval_type `binary`, or `evaluate_expected_outcome`):\n   - `field`: `\"score\"`\n   - `op`: `\"eq\"` or `\"neq\"`\n   - `value`: `true` for pass, `false` for fail\n   - Example (must pass): `{\"field\": \"score\", \"op\": \"eq\", \"value\": true}`\n   - Example (must fail): `{\"field\": \"score\", \"op\": \"eq\", \"value\": false}`\n   - Legacy values `5` (pass) and `0` (fail) are still accepted for back-compat but new rules should use bool.\n\n3. Enum metrics (eval_type `enum`, or `observability_topics` / `observability_dropoff`):\n   - `field`: `\"enum\"`\n   - `op`: `\"eq\"`, `\"neq\"`, or `\"in\"`\n   - `value`: a single string for `eq`/`neq`, or a list of strings for `in`. Must match one of the metric's defined `enum_values`.\n   - Example: `{\"field\": \"enum\", \"op\": \"eq\", \"value\": \"resolved\"}`\n   - Example (any of): `{\"field\": \"enum\", \"op\": \"in\", \"value\": [\"resolved\", \"partially_resolved\"]}`\n\nFull example:\n```json\n{\n    \"evaluation_logic\": \"and\",\n    \"rules\": [\n        {\n            \"metric_id\": 115164,\n            \"conditions\": {\n                \"operator\": \"and\",\n                \"conditions\": [\n                    {\"op\": \"eq\", \"field\": \"score\", \"value\": true}\n                ]\n            }\n        },\n        {\n            \"metric_id\": 5512,\n            \"conditions\": {\n                \"operator\": \"and\",\n                \"conditions\": [\n                    {\"op\": \"gte\", \"field\": \"score\", \"value\": 4}\n                ]\n            }\n        },\n        {\n            \"metric_id\": 8821,\n            \"conditions\": {\n                \"operator\": \"and\",\n                \"conditions\": [\n                    {\"op\": \"in\", \"field\": \"enum\", \"value\": [\"resolved\", \"partially_resolved\"]}\n                ]\n            }\n        }\n    ]\n}\n```\n\nNotes:\n- `metric_id` must reference a metric belonging to this project (project-scoped or agent-scoped under this project); unknown ids are rejected.\n- Rules whose metric did not produce a value on a given call are skipped (neither pass nor fail) and do not affect the outcome.\n- Pass an empty object `{}` to clear the rubric.\n"
          },
          "timezone": {
            "type": "string",
            "description": "\nProject Timezone\n"
          },
          "vapi_api_key": {
            "type": "string",
            "writeOnly": true,
            "description": "\nVAPI Private API Key. Used for all VAPI operations (calls, chat, and testing).\nExample: `\"vapi_api_key_123\"`\n"
          },
          "vapi_api_key_configured": {
            "type": "string",
            "readOnly": true
          },
          "vapi_public_key_configured": {
            "type": "string",
            "readOnly": true
          },
          "retell_api_key": {
            "type": "string",
            "writeOnly": true,
            "description": "\nRetell API key\nExample: `\"retell_api_key_123\"`\n"
          },
          "retell_api_key_configured": {
            "type": "string",
            "readOnly": true
          },
          "syntflow_api_key": {
            "type": "string",
            "writeOnly": true,
            "description": "\nSyntflow API key\nExample: `\"syntflow_api_key_123\"`\n"
          },
          "syntflow_api_key_configured": {
            "type": "string",
            "readOnly": true
          },
          "elevenlabs_api_key": {
            "type": "string",
            "writeOnly": true,
            "description": "\nElevenLabs API key\nExample: `\"elevenlabs_api_key_123\"`\n"
          },
          "elevenlabs_api_key_configured": {
            "type": "string",
            "readOnly": true
          },
          "livekit_api_key": {
            "type": "string",
            "writeOnly": true,
            "description": "\nLiveKit API key\nExample: `\"livekit_api_key_123\"`\n"
          },
          "livekit_api_key_configured": {
            "type": "string",
            "readOnly": true
          },
          "pipecat_api_key": {
            "type": "string",
            "writeOnly": true,
            "description": "\nPipecat/Daily.co API key\nExample: `\"pipecat_api_key_123\"`\n"
          },
          "pipecat_api_key_configured": {
            "type": "string",
            "readOnly": true
          },
          "is_deleted": {
            "type": "boolean"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          }
        }
      },
      "PatchedProviderCredentialDetail": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "organization": {
            "type": [
              "integer",
              "null"
            ]
          },
          "project": {
            "type": [
              "integer",
              "null"
            ]
          },
          "provider": {
            "enum": [
              "vapi",
              "retell",
              "synthflow",
              "elevenlabs",
              "bland",
              "livekit",
              "pipecat",
              "koreai",
              "custom",
              "agentforce",
              "genesys",
              "amazon_connect",
              "agora",
              "telnyx",
              "sierra"
            ],
            "type": "string",
            "description": "* `vapi` - Vapi\n* `retell` - Retell\n* `synthflow` - Synthflow\n* `elevenlabs` - Elevenlabs\n* `bland` - Bland\n* `livekit` - Livekit\n* `pipecat` - Pipecat\n* `koreai` - Kore\n* `custom` - Custom\n* `agentforce` - Agentforce\n* `genesys` - Genesys\n* `amazon_connect` - Amazon Connect\n* `agora` - Agora\n* `telnyx` - Telnyx\n* `sierra` - Sierra",
            "x-spec-enum-id": "1cdb82cad8aba1ad"
          },
          "key": {
            "type": "string",
            "maxLength": 255
          },
          "data": {},
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          }
        }
      },
      "PatchedRequestCriticalMetricScenario": {
        "type": "object",
        "properties": {
          "priority": {
            "enum": [
              "critical",
              "non-critical",
              "not_a_bug"
            ],
            "type": "string",
            "x-spec-enum-id": "6b5f38576e0a1903",
            "description": "Priority of the Critical Metric Scenario\n\n* `critical` - Critical\n* `non-critical` - Non Critical\n* `not_a_bug` - Not A Bug"
          }
        }
      },
      "PatchedResultDetailV2": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "name": {
            "type": "string",
            "description": "\nName of the result\nExample: `\"Test Result 1\"`\n",
            "maxLength": 255
          },
          "agent": {
            "type": "integer"
          },
          "agent_name": {
            "type": "string",
            "readOnly": true,
            "description": "Name of the agent associated with this result"
          },
          "agent_version": {
            "type": "string",
            "readOnly": true,
            "description": "The agent version (history record) this result ran against, or null."
          },
          "status": {
            "enum": [
              "running",
              "completed",
              "failed",
              "pending",
              "in_progress",
              "evaluating",
              "in_queue",
              "timeout",
              "cancelled",
              "scaling_up"
            ],
            "type": "string",
            "x-spec-enum-id": "623e22fc1eb17833",
            "readOnly": true,
            "description": "\nCurrent status of the result\n\n\n* `running` - Running\n* `completed` - Completed\n* `failed` - Failed\n* `pending` - Pending\n* `in_progress` - In Progress\n* `evaluating` - Evaluating\n* `in_queue` - In Queue\n* `timeout` - Timeout\n* `cancelled` - Cancelled\n* `scaling_up` - Scaling Up"
          },
          "met_expected_outcome_count": {
            "type": "string",
            "readOnly": true,
            "description": "Number of runs that fully met their expected outcomes with a score of 100"
          },
          "total_expected_outcome_count": {
            "type": "string",
            "readOnly": true,
            "description": "Total number of runs that had expected outcomes defined"
          },
          "success_rate": {
            "type": "number",
            "format": "double",
            "readOnly": true,
            "description": "\nSuccess rate of the test runs\n"
          },
          "run_as_text": {
            "type": "boolean",
            "readOnly": true,
            "description": "\nWhether this test was run in text mode instead of voice mode\nExample: `true` or `false`\n"
          },
          "is_cronjob": {
            "type": "string",
            "readOnly": true,
            "description": "Whether this result was created by a scheduled cronjob"
          },
          "runs": {
            "type": "object",
            "additionalProperties": {},
            "description": "Run objects keyed by run ID string (e.g. {\"12345\": {...}}). The list endpoint returns `runs` as an array of summaries instead.",
            "readOnly": true
          },
          "overall_evaluation": {
            "oneOf": [
              {},
              {
                "type": "null"
              }
            ],
            "readOnly": true,
            "description": "\nOverall evaluation of the test runs\nExample:\n```json\n{\n    \"success_rate\": \"number\",\n    \"metric_summary\": {\n      \"metric_id\": {\n        \"id\": \"integer\",\n        \"name\": \"string\",\n        \"type\": \"string\",\n        \"score\": \"number\",\n        \"explanation\": \"string (optional)\",\n        \"function_name\": \"string\",\n        \"vocera_defined_metric_code\": \"string (optional)\",\n        \"p50\": \"number (for numeric metrics)\"\n      }\n    },\n    \"worst_performing_metrics\": {\n      \"binary_adherence\": [\n        \"array of metric_ids\"\n      ]\n    },\n    \"numeric_metrics\": [\n      {\n        \"name\": \"string\",\n        \"type\": \"numeric\",\n        \"value\": \"number\",\n        \"percentiles\": {\n          \"p50\": \"number\"\n        }\n      }\n    ],\n    \"enum_metrics\": [\n      \"array of metric_ids\"\n    ],\n    \"extra_metrics\": [\n      {\n        \"name\": \"string (e.g., 'Expected Outcome', 'Average Ringing Duration')\",\n        \"type\": \"string\",\n        \"value\": \"number\",\n        \"percentiles\": {\n          \"p50\": \"number (optional)\"\n        }\n      }\n    ]\n}\n"
          },
          "total_duration": {
            "type": "string",
            "readOnly": true,
            "description": "\nTotal duration of the test runs for this result\nExample: `22:30`\n"
          },
          "total_runs_count": {
            "type": "string",
            "readOnly": true,
            "description": "\nTotal number of test runs associated with this result\nExample: `10`\n"
          },
          "completed_runs_count": {
            "type": "string",
            "readOnly": true,
            "description": "\nNumber of test runs that have completed successfully\nExample: `10`\n"
          },
          "success_runs_count": {
            "type": "string",
            "readOnly": true,
            "description": "\nNumber of test runs that were marked as successful\nExample: `10`\n"
          },
          "failed_runs_count": {
            "type": "string",
            "readOnly": true,
            "description": "\nNumber of test runs that failed or encountered errors\nExample: `10`\n"
          },
          "connected_runs": {
            "type": "string",
            "readOnly": true,
            "description": "List of run IDs that got connected successfully (have transcript data). Returns empty list if no connected runs."
          },
          "not_connected_runs": {
            "type": "string",
            "readOnly": true,
            "description": "List of run IDs that never connected (no transcript data). Returns empty list if every run connected."
          },
          "failed_infrastructure_runs": {
            "type": "string",
            "readOnly": true,
            "description": "List of run IDs that failed infrastructure issues metric (score=0). Returns null if metric not found, empty list if metric exists but no failures."
          },
          "failed_workflow_runs": {
            "type": "string",
            "readOnly": true,
            "description": "List of run IDs that failed expected outcome metric (score=0). Returns null if metric not found, empty list if metric exists but no failures."
          },
          "successful_calls": {
            "type": "string",
            "readOnly": true,
            "description": "List of run IDs that completed successfully. Returns empty list if no successful runs."
          },
          "scenarios": {
            "type": "string",
            "readOnly": true,
            "description": "\nList of scenario names used in the test runs for this result\nExample: ```\n```json\n[\n    {\n        \"id\": 123,\n        \"name\": \"Scenario 1\"\n    },\n    {\n        \"id\": 456,\n        \"name\": \"Scenario 2\"\n    }\n]\n```\n"
          },
          "critical_categories": {
            "type": "string",
            "readOnly": true,
            "description": "\nList of critical categories for this result\nExample:\n```json\n[\n    {\n      \"id\": 2950,\n      \"name\": \"Pronunciation Analysis\",\n      \"eval_type\": \"continuous_qualitative\",\n      \"simulation_enabled\": true,\n      \"observability_enabled\": true\n    },\n    {\n      \"id\": 3284,\n      \"name\": \"Latency\",\n      \"eval_type\": \"numeric\",\n      \"simulation_enabled\": true,\n      \"observability_enabled\": false\n    },\n    {\n      \"id\": 3295,\n      \"name\": \"Detect Silence in Conversation\",\n      \"eval_type\": \"binary\",\n      \"simulation_enabled\": true,\n      \"observability_enabled\": true\n    }\n  ]\n```\n"
          },
          "metrics": {
            "type": "string",
            "readOnly": true
          },
          "runs_by_tags": {
            "type": "string",
            "readOnly": true
          },
          "latency_data": {
            "type": "string",
            "readOnly": true
          },
          "failed_reasons": {
            "oneOf": [
              {},
              {
                "type": "null"
              }
            ],
            "readOnly": true,
            "description": "\nFailed reasons of the test runs\nExample:\n```json\n{\n    \"issues\": [\n      {\n        \"rank\": 1,\n        \"run_ids\": [\n          34588\n        ],\n        \"description\": \"The agent did not provide the standard greeting, emergency disclaimer, or ask how they could help.\",\n        \"affected_count\": 1\n      },\n      {\n        \"rank\": 2,\n        \"run_ids\": [\n          34588\n        ],\n        \"description\": \"The agent did not explain the distinction between the primary care and express clinics.\",\n        \"affected_count\": 1\n      }\n    ],\n    \"total_failed_runs\": 1\n  }\n```\n"
          },
          "ai_summary": {
            "oneOf": [
              {},
              {
                "type": "null"
              }
            ],
            "readOnly": true,
            "description": "\nLLM-generated narrative summary of the result, structured for the Results-page UI.\nExample:\n```json\n{\n    \"what_happened\": \"8 of 10 runs failed, 2 passed. All 8 failures cluster into 3 distinct causes.\",\n    \"why_it_happened\": \"The default test profile isn't seeded in the production backend, so every auth-required workflow exits before PIN/address steps run.\",\n    \"how_to_fix\": \"Seed the test profile in production, tighten the competitor-mention guardrail, and add CA-only store phrasing to the FAQ flow.\",\n    \"generated_from_runs_count\": 10,\n    \"generated_at\": \"2026-05-25T12:00:00Z\"\n}\n```\n"
          },
          "ai_summary_status": {
            "type": "string",
            "readOnly": true,
            "description": "Generation state of the async AI summary, derived so the UI can show a reliable state instead of guessing from an empty `ai_summary`. `completed` = summary populated; `skipped_no_failures` = no failed runs, nothing to summarize; `pending` = there are failed runs but the summary isn't ready yet (still generating)."
          },
          "next_steps": {
            "oneOf": [
              {},
              {
                "type": "null"
              }
            ],
            "readOnly": true,
            "description": "\nLLM-suggested next steps to fix the issues found in this result, ordered by impact.\nExample:\n```json\n[\n    {\"title\": \"Seed test profile in production\", \"description\": \"Unblocks 6 runs; ~5 min.\"},\n    {\"title\": \"Tighten competitor guardrail\", \"description\": \"1 prompt edit; review drift run.\"}\n]\n```\n"
          },
          "path_coverage": {
            "oneOf": [
              {},
              {
                "type": "null"
              }
            ],
            "readOnly": true,
            "description": "\nWorkflow-coverage summary for this result: which of the agent's critical paths the\nruns exercised, and which they missed.\nExample:\n```json\n{\n    \"coverage_pct\": 66.7,\n    \"total_paths\": 3,\n    \"covered_paths\": [\"Book appointment\", \"Reschedule appointment\"],\n    \"uncovered_paths\": [\"Cancel appointment\"],\n    \"generated_at\": \"2026-07-14T12:00:00Z\"\n}\n```\n"
          },
          "performance_metrics": {
            "type": "string",
            "readOnly": true,
            "description": "Per-rubric-rule performance breakdown. One entry per rule in the project's rubric_config: metric name, aggregated value across the result's runs, and whether that aggregate meets the rule's conditions."
          },
          "run_type": {
            "type": [
              "string",
              "null"
            ],
            "readOnly": true,
            "description": "Run Execution Type"
          },
          "run_settings": {
            "oneOf": [
              {},
              {
                "type": "null"
              }
            ],
            "description": "Snapshot of the override-relevant request payload (personality_ids, frequency, concurrency_limit, connection-specific overrides, etc.)."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "\nTimestamp when this test result was created\nExample: `2021-01-01 00:00:00`\n"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true,
            "description": "\nTimestamp when this test result was last updated\nExample: `2021-01-01 00:00:00`\n"
          }
        }
      },
      "PatchedRun": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "provider_call_id": {
            "type": "string",
            "readOnly": true,
            "description": "\nCall ID from the Assistant provider\nExample: `call_abc123`\n"
          },
          "trace_id": {
            "type": "string",
            "description": "OpenTelemetry trace ID (32-char hex). Set when OTel tracing is enabled.",
            "maxLength": 32
          },
          "scenario": {
            "type": [
              "integer",
              "null"
            ],
            "readOnly": true
          },
          "scenario_name": {
            "type": "string",
            "readOnly": true,
            "default": "Scenario Deleted"
          },
          "scenario_type": {
            "type": "string",
            "readOnly": true,
            "description": "Type of the run's scenario (e.g. instruction, conditional_actions), null if the scenario was deleted"
          },
          "personality": {
            "type": [
              "integer",
              "null"
            ],
            "readOnly": true,
            "description": "Personality this run belongs to"
          },
          "personality_name": {
            "type": "string",
            "readOnly": true,
            "description": "Name of the personality this run belongs to"
          },
          "agent": {
            "type": "integer",
            "readOnly": true,
            "description": "ID of the agent associated with this run"
          },
          "agent_name": {
            "type": "string",
            "readOnly": true,
            "description": "Name of the agent associated with this run"
          },
          "agent_version": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ExpectedOutcome"
              }
            ],
            "readOnly": true,
            "description": "The agent version (history record) this run's result ran against, or null."
          },
          "result_id": {
            "type": "integer",
            "readOnly": true
          },
          "result_name": {
            "type": "string",
            "readOnly": true,
            "description": "Name of the result this run belongs to"
          },
          "expected_outcome_prompt": {
            "type": "string",
            "readOnly": true
          },
          "expected_outcome": {
            "type": "string",
            "readOnly": true
          },
          "evaluation": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Evaluation"
              }
            ],
            "readOnly": true,
            "description": "Run Evaluation"
          },
          "rubric": {
            "oneOf": [
              {},
              {
                "type": "null"
              }
            ],
            "readOnly": true,
            "description": "\nDetailed rubric evaluation data\nExample:\n```json\n[\n    {\n        \"metric_id\": 100,\n        \"metric_name\": \"Call Quality\",\n        \"value\": 5,\n        \"explanation\": [\"The response was accurate\"],\n        \"passed\": true,\n        \"conditions\": \"score gte 5\",\n        \"expected_conditions\": {\"operator\": \"and\", \"conditions\": [{\"field\": \"score\", \"op\": \"gte\", \"value\": 5}]}\n    }\n]\n```\n"
          },
          "transcript": {
            "type": "string",
            "readOnly": true,
            "description": "Full text transcript of the call.\nExample: \n```text\n[00:01] Testing Agent: Hello. \n[00:02] Main Agent: Hello, how can I help you today?\n[00:03] Testing Agent: Well, I mean, sure. What time exactly are we talking about here\n[00:04] Main Agent: 6 PM.\n[00:05] Testing Agent: Great. I'll book that for you. Just a sec.\n[00:06] Main Agent: Okay.\n```\n"
          },
          "transcript_object": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RunListTranscriptObject"
            },
            "readOnly": true,
            "description": "Transcript object"
          },
          "duration": {
            "type": "string",
            "readOnly": true,
            "description": "Duration of the run in MM:SS format"
          },
          "voice_recording_url": {
            "type": "string",
            "readOnly": true,
            "description": "URL to access the voice recording of this run"
          },
          "email_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "email",
            "readOnly": true
          },
          "status": {
            "enum": [
              "running",
              "completed",
              "failed",
              "pending",
              "in_progress",
              "evaluating",
              "in_queue",
              "timeout",
              "cancelled",
              "scaling_up"
            ],
            "type": "string",
            "description": "* `running` - Running\n* `completed` - Completed\n* `failed` - Failed\n* `pending` - Pending\n* `in_progress` - In Progress\n* `evaluating` - Evaluating\n* `in_queue` - In Queue\n* `timeout` - Timeout\n* `cancelled` - Cancelled\n* `scaling_up` - Scaling Up",
            "x-spec-enum-id": "623e22fc1eb17833",
            "readOnly": true
          },
          "evaluation_status": {
            "enum": [
              "success",
              "failure",
              "reviewed_success",
              "reviewed_failure"
            ],
            "type": "string",
            "description": "* `success` - Success\n* `failure` - Failure\n* `reviewed_success` - Reviewed Success\n* `reviewed_failure` - Reviewed Failure",
            "x-spec-enum-id": "a5dfbbcee6f2a6ce"
          },
          "metadata": {
            "readOnly": true
          },
          "success": {
            "type": "boolean",
            "description": "Whether this run passed its quality evaluation. false means either the call failed to connect or an evaluation check did not pass. Check `error_message` for connection failures and `evaluation` for check results."
          },
          "is_reviewed": {
            "type": "boolean",
            "description": "Whether the call has been reviewed.\nExample: `true` or `false`"
          },
          "feedback": {
            "type": "string"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "executed_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "readOnly": true
          },
          "outbound_number": {
            "type": "string",
            "readOnly": true,
            "description": "Phone number used to make the outbound call for this run"
          },
          "inbound_number": {
            "type": "string",
            "readOnly": true,
            "description": "Phone number used to receive the inbound call for this run"
          },
          "critical_categories": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RunListCriticalCategories"
            },
            "readOnly": true,
            "description": "List of critical evaluation categories and their results for this run"
          },
          "error_message": {
            "type": "string"
          },
          "scenario_instructions": {
            "type": "string"
          },
          "run_as_text": {
            "type": "boolean",
            "readOnly": true
          },
          "test_profile_data": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/TestProfileData"
              },
              {
                "type": "null"
              }
            ],
            "description": "Test Profile",
            "readOnly": true
          },
          "generated_mock_tool_entries": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": {}
            },
            "readOnly": true,
            "description": "Expected mock tool calls for this run's evaluator. Each entry has shape {tool_id, tool_name, new_entry: {input, output}}."
          },
          "mocked_tool_names": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "readOnly": true,
            "description": "Tool names that were mock-enabled for this run's result. Function calls in the transcript matching these names were served by Cekura mocks. Empty if no tools were mocked."
          },
          "provider_call_details": {
            "readOnly": true,
            "description": "\nDetails of the call from the provider\n"
          },
          "agent_number": {
            "type": [
              "string",
              "null"
            ],
            "readOnly": true,
            "description": "Phone number of the agent (only for voice inbound calls)"
          },
          "testing_channel_index": {
            "type": [
              "integer",
              "null"
            ],
            "readOnly": true,
            "description": "The channel index of the testing agent in the audio recording"
          },
          "run_type": {
            "type": [
              "string",
              "null"
            ],
            "readOnly": true,
            "description": "Run Execution Type"
          },
          "outbound_dial_window_opens_at": {
            "type": "string",
            "readOnly": true,
            "description": "ISO timestamp when the outbound dial window opened. Null until the run reaches pending/waiting-for-call."
          },
          "outbound_dial_window_seconds": {
            "type": "string",
            "readOnly": true,
            "description": "Duration of the outbound dial window in seconds."
          },
          "outbound_dial_window_closes_at": {
            "type": "string",
            "readOnly": true,
            "description": "ISO timestamp when the outbound dial window closes. Null until the window opens."
          }
        }
      },
      "PatchedScenarioEditHistoryRequest": {
        "type": "object",
        "properties": {
          "history_id": {
            "type": "integer"
          },
          "version_name": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "PatchedScenarioImprovementSessionDetail": {
        "type": "object",
        "description": "",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "title": {
            "type": "string",
            "description": "Title for the session (auto-generated from first user message)",
            "maxLength": 255
          },
          "project": {
            "type": [
              "integer",
              "null"
            ]
          },
          "scenario_ids": {
            "description": "List of scenario IDs being improved in this session"
          },
          "conversation_history": {
            "description": "List of conversation items: [{role: 'user'|'assistant', content: str, timestamp: str, tool_calls: [...]}]"
          },
          "status": {
            "enum": [
              "pending",
              "in_progress",
              "completed",
              "cancelled",
              "failed"
            ],
            "type": "string",
            "x-spec-enum-id": "834f792e06398501",
            "description": "Current status of the improvement session\n\n* `pending` - Pending\n* `in_progress` - In Progress\n* `completed` - Completed\n* `cancelled` - Cancelled\n* `failed` - Failed"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "created_by": {
            "type": [
              "integer",
              "null"
            ]
          }
        }
      },
      "PatchedSchemaPostAIAgentTestProfileExternal": {
        "type": "object",
        "properties": {
          "agent": {
            "type": [
              "integer",
              "null"
            ],
            "description": "ID of the agent. Either agent or project must be provided."
          },
          "project": {
            "type": [
              "integer",
              "null"
            ],
            "description": "ID of the project. Either agent or project must be provided."
          },
          "name": {
            "type": "string",
            "description": "Name of the test profile"
          },
          "information": {
            "type": "object",
            "additionalProperties": {},
            "description": "Test profile information. Use the sectioned shape — `main_agent_variables` (sent to the agent under test as dynamic variables at call time) and `testing_agent_variables` (persona/context used by the simulated caller, not sent to the agent). Legacy flat dicts (no section keys) are still accepted and delivered to both sides for backward compatibility. Example: {\"main_agent_variables\": {\"user_id\": \"U-42\"}, \"testing_agent_variables\": {\"customer_name\": \"John Doe\"}}."
          }
        }
      },
      "PatchedSchemaPostAIAgentV2": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true,
            "description": "Agent ID.\nExample: `2142`"
          },
          "name": {
            "type": "string",
            "description": "Agent name. Optional when configure_from_provider is set — it's fetched from the provider.",
            "maxLength": 255
          },
          "description": {
            "type": "string",
            "description": "\nA detailed description of what this agent does and how it should interact\nExample: \n```text\nAI agent for handling customer support inquiries and resolving technical issues\n```\n"
          },
          "project": {
            "type": "integer",
            "description": "The project this agent belongs to"
          },
          "language": {
            "enum": [
              "af",
              "ar",
              "bn",
              "bg",
              "zh",
              "cs",
              "da",
              "nl",
              "en",
              "et",
              "fi",
              "fr",
              "de",
              "el",
              "gu",
              "hi",
              "he",
              "hu",
              "id",
              "it",
              "ja",
              "kn",
              "ko",
              "ms",
              "ml",
              "mr",
              "multi",
              "no",
              "pl",
              "pa",
              "pt",
              "ro",
              "ru",
              "sk",
              "es",
              "sv",
              "th",
              "tr",
              "tl",
              "ta",
              "te",
              "uk",
              "vi"
            ],
            "type": "string",
            "x-spec-enum-id": "b822ad429c7b7fec",
            "default": "en",
            "description": "\nThe primary language this agent uses for communication (e.g. 'en' for English)\n\n\n* `af` - Afrikaans\n* `ar` - Arabic\n* `bn` - Bengali\n* `bg` - Bulgarian\n* `zh` - Chinese Simplified\n* `cs` - Czech\n* `da` - Danish\n* `nl` - Dutch\n* `en` - English\n* `et` - Estonian\n* `fi` - Finnish\n* `fr` - French\n* `de` - German\n* `el` - Greek\n* `gu` - Gujarati\n* `hi` - Hindi\n* `he` - Hebrew\n* `hu` - Hungarian\n* `id` - Indonesian\n* `it` - Italian\n* `ja` - Japanese\n* `kn` - Kannada\n* `ko` - Korean\n* `ms` - Malay\n* `ml` - Malayalam\n* `mr` - Marathi\n* `multi` - Multilingual\n* `no` - Norwegian\n* `pl` - Polish\n* `pa` - Punjabi\n* `pt` - Portuguese\n* `ro` - Romanian\n* `ru` - Russian\n* `sk` - Slovak\n* `es` - Spanish\n* `sv` - Swedish\n* `th` - Thai\n* `tr` - Turkish\n* `tl` - Tagalog\n* `ta` - Tamil\n* `te` - Telugu\n* `uk` - Ukrainian\n* `vi` - Vietnamese"
          },
          "telephony": {
            "allOf": [
              {
                "$ref": "#/components/schemas/AgentTelephony"
              }
            ],
            "writeOnly": true,
            "description": "Phone and SIP/websocket channel configuration."
          },
          "provider": {
            "allOf": [
              {
                "$ref": "#/components/schemas/SchemaAgentProviderCreate"
              }
            ],
            "writeOnly": true,
            "description": "AI platform integration. Nested credentials replace the flat {provider}_api_key fields."
          },
          "agent_speaks_first": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "True = agent speaks first; False = test user speaks first; null = auto-detect."
          },
          "predefined_metrics": {
            "writeOnly": true,
            "description": "predefined metrics to use for the agent"
          },
          "knowledge_base_files": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AgentKnowledgeBaseFileWrite"
            },
            "writeOnly": true,
            "description": "Full desired set of knowledge base files. Reference existing by `id`; add new ones with `file_name` + `content_base64`. Omitted existing files are deleted."
          },
          "enabled_personalities": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "readOnly": true,
            "description": "\nPersonality profiles enabled for this agent\nExample: `[1, 2, 3]`\n"
          },
          "webhook_url": {
            "type": "string",
            "format": "uri",
            "description": "Webhook URL for this agent. When set, overrides the project-level webhook URL for events from this agent."
          },
          "webhook_secret": {
            "type": "string",
            "writeOnly": true,
            "description": "Secret sent in X-CEKURA-SECRET header. Applies when agent webhook_url is set. Write-only — never returned in API responses. Use `webhook_secret_configured` to check whether one is set."
          },
          "webhook_secret_configured": {
            "type": "string",
            "readOnly": true
          },
          "mock_tools": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AgentMockToolWrite"
            },
            "writeOnly": true,
            "description": "Full desired set of mock tools. Items with `id` (or a matching `name`) update existing tools; items without create new ones. Omitted existing tools are deleted."
          },
          "mock_tools_enabled": {
            "type": "boolean",
            "description": "Whether mock tools should be selected by default when configuring a run."
          },
          "mock_tools_provider": {
            "type": [
              "string",
              "null"
            ],
            "readOnly": true,
            "description": "Provider the mock tools were fetched from (vapi, retell, elevenlabs, custom). Null until auto-fetch has been run."
          },
          "dynamic_variables": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AgentDynamicVariableWrite"
            },
            "writeOnly": true,
            "description": "Full desired set of dynamic variable definitions, matched by name. Omitted existing variables are deleted."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true,
            "description": "\nTimestamp when the agent was created\nExample: `\"2021-01-01T00:00:00Z\"`\n"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true,
            "description": "\nTimestamp when the agent was last updated\nExample: `\"2021-01-01T00:00:00Z\"`\n"
          },
          "email_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "email",
            "description": "Email address this agent receives at. When set, enables email-based test runs.",
            "maxLength": 254
          }
        }
      },
      "PatchedSchemaPostCronJob": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Name for the cronjob"
          },
          "scenarios": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "\nList of scenario IDs to execute\nExample: `[123, 456, 789]`\n"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "\nAlternative to scenarios - List of tags to filter scenario\nExample: `[\"tag1\", \"tag2\", \"tag3\"]`\n"
          },
          "agent": {
            "type": "integer",
            "description": "\nAgent ID. Required when using tags to filter scenarios.\nExample: `123`\n"
          },
          "crontab_expression": {
            "type": "string",
            "description": "\nCron expression for scheduling (e.g. '0 9 * * 1-5' for weekdays at 9am)\nExample: \n- `\"0 9 * * 1-5\"`\n- `\"0 0 * * 0\"`\n"
          },
          "timezone": {
            "enum": [
              "Africa/Abidjan",
              "Africa/Accra",
              "Africa/Addis_Ababa",
              "Africa/Algiers",
              "Africa/Asmara",
              "Africa/Bamako",
              "Africa/Bangui",
              "Africa/Banjul",
              "Africa/Bissau",
              "Africa/Blantyre",
              "Africa/Brazzaville",
              "Africa/Bujumbura",
              "Africa/Cairo",
              "Africa/Casablanca",
              "Africa/Ceuta",
              "Africa/Conakry",
              "Africa/Dakar",
              "Africa/Dar_es_Salaam",
              "Africa/Djibouti",
              "Africa/Douala",
              "Africa/El_Aaiun",
              "Africa/Freetown",
              "Africa/Gaborone",
              "Africa/Harare",
              "Africa/Johannesburg",
              "Africa/Juba",
              "Africa/Kampala",
              "Africa/Khartoum",
              "Africa/Kigali",
              "Africa/Kinshasa",
              "Africa/Lagos",
              "Africa/Libreville",
              "Africa/Lome",
              "Africa/Luanda",
              "Africa/Lubumbashi",
              "Africa/Lusaka",
              "Africa/Malabo",
              "Africa/Maputo",
              "Africa/Maseru",
              "Africa/Mbabane",
              "Africa/Mogadishu",
              "Africa/Monrovia",
              "Africa/Nairobi",
              "Africa/Ndjamena",
              "Africa/Niamey",
              "Africa/Nouakchott",
              "Africa/Ouagadougou",
              "Africa/Porto-Novo",
              "Africa/Sao_Tome",
              "Africa/Tripoli",
              "Africa/Tunis",
              "Africa/Windhoek",
              "America/Adak",
              "America/Anchorage",
              "America/Chicago",
              "America/Denver",
              "America/Los_Angeles",
              "America/New_York",
              "America/Phoenix",
              "America/Sao_Paulo",
              "Asia/Dubai",
              "Asia/Hong_Kong",
              "Asia/Kolkata",
              "Asia/Seoul",
              "Asia/Shanghai",
              "Asia/Singapore",
              "Asia/Tokyo",
              "Australia/Melbourne",
              "Australia/Perth",
              "Australia/Sydney",
              "Europe/Amsterdam",
              "Europe/Berlin",
              "Europe/London",
              "Europe/Madrid",
              "Europe/Moscow",
              "Europe/Paris",
              "Europe/Rome",
              "Pacific/Auckland",
              "Pacific/Honolulu",
              "US/Central",
              "US/Eastern",
              "US/Mountain",
              "US/Pacific",
              "UTC"
            ],
            "type": "string",
            "x-spec-enum-id": "6e7339d971185fa9",
            "description": "\nTimezone for the cronjob (default: Project timezone)\n\n\n* `Africa/Abidjan` - Africa/Abidjan\n* `Africa/Accra` - Africa/Accra\n* `Africa/Addis_Ababa` - Africa/Addis_Ababa\n* `Africa/Algiers` - Africa/Algiers\n* `Africa/Asmara` - Africa/Asmara\n* `Africa/Bamako` - Africa/Bamako\n* `Africa/Bangui` - Africa/Bangui\n* `Africa/Banjul` - Africa/Banjul\n* `Africa/Bissau` - Africa/Bissau\n* `Africa/Blantyre` - Africa/Blantyre\n* `Africa/Brazzaville` - Africa/Brazzaville\n* `Africa/Bujumbura` - Africa/Bujumbura\n* `Africa/Cairo` - Africa/Cairo\n* `Africa/Casablanca` - Africa/Casablanca\n* `Africa/Ceuta` - Africa/Ceuta\n* `Africa/Conakry` - Africa/Conakry\n* `Africa/Dakar` - Africa/Dakar\n* `Africa/Dar_es_Salaam` - Africa/Dar_es_Salaam\n* `Africa/Djibouti` - Africa/Djibouti\n* `Africa/Douala` - Africa/Douala\n* `Africa/El_Aaiun` - Africa/El_Aaiun\n* `Africa/Freetown` - Africa/Freetown\n* `Africa/Gaborone` - Africa/Gaborone\n* `Africa/Harare` - Africa/Harare\n* `Africa/Johannesburg` - Africa/Johannesburg\n* `Africa/Juba` - Africa/Juba\n* `Africa/Kampala` - Africa/Kampala\n* `Africa/Khartoum` - Africa/Khartoum\n* `Africa/Kigali` - Africa/Kigali\n* `Africa/Kinshasa` - Africa/Kinshasa\n* `Africa/Lagos` - Africa/Lagos\n* `Africa/Libreville` - Africa/Libreville\n* `Africa/Lome` - Africa/Lome\n* `Africa/Luanda` - Africa/Luanda\n* `Africa/Lubumbashi` - Africa/Lubumbashi\n* `Africa/Lusaka` - Africa/Lusaka\n* `Africa/Malabo` - Africa/Malabo\n* `Africa/Maputo` - Africa/Maputo\n* `Africa/Maseru` - Africa/Maseru\n* `Africa/Mbabane` - Africa/Mbabane\n* `Africa/Mogadishu` - Africa/Mogadishu\n* `Africa/Monrovia` - Africa/Monrovia\n* `Africa/Nairobi` - Africa/Nairobi\n* `Africa/Ndjamena` - Africa/Ndjamena\n* `Africa/Niamey` - Africa/Niamey\n* `Africa/Nouakchott` - Africa/Nouakchott\n* `Africa/Ouagadougou` - Africa/Ouagadougou\n* `Africa/Porto-Novo` - Africa/Porto-Novo\n* `Africa/Sao_Tome` - Africa/Sao_Tome\n* `Africa/Tripoli` - Africa/Tripoli\n* `Africa/Tunis` - Africa/Tunis\n* `Africa/Windhoek` - Africa/Windhoek\n* `America/Adak` - America/Adak\n* `America/Anchorage` - America/Anchorage\n* `America/Chicago` - America/Chicago\n* `America/Denver` - America/Denver\n* `America/Los_Angeles` - America/Los_Angeles\n* `America/New_York` - America/New_York\n* `America/Phoenix` - America/Phoenix\n* `America/Sao_Paulo` - America/Sao_Paulo\n* `Asia/Dubai` - Asia/Dubai\n* `Asia/Hong_Kong` - Asia/Hong_Kong\n* `Asia/Kolkata` - Asia/Kolkata\n* `Asia/Seoul` - Asia/Seoul\n* `Asia/Shanghai` - Asia/Shanghai\n* `Asia/Singapore` - Asia/Singapore\n* `Asia/Tokyo` - Asia/Tokyo\n* `Australia/Melbourne` - Australia/Melbourne\n* `Australia/Perth` - Australia/Perth\n* `Australia/Sydney` - Australia/Sydney\n* `Europe/Amsterdam` - Europe/Amsterdam\n* `Europe/Berlin` - Europe/Berlin\n* `Europe/London` - Europe/London\n* `Europe/Madrid` - Europe/Madrid\n* `Europe/Moscow` - Europe/Moscow\n* `Europe/Paris` - Europe/Paris\n* `Europe/Rome` - Europe/Rome\n* `Pacific/Auckland` - Pacific/Auckland\n* `Pacific/Honolulu` - Pacific/Honolulu\n* `US/Central` - US/Central\n* `US/Eastern` - US/Eastern\n* `US/Mountain` - US/Mountain\n* `US/Pacific` - US/Pacific\n* `UTC` - UTC"
          },
          "personality": {
            "type": "integer",
            "description": "DEPRECATED: Use personalities instead"
          },
          "personalities": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "\nList of personalities to use for test execution. Multiple personalities can be assigned to run tests with different configurations.\nExample: `[1, 2, 3]` (personality IDs)\n"
          },
          "run_as_text": {
            "type": "boolean",
            "default": false,
            "description": "DEPRECATED: Use execution_mode instead. Run scenarios as text-based chat instead of voice calls"
          },
          "execution_mode": {
            "enum": [
              "voice",
              "text",
              "sip",
              "vapi_webrtc",
              "retell_webrtc",
              "elevenlabs",
              "ello",
              "livekit_v2",
              "pipecat_v2",
              "agora"
            ],
            "type": "string",
            "x-spec-enum-id": "aef421315acd0ca3",
            "default": "voice",
            "description": "\nExecution mode for the cron job. Choices: voice, text, sip\nExample: `\"voice\"`, `\"text\"`, or `\"sip\"`\n\n\n* `voice` - Voice\n* `text` - Text\n* `sip` - SIP\n* `vapi_webrtc` - VAPI WebRTC\n* `retell_webrtc` - Retell WebRTC\n* `elevenlabs` - ElevenLabs\n* `ello` - Ello\n* `livekit_v2` - LiveKit\n* `pipecat_v2` - Pipecat\n* `agora` - Agora"
          }
        }
      },
      "PatchedSchemaPostMetricEdit": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "name": {
            "type": "string",
            "description": "Name of the metric"
          },
          "description": {
            "type": "string",
            "description": "Description of what this metric evaluates"
          },
          "audio_enabled": {
            "type": "boolean",
            "description": "Whether this metric evaluates audio content"
          },
          "prompt": {
            "type": "string",
            "description": "The evaluation prompt used for this metric"
          },
          "project": {
            "type": "integer",
            "description": "ID of the project this metric belongs to."
          },
          "agents": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "List of agent IDs to enable this project-level metric for. Only applicable when project is set."
          },
          "assistant_id": {
            "type": "string",
            "description": "External identifier for the assistant"
          },
          "type": {
            "enum": [
              "basic",
              "custom_prompt",
              "custom_code",
              "llm_judge"
            ],
            "type": "string",
            "x-spec-enum-id": "b44700c0a6443b40",
            "description": "Type of metric (`llm_judge` recommended; `basic` and `custom_prompt` are deprecated)\n\n* `basic` - Basic (Deprecated in favor of LLM Judge)\n* `custom_prompt` - Custom Prompt ( Deprecated in favor of LLM Judge)\n* `custom_code` - Custom Code\n* `llm_judge` - LLM Judge"
          },
          "eval_type": {
            "enum": [
              "binary",
              "continuous_qualitative",
              "numeric",
              "enum"
            ],
            "type": "string",
            "x-spec-enum-id": "b40eac6824409cc2",
            "description": "Output shape of the evaluation score. Accepts canonical (binary, continuous_qualitative, numeric, enum); legacy binary_workflow_adherence and binary_qualitative are accepted and mapped to binary.\n\n* `binary` - Binary\n* `continuous_qualitative` - Continuous Qualitative\n* `numeric` - Numeric\n* `enum` - Enum"
          },
          "enum_values": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Possible values for enum-type metrics (list of strings, e.g. [\"resolved\", \"escalated\", \"abandoned\"])"
          },
          "display_order": {
            "type": "integer",
            "description": "Order in which to display this metric in the UI"
          },
          "configuration": {
            "type": "object",
            "additionalProperties": {},
            "description": "Per-metric configuration.\n\nSome predefined metrics carry **per-agent** configuration, keyed by agent id: `configuration[<key>] = {\"<agent_id>\": <value>}`. On read, every agent attached to the metric is returned; on write, only the agent ids you include are updated.\n\nCall-level keys (not per-agent):\n* **Detect Silence** — `silence_duration` (int, seconds, default 10): minimum mutual silence before flagging a failure.\n* **Infrastructure Issues** — `infra_issues_timeout` (int, seconds, default 10): max seconds before the Main Agent must respond after the Testing Agent finishes speaking.\n\nPer-agent keys (each value is `{\"<agent_id>\": <value>}`):\n* **Dropoff Node** — `nodes`: `{\"<agent_id>\": [{name, description}]}` — conversation stages used to classify where a call dropped off.\n* **Topic of Call** — `nodes`: `{\"<agent_id>\": [{name, description}]}` — topic categories used to classify each call.\n* **Pronunciation Check** — `pronunciation_words`: `{\"<agent_id>\": [[word, phonemes], ...]}` — how specific words should be pronounced (e.g. {\"42\": [[\"Cekura\", \"suh-KYUR-uh\"]]}).\n* **Letterwise Pronunciation** — `spelling_word_types`: `{\"<agent_id>\": [\"name\", \"email\", ...]}` — word categories the Main Agent must spell out letter-by-letter.\n* **Hallucination** — `hallucination_kb_files`: `{\"<agent_id>\": [file_id, ...]}` — KnowledgeBaseFile IDs used as the source of truth for fact-checking."
          },
          "add_to_new_agents": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "When enabled, this metric is automatically assigned to new agents created in the project."
          },
          "simulation_enabled": {
            "type": "boolean",
            "description": "\nEnable this metric for simulations.\nExample: `true` or `false`\n        "
          },
          "observability_enabled": {
            "type": "boolean",
            "description": "\nEnable this metric for observability.\nExample: `true` or `false`\n        "
          },
          "sampling_enabled": {
            "type": "boolean",
            "description": "Enable sampling for this metric using project-level sample rate"
          },
          "evaluation_trigger": {
            "enum": [
              "always",
              "automatic",
              "custom"
            ],
            "type": "string",
            "x-spec-enum-id": "ecd3c02e0e393ef5",
            "default": "always",
            "description": "When to run this metric.\n\n* `always` — evaluate every call (default)\n* `automatic` — system decides based on call content\n* `custom` — only evaluate when `evaluation_trigger_prompt` condition is met\n\n* `always` - Always\n* `automatic` - Automatic\n* `custom` - Custom"
          },
          "evaluation_trigger_prompt": {
            "type": "string",
            "description": "LLM prompt that decides whether to evaluate this call. Only used when `evaluation_trigger=custom` and `trigger_type=llm_judge`.\nExample: \"Did the agent offer a refund?\""
          },
          "trigger_type": {
            "enum": [
              "llm_judge",
              "custom_code"
            ],
            "type": "string",
            "x-spec-enum-id": "2adad4b8df61914f",
            "default": "llm_judge",
            "description": "How to evaluate the trigger condition. Only relevant when `evaluation_trigger=custom`.\n\n* `llm_judge` — use `evaluation_trigger_prompt` (default)\n* `custom_code` — use `evaluation_trigger_custom_code`\n\n* `llm_judge` - LLM Judge\n* `custom_code` - Custom Code"
          },
          "evaluation_trigger_custom_code": {
            "type": "string",
            "description": "Python code to evaluate the trigger condition. Only used when `evaluation_trigger=custom` and `trigger_type=custom_code`."
          },
          "custom_code": {
            "type": "string",
            "description": "Python code that implements the metric evaluation. Required when `type=custom_code`. Must define a function `evaluate(transcript, ...) -> bool | float | str`."
          }
        }
      },
      "PatchedSchemaPostScenario": {
        "type": "object",
        "properties": {
          "agent": {
            "type": [
              "integer",
              "null"
            ],
            "description": "ID of the agent. Either agent or project must be provided."
          },
          "project": {
            "type": [
              "integer",
              "null"
            ],
            "description": "ID of the project. Either agent or project must be provided."
          },
          "assistant_id": {
            "type": "string",
            "writeOnly": true,
            "description": "\nAlternative to agent ID - the assistant ID to use for this scenario\nExample: `\"asst_1234567890\"`\n"
          },
          "name": {
            "type": "string",
            "description": "Name of the evaluator"
          },
          "personality": {
            "type": "integer",
            "description": "The personality of the evaluator"
          },
          "scenario_type": {
            "enum": [
              "instruction",
              "conditional_actions"
            ],
            "type": "string",
            "x-spec-enum-id": "97f8e4b948b4e205",
            "default": "instruction",
            "description": "\nType of scenario to create:\n- `instruction`: Standard instruction-based scenario where the instructions field contains plain text\n- `conditional_actions`: Conditional action-based scenario where the instructions field contains a JSON structure\n\nDefault: `instruction`\n\n\n* `instruction` - Instruction\n* `conditional_actions` - Conditional Actions"
          },
          "instructions": {
            "type": "string",
            "description": "\nScenario Instructions - the format depends on the scenario_type:\n\n**For scenario_type=\"instruction\":**\nProvide plain text instructions that describe the scenario behavior.\nExample: `\"You are a customer calling to inquire about your order status. Be polite and provide order number 12345 when asked.\"`\n\n**For scenario_type=\"conditional_actions\":**\nUse the structured `conditional_actions` field instead. If you send via `instructions`, pass a JSON-formatted string with the following structure:\n\n```json\n{\n  \"role\": \"A friendly customer calling about an appointment\",\n  \"conditions\": [\n    {\n      \"id\": 0,\n      \"condition\": \"FIRST_MESSAGE\",\n      \"action\": \"Hi, I'd like to check on my upcoming appointment <silence time=\\\"1.5s\\\" />\",\n      \"type\": \"standard\",\n      \"fixed_message\": true\n    },\n    {\n      \"id\": 1,\n      \"condition\": \"The agent asks for your name\",\n      \"action\": \"My name is Sarah Johnson\",\n      \"type\": \"standard\",\n      \"fixed_message\": true\n    },\n    {\n      \"id\": 2,\n      \"condition\": \"The agent asks for your date of birth\",\n      \"action\": \"January first, nineteen ninety\",\n      \"type\": \"standard\",\n      \"fixed_message\": true\n    },\n    {\n      \"id\": 3,\n      \"condition\": \"The agent confirms your identity and provides appointment details\",\n      \"action\": \"Thank you, that's all I needed <silence time=\\\"1.0s\\\" />\",\n      \"type\": \"standard\",\n      \"fixed_message\": true\n    },\n    {\n      \"id\": 4,\n      \"condition\": 3,\n      \"action\": \"<endcall />\",\n      \"type\": \"action_followup\",\n      \"fixed_message\": true\n    }\n  ]\n}\n```\n\n**Note:** When sent via `instructions`, the value must be a JSON-formatted string (e.g. `JSON.stringify(...)` / `json.dumps(...)`). For new integrations, use the structured `conditional_actions` field below.\n\n**Structure Details:**\n\n- **`role`** (string): Personality/role description for the scenario actor\n\n- **`conditions`** (array): Ordered list of conditional actions that define the conversation flow\n\n  **Each condition object has:**\n  - **`id`** (integer): Unique sequential identifier (0, 1, 2, 3...)\n\n  - **`condition`** (string | integer): The trigger that activates this action\n    - `\"FIRST_MESSAGE\"` — Triggers at conversation start (use for `id: 0`)\n    - Natural-language description of the main agent's observable action, written from a third-person observer perspective (e.g. `\"The agent asks for your date of birth\"`, `\"The agent confirms the cancellation\"`). Matched semantically against the conversation context.\n    - Integer (e.g. `3`) — References another condition's `id` for sequential `action_followup` chaining\n\n  - **`action`** (string): What the scenario actor says or does\n    - **SSML pause tags:** `<silence time=\"1.5s\" />` (interruptible) or `<hold time=\"2s\" />` (not interruptible). `<silence>` lets the main agent jump in mid-pause; `<hold>` enforces dead air.\n    - **Emotion markers:** `[laughter]`, `[sigh]`, etc. (can repeat like `[laughter] [laughter]`)\n    - **Special actions:** `<endcall />` to end the call\n\n  - **`type`** (string): Either `\"standard\"` (normal response) or `\"action_followup\"` (fires on the testing agent's next turn after the referenced condition — one main-agent reply elapses in between, regardless of its content; never fires in the same turn as its parent)\n\n  - **`fixed_message`** (boolean): Set to `true` for fixed responses, `false` for dynamic\n\n**Usage Tips:**\n- Always start with `id: 0` and `condition: \"FIRST_MESSAGE\"`\n- Write conditions as third-person descriptions of what the main agent does (e.g. `\"The agent confirms the cancellation\"`)\n- Use the last condition to trigger `<endcall />` for clean call termination\n- Combine SSML tags and emotion markers naturally: `\"Great <silence time=\\\"1.5s\\\" /> [laughter] [laughter]\"`\n"
          },
          "conditional_actions": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ConditionalActions"
              }
            ],
            "description": "Structured conditional-actions object for `scenario_type=\"conditional_actions\"`. Use either `conditional_actions` (structured) or `instructions` (plain text) — not both."
          },
          "expected_outcome_prompt": {
            "type": "string",
            "description": "\nExpected Outcome Prompt\nExample: `\"The user should be able to complete the order\"`\n"
          },
          "metrics": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "\nList of metric IDs to associate with this evaluator\nExample: `[123, 456, 789]`\n"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "\nList of tags to associate with the evaluator\nExample: `[\"tag1\", \"tag2\", \"tag3\"]`\n"
          },
          "tool_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "List of tool IDs to use for evaluator",
            "example": [
              "TOOL_DTMF",
              "TOOL_END_CALL",
              "TOOL_END_CALL_ONLY_ON_TRANSFER"
            ]
          },
          "test_profile": {
            "type": "integer",
            "description": "The test profile ID to use for the evaluator"
          },
          "phone_number": {
            "type": "integer",
            "description": "The phone number ID to use for the evaluator (works for both inbound and outbound)"
          },
          "inbound_phone_number": {
            "type": "integer",
            "description": "(Deprecated) The inbound phone number ID to use for the evaluator. Use phone_number instead, which works for both inbound and outbound."
          },
          "folder_path": {
            "type": [
              "string",
              "null"
            ],
            "description": "Dot-separated path of the folder to assign this evaluator to (e.g. \"Sales.Inbound\"). Folders must be created before use — they are not auto-created. Use `scenarios_create_folder_create` to create each level before assigning evaluators. Example: to use \"Sales.Inbound\", first create \"Sales\", then create \"Inbound\" inside it."
          },
          "generated_mock_tool_entries": {
            "oneOf": [
              {},
              {
                "type": "null"
              }
            ],
            "description": "Expected mock tool calls for this evaluator. Each entry has shape {tool_id, tool_name, new_entry: {input, output}}. Auto-generated during scenario generation when the agent has mock tools attached; can also be set or edited manually."
          }
        }
      },
      "PatchedSchemaUpdateAIAgentExternal": {
        "type": "object",
        "description": "Update an AI voice agent.",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true,
            "description": "Agent ID.\nExample: `2142`"
          },
          "agent_name": {
            "type": "string",
            "description": "\nA descriptive name for your agent\nExample: \n- `\"Customer Service Assistant\"`\n- `\"Sales Bot\"`\n",
            "maxLength": 255
          },
          "contact_number": {
            "type": "string",
            "description": "\nPhone number assigned to this agent for calls (must start with + followed by digits, min 8 chars)\nExample: `\"+1234567890\"`\n",
            "maxLength": 30
          },
          "inbound": {
            "type": "boolean",
            "description": "Whether this agent handles inbound calls.\n- If true, our agent will call you on above number.\n- If false, your agent will have to call our agent.\n\nExample: `true` or `false`\n"
          },
          "description": {
            "type": "string",
            "description": "\nA detailed description of what this agent does and how it should interact\nExample: \n```text\nAI agent for handling customer support inquiries and resolving technical issues\n```\n"
          },
          "language": {
            "enum": [
              "af",
              "ar",
              "bn",
              "bg",
              "zh",
              "cs",
              "da",
              "nl",
              "en",
              "et",
              "fi",
              "fr",
              "de",
              "el",
              "gu",
              "hi",
              "he",
              "hu",
              "id",
              "it",
              "ja",
              "kn",
              "ko",
              "ms",
              "ml",
              "mr",
              "multi",
              "no",
              "pl",
              "pa",
              "pt",
              "ro",
              "ru",
              "sk",
              "es",
              "sv",
              "th",
              "tr",
              "tl",
              "ta",
              "te",
              "uk",
              "vi"
            ],
            "type": "string",
            "x-spec-enum-id": "b822ad429c7b7fec",
            "default": "en",
            "description": "\nThe primary language this agent uses for communication (e.g. 'en' for English)\n\n\n* `af` - Afrikaans\n* `ar` - Arabic\n* `bn` - Bengali\n* `bg` - Bulgarian\n* `zh` - Chinese Simplified\n* `cs` - Czech\n* `da` - Danish\n* `nl` - Dutch\n* `en` - English\n* `et` - Estonian\n* `fi` - Finnish\n* `fr` - French\n* `de` - German\n* `el` - Greek\n* `gu` - Gujarati\n* `hi` - Hindi\n* `he` - Hebrew\n* `hu` - Hungarian\n* `id` - Indonesian\n* `it` - Italian\n* `ja` - Japanese\n* `kn` - Kannada\n* `ko` - Korean\n* `ms` - Malay\n* `ml` - Malayalam\n* `mr` - Marathi\n* `multi` - Multilingual\n* `no` - Norwegian\n* `pl` - Polish\n* `pa` - Punjabi\n* `pt` - Portuguese\n* `ro` - Romanian\n* `ru` - Russian\n* `sk` - Slovak\n* `es` - Spanish\n* `sv` - Swedish\n* `th` - Thai\n* `tr` - Turkish\n* `tl` - Tagalog\n* `ta` - Tamil\n* `te` - Telugu\n* `uk` - Ukrainian\n* `vi` - Vietnamese"
          },
          "assistant_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "\nExternal assistant service identifier (minimum 10 characters).\nExample: `\"asst_abc123xyz\"`.\n\nNote: `assistant_id` alone does NOT substitute for provider credentials. Providers like VAPI, Retell, and Bland still require their respective `*_api_key` to be set.\n",
            "maxLength": 255
          },
          "chat_assistant_id": {
            "type": "string",
            "description": "\nChat / provider-specific assistant identifier (minimum 10 characters).\nExample: `\"chat_asst_abc123xyz\"`.\n\nRequired for `assistant_provider` values:\n- `retell` — the Retell agent id (used for voice too, despite the field name).\n- `bland` — the Bland pathway_id (Bland calls it pathway_id internally).\n- `sms` / `whatsapp` — the text-channel assistant id.\n",
            "maxLength": 255
          },
          "websocket_url": {
            "type": [
              "string",
              "null"
            ],
            "description": "\nWebSocket endpoint URL for real-time communication\nExample: `\"wss://api.example.com/ws\"`\n"
          },
          "websocket_headers": {
            "type": "object",
            "additionalProperties": {},
            "description": "\nHeaders to be sent to the websocket server\n"
          },
          "llm_system_prompt": {
            "type": "string",
            "description": "\nSystem prompt that defines the agent's behavior and personality\nExample: \n```text\nYou are a helpful customer service agent. Always be polite and professional.\n```\n"
          },
          "llm_model": {
            "enum": [
              "gpt-4o",
              "gpt-4o-mini",
              "gpt-4.1",
              "gpt-4.1-mini",
              "claude-sonnet-4-5-20250929"
            ],
            "type": "string",
            "x-spec-enum-id": "50e3b52be1ccac3f",
            "default": "gpt-4o",
            "description": "\nThe LLM model to use for simulating user responses\n\n\n* `gpt-4o` - gpt-4o\n* `gpt-4o-mini` - gpt-4o-mini\n* `gpt-4.1` - gpt-4.1\n* `gpt-4.1-mini` - gpt-4.1-mini\n* `claude-sonnet-4-5-20250929` - claude-sonnet-4-5"
          },
          "llm_temperature": {
            "type": "number",
            "format": "double",
            "default": 0,
            "description": "\nControls randomness in responses (0.0-2.0, lower = more focused)\nExample: `0.5`\n"
          },
          "llm_max_tokens": {
            "type": "integer",
            "default": 4096,
            "description": "\nMaximum length of simulated responses in tokens\nExample: `4096`\n"
          },
          "outbound_auto_call": {
            "type": "boolean",
            "default": false,
            "description": "\nWhether to automatically call the outbound number\nExample: `False` or `True`\n"
          },
          "sip_endpoint": {
            "type": [
              "string",
              "null"
            ],
            "description": "SIP endpoint URL for direct SIP-based phone calls.\nExample: `\"sip:agent@cekura.ai\"` or `\"sip:contact@domain.com\"`\nLeave empty if SIP calling is not configured for this agent.",
            "maxLength": 255
          },
          "sip_auth": {
            "oneOf": [
              {},
              {
                "type": "null"
              }
            ],
            "description": "\nSIP authentication credentials\nExample: `{\"username\": \"user123\", \"password\": \"pass123\"}`\n"
          },
          "websocket_voice_url": {
            "type": [
              "string",
              "null"
            ],
            "description": "Raw-PCM (16kHz 16-bit mono) websocket endpoint for direct websocket-based voice calls",
            "maxLength": 255
          },
          "websocket_auth": {
            "oneOf": [
              {},
              {
                "type": "null"
              }
            ],
            "description": "\nWebsocket Basic Auth credentials\nExample: `{\"username\": \"user123\", \"password\": \"pass123\"}`\n"
          },
          "predefined_metrics": {
            "writeOnly": true,
            "description": "predefined metrics to use for the agent"
          },
          "knowledge_base_files": {
            "type": "string",
            "readOnly": true,
            "description": "\nList of knowledge base files attached to the agent\nExample: `[1, 2, 3]`\n"
          },
          "transcript_provider": {
            "enum": [
              "vapi",
              "retell",
              "synthflow",
              "elevenlabs",
              "bland",
              "livekit",
              "pipecat",
              "koreai",
              "custom",
              "cisco",
              "genesys",
              "agora",
              "amazon_connect",
              "telnyx",
              ""
            ],
            "type": "string",
            "x-spec-enum-id": "2b38755f8404d645",
            "default": "",
            "description": "\nService provider for speech-to-text transcription\n\n\n* `vapi` - Vapi\n* `retell` - Retell\n* `synthflow` - Synthflow\n* `elevenlabs` - Elevenlabs\n* `bland` - Bland\n* `livekit` - Livekit\n* `pipecat` - Pipecat\n* `koreai` - Kore\n* `custom` - Custom\n* `cisco` - Cisco\n* `genesys` - Genesys\n* `agora` - Agora\n* `amazon_connect` - Amazon Connect\n* `telnyx` - Telnyx"
          },
          "assistant_provider": {
            "enum": [
              "vapi",
              "retell",
              "elevenlabs",
              "vocera",
              "sms",
              "whatsapp",
              "self_hosted",
              "agentforce",
              "cisco",
              "bland",
              "livekit",
              "pipecat",
              "synthflow",
              "agora",
              "koreai",
              "genesys",
              "amazon_connect",
              "telnyx",
              "sierra",
              ""
            ],
            "type": "string",
            "x-spec-enum-id": "be289759a77f8b31",
            "default": "",
            "description": "\nService provider for the AI assistant functionality. Valid values (live enum):\n\n- `self_hosted` — websocket or observation-only; no api_key needed. Use `websocket_url` + `websocket_headers` for text-mode runs.\n- `vapi` — requires `vapi_api_key`; optional `assistant_id`, `vapi_data.public_key`.\n- `retell` — requires `retell_api_key` AND `chat_assistant_id` (used for voice too).\n- `bland` — requires `bland_api_key`; `assistant_id` is the Bland persona_id (voice), `chat_assistant_id` the pathway_id (text); `bland_data.encrypted_key` for Twilio.\n- `livekit` — requires `livekit_api_key` + `livekit_data.url`; `livekit_data.api_secret` is needed at run time for WebRTC.\n- `elevenlabs` — requires `elevenlabs_api_key`.\n- `agentforce` — requires `agentforce_client_secret` + `agentforce_data`.\n- `sierra` — requires `sierra_agent_token`; optional `sierra_data` (host, api_secret). Chat/text runs only.\n- `amazon_connect` — requires `amazon_connect_data` with `snippet_id` and `connect_host`; optional `amazon_connect_security_token` and `region`.\n- `cisco` — Cisco Webex.\n- `vocera` — Cekura-hosted.\n- `sms` / `whatsapp` — text-only channels; use `chat_assistant_id`.\n- `\"\"` (empty) — unset; agent is not runnable until a provider is configured.\n\nNote: the serializer also exposes `pipecat_*`, `synthflow_*`, `koreai_*`, `genesys_*`, `custom_provider_*` fields, but those provider values are not currently selectable in this enum.\n\n\n* `vapi` - Vapi\n* `retell` - Retell\n* `elevenlabs` - Elevenlabs\n* `vocera` - Vocera\n* `sms` - Sms\n* `whatsapp` - Whatsapp\n* `self_hosted` - Self Hosted\n* `agentforce` - Agentforce\n* `cisco` - Cisco\n* `bland` - Bland\n* `livekit` - Livekit\n* `pipecat` - Pipecat\n* `synthflow` - Synthflow\n* `agora` - Agora\n* `koreai` - Koreai\n* `genesys` - Genesys\n* `amazon_connect` - Amazon Connect\n* `telnyx` - Telnyx\n* `sierra` - Sierra"
          },
          "vapi_api_key": {
            "type": "string",
            "writeOnly": true,
            "description": "\nAPI key for VAPI service provider. Required when `assistant_provider=\"vapi\"`.\nExample: `\"vapi_api_key_123\"`\n"
          },
          "vapi_api_key_configured": {
            "type": "string",
            "readOnly": true
          },
          "vapi_public_key_configured": {
            "type": "string",
            "readOnly": true
          },
          "retell_api_key": {
            "type": "string",
            "writeOnly": true,
            "description": "\nAPI key for Retell service provider. Required when `assistant_provider=\"retell\"` (along with `chat_assistant_id`).\nExample: `\"retell_api_key_123\"`\n"
          },
          "retell_api_key_configured": {
            "type": "string",
            "readOnly": true
          },
          "elevenlabs_api_key": {
            "type": "string",
            "writeOnly": true,
            "description": "\nAPI key for ElevenLabs voice synthesis service. Required when `assistant_provider=\"elevenlabs\"`.\nExample: `\"elevenlabs_api_key_123\"`\n"
          },
          "elevenlabs_api_key_configured": {
            "type": "string",
            "readOnly": true
          },
          "bland_api_key": {
            "type": "string",
            "writeOnly": true,
            "description": "\nAPI key for Bland service provider. Required when `assistant_provider=\"bland\"`. Pair with `assistant_id` (Bland persona_id) for voice, or `chat_assistant_id` (Bland pathway_id) for text-mode runs.\nExample: `\"bland_api_key_123\"`\n"
          },
          "bland_api_key_configured": {
            "type": "string",
            "readOnly": true
          },
          "bland_data": {
            "type": "string",
            "description": "\nBland additional configuration. Pass `encrypted_key` containing the Twilio credential bundle.\nExample: `{\"encrypted_key\": \"twillio_encrypted_key\"}`\n"
          },
          "livekit_api_key": {
            "type": "string",
            "writeOnly": true,
            "description": "\nAPI key for LiveKit service provider. Required together with `livekit_data.url` when `assistant_provider=\"livekit\"`.\nExample: `\"livekit_api_key_123\"`\n"
          },
          "livekit_api_key_configured": {
            "type": "string",
            "readOnly": true
          },
          "livekit_data": {
            "type": "string",
            "description": "\nLiveKit additional data (api_secret, url, and config). `url` is required alongside `livekit_api_key` when `assistant_provider=\"livekit\"`;\n`api_secret` is optional to save but needed at run time for WebRTC token minting.\nOn response, secrets are masked (the `api_secret` key is stripped and replaced with `api_secret_configured: true`).\n"
          },
          "pipecat_api_key": {
            "type": "string",
            "writeOnly": true,
            "description": "\nAPI key for Pipecat/Daily.co service provider\nExample: `\"pipecat_api_key_123\"`\n"
          },
          "pipecat_api_key_configured": {
            "type": "string",
            "readOnly": true
          },
          "pipecat_data": {
            "type": "string",
            "description": "\nPipecat/Daily.co additional data (webhook_url and config)\n"
          },
          "koreai_client_secret": {
            "type": "string",
            "writeOnly": true,
            "description": "\nClient secret key for Kore.ai service provider\nExample: `\"client_secret_key_123\"`\n"
          },
          "koreai_client_secret_configured": {
            "type": "string",
            "readOnly": true
          },
          "koreai_api_key_configured": {
            "type": "string",
            "readOnly": true
          },
          "koreai_data": {
            "type": "string",
            "description": "\nKore.ai additional data.\nFor the RTM runner: {\"api_secret\": \"<xo-webclient API key>\", \"host\": \"platform.kore.ai\"}\nFor transcript fetch: {\"client_id\": \"cs-...\", \"bot_id\": \"st-...\", \"host\": \"bots.kore.ai\"}\napi_secret is encrypted at rest automatically.\n"
          },
          "genesys_client_secret": {
            "type": "string",
            "writeOnly": true,
            "description": "\nClient secret key for Genesys Cloud service provider\n"
          },
          "genesys_client_secret_configured": {
            "type": "string",
            "readOnly": true
          },
          "genesys_data": {
            "type": "string",
            "description": "\nGenesys Cloud additional data - client_id and region\n"
          },
          "agentforce_client_secret": {
            "type": "string",
            "writeOnly": true,
            "description": "\nClient secret for Salesforce Agentforce OAuth2 authentication\nExample: `\"3EG7HHH...\"`\n"
          },
          "agentforce_client_secret_configured": {
            "type": "string",
            "readOnly": true
          },
          "agentforce_data": {
            "type": "string",
            "description": "\nAgentforce additional data - client_id, domain, and agent_id\nExample: `{\"client_id\": \"sd7a8...\", \"domain\": \"https://example.sandbox.my.salesforce.com\", \"agent_id\": \"0Xx...\"}`\n"
          },
          "sierra_agent_token": {
            "type": "string",
            "writeOnly": true,
            "description": "\nSierra Headless API agent token. Required when `assistant_provider=\"sierra\"`.\n"
          },
          "sierra_agent_token_configured": {
            "type": "string",
            "readOnly": true
          },
          "sierra_data": {
            "type": "string",
            "description": "\nSierra additional configuration. Optional keys: `host` (API host, defaults to api.sierra.chat) and `api_secret` (bearer API key, only needed when the Sierra org enforces Headless API authentication; encrypted at rest).\nExample: `{\"host\": \"api.sierra.chat\"}`\n"
          },
          "amazon_connect_security_token": {
            "type": "string",
            "writeOnly": true,
            "description": "x-amz-security-token for Amazon Connect authenticated chat widgets."
          },
          "amazon_connect_security_token_configured": {
            "type": "string",
            "readOnly": true
          },
          "amazon_connect_data": {
            "type": "string",
            "description": "Amazon Connect config: snippet_id (required), connect_host (required), region (default us-east-1)."
          },
          "custom_provider_api_key": {
            "type": "string",
            "writeOnly": true,
            "description": "\nAPI key for custom service provider\nExample: `\"custom_api_key_123\"`\n"
          },
          "custom_provider_api_key_configured": {
            "type": "string",
            "readOnly": true
          },
          "custom_provider_data": {
            "type": "string",
            "description": "\nAdditional configuration data for custom service provider\n"
          },
          "vapi_data": {
            "type": "string",
            "description": "\nVAPI additional configuration data\nExample: `{\"public_key\": \"your-vapi-public-key\", \"trigger_url\": \"https://example.com/trigger\"}`\n"
          },
          "retell_data": {
            "type": "string",
            "description": "\nRetell additional configuration data\nExample: `{\"trigger_url\": \"https://example.com/trigger\"}`\n"
          },
          "elevenlabs_data": {
            "type": "string",
            "description": "\nElevenLabs additional configuration data\nExample: `{\"trigger_url\": \"https://example.com/trigger\"}`\n"
          },
          "agora_api_key": {
            "type": "string",
            "writeOnly": true,
            "description": "\nSecret sent in the session-endpoint auth header (default `X-Cekura-Secret`) when fetching Agora join details. Write-only.\n"
          },
          "agora_data": {
            "type": "string",
            "description": "\nConfiguration for the Agora session endpoint that mints per-call join details.\nSupported keys:\n  `session_endpoint_url` (required): endpoint Cekura calls per run.\n  `client_id` (required): sent in the request body.\n  `auth_header_name` (optional): header carrying the secret (default `X-Cekura-Secret`).\n  `request_method` (optional): GET or POST (default POST).\nExample: `{\"session_endpoint_url\": \"https://your-host/cekura/v1/sessions\", \"client_id\": \"abc\"}`\n"
          },
          "synthflow_api_key": {
            "type": "string",
            "writeOnly": true,
            "description": "\nAPI key for Synthflow service provider\nExample: `\"synthflow_api_key_123\"`\n"
          },
          "synthflow_api_key_configured": {
            "type": "string",
            "readOnly": true
          },
          "synthflow_data": {
            "type": "string",
            "description": "\nSynthflow additional configuration data\nExample: `{\"synthflow_base_url_override\": \"https://api.synthflow.ai\"}`\n"
          },
          "telnyx_api_key": {
            "type": "string",
            "writeOnly": true,
            "description": "\nAPI key for Telnyx AI Assistants\nExample: `\"telnyx_api_key_123\"`\n"
          },
          "telnyx_api_key_configured": {
            "type": "string",
            "readOnly": true
          },
          "enabled_personalities": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "readOnly": true,
            "description": "\nPersonality profiles enabled for this agent\nExample: `[1, 2, 3]`\n"
          },
          "dropoff_nodes": {
            "description": "Configuration for conversation dropoff points.\nExample: `{\"timeout\": 30, \"max_retries\": 3}`"
          },
          "topic_nodes": {
            "description": "Configuration for topic classification nodes.\nExample: `{\"billing\": \"handle_billing\", \"support\": \"handle_support\"}`"
          },
          "pronunciation_words": {
            "oneOf": [
              {},
              {
                "type": "null"
              }
            ],
            "description": "List of words with phonemes for pronunciation analysis.\nExample: `[[\"hello\", \"HH AH L OW\"], [\"world\", \"W ER L D\"]]`"
          },
          "spelling_word_types": {
            "oneOf": [
              {},
              {
                "type": "null"
              }
            ],
            "description": "List of word types/categories to check for spelling analysis.\nExample: `[\"name\", \"postcode\", \"email\", \"address\"]`"
          },
          "auto_update_dropoff_nodes": {
            "type": "boolean",
            "description": "Whether to automatically update the dropoff nodes based on the agent description"
          },
          "auto_update_topic_nodes": {
            "type": "boolean",
            "description": "Whether to automatically update the topic nodes based on the agent description"
          },
          "hallucination_metric_kb_files": {
            "type": "array",
            "items": {
              "type": [
                "integer",
                "null"
              ]
            },
            "description": "Knowledge base files used for hallucination metric"
          },
          "outbound_numbers": {
            "description": "List of phone numbers authorized to place outbound calls for this agent.\nExample: `[\"+1234567890\", \"+0987654321\"]`\n\nUsed for webhook validation — when an inbound webhook arrives, the system\nchecks whether the calling number is in this list (falls back to\n`contact_number` if the list is empty). Actual call placement for test runs\nuses the scenario's configured phone number or a number allocated from the\norganisation's phone pool."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true,
            "description": "\nTimestamp when the agent was created\nExample: `\"2021-01-01T00:00:00Z\"`\n"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true,
            "description": "\nTimestamp when the agent was last updated\nExample: `\"2021-01-01T00:00:00Z\"`\n"
          },
          "auto_fetch_calls_enabled": {
            "type": "boolean",
            "default": false,
            "description": "Enable automatic fetching of calls every 30 seconds (VAPI/Retell/ElevenLabs/Bland)"
          },
          "auto_sync_prompt_enabled": {
            "type": "boolean",
            "description": "Enable one-way prompt sync from the provider to Cekura on a schedule. Cekura re-fetches the provider prompt and updates the agent description; it does not push Cekura description changes back to the provider. Supported providers: vapi, retell, elevenlabs, synthflow, telnyx, bland."
          },
          "agent_gives_first_message": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Whether the main agent (not the testing agent) will give the first message. True = agent speaks first (testing agent won't generate a first message). False = testing agent speaks first (first message will be generated). None = preference not yet set."
          },
          "webhook_url": {
            "type": "string",
            "format": "uri",
            "description": "Webhook URL for this agent. When set, overrides the project-level webhook URL for events from this agent."
          },
          "webhook_secret": {
            "type": "string",
            "writeOnly": true,
            "description": "Secret sent in X-CEKURA-SECRET header. Applies when agent webhook_url is set. Write-only — never returned in API responses. Use `webhook_secret_configured` to check whether one is set."
          },
          "webhook_secret_configured": {
            "type": "string",
            "readOnly": true
          },
          "email_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "email",
            "description": "Email address this agent receives at. When set, enables email-based test runs.",
            "maxLength": 254
          }
        }
      },
      "PatchedSlackWorkspace": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "team_name": {
            "type": "string",
            "readOnly": true
          },
          "channel_id": {
            "type": "string",
            "maxLength": 255
          },
          "organization": {
            "type": "integer",
            "readOnly": true
          },
          "is_verified": {
            "type": "boolean",
            "readOnly": true
          },
          "project": {
            "type": [
              "integer",
              "null"
            ]
          },
          "scopes": {
            "type": "string",
            "readOnly": true
          },
          "has_files_write": {
            "type": "string",
            "readOnly": true
          }
        }
      },
      "PatchedTool": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "name": {
            "type": "string",
            "description": "Name of the tool - must be less than 64 characters and contain only alphanumerics, underscores, hyphens, and spaces between words (no leading or trailing spaces)",
            "maxLength": 255
          },
          "description": {
            "type": "string",
            "description": "\nDescription of the mock tool.\nExample: \"This tool retrieves user data from the database based on user ID\"\n"
          },
          "information": {
            "description": "\nInformation of the tool - must be a list of input-output mappings.\nExample:\n```json\n[\n    {\n        \"input\": {\"user_id\": 1},\n        \"output\": {\"name\": \"John Doe\", \"age\": 30, \"email\": \"john@example.com\"}\n    },\n    {\n        \"input\": {\"user_id\": 2},\n        \"output\": {\"name\": \"Jane Smith\", \"age\": 25, \"email\": \"jane@example.com\"}\n    }\n]\n```\n"
          },
          "freetext_params": {
            "description": "Parameter names skipped during mock matching because they are free-text (e.g. [\"notes\", \"reason\"])"
          },
          "mock_url": {
            "type": "string",
            "readOnly": true,
            "description": "Per-tool webhook URL. None if this Tool is served through an MCP endpoint."
          },
          "served_via": {
            "type": "string",
            "readOnly": true,
            "description": "How this tool is accessed at runtime. `{'type': 'direct'}` for standalone tools; `{'type': 'mcp', 'mock_index': N, 'url': '.../mcp/N/', 'server_name': ...}` for MCP sub-tools."
          },
          "mcp_server": {
            "type": "string",
            "readOnly": true,
            "description": "MCP server this tool was fetched from, as `{'name', 'key'}`. Null for standalone (non-MCP) tools. Server-managed — ignored on writes."
          }
        }
      },
      "PatchedUpdateCallLog": {
        "type": "object",
        "properties": {
          "call_id": {
            "type": "string",
            "description": "Unique identifier for the call.\nExample: \n- `\"call_abc123xyz\"`\n- `\"stereo_audio_session_456\"`",
            "maxLength": 100
          },
          "transcript_type": {
            "enum": [
              "cekura",
              "vocera",
              "vapi",
              "retell",
              "deepgram",
              "pipecat",
              "livekit",
              "elevenlabs"
            ],
            "type": "string",
            "x-spec-enum-id": "c6022e3df55b8e81",
            "writeOnly": true,
            "description": "Format of the `transcript_json` payload. Tells Cekura how to parse roles and timestamps.\n\n- `vapi` — Vapi webhook format: `[{\"role\": \"bot\"|\"user\", \"message\": \"...\", \"time\": 0.0}]`\n- `retell` — Retell webhook format\n- `elevenlabs` — ElevenLabs format\n- `livekit` — LiveKit format\n- `pipecat` — Pipecat format\n- `deepgram` — Deepgram format\n- `cekura` (default) — `[{\"role\": \"Testing Agent\"|\"Main Agent\", \"content\": \"...\", \"start_time\": 0.0, \"end_time\": 2.5}]`. **Valid roles are `\"Testing Agent\"` and `\"Main Agent\"` only** — using `\"agent\"` or `\"user\"` will return a validation error.\n\nOmit this field to detect the supported format automatically.\n\n* `cekura` - cekura\n* `vocera` - vocera\n* `vapi` - vapi\n* `retell` - retell\n* `deepgram` - deepgram\n* `pipecat` - pipecat\n* `livekit` - livekit\n* `elevenlabs` - elevenlabs"
          },
          "transcript_json": {
            "description": "\nCall transcript in supported format (Vapi, Retell, Deepgram, ElevenLabs, Cekura)\n\nCheck the [Transcript Format](/documentation/advanced/transcript-format) documentation for more details.\n\nCekura Transcript Format Example:\n```json\n[\n   {\n      \"role\": \"Testing Agent\",\n      \"content\": \"Hello.\",\n      \"end_time\": 1.9399999,\n      \"start_time\": 1.4399999\n   },\n   {\n      \"role\": \"Main Agent\",\n      \"content\": \"Hello. I want to book appointment today. My name is John.\",\n      \"end_time\": 7.539999511718751,\n      \"start_time\": 3.1\n   },\n   {\n      \"role\": \"Testing Agent\",\n      \"content\": \"Well, I mean, sure. What time exactly are we talking about here\",\n      \"end_time\": 15.71,\n      \"start_time\": 12.01\n   },\n   {\n      \"role\": \"Main Agent\",\n      \"content\": \"6 PM.\",\n      \"end_time\": 18.269999,\n      \"start_time\": 17.609999\n   }\n]\n```\n"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "description": "When the call occurred.\nExample: `2024-03-15T10:15:45Z`"
          },
          "duration": {
            "type": "number",
            "format": "double",
            "minimum": 0,
            "description": "Call duration in minutes as a non-negative number. For example, use `1.5` for one minute and 30 seconds."
          },
          "call_ended_reason": {
            "type": "string",
            "description": "\nReason why the call ended\nExample:\n- `\"customer-ended-call\"`\n- `\"agent-ended-call\"`\n",
            "maxLength": 100
          },
          "customer_number": {
            "type": "string",
            "description": "\nCustomer's phone number or identifier\nExample:\n- `\"+1234567890\"`\n- `\"customer_abc123\"`\n",
            "maxLength": 100
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {},
            "description": "\nAdditional call metadata. Supplied top-level keys are merged with existing metadata; supplied keys overwrite matching keys and omitted keys are preserved.\nExample:\n```json\n{\n    \"customer_id\": \"123\",\n    \"order_id\": \"ORD-12345\",\n    \"name\": \"John Doe\"\n}\n```\n"
          },
          "dynamic_variables": {
            "type": "object",
            "additionalProperties": {},
            "description": "\nDynamic variables used to replace {{variables}} in agent description. Supplied top-level keys are merged with existing variables; supplied keys overwrite matching keys and omitted keys are preserved.\nExample:\n```json\n{\n    \"subscription_id\": \"SUB-12345\",\n    \"product_type\": \"premium\"\n}\n```\n"
          }
        }
      },
      "PatchedUserAPIKey": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "name": {
            "type": "string"
          },
          "organization_name": {
            "type": "string",
            "readOnly": true
          },
          "project": {
            "type": [
              "integer",
              "null"
            ]
          },
          "project_name": {
            "type": "string",
            "readOnly": true
          },
          "key": {
            "type": "string",
            "readOnly": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          }
        }
      },
      "PatchedUserConfiguration": {
        "type": "object",
        "description": "",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "project": {
            "type": "integer",
            "description": "The project this configuration belongs to"
          },
          "agent": {
            "type": "integer",
            "description": "The agent this configuration belongs to"
          },
          "name": {
            "type": "string",
            "description": "Name of the configuration",
            "maxLength": 255
          },
          "configuration_type": {
            "enum": [
              "undefined",
              "runs_overview"
            ],
            "type": "string",
            "x-spec-enum-id": "bf0bea22f65083a0",
            "description": "Type of configuration\n\n* `undefined` - Undefined\n* `runs_overview` - Runs Overview"
          },
          "data": {
            "description": "Configuration data stored as key-value pairs"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          }
        }
      },
      "PatchedUserMembership": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "organization": {
            "type": [
              "integer",
              "null"
            ],
            "readOnly": true
          },
          "organization_name": {
            "type": "string",
            "readOnly": true
          },
          "project": {
            "type": [
              "integer",
              "null"
            ]
          },
          "project_name": {
            "type": "string",
            "readOnly": true
          },
          "user": {
            "allOf": [
              {
                "$ref": "#/components/schemas/UserInline"
              }
            ],
            "readOnly": true
          },
          "role": {
            "enum": [
              "admin",
              "member",
              "view_only",
              "labs",
              "labs_view_only",
              "insights_view"
            ],
            "type": "string",
            "description": "* `admin` - Admin\n* `member` - Member\n* `view_only` - View Only\n* `labs` - Labs\n* `labs_view_only` - Labs View Only\n* `insights_view` - Insights View Only",
            "x-spec-enum-id": "dc933c4519c4289a"
          },
          "is_email_notify_enabled": {
            "type": "boolean"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          }
        }
      },
      "PatchedView": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "project": {
            "type": "integer"
          },
          "name": {
            "type": "string",
            "description": "Name of the view",
            "maxLength": 255
          },
          "filter_config": {
            "description": "Filter configuration with agent_ids and extensible fields"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          }
        }
      },
      "PatchedWidget": {
        "type": "object",
        "description": "Widget configuration. Key rules:\n- `line` / `pie`: set `field` only (e.g. `\"duration\"`, `\"call_ended_reason\"`). No aggregation needed.\n- `bar`: set `field` + `aggregation_function` (e.g. `\"count\"`) + `time_period` (e.g. `\"day\"`).\n- `stat`: leave `field` empty — returns total_calls, success_rate, avg_duration, p95_latency.\n- `field = \"metric_evaluations.value\"`: `metric` (integer metric ID) is **required**.\n  Get valid IDs from `GET /test_framework/v1/metrics?agent_id=<id>`.\n- `effective_filters` (read-only): merged dashboard + widget filters — useful for debugging.",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "dashboard": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Dashboard this widget belongs to"
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional name/title for the widget",
            "maxLength": 255
          },
          "filters": {
            "type": [
              "object",
              "null"
            ],
            "description": "Filter conditions to scope the data. See the [Dashboards guide](https://docs.cekura.ai/documentation/guides/dashboards#filters) for supported fields, operators, and syntax.",
            "properties": {
              "field": {
                "type": "string",
                "description": "Field name to filter on",
                "examples": [
                  "success",
                  "duration",
                  "timestamp",
                  "metadata.region",
                  "metric_evaluations.value"
                ]
              },
              "op": {
                "type": "string",
                "enum": [
                  "eq",
                  "neq",
                  "gt",
                  "gte",
                  "lt",
                  "lte",
                  "contains",
                  "startswith",
                  "endswith",
                  "in",
                  "isnull",
                  "regex"
                ],
                "description": "Comparison operator"
              },
              "value": {
                "description": "Value to compare against. Type depends on the field and operator."
              },
              "operator": {
                "type": "string",
                "enum": [
                  "and",
                  "or",
                  "same_row"
                ],
                "description": "Logical operator to combine conditions"
              },
              "conditions": {
                "type": "array",
                "description": "List of filter conditions or nested groups",
                "items": {}
              }
            },
            "examples": [
              {
                "field": "success",
                "op": "eq",
                "value": true
              },
              {
                "operator": "and",
                "conditions": [
                  {
                    "field": "timestamp",
                    "op": "gte",
                    "value": "today-7d"
                  },
                  {
                    "field": "duration",
                    "op": "gte",
                    "value": 60
                  }
                ]
              }
            ]
          },
          "effective_filters": {
            "type": "object",
            "description": "Merged filters from dashboard and widget (read-only). Can be used with the call logs API filters_v2 parameter.",
            "properties": {
              "field": {
                "type": "string",
                "description": "Field name to filter on",
                "examples": [
                  "success",
                  "duration",
                  "timestamp",
                  "metadata.region",
                  "metric_evaluations.value"
                ]
              },
              "op": {
                "type": "string",
                "enum": [
                  "eq",
                  "neq",
                  "gt",
                  "gte",
                  "lt",
                  "lte",
                  "contains",
                  "startswith",
                  "endswith",
                  "in",
                  "isnull",
                  "regex"
                ],
                "description": "Comparison operator"
              },
              "value": {
                "description": "Value to compare against. Type depends on the field and operator."
              },
              "operator": {
                "type": "string",
                "enum": [
                  "and",
                  "or",
                  "same_row"
                ],
                "description": "Logical operator to combine conditions"
              },
              "conditions": {
                "type": "array",
                "description": "List of filter conditions or nested groups",
                "items": {}
              }
            },
            "examples": [
              {
                "field": "success",
                "op": "eq",
                "value": true
              },
              {
                "operator": "and",
                "conditions": [
                  {
                    "field": "timestamp",
                    "op": "gte",
                    "value": "today-7d"
                  },
                  {
                    "field": "duration",
                    "op": "gte",
                    "value": 60
                  }
                ]
              }
            ],
            "readOnly": true
          },
          "chart_type": {
            "enum": [
              "line",
              "bar",
              "pie",
              "stat"
            ],
            "type": "string",
            "x-spec-enum-id": "458699e47c376d15",
            "description": "Type of chart to display\n\n* `line` - Line\n* `bar` - Bar\n* `pie` - Pie\n* `stat` - Stat"
          },
          "data_type": {
            "enum": [
              "numeric",
              "boolean",
              "string",
              "datetime",
              "dynamic",
              "",
              null
            ],
            "type": [
              "string",
              "null"
            ],
            "x-spec-enum-id": "553dbfa7e4c5fb6a",
            "description": "Data type of the field being plotted (optional, can be inferred)\n\n* `numeric` - Numeric\n* `boolean` - Boolean\n* `string` - String\n* `datetime` - DateTime\n* `dynamic` - Dynamic"
          },
          "field": {
            "type": "string",
            "description": "Field name to plot. See the [Dashboards guide](https://docs.cekura.ai/documentation/guides/dashboards#supported-fields) for available fields, valid chart types, and aggregation combinations.",
            "examples": [
              "duration",
              "success",
              "call_ended_reason",
              "metric_evaluations.value",
              "metadata.region"
            ],
            "default": "",
            "maxLength": 255
          },
          "metric": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Metric to use when field is 'metric_evaluations.value'"
          },
          "metric_name": {
            "type": "string",
            "readOnly": true,
            "description": "Name of the metric (if metric is set)"
          },
          "time_period": {
            "enum": [
              "hour",
              "day",
              "week",
              "month",
              "",
              null
            ],
            "type": [
              "string",
              "null"
            ],
            "x-spec-enum-id": "c3b53047d634938d",
            "description": "Time period for aggregation (for bar charts)\n\n* `hour` - Hour\n* `day` - Day\n* `week` - Week\n* `month` - Month"
          },
          "aggregation_function": {
            "enum": [
              "count",
              "sum",
              "avg",
              "min",
              "max",
              "p50",
              "p95",
              "p99",
              "",
              null
            ],
            "type": [
              "string",
              "null"
            ],
            "x-spec-enum-id": "be3fac57dbd138ef",
            "description": "Aggregation function to apply (for bar charts)\n\n* `count` - Count\n* `sum` - Sum\n* `avg` - Average\n* `min` - Minimum\n* `max` - Maximum\n* `p50` - 50th Percentile (Median)\n* `p95` - 95th Percentile\n* `p99` - 99th Percentile"
          },
          "group_by": {
            "oneOf": [
              {},
              {
                "type": "null"
              }
            ],
            "description": "Optional group-by configuration. Field group: `{\"type\": \"field\", \"field\": \"agent.id\"}`. Time bucket: `{\"type\": \"bucket\", \"interval\": 3600000}` (interval in milliseconds). Leave null or empty for no grouping."
          },
          "metadata": {
            "oneOf": [
              {},
              {
                "type": "null"
              }
            ],
            "description": "Frontend metadata (e.g., position, size, styling)"
          },
          "created_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "readOnly": true,
            "description": "When the widget was created"
          },
          "updated_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "readOnly": true,
            "description": "When the widget was last updated"
          }
        }
      },
      "PaymentHistory": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "amount": {
            "type": "string",
            "readOnly": true
          },
          "currency": {
            "type": [
              "string",
              "null"
            ],
            "description": "Currency code (e.g. USD, INR)",
            "maxLength": 10
          },
          "payment_type": {
            "enum": [
              "auto_pay",
              "one_time_payment",
              "self_serve_credits",
              "self_serve_member_seat",
              "subscription",
              "subscription_member_seat",
              null
            ],
            "type": [
              "string",
              "null"
            ],
            "x-spec-enum-id": "361bd31b044dd4ca",
            "description": "Type of payment (auto_pay or one_time_payment)\n\n* `auto_pay` - Auto Pay\n* `one_time_payment` - One-Time Payment\n* `self_serve_credits` - Self-Serve Credits\n* `self_serve_member_seat` - Self-Serve Member Seat\n* `subscription` - Subscription\n* `subscription_member_seat` - Subscription Member Seat"
          },
          "description": {
            "type": "string",
            "description": "Payment description or notes"
          },
          "stripe_payment_intent_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Stripe PaymentIntent ID for tracking. CAUTION: subscription renewal rows (written by StripeWebhookView.handle_invoice_paid) store the Stripe *invoice* id here instead of a PI id. The payment_intent.payment_failed ops alert (send_granted_before_payment_failed_alert) matches this field against PI ids and relies on renewals NOT matching — if renewals ever store real PI ids, every dunning retry on a renewal would page ops.",
            "maxLength": 255
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          }
        }
      },
      "Personality": {
        "type": "object",
        "description": "",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "forked_from": {
            "type": [
              "integer",
              "null"
            ]
          },
          "organization": {
            "type": [
              "integer",
              "null"
            ]
          },
          "name": {
            "type": "string",
            "description": "\nName of the personality\nExample: `\"Customer Service\"`\n",
            "maxLength": 255
          },
          "prompt": {
            "type": "string",
            "description": "\nPrompt of the personality\nExample: `\"You are a friendly and helpful customer service agent who is always willing to help\"`\n"
          },
          "language": {
            "enum": [
              "af",
              "ar",
              "bn",
              "bg",
              "zh",
              "cs",
              "da",
              "nl",
              "en",
              "et",
              "fi",
              "fr",
              "de",
              "el",
              "gu",
              "hi",
              "he",
              "hu",
              "id",
              "it",
              "ja",
              "kn",
              "ko",
              "ms",
              "ml",
              "mr",
              "multi",
              "no",
              "pl",
              "pa",
              "pt",
              "ro",
              "ru",
              "sk",
              "es",
              "sv",
              "th",
              "tr",
              "tl",
              "ta",
              "te",
              "uk",
              "vi"
            ],
            "type": "string",
            "x-spec-enum-id": "b822ad429c7b7fec",
            "description": "\nLanguage of the personality\n\n\n* `af` - Afrikaans\n* `ar` - Arabic\n* `bn` - Bengali\n* `bg` - Bulgarian\n* `zh` - Chinese Simplified\n* `cs` - Czech\n* `da` - Danish\n* `nl` - Dutch\n* `en` - English\n* `et` - Estonian\n* `fi` - Finnish\n* `fr` - French\n* `de` - German\n* `el` - Greek\n* `gu` - Gujarati\n* `hi` - Hindi\n* `he` - Hebrew\n* `hu` - Hungarian\n* `id` - Indonesian\n* `it` - Italian\n* `ja` - Japanese\n* `kn` - Kannada\n* `ko` - Korean\n* `ms` - Malay\n* `ml` - Malayalam\n* `mr` - Marathi\n* `multi` - Multilingual\n* `no` - Norwegian\n* `pl` - Polish\n* `pa` - Punjabi\n* `pt` - Portuguese\n* `ro` - Romanian\n* `ru` - Russian\n* `sk` - Slovak\n* `es` - Spanish\n* `sv` - Swedish\n* `th` - Thai\n* `tr` - Turkish\n* `tl` - Tagalog\n* `ta` - Tamil\n* `te` - Telugu\n* `uk` - Ukrainian\n* `vi` - Vietnamese"
          },
          "accent": {
            "type": "string",
            "description": "\nAccent of the personality\nExample: `\"American\"`\n",
            "maxLength": 255
          },
          "gender": {
            "enum": [
              "male",
              "female",
              "neutral"
            ],
            "type": "string",
            "x-spec-enum-id": "427cb1f56db21620",
            "description": "\nGender of the personality\n\n\n* `male` - Male\n* `female` - Female\n* `neutral` - Neutral"
          },
          "enabled": {
            "type": "boolean",
            "readOnly": true,
            "default": false
          },
          "call_service_provider": {
            "enum": [
              "vapi",
              "patronus"
            ],
            "type": "string",
            "x-spec-enum-id": "f442d6949d5b96ff",
            "description": "\nCall service provider\n\n\n* `vapi` - VAPI\n* `patronus` - Patronus"
          },
          "background_noise": {
            "type": "string"
          },
          "voice_model": {
            "type": "string"
          },
          "voice_id": {
            "type": "string"
          },
          "interruption_level": {
            "type": "string"
          },
          "speed": {
            "type": "string"
          },
          "generation_config": {
            "type": "string"
          },
          "network_simulation": {
            "type": "string"
          },
          "message_plan": {
            "type": "string"
          },
          "start_speaking_plan": {
            "type": "string"
          },
          "stop_speaking_plan": {
            "type": [
              "string",
              "null"
            ]
          },
          "background_sound_volume": {
            "type": [
              "string",
              "null"
            ]
          },
          "patronus_settings": {
            "oneOf": [
              {},
              {
                "type": "null"
              }
            ]
          },
          "provider_agent_id": {
            "type": "string",
            "description": "\nProvider agent ID\nExample: `\"assistant_123\"`\n",
            "maxLength": 255
          },
          "is_starred": {
            "type": "boolean",
            "description": "\nWhether the personality is starred\n"
          }
        },
        "required": [
          "background_noise",
          "name",
          "prompt",
          "voice_model"
        ]
      },
      "PhoneNumber": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "scenario_id": {
            "type": "string",
            "readOnly": true
          },
          "scenario_name": {
            "type": "string",
            "readOnly": true
          },
          "number": {
            "type": "string",
            "maxLength": 15
          },
          "phone_number_id": {
            "type": "string",
            "maxLength": 255
          },
          "call_service_provider": {
            "enum": [
              "vapi",
              "patronus"
            ],
            "type": "string",
            "x-spec-enum-id": "f442d6949d5b96ff",
            "description": "Call service provider this phone number is associated with.\nExample: `\"vapi\"` or `\"retell\"`\n\n* `vapi` - VAPI\n* `patronus` - Patronus"
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Name or identifier for this phone number",
            "maxLength": 255
          },
          "provider": {
            "enum": [
              "cekura",
              "twilio",
              "telnyx",
              "plivo",
              null
            ],
            "type": [
              "string",
              "null"
            ],
            "x-spec-enum-id": "0a9c3a00dd5354a9",
            "description": "Provider of this phone number (Cekura or Twilio)\n\n* `cekura` - Cekura\n* `twilio` - Twilio\n* `telnyx` - Telnyx\n* `plivo` - Plivo"
          },
          "sms_enabled": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Whether SMS is enabled for this phone number"
          },
          "metadata": {
            "oneOf": [
              {},
              {
                "type": "null"
              }
            ],
            "description": "Encrypted provider credentials and other metadata"
          },
          "created_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When this record was created.\nExample: `2024-03-15T10:30:45Z`"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true,
            "description": "When this record was last updated.\nExample: `2024-03-15T10:35:11Z`"
          },
          "organization": {
            "type": [
              "integer",
              "null"
            ]
          },
          "user": {
            "type": [
              "integer",
              "null"
            ]
          }
        },
        "required": [
          "number",
          "phone_number_id"
        ]
      },
      "PhoneNumberDetail": {
        "type": "object",
        "description": "",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "number": {
            "type": "string",
            "maxLength": 15
          },
          "phone_number_id": {
            "type": "string",
            "maxLength": 255
          },
          "call_service_provider": {
            "enum": [
              "vapi",
              "patronus"
            ],
            "type": "string",
            "x-spec-enum-id": "f442d6949d5b96ff",
            "description": "Call service provider this phone number is associated with.\nExample: `\"vapi\"` or `\"retell\"`\n\n* `vapi` - VAPI\n* `patronus` - Patronus"
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Name or identifier for this phone number",
            "maxLength": 255
          },
          "provider": {
            "enum": [
              "cekura",
              "twilio",
              "telnyx",
              "plivo",
              null
            ],
            "type": [
              "string",
              "null"
            ],
            "x-spec-enum-id": "0a9c3a00dd5354a9",
            "description": "Provider of this phone number (Cekura or Twilio)\n\n* `cekura` - Cekura\n* `twilio` - Twilio\n* `telnyx` - Telnyx\n* `plivo` - Plivo"
          },
          "sms_enabled": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Whether SMS is enabled for this phone number"
          },
          "created_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When this record was created.\nExample: `2024-03-15T10:30:45Z`"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true,
            "description": "When this record was last updated.\nExample: `2024-03-15T10:35:11Z`"
          },
          "organization": {
            "type": [
              "integer",
              "null"
            ]
          },
          "user": {
            "type": [
              "integer",
              "null"
            ]
          }
        },
        "required": [
          "number",
          "phone_number_id"
        ]
      },
      "PhoneNumberInbound": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "number": {
            "type": "string",
            "maxLength": 15
          },
          "phone_number_id": {
            "type": "string",
            "maxLength": 255
          }
        },
        "required": [
          "number",
          "phone_number_id"
        ]
      },
      "PipecatConfig": {
        "type": "object",
        "description": "Pipecat provider configuration.",
        "properties": {
          "pipecat_agent_name": {
            "type": "string",
            "description": "Name of the Pipecat agent. Required when tracing_enabled is false."
          },
          "config": {
            "description": "Additional agent configuration as a JSON object."
          },
          "room_properties": {
            "description": "Room properties configuration as a JSON object."
          },
          "webhook_url": {
            "type": "string",
            "description": "Webhook URL for Pipecat call events."
          },
          "tracing_enabled": {
            "type": "boolean",
            "description": "Enable Pipecat tracing (requires Cekura SDK integrated in your Pipecat agent). When true, pipecat_agent_name is not required."
          }
        },
        "title": "Pipecat"
      },
      "PredefinedMetric": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "name": {
            "type": "string",
            "description": "Name of the metric.\nExample: \n- `\"Customer Satisfaction\"`\n- `\"Response Time\"`",
            "maxLength": 255
          },
          "description": {
            "type": "string",
            "description": "Description of what the metric measures.\nExample: `\"Measures how satisfied customers are with the service provided\"`"
          },
          "code": {
            "type": "string",
            "readOnly": true,
            "description": "Unique code identifier for the metric"
          },
          "slug": {
            "type": [
              "string",
              "null"
            ],
            "description": "URL-friendly unique identifier in snake_case format",
            "maxLength": 255
          },
          "type": {
            "enum": [
              "basic",
              "custom_prompt",
              "custom_code",
              "llm_judge"
            ],
            "type": "string",
            "description": "* `basic` - Basic (Deprecated in favor of LLM Judge)\n* `custom_prompt` - Custom Prompt ( Deprecated in favor of LLM Judge)\n* `custom_code` - Custom Code\n* `llm_judge` - LLM Judge",
            "x-spec-enum-id": "b44700c0a6443b40"
          },
          "eval_type": {
            "enum": [
              "binary",
              "continuous_qualitative",
              "numeric",
              "enum"
            ],
            "type": "string",
            "description": "* `binary` - Binary\n* `continuous_qualitative` - Continuous Qualitative\n* `numeric` - Numeric\n* `enum` - Enum",
            "x-spec-enum-id": "b40eac6824409cc2"
          },
          "audio_enabled": {
            "type": "boolean",
            "readOnly": true,
            "description": "Whether this metric requires audio analysis"
          },
          "prompt": {
            "type": "string",
            "description": "Evaluation prompt for the metric"
          },
          "function_name": {
            "type": [
              "string",
              "null"
            ],
            "readOnly": true,
            "description": "Python function name for custom metric evaluation"
          },
          "enum_values": {
            "description": "List of possible enum values for enum type metrics"
          },
          "custom_code": {
            "type": "string",
            "description": "Custom evaluation code for the metric"
          },
          "simulation_enabled": {
            "type": "boolean",
            "description": "Enable this metric for simulations.\nExample: `true` or `false`"
          },
          "observability_enabled": {
            "type": "boolean",
            "description": "Enable this metric for observability.\nExample: `true` or `false`"
          },
          "configuration": {
            "description": "Custom configuration parameters for metric.\nExample: ```json\n{\n    \n}\n```\n```"
          },
          "cost": {
            "type": "string",
            "format": "decimal",
            "pattern": "^-?\\d{0,4}(?:\\.\\d{0,6})?$",
            "readOnly": true,
            "description": "Cost in credits for evaluating this metric.\nExample: `0.005000`"
          },
          "evaluation_trigger": {
            "enum": [
              "always",
              "automatic",
              "custom"
            ],
            "type": "string",
            "x-spec-enum-id": "ecd3c02e0e393ef5",
            "description": "When to trigger this metric evaluation\n\n* `always` - Always\n* `automatic` - Automatic\n* `custom` - Custom"
          },
          "evaluation_trigger_prompt": {
            "type": "string",
            "description": "Prompt to determine when to trigger metric evaluation"
          },
          "category": {
            "enum": [
              "Speech Quality",
              "Conversation Quality",
              "Accuracy",
              "Customer Experience",
              null
            ],
            "type": [
              "string",
              "null"
            ],
            "x-spec-enum-id": "27e47be2b5ffc09e",
            "readOnly": true,
            "description": "Category of the metric\n\n* `Speech Quality` - Speech Quality\n* `Conversation Quality` - Conversation Quality\n* `Accuracy` - Accuracy\n* `Customer Experience` - Customer Experience"
          },
          "sub_category": {
            "type": [
              "string",
              "null"
            ],
            "readOnly": true,
            "description": "Sub category of the metric"
          },
          "organization": {
            "type": [
              "integer",
              "null"
            ],
            "readOnly": true
          }
        },
        "required": [
          "description",
          "name"
        ]
      },
      "PredefinedMetricCopyRequest": {
        "type": "object",
        "properties": {
          "predefined_metric_ids": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "IDs of the predefined metrics to attach. Get these from the predefined metrics list."
          },
          "metric_codes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Codes of the predefined metrics to attach. Provide this or predefined_metric_ids."
          },
          "project_id": {
            "type": "integer",
            "description": "Project to attach the metrics to. Provide either project_id or agent_id, not both."
          },
          "agent_id": {
            "type": "integer",
            "description": "Agent to attach the metrics to. Provide either project_id or agent_id, not both."
          },
          "scenarios": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "Optional scenario IDs to scope the metrics to (max 1000). Omit to apply across the target."
          }
        }
      },
      "ProcessFeedbacksRequest": {
        "type": "object",
        "properties": {
          "metric_id": {
            "type": "integer",
            "description": "ID of the metric to process feedbacks for"
          },
          "metric_type": {
            "enum": [
              "basic",
              "custom_prompt",
              "custom_code",
              "llm_judge"
            ],
            "type": "string",
            "x-spec-enum-id": "b44700c0a6443b40",
            "description": "Optional metric type\n\n* `basic` - Basic (Deprecated in favor of LLM Judge)\n* `custom_prompt` - Custom Prompt ( Deprecated in favor of LLM Judge)\n* `custom_code` - Custom Code\n* `llm_judge` - LLM Judge"
          },
          "test_set_ids": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "Test set IDs whose feedback drives the optimization. If omitted, defaults to every test set already added to this metric's Lab."
          },
          "simplified_prompt": {
            "type": "string",
            "description": "Simplified prompt to use as initial prompt for optimization. If provided, the optimizer will start from this prompt instead of the metric's original description."
          },
          "skip_evaluation": {
            "type": "boolean",
            "default": false,
            "description": "If true, skip running LLM evaluations on test sets after optimization. This speeds up the process but won't show evaluation results."
          }
        },
        "required": [
          "metric_id"
        ]
      },
      "ProcessFeedbacksResponse": {
        "type": "object",
        "properties": {
          "improved_metric_description": {
            "type": "string",
            "description": "Improved metric description"
          },
          "improved_evaluation_trigger": {
            "type": "string",
            "description": "Improved evaluation trigger. Interpretation depends on improved_trigger_kind: 'always' (literal) → run on every example; Python source → trigger.py from the sandbox (when improved_trigger_kind='custom_code'); LLM-judge prompt otherwise."
          },
          "improved_trigger_kind": {
            "enum": [
              "always",
              "llm_judge",
              "custom_code"
            ],
            "type": "string",
            "x-spec-enum-id": "2210e45c3e829037",
            "default": "always",
            "description": "Tells the frontend how to interpret improved_evaluation_trigger. Set to 'custom_code' when meta-harness produced an optimized Python trigger; 'always' when no trigger gating is needed.\n\n* `always` - Always\n* `llm_judge` - LLM Judge\n* `custom_code` - Custom Code"
          },
          "trigger_type": {
            "enum": [
              "llm_judge",
              "custom_code"
            ],
            "type": "string",
            "x-spec-enum-id": "2adad4b8df61914f",
            "description": "Type of evaluation trigger (llm_judge or custom_code)\n\n* `llm_judge` - LLM Judge\n* `custom_code` - Custom Code"
          },
          "metric_description_program": {
            "description": "Advanced metric configuration"
          },
          "metric_description_variables": {
            "type": "array",
            "items": {},
            "description": "Variables used in metric description"
          },
          "evaluation_trigger_program": {
            "description": "Advanced trigger configuration"
          },
          "evaluation_trigger_variables": {
            "type": "array",
            "items": {},
            "description": "Variables used in evaluation trigger"
          },
          "review_results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReviewResult"
            },
            "description": "Evaluation results for each test set"
          },
          "custom_code": {
            "type": "string",
            "default": "",
            "description": "Optimized Python code (meta-harness output). When present, metric should switch to custom_code type."
          },
          "type": {
            "enum": [
              "basic",
              "custom_prompt",
              "custom_code",
              "llm_judge"
            ],
            "type": "string",
            "x-spec-enum-id": "b44700c0a6443b40",
            "description": "Suggested metric type after optimization (custom_code if meta-harness produced code)\n\n* `basic` - Basic (Deprecated in favor of LLM Judge)\n* `custom_prompt` - Custom Prompt ( Deprecated in favor of LLM Judge)\n* `custom_code` - Custom Code\n* `llm_judge` - LLM Judge"
          },
          "feedback_edits": {
            "type": "array",
            "items": {},
            "description": "User-answer-driven feedback corrections applied to metric reviews during optimization"
          },
          "unauthorized_label_changes": {
            "type": "array",
            "items": {},
            "description": "Expected-value changes detected in the run that lacked explicit user approval"
          },
          "unresolved_samples": {
            "type": "array",
            "items": {},
            "description": "Samples the optimizer could not resolve, each with a verdict (noise / ambiguous label / prompt limit), the observed pass rate across repeated evaluations, and a user-facing explanation of why 100% accuracy was not reachable for it."
          },
          "optimization_summary": {
            "type": "string",
            "default": "",
            "description": "Plain-language summary of what the optimized metric does, shown in the review dialog so the user can check intent without reading the code."
          },
          "old_score": {
            "description": "Baseline accuracy before optimization: {num_correct, num_total, score} over the evaluated samples. Shown next to new_score so the user can see the improvement."
          },
          "new_score": {
            "description": "Optimized accuracy after this run: {num_correct, num_total, score} over the same evaluated samples as old_score."
          }
        },
        "required": [
          "improved_evaluation_trigger",
          "improved_metric_description"
        ]
      },
      "Project": {
        "type": "object",
        "description": "",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "name": {
            "type": "string",
            "description": "\nName of the project\nExample: `\"Default Project\"`\n"
          },
          "members": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MembershipInline"
            },
            "readOnly": true
          },
          "organization": {
            "allOf": [
              {
                "$ref": "#/components/schemas/OrganizationInline"
              }
            ],
            "readOnly": true
          },
          "organization_id": {
            "type": "integer",
            "writeOnly": true,
            "description": "ID of the organization to create the project under. Required when authenticating as a user (you must be an admin of that organization); omit it when using an organization-scoped API key, where the organization is inferred from the key."
          },
          "outbound_timeout": {
            "type": "integer",
            "description": "\nOutbound timeout in seconds\nExample: `300`\n"
          },
          "max_call_duration": {
            "type": "integer",
            "description": "\nMax call duration in seconds\nExample: `300`\n"
          },
          "min_call_duration": {
            "type": "integer",
            "description": "\nMin call duration in seconds\nExample: `30`\n"
          },
          "sample_rate": {
            "type": "number",
            "format": "double",
            "description": "\nMetric sampling rate (0.0 to 1.0). Default is 1.0 (100% of calls).\nExample: `0.5` (50%), `0.1` (10%), `0.001` (0.1%)\n"
          },
          "max_messages_chat_runs_limit": {
            "type": "integer",
            "description": "\nMax messages chat runs limit\nExample: `100`\n"
          },
          "webhook_url": {
            "type": "string",
            "format": "uri",
            "description": "\nWebhook URL\nExample: `\"https://yourdomain.com/webhook\"`\n"
          },
          "webhook_secret": {
            "type": "string",
            "writeOnly": true,
            "description": "\nWebhook secret. Sent in `X-CEKURA-SECRET` header when invoking `webhook_url`.\nWrite-only — never returned in API responses. Use `webhook_secret_configured`\nto check whether one is set.\nExample: `\"your-webhook-secret\"`\n"
          },
          "webhook_secret_configured": {
            "type": "string",
            "readOnly": true
          },
          "evaluate_relevant_metrics_enabled": {
            "type": "boolean",
            "description": "\nEvaluate relevant metrics enabled\nExample: `true` or `false`\n"
          },
          "end_call_enabled": {
            "type": "boolean",
            "description": "\nEnd call enabled\nExample: `true` or `false`\n"
          },
          "generate_scenario_auto_assign_numbers_enabled": {
            "type": "boolean",
            "description": "\nGenerate scenario auto assign numbers enabled\nExample: `true` or `false`\n"
          },
          "enable_client_side_testing": {
            "type": "boolean",
            "description": "\nEnable client side testing\nExample: `true` or `false`\n"
          },
          "use_provider_transcript": {
            "type": "boolean",
            "description": "When true, evaluations use the provider transcript instead of Cekura transcript with provider side tool calls. Defaults to false."
          },
          "should_show_powered_by": {
            "type": "boolean",
            "description": "\nShould show powered by\nExample: `true` or `false`\n"
          },
          "notify_results_completion": {
            "type": "boolean",
            "description": "\nNotify on result completion\nExample: `true` or `false`\n"
          },
          "notify_daily_report": {
            "type": "boolean",
            "description": "\nNotify daily report\nExample: `true` or `false`\n"
          },
          "notify_daily_report_no_calls": {
            "type": "boolean",
            "description": "\nNotify daily report even if there are no calls\nExample: `true` or `false`\n"
          },
          "daily_report_ai_summary_enabled": {
            "type": "boolean",
            "description": "\nReplace the default daily report data dump with an AI-narrated Top Issues\nsection in Slack and email. Off by default. When on, Slack also exposes a\n\"Show more\" button that opens a modal with the legacy detail sections.\nExample: `true` or `false`\n"
          },
          "notify_cron_failure": {
            "type": "boolean",
            "description": "\nNotify cron failure\nExample: `true` or `false`\n"
          },
          "notify_cron_success": {
            "type": "boolean",
            "description": "\nNotify cron success\nExample: `true` or `false`\n"
          },
          "notify_no_calls": {
            "type": "boolean",
            "description": "\nNotify no calls\nExample: `true` or `false`\n"
          },
          "no_calls_notify_time_period": {
            "description": "\nConfiguration for no calls notification time periods, timeframes, exception numbers, and agents to exclude\nExample:\n```json\n{\n    \"time_zone\": \"America/New_York\",\n    \"time_periods\": [\n        {\n            \"start_time\": \"09:00\",\n            \"end_time\": \"17:00\",\n            \"time_frame\": 30\n        },\n        {\n            \"start_time\": \"18:00\",\n            \"end_time\": \"23:59\",\n            \"time_frame\": 60\n        }\n    ],\n    \"exception_numbers\": [\"+15551234567\", \"+14155552671\"],\n    \"agents\": [1, 10, 90]\n}\n```\nNote:\n- Calls with customer_number in exception_numbers list will be ignored when checking for no calls alert.\n- If agents list is provided and not empty, those specific agents will be excluded from monitoring. All other agents in the project will be monitored. If omitted or empty, all agents in the project will be monitored.\n"
          },
          "notify_daily_report_webhook": {
            "type": "boolean",
            "description": "\nNotify daily report webhook\nExample: `true` or `false`\n"
          },
          "notify_pre_run_webhook": {
            "type": "boolean",
            "description": "\nSend a webhook at the start of a run (before calls dispatch) to configure the external test sandbox\nExample: `true` or `false`\n"
          },
          "daily_report_dashboard_ids": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "\nDashboard IDs to include as visual snapshots in the daily report\nExample: `[1, 2, 3]`\n"
          },
          "notify_result_webhook_failed": {
            "type": "boolean",
            "description": "\nNotify result webhook failed\nExample: `true` or `false`\n"
          },
          "notify_result_webhook_success": {
            "type": "boolean",
            "description": "\nNotify result webhook success\nExample: `true` or `false`\n"
          },
          "notify_result_webhook_error": {
            "type": "boolean",
            "description": "\nNotify result webhook for error runs (runs with error_message)\nExample: `true` or `false`\n"
          },
          "notify_cronjob_webhook_failed": {
            "type": "boolean",
            "description": "\nNotify cronjob webhook failed\nExample: `true` or `false`\n"
          },
          "notify_cronjob_webhook_success": {
            "type": "boolean",
            "description": "\nNotify cronjob webhook success\nExample: `true` or `false`\n"
          },
          "notify_cronjob_webhook_error": {
            "type": "boolean",
            "description": "\nNotify cronjob webhook for error runs (runs with error_message)\nExample: `true` or `false`\n"
          },
          "notify_call_log_webhook_failed": {
            "type": "boolean",
            "description": "\nNotify call log webhook failed\nExample: `true` or `false`\n"
          },
          "notify_call_log_webhook_success": {
            "type": "boolean",
            "description": "\nNotify call log webhook success\nExample: `true` or `false`\n"
          },
          "notify_frequent_calls_for_number": {
            "type": "boolean"
          },
          "frequent_calls_threshold": {
            "type": "integer",
            "maximum": 2147483647,
            "minimum": -2147483648
          },
          "frequent_calls_time_period": {
            "type": "integer",
            "maximum": 2147483647,
            "minimum": -2147483648
          },
          "frequent_calls_cooldown": {
            "type": "integer",
            "maximum": 2147483647,
            "minimum": -2147483648
          },
          "forward_vapi_webhook": {
            "type": "boolean",
            "description": "\nForward vapi webhook\nExample: `true` or `false`\n"
          },
          "forward_retell_webhook": {
            "type": "boolean",
            "description": "\nForward retell webhook\nExample: `true` or `false`\n"
          },
          "is_send_emails_enabled": {
            "type": "boolean",
            "description": "\nIs send emails enabled\nExample: `true` or `false`\n"
          },
          "rubric_config": {
            "description": "\nProject-level scoring rubric for evaluating call success. Each call log produced under this project is run against the rubric and gets a single pass/fail outcome based on its metric results.\n\nIMPORTANT (read before writing):\n- NEVER blindly overwrite this field. Always first GET the project, read the existing `rubric_config`, then merge in only the rule(s) you intend to add/update, and PATCH the full merged value. Sending a partial value will silently delete every rule you did not include.\n\nStructure:\n- `evaluation_logic`: MUST be `\"and\"`. All rules have to pass for a call to be marked successful. (Other values are not supported by the product currently.)\n- `rules`: List of rules. Use one rule per (metric, condition) — keep each rule simple, with a single condition inside.\n\nEach rule shape:\n```json\n{\n    \"metric_id\": <metric id>,\n    \"conditions\": {\n        \"operator\": \"and\",\n        \"conditions\": [\n            {\"field\": <field>, \"op\": <op>, \"value\": <value>}\n        ]\n    }\n}\n```\n\nWhat `field`, `op`, and `value` to use depends on the metric type. The three supported cases:\n\n1. Numeric / score metrics (qualitative scores, numeric metrics, workflow adherence with a score, etc.):\n   - `field`: `\"score\"`\n   - `op`: one of `\"gt\"`, `\"gte\"`, `\"lt\"`, `\"lte\"`, `\"eq\"`\n   - `value`: a number (qualitative scores are on a 0–5 scale)\n   - Example (score must be at least 4): `{\"field\": \"score\", \"op\": \"gte\", \"value\": 4}`\n\n2. Boolean / binary metrics (eval_type `binary`, or `evaluate_expected_outcome`):\n   - `field`: `\"score\"`\n   - `op`: `\"eq\"` or `\"neq\"`\n   - `value`: `true` for pass, `false` for fail\n   - Example (must pass): `{\"field\": \"score\", \"op\": \"eq\", \"value\": true}`\n   - Example (must fail): `{\"field\": \"score\", \"op\": \"eq\", \"value\": false}`\n   - Legacy values `5` (pass) and `0` (fail) are still accepted for back-compat but new rules should use bool.\n\n3. Enum metrics (eval_type `enum`, or `observability_topics` / `observability_dropoff`):\n   - `field`: `\"enum\"`\n   - `op`: `\"eq\"`, `\"neq\"`, or `\"in\"`\n   - `value`: a single string for `eq`/`neq`, or a list of strings for `in`. Must match one of the metric's defined `enum_values`.\n   - Example: `{\"field\": \"enum\", \"op\": \"eq\", \"value\": \"resolved\"}`\n   - Example (any of): `{\"field\": \"enum\", \"op\": \"in\", \"value\": [\"resolved\", \"partially_resolved\"]}`\n\nFull example:\n```json\n{\n    \"evaluation_logic\": \"and\",\n    \"rules\": [\n        {\n            \"metric_id\": 115164,\n            \"conditions\": {\n                \"operator\": \"and\",\n                \"conditions\": [\n                    {\"op\": \"eq\", \"field\": \"score\", \"value\": true}\n                ]\n            }\n        },\n        {\n            \"metric_id\": 5512,\n            \"conditions\": {\n                \"operator\": \"and\",\n                \"conditions\": [\n                    {\"op\": \"gte\", \"field\": \"score\", \"value\": 4}\n                ]\n            }\n        },\n        {\n            \"metric_id\": 8821,\n            \"conditions\": {\n                \"operator\": \"and\",\n                \"conditions\": [\n                    {\"op\": \"in\", \"field\": \"enum\", \"value\": [\"resolved\", \"partially_resolved\"]}\n                ]\n            }\n        }\n    ]\n}\n```\n\nNotes:\n- `metric_id` must reference a metric belonging to this project (project-scoped or agent-scoped under this project); unknown ids are rejected.\n- Rules whose metric did not produce a value on a given call are skipped (neither pass nor fail) and do not affect the outcome.\n- Pass an empty object `{}` to clear the rubric.\n"
          },
          "timezone": {
            "type": "string",
            "description": "\nProject Timezone\n"
          },
          "vapi_api_key": {
            "type": "string",
            "writeOnly": true,
            "description": "\nVAPI Private API Key. Used for all VAPI operations (calls, chat, and testing).\nExample: `\"vapi_api_key_123\"`\n"
          },
          "vapi_api_key_configured": {
            "type": "string",
            "readOnly": true
          },
          "vapi_public_key_configured": {
            "type": "string",
            "readOnly": true
          },
          "retell_api_key": {
            "type": "string",
            "writeOnly": true,
            "description": "\nRetell API key\nExample: `\"retell_api_key_123\"`\n"
          },
          "retell_api_key_configured": {
            "type": "string",
            "readOnly": true
          },
          "syntflow_api_key": {
            "type": "string",
            "writeOnly": true,
            "description": "\nSyntflow API key\nExample: `\"syntflow_api_key_123\"`\n"
          },
          "syntflow_api_key_configured": {
            "type": "string",
            "readOnly": true
          },
          "elevenlabs_api_key": {
            "type": "string",
            "writeOnly": true,
            "description": "\nElevenLabs API key\nExample: `\"elevenlabs_api_key_123\"`\n"
          },
          "elevenlabs_api_key_configured": {
            "type": "string",
            "readOnly": true
          },
          "livekit_api_key": {
            "type": "string",
            "writeOnly": true,
            "description": "\nLiveKit API key\nExample: `\"livekit_api_key_123\"`\n"
          },
          "livekit_api_key_configured": {
            "type": "string",
            "readOnly": true
          },
          "pipecat_api_key": {
            "type": "string",
            "writeOnly": true,
            "description": "\nPipecat/Daily.co API key\nExample: `\"pipecat_api_key_123\"`\n"
          },
          "pipecat_api_key_configured": {
            "type": "string",
            "readOnly": true
          },
          "is_deleted": {
            "type": "boolean"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          }
        },
        "required": [
          "name"
        ]
      },
      "ProjectInline": {
        "type": "object",
        "description": "",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "name": {
            "type": "string",
            "maxLength": 255
          },
          "members": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MembershipInline"
            },
            "readOnly": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          }
        },
        "required": [
          "name"
        ]
      },
      "ProviderCredentialDetail": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "organization": {
            "type": [
              "integer",
              "null"
            ]
          },
          "project": {
            "type": [
              "integer",
              "null"
            ]
          },
          "provider": {
            "enum": [
              "vapi",
              "retell",
              "synthflow",
              "elevenlabs",
              "bland",
              "livekit",
              "pipecat",
              "koreai",
              "custom",
              "agentforce",
              "genesys",
              "amazon_connect",
              "agora",
              "telnyx",
              "sierra"
            ],
            "type": "string",
            "description": "* `vapi` - Vapi\n* `retell` - Retell\n* `synthflow` - Synthflow\n* `elevenlabs` - Elevenlabs\n* `bland` - Bland\n* `livekit` - Livekit\n* `pipecat` - Pipecat\n* `koreai` - Kore\n* `custom` - Custom\n* `agentforce` - Agentforce\n* `genesys` - Genesys\n* `amazon_connect` - Amazon Connect\n* `agora` - Agora\n* `telnyx` - Telnyx\n* `sierra` - Sierra",
            "x-spec-enum-id": "1cdb82cad8aba1ad"
          },
          "key": {
            "type": "string",
            "maxLength": 255
          },
          "data": {},
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          }
        },
        "required": [
          "key"
        ]
      },
      "ProviderCredentialList": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "organization": {
            "type": [
              "integer",
              "null"
            ]
          },
          "project": {
            "type": [
              "integer",
              "null"
            ]
          },
          "provider": {
            "enum": [
              "vapi",
              "retell",
              "synthflow",
              "elevenlabs",
              "bland",
              "livekit",
              "pipecat",
              "koreai",
              "custom",
              "agentforce",
              "genesys",
              "amazon_connect",
              "agora",
              "telnyx",
              "sierra"
            ],
            "type": "string",
            "description": "* `vapi` - Vapi\n* `retell` - Retell\n* `synthflow` - Synthflow\n* `elevenlabs` - Elevenlabs\n* `bland` - Bland\n* `livekit` - Livekit\n* `pipecat` - Pipecat\n* `koreai` - Kore\n* `custom` - Custom\n* `agentforce` - Agentforce\n* `genesys` - Genesys\n* `amazon_connect` - Amazon Connect\n* `agora` - Agora\n* `telnyx` - Telnyx\n* `sierra` - Sierra",
            "x-spec-enum-id": "1cdb82cad8aba1ad"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          }
        }
      },
      "ProviderCredentialsConfig": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/VapiConfig"
          },
          {
            "$ref": "#/components/schemas/RetellConfig"
          },
          {
            "$ref": "#/components/schemas/ElevenLabsConfig"
          },
          {
            "$ref": "#/components/schemas/BlandConfig"
          },
          {
            "$ref": "#/components/schemas/LiveKitConfig"
          },
          {
            "$ref": "#/components/schemas/SynthflowConfig"
          },
          {
            "$ref": "#/components/schemas/KoreAiConfig"
          },
          {
            "$ref": "#/components/schemas/GenesysConfig"
          },
          {
            "$ref": "#/components/schemas/PipecatConfig"
          },
          {
            "$ref": "#/components/schemas/SelfHostedConfig"
          },
          {
            "$ref": "#/components/schemas/AmazonConnectConfig"
          }
        ]
      },
      "RenameFolderRequest": {
        "type": "object",
        "properties": {
          "path": {
            "type": "string",
            "description": "Current folder path. Example: \"Sales.Inbound\""
          },
          "project_id": {
            "type": "integer",
            "description": "Project ID the folder belongs to"
          },
          "name": {
            "type": "string",
            "description": "New name for the folder"
          }
        },
        "required": [
          "name",
          "path",
          "project_id"
        ]
      },
      "RerunEvaluation": {
        "type": "object",
        "properties": {
          "agent_id": {
            "type": "integer",
            "description": "Cekura agent ID. Provide this or `assistant_id`, not both. Example: `2142`"
          },
          "assistant_id": {
            "type": "integer",
            "description": "External assistant identifier. Provide this or `agent_id`, not both. Example: `2143`"
          },
          "call_logs": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "List of call log IDs to re-evaluate, or the string `\"all\"` for all call logs. Example: `[1, 2, 3]`"
          }
        },
        "required": [
          "agent_id",
          "assistant_id",
          "call_logs"
        ]
      },
      "Result": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true,
            "description": "\nUnique identifier for the Result\nExample: `123`\n"
          },
          "name": {
            "type": "string",
            "description": "\nName of the Result\nExample: `\"Test Result 1\"`\n",
            "maxLength": 255
          },
          "agent": {
            "type": "integer",
            "readOnly": true,
            "description": "\nID of the AI agent that was tested\nExample: `123`\n"
          },
          "agent_name": {
            "type": "string",
            "readOnly": true,
            "description": "\nName of the AI agent that was tested\nExample: `\"Test Agent 1\"`\n"
          },
          "agent_inbound": {
            "type": "boolean",
            "readOnly": true,
            "description": "\nWhether the agent is configured for inbound calls (true) or outbound calls (false)\nExample: `true` or `false`\n"
          },
          "status": {
            "enum": [
              "running",
              "completed",
              "failed",
              "pending",
              "in_progress",
              "evaluating",
              "in_queue",
              "timeout",
              "cancelled",
              "scaling_up"
            ],
            "type": "string",
            "x-spec-enum-id": "623e22fc1eb17833",
            "default": "pending",
            "description": "\nCurrent status of the result\n\n\n* `running` - Running\n* `completed` - Completed\n* `failed` - Failed\n* `pending` - Pending\n* `in_progress` - In Progress\n* `evaluating` - Evaluating\n* `in_queue` - In Queue\n* `timeout` - Timeout\n* `cancelled` - Cancelled\n* `scaling_up` - Scaling Up"
          },
          "success_rate": {
            "type": "number",
            "format": "double",
            "default": 0,
            "description": "Success rate of the test runs as a decimal (0.0 to 1.0)"
          },
          "run_as_text": {
            "type": "boolean",
            "default": false,
            "description": "\nWhether this test was run in text mode instead of voice mode\nExample: `true` or `false`\n"
          },
          "is_cronjob": {
            "type": "string",
            "readOnly": true,
            "description": "\nWhether this result was created by a scheduled cronjob\nExample: `true` or `false`\n"
          },
          "runs": {
            "type": "object",
            "additionalProperties": {},
            "description": "Run summaries for this result. For full run data including transcripts and metric scores, fetch the result detail endpoint — there `runs` is a dict keyed by run ID.",
            "readOnly": true
          },
          "met_expected_outcome_count": {
            "type": "string",
            "readOnly": true,
            "description": "\nNumber of test runs that met the expected outcome criteria\nExample: `10`\n"
          },
          "total_expected_outcome_count": {
            "type": "string",
            "readOnly": true,
            "description": "\nTotal number of test runs that were evaluated for expected outcomes\nExample: `10`\n"
          },
          "total_runs_count": {
            "type": "string",
            "readOnly": true,
            "description": "\nTotal number of test runs associated with this result\nExample: `10`\n"
          },
          "completed_runs_count": {
            "type": "string",
            "readOnly": true,
            "description": "\nNumber of test runs that have completed successfully\nExample: `10`\n"
          },
          "success_runs_count": {
            "type": "string",
            "readOnly": true,
            "description": "\nNumber of test runs that were marked as successful\nExample: `10`\n"
          },
          "failed_runs_count": {
            "type": "string",
            "readOnly": true,
            "description": "\nNumber of test runs that failed or encountered errors\nExample: `10`\n"
          },
          "scenarios": {
            "type": "object",
            "additionalProperties": {},
            "description": "\nList of scenario names used in the test runs for this result\nExample:\n```json\n[\n    {\n        \"id\": 123,\n        \"name\": \"Scenario 1\"\n    },\n    {\n        \"id\": 456,\n        \"name\": \"Scenario 2\"\n    }\n]\n```\n",
            "readOnly": true
          },
          "run_type": {
            "type": [
              "string",
              "null"
            ],
            "readOnly": true,
            "description": "Run Execution Type"
          },
          "agent_version": {
            "type": "string",
            "readOnly": true,
            "description": "The agent version (history record) this result ran against, or null."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true,
            "description": "\nTimestamp when this test result was created\nExample: `2021-01-01 00:00:00`\n"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true,
            "description": "Timestamp when this test result was last updated"
          }
        },
        "required": [
          "name"
        ]
      },
      "ResultDetailV2": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "name": {
            "type": "string",
            "description": "\nName of the result\nExample: `\"Test Result 1\"`\n",
            "maxLength": 255
          },
          "agent": {
            "type": "integer"
          },
          "agent_name": {
            "type": "string",
            "readOnly": true,
            "description": "Name of the agent associated with this result"
          },
          "agent_version": {
            "type": "string",
            "readOnly": true,
            "description": "The agent version (history record) this result ran against, or null."
          },
          "status": {
            "enum": [
              "running",
              "completed",
              "failed",
              "pending",
              "in_progress",
              "evaluating",
              "in_queue",
              "timeout",
              "cancelled",
              "scaling_up"
            ],
            "type": "string",
            "x-spec-enum-id": "623e22fc1eb17833",
            "readOnly": true,
            "description": "\nCurrent status of the result\n\n\n* `running` - Running\n* `completed` - Completed\n* `failed` - Failed\n* `pending` - Pending\n* `in_progress` - In Progress\n* `evaluating` - Evaluating\n* `in_queue` - In Queue\n* `timeout` - Timeout\n* `cancelled` - Cancelled\n* `scaling_up` - Scaling Up"
          },
          "met_expected_outcome_count": {
            "type": "string",
            "readOnly": true,
            "description": "Number of runs that fully met their expected outcomes with a score of 100"
          },
          "total_expected_outcome_count": {
            "type": "string",
            "readOnly": true,
            "description": "Total number of runs that had expected outcomes defined"
          },
          "success_rate": {
            "type": "number",
            "format": "double",
            "readOnly": true,
            "description": "\nSuccess rate of the test runs\n"
          },
          "run_as_text": {
            "type": "boolean",
            "readOnly": true,
            "description": "\nWhether this test was run in text mode instead of voice mode\nExample: `true` or `false`\n"
          },
          "is_cronjob": {
            "type": "string",
            "readOnly": true,
            "description": "Whether this result was created by a scheduled cronjob"
          },
          "runs": {
            "type": "object",
            "additionalProperties": {},
            "description": "Run objects keyed by run ID string (e.g. {\"12345\": {...}}). The list endpoint returns `runs` as an array of summaries instead.",
            "readOnly": true
          },
          "overall_evaluation": {
            "oneOf": [
              {},
              {
                "type": "null"
              }
            ],
            "readOnly": true,
            "description": "\nOverall evaluation of the test runs\nExample:\n```json\n{\n    \"success_rate\": \"number\",\n    \"metric_summary\": {\n      \"metric_id\": {\n        \"id\": \"integer\",\n        \"name\": \"string\",\n        \"type\": \"string\",\n        \"score\": \"number\",\n        \"explanation\": \"string (optional)\",\n        \"function_name\": \"string\",\n        \"vocera_defined_metric_code\": \"string (optional)\",\n        \"p50\": \"number (for numeric metrics)\"\n      }\n    },\n    \"worst_performing_metrics\": {\n      \"binary_adherence\": [\n        \"array of metric_ids\"\n      ]\n    },\n    \"numeric_metrics\": [\n      {\n        \"name\": \"string\",\n        \"type\": \"numeric\",\n        \"value\": \"number\",\n        \"percentiles\": {\n          \"p50\": \"number\"\n        }\n      }\n    ],\n    \"enum_metrics\": [\n      \"array of metric_ids\"\n    ],\n    \"extra_metrics\": [\n      {\n        \"name\": \"string (e.g., 'Expected Outcome', 'Average Ringing Duration')\",\n        \"type\": \"string\",\n        \"value\": \"number\",\n        \"percentiles\": {\n          \"p50\": \"number (optional)\"\n        }\n      }\n    ]\n}\n"
          },
          "total_duration": {
            "type": "string",
            "readOnly": true,
            "description": "\nTotal duration of the test runs for this result\nExample: `22:30`\n"
          },
          "total_runs_count": {
            "type": "string",
            "readOnly": true,
            "description": "\nTotal number of test runs associated with this result\nExample: `10`\n"
          },
          "completed_runs_count": {
            "type": "string",
            "readOnly": true,
            "description": "\nNumber of test runs that have completed successfully\nExample: `10`\n"
          },
          "success_runs_count": {
            "type": "string",
            "readOnly": true,
            "description": "\nNumber of test runs that were marked as successful\nExample: `10`\n"
          },
          "failed_runs_count": {
            "type": "string",
            "readOnly": true,
            "description": "\nNumber of test runs that failed or encountered errors\nExample: `10`\n"
          },
          "connected_runs": {
            "type": "string",
            "readOnly": true,
            "description": "List of run IDs that got connected successfully (have transcript data). Returns empty list if no connected runs."
          },
          "not_connected_runs": {
            "type": "string",
            "readOnly": true,
            "description": "List of run IDs that never connected (no transcript data). Returns empty list if every run connected."
          },
          "failed_infrastructure_runs": {
            "type": "string",
            "readOnly": true,
            "description": "List of run IDs that failed infrastructure issues metric (score=0). Returns null if metric not found, empty list if metric exists but no failures."
          },
          "failed_workflow_runs": {
            "type": "string",
            "readOnly": true,
            "description": "List of run IDs that failed expected outcome metric (score=0). Returns null if metric not found, empty list if metric exists but no failures."
          },
          "successful_calls": {
            "type": "string",
            "readOnly": true,
            "description": "List of run IDs that completed successfully. Returns empty list if no successful runs."
          },
          "scenarios": {
            "type": "string",
            "readOnly": true,
            "description": "\nList of scenario names used in the test runs for this result\nExample: ```\n```json\n[\n    {\n        \"id\": 123,\n        \"name\": \"Scenario 1\"\n    },\n    {\n        \"id\": 456,\n        \"name\": \"Scenario 2\"\n    }\n]\n```\n"
          },
          "critical_categories": {
            "type": "string",
            "readOnly": true,
            "description": "\nList of critical categories for this result\nExample:\n```json\n[\n    {\n      \"id\": 2950,\n      \"name\": \"Pronunciation Analysis\",\n      \"eval_type\": \"continuous_qualitative\",\n      \"simulation_enabled\": true,\n      \"observability_enabled\": true\n    },\n    {\n      \"id\": 3284,\n      \"name\": \"Latency\",\n      \"eval_type\": \"numeric\",\n      \"simulation_enabled\": true,\n      \"observability_enabled\": false\n    },\n    {\n      \"id\": 3295,\n      \"name\": \"Detect Silence in Conversation\",\n      \"eval_type\": \"binary\",\n      \"simulation_enabled\": true,\n      \"observability_enabled\": true\n    }\n  ]\n```\n"
          },
          "metrics": {
            "type": "string",
            "readOnly": true
          },
          "runs_by_tags": {
            "type": "string",
            "readOnly": true
          },
          "latency_data": {
            "type": "string",
            "readOnly": true
          },
          "failed_reasons": {
            "oneOf": [
              {},
              {
                "type": "null"
              }
            ],
            "readOnly": true,
            "description": "\nFailed reasons of the test runs\nExample:\n```json\n{\n    \"issues\": [\n      {\n        \"rank\": 1,\n        \"run_ids\": [\n          34588\n        ],\n        \"description\": \"The agent did not provide the standard greeting, emergency disclaimer, or ask how they could help.\",\n        \"affected_count\": 1\n      },\n      {\n        \"rank\": 2,\n        \"run_ids\": [\n          34588\n        ],\n        \"description\": \"The agent did not explain the distinction between the primary care and express clinics.\",\n        \"affected_count\": 1\n      }\n    ],\n    \"total_failed_runs\": 1\n  }\n```\n"
          },
          "ai_summary": {
            "oneOf": [
              {},
              {
                "type": "null"
              }
            ],
            "readOnly": true,
            "description": "\nLLM-generated narrative summary of the result, structured for the Results-page UI.\nExample:\n```json\n{\n    \"what_happened\": \"8 of 10 runs failed, 2 passed. All 8 failures cluster into 3 distinct causes.\",\n    \"why_it_happened\": \"The default test profile isn't seeded in the production backend, so every auth-required workflow exits before PIN/address steps run.\",\n    \"how_to_fix\": \"Seed the test profile in production, tighten the competitor-mention guardrail, and add CA-only store phrasing to the FAQ flow.\",\n    \"generated_from_runs_count\": 10,\n    \"generated_at\": \"2026-05-25T12:00:00Z\"\n}\n```\n"
          },
          "ai_summary_status": {
            "type": "string",
            "readOnly": true,
            "description": "Generation state of the async AI summary, derived so the UI can show a reliable state instead of guessing from an empty `ai_summary`. `completed` = summary populated; `skipped_no_failures` = no failed runs, nothing to summarize; `pending` = there are failed runs but the summary isn't ready yet (still generating)."
          },
          "next_steps": {
            "oneOf": [
              {},
              {
                "type": "null"
              }
            ],
            "readOnly": true,
            "description": "\nLLM-suggested next steps to fix the issues found in this result, ordered by impact.\nExample:\n```json\n[\n    {\"title\": \"Seed test profile in production\", \"description\": \"Unblocks 6 runs; ~5 min.\"},\n    {\"title\": \"Tighten competitor guardrail\", \"description\": \"1 prompt edit; review drift run.\"}\n]\n```\n"
          },
          "path_coverage": {
            "oneOf": [
              {},
              {
                "type": "null"
              }
            ],
            "readOnly": true,
            "description": "\nWorkflow-coverage summary for this result: which of the agent's critical paths the\nruns exercised, and which they missed.\nExample:\n```json\n{\n    \"coverage_pct\": 66.7,\n    \"total_paths\": 3,\n    \"covered_paths\": [\"Book appointment\", \"Reschedule appointment\"],\n    \"uncovered_paths\": [\"Cancel appointment\"],\n    \"generated_at\": \"2026-07-14T12:00:00Z\"\n}\n```\n"
          },
          "performance_metrics": {
            "type": "string",
            "readOnly": true,
            "description": "Per-rubric-rule performance breakdown. One entry per rule in the project's rubric_config: metric name, aggregated value across the result's runs, and whether that aggregate meets the rule's conditions."
          },
          "run_type": {
            "type": [
              "string",
              "null"
            ],
            "readOnly": true,
            "description": "Run Execution Type"
          },
          "run_settings": {
            "oneOf": [
              {},
              {
                "type": "null"
              }
            ],
            "description": "Snapshot of the override-relevant request payload (personality_ids, frequency, concurrency_limit, connection-specific overrides, etc.)."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "\nTimestamp when this test result was created\nExample: `2021-01-01 00:00:00`\n"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true,
            "description": "\nTimestamp when this test result was last updated\nExample: `2021-01-01 00:00:00`\n"
          }
        },
        "required": [
          "agent"
        ]
      },
      "RetellChatConfig": {
        "type": "object",
        "description": "Retell chat configuration.",
        "properties": {
          "agent_id": {
            "type": "string",
            "description": "The Retell agent ID to use for text-mode test runs."
          }
        },
        "required": [
          "agent_id"
        ],
        "title": "Retell"
      },
      "RetellConfig": {
        "type": "object",
        "description": "Retell provider configuration.",
        "properties": {
          "trigger_url": {
            "type": "string",
            "description": "URL Cekura calls to create outbound Retell phone calls."
          },
          "trigger_secret": {
            "type": "string",
            "writeOnly": true,
            "description": "Optional shared secret sent as the X-CEKURA-SECRET header on trigger URL requests, so your endpoint can reject calls it didn't expect. Write-only — responses expose trigger_secret_configured instead."
          },
          "livekit_server_url": {
            "type": "string",
            "description": "Override the default Retell LiveKit server URL, e.g. wss://retell-ai-4ihahnq7.livekit.cloud. Only change if you need a specific Retell region."
          }
        },
        "title": "Retell"
      },
      "ReviewResult": {
        "type": "object",
        "properties": {
          "review_id": {
            "type": "integer"
          },
          "test_set_id": {
            "type": "integer"
          },
          "actual_value": {
            "oneOf": [
              {},
              {
                "type": "null"
              }
            ]
          },
          "explanation": {
            "oneOf": [
              {},
              {
                "type": "null"
              }
            ]
          },
          "success": {
            "type": "boolean"
          },
          "error": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "review_id",
          "success",
          "test_set_id"
        ]
      },
      "Run": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "provider_call_id": {
            "type": "string",
            "readOnly": true,
            "description": "\nCall ID from the Assistant provider\nExample: `call_abc123`\n"
          },
          "trace_id": {
            "type": "string",
            "description": "OpenTelemetry trace ID (32-char hex). Set when OTel tracing is enabled.",
            "maxLength": 32
          },
          "scenario": {
            "type": [
              "integer",
              "null"
            ],
            "readOnly": true
          },
          "scenario_name": {
            "type": "string",
            "readOnly": true,
            "default": "Scenario Deleted"
          },
          "scenario_type": {
            "type": "string",
            "readOnly": true,
            "description": "Type of the run's scenario (e.g. instruction, conditional_actions), null if the scenario was deleted"
          },
          "personality": {
            "type": [
              "integer",
              "null"
            ],
            "readOnly": true,
            "description": "Personality this run belongs to"
          },
          "personality_name": {
            "type": "string",
            "readOnly": true,
            "description": "Name of the personality this run belongs to"
          },
          "agent": {
            "type": "integer",
            "readOnly": true,
            "description": "ID of the agent associated with this run"
          },
          "agent_name": {
            "type": "string",
            "readOnly": true,
            "description": "Name of the agent associated with this run"
          },
          "agent_version": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ExpectedOutcome"
              }
            ],
            "readOnly": true,
            "description": "The agent version (history record) this run's result ran against, or null."
          },
          "result_id": {
            "type": "integer",
            "readOnly": true
          },
          "result_name": {
            "type": "string",
            "readOnly": true,
            "description": "Name of the result this run belongs to"
          },
          "expected_outcome_prompt": {
            "type": "string",
            "readOnly": true
          },
          "expected_outcome": {
            "type": "string",
            "readOnly": true
          },
          "evaluation": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Evaluation"
              }
            ],
            "readOnly": true,
            "description": "Run Evaluation"
          },
          "rubric": {
            "oneOf": [
              {},
              {
                "type": "null"
              }
            ],
            "readOnly": true,
            "description": "\nDetailed rubric evaluation data\nExample:\n```json\n[\n    {\n        \"metric_id\": 100,\n        \"metric_name\": \"Call Quality\",\n        \"value\": 5,\n        \"explanation\": [\"The response was accurate\"],\n        \"passed\": true,\n        \"conditions\": \"score gte 5\",\n        \"expected_conditions\": {\"operator\": \"and\", \"conditions\": [{\"field\": \"score\", \"op\": \"gte\", \"value\": 5}]}\n    }\n]\n```\n"
          },
          "transcript": {
            "type": "string",
            "readOnly": true,
            "description": "Full text transcript of the call.\nExample: \n```text\n[00:01] Testing Agent: Hello. \n[00:02] Main Agent: Hello, how can I help you today?\n[00:03] Testing Agent: Well, I mean, sure. What time exactly are we talking about here\n[00:04] Main Agent: 6 PM.\n[00:05] Testing Agent: Great. I'll book that for you. Just a sec.\n[00:06] Main Agent: Okay.\n```\n"
          },
          "transcript_object": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RunListTranscriptObject"
            },
            "readOnly": true,
            "description": "Transcript object"
          },
          "duration": {
            "type": "string",
            "readOnly": true,
            "description": "Duration of the run in MM:SS format"
          },
          "voice_recording_url": {
            "type": "string",
            "readOnly": true,
            "description": "URL to access the voice recording of this run"
          },
          "email_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "email",
            "readOnly": true
          },
          "status": {
            "enum": [
              "running",
              "completed",
              "failed",
              "pending",
              "in_progress",
              "evaluating",
              "in_queue",
              "timeout",
              "cancelled",
              "scaling_up"
            ],
            "type": "string",
            "description": "* `running` - Running\n* `completed` - Completed\n* `failed` - Failed\n* `pending` - Pending\n* `in_progress` - In Progress\n* `evaluating` - Evaluating\n* `in_queue` - In Queue\n* `timeout` - Timeout\n* `cancelled` - Cancelled\n* `scaling_up` - Scaling Up",
            "x-spec-enum-id": "623e22fc1eb17833",
            "readOnly": true
          },
          "evaluation_status": {
            "enum": [
              "success",
              "failure",
              "reviewed_success",
              "reviewed_failure"
            ],
            "type": "string",
            "description": "* `success` - Success\n* `failure` - Failure\n* `reviewed_success` - Reviewed Success\n* `reviewed_failure` - Reviewed Failure",
            "x-spec-enum-id": "a5dfbbcee6f2a6ce"
          },
          "metadata": {
            "readOnly": true
          },
          "success": {
            "type": "boolean",
            "description": "Whether this run passed its quality evaluation. false means either the call failed to connect or an evaluation check did not pass. Check `error_message` for connection failures and `evaluation` for check results."
          },
          "is_reviewed": {
            "type": "boolean",
            "description": "Whether the call has been reviewed.\nExample: `true` or `false`"
          },
          "feedback": {
            "type": "string"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "executed_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "readOnly": true
          },
          "outbound_number": {
            "type": "string",
            "readOnly": true,
            "description": "Phone number used to make the outbound call for this run"
          },
          "inbound_number": {
            "type": "string",
            "readOnly": true,
            "description": "Phone number used to receive the inbound call for this run"
          },
          "critical_categories": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RunListCriticalCategories"
            },
            "readOnly": true,
            "description": "List of critical evaluation categories and their results for this run"
          },
          "error_message": {
            "type": "string"
          },
          "scenario_instructions": {
            "type": "string"
          },
          "run_as_text": {
            "type": "boolean",
            "readOnly": true
          },
          "test_profile_data": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/TestProfileData"
              },
              {
                "type": "null"
              }
            ],
            "description": "Test Profile",
            "readOnly": true
          },
          "generated_mock_tool_entries": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": {}
            },
            "readOnly": true,
            "description": "Expected mock tool calls for this run's evaluator. Each entry has shape {tool_id, tool_name, new_entry: {input, output}}."
          },
          "mocked_tool_names": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "readOnly": true,
            "description": "Tool names that were mock-enabled for this run's result. Function calls in the transcript matching these names were served by Cekura mocks. Empty if no tools were mocked."
          },
          "provider_call_details": {
            "readOnly": true,
            "description": "\nDetails of the call from the provider\n"
          },
          "agent_number": {
            "type": [
              "string",
              "null"
            ],
            "readOnly": true,
            "description": "Phone number of the agent (only for voice inbound calls)"
          },
          "testing_channel_index": {
            "type": [
              "integer",
              "null"
            ],
            "readOnly": true,
            "description": "The channel index of the testing agent in the audio recording"
          },
          "run_type": {
            "type": [
              "string",
              "null"
            ],
            "readOnly": true,
            "description": "Run Execution Type"
          },
          "outbound_dial_window_opens_at": {
            "type": "string",
            "readOnly": true,
            "description": "ISO timestamp when the outbound dial window opened. Null until the run reaches pending/waiting-for-call."
          },
          "outbound_dial_window_seconds": {
            "type": "string",
            "readOnly": true,
            "description": "Duration of the outbound dial window in seconds."
          },
          "outbound_dial_window_closes_at": {
            "type": "string",
            "readOnly": true,
            "description": "ISO timestamp when the outbound dial window closes. Null until the window opens."
          }
        }
      },
      "RunList": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "provider_call_id": {
            "type": "string",
            "description": "\nCall ID from the Assistant provider\nExample: `call_abc123`\n",
            "maxLength": 255
          },
          "trace_id": {
            "type": "string",
            "description": "OpenTelemetry trace ID (32-char hex). Set when OTel tracing is enabled.",
            "maxLength": 32
          },
          "scenario": {
            "type": [
              "integer",
              "null"
            ]
          },
          "scenario_name": {
            "type": "string",
            "readOnly": true,
            "default": "Scenario Deleted"
          },
          "personality": {
            "type": [
              "integer",
              "null"
            ],
            "readOnly": true
          },
          "personality_name": {
            "type": "string",
            "readOnly": true
          },
          "result_id": {
            "type": "integer",
            "readOnly": true
          },
          "agent": {
            "type": "integer",
            "readOnly": true
          },
          "agent_name": {
            "type": "string",
            "readOnly": true
          },
          "duration": {
            "type": "string",
            "readOnly": true
          },
          "status": {
            "enum": [
              "running",
              "completed",
              "failed",
              "pending",
              "in_progress",
              "evaluating",
              "in_queue",
              "timeout",
              "cancelled",
              "scaling_up"
            ],
            "type": "string",
            "description": "* `running` - Running\n* `completed` - Completed\n* `failed` - Failed\n* `pending` - Pending\n* `in_progress` - In Progress\n* `evaluating` - Evaluating\n* `in_queue` - In Queue\n* `timeout` - Timeout\n* `cancelled` - Cancelled\n* `scaling_up` - Scaling Up",
            "x-spec-enum-id": "623e22fc1eb17833"
          },
          "evaluation_status": {
            "enum": [
              "success",
              "failure",
              "reviewed_success",
              "reviewed_failure"
            ],
            "type": "string",
            "description": "* `success` - Success\n* `failure` - Failure\n* `reviewed_success` - Reviewed Success\n* `reviewed_failure` - Reviewed Failure",
            "x-spec-enum-id": "a5dfbbcee6f2a6ce",
            "readOnly": true
          },
          "expected_outcome": {
            "type": "object",
            "additionalProperties": {},
            "description": "Expected-outcome evaluation. Supports key selection — `?ql={expected_outcome{score}}` omits the explanation and alignment arrays.",
            "readOnly": true
          },
          "success": {
            "type": "boolean",
            "description": "Whether this run passed its quality evaluation. false means either the call failed to connect or an evaluation check did not pass. Check `error_message` for connection failures and `evaluation` for check results."
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "executed_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {},
            "description": "Provider call metadata. Supports key selection — `?ql={metadata{ended_reason,ringing_duration}}` returns only those keys instead of the full provider payload.",
            "readOnly": true
          },
          "outbound_number": {
            "type": "string",
            "readOnly": true
          },
          "inbound_number": {
            "type": "string",
            "readOnly": true
          },
          "critical_categories": {
            "type": "string",
            "readOnly": true
          },
          "metrics": {
            "type": "string",
            "readOnly": true
          },
          "error_message": {
            "type": "string"
          },
          "run_as_text": {
            "type": "boolean",
            "readOnly": true
          },
          "test_profile_name": {
            "type": "string",
            "readOnly": true
          },
          "agent_number": {
            "type": [
              "string",
              "null"
            ],
            "readOnly": true,
            "description": "\nOverride the phone number from which the agent under test receives the call during outbound runs.\nThis allows overriding the default agent contact number for testing purposes.\nExample: `+1234567890`\n"
          },
          "run_type": {
            "type": [
              "string",
              "null"
            ],
            "readOnly": true,
            "description": "Run Execution Type"
          },
          "agent_version": {
            "type": "string",
            "readOnly": true,
            "description": "The agent version (history record) this run's result ran against, or null."
          },
          "outbound_dial_window_opens_at": {
            "type": "string",
            "readOnly": true,
            "description": "ISO timestamp when the outbound dial window opened. Null until the run reaches pending/waiting-for-call."
          },
          "outbound_dial_window_seconds": {
            "type": "string",
            "readOnly": true,
            "description": "Duration of the outbound dial window in seconds."
          },
          "outbound_dial_window_closes_at": {
            "type": "string",
            "readOnly": true,
            "description": "ISO timestamp when the outbound dial window closes. Null until the window opens."
          }
        }
      },
      "RunListCriticalCategories": {
        "type": "object",
        "properties": {
          "category_id": {
            "type": "integer",
            "description": "Category ID"
          },
          "category": {
            "type": "string",
            "description": "Category name"
          },
          "deviation": {
            "type": "number",
            "format": "double",
            "description": "Deviation"
          },
          "wrongly_marked": {
            "type": "boolean",
            "description": "Whether the category was wrongly marked"
          },
          "feedback": {
            "type": "string",
            "description": "Feedback"
          },
          "priority": {
            "enum": [
              "critical",
              "non-critical",
              "not_a_bug"
            ],
            "type": "string",
            "x-spec-enum-id": "6b5f38576e0a1903",
            "description": "Priority\n\n* `critical` - Critical\n* `non-critical` - Non Critical\n* `not_a_bug` - Not A Bug"
          }
        },
        "required": [
          "category",
          "category_id",
          "deviation",
          "feedback",
          "priority",
          "wrongly_marked"
        ]
      },
      "RunListTranscriptObject": {
        "type": "object",
        "properties": {
          "role": {
            "type": "string",
            "description": "Role of the message"
          },
          "content": {
            "type": "string",
            "description": "Content of the message"
          },
          "timestamp": {
            "type": "number",
            "format": "double",
            "description": "Timestamp of the message"
          }
        },
        "required": [
          "content",
          "role",
          "timestamp"
        ]
      },
      "RunLivekitScenarios": {
        "type": "object",
        "description": "",
        "properties": {
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional name for the scenario result"
          },
          "frequency": {
            "type": "integer",
            "maximum": 100,
            "minimum": 1,
            "default": 1,
            "description": "Frequency to run"
          },
          "scenarios": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LivekitScenario"
            }
          },
          "agent": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Agent to use. Required if none of the scenarios have an agent."
          },
          "personality_ids": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "integer"
            },
            "description": "List of personality IDs to override for this run. If not provided, uses the scenario's default personality."
          },
          "test_profile_ids": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "integer"
            },
            "description": "List of test profile IDs to override for this run. If not provided, uses the scenario's default test profile."
          },
          "mock_tool_names": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "Names of mock tools to activate for this run. Omit (or send null) to mock every tool configured on the agent; send an empty list to mock none so every tool keeps its original endpoint; send specific names to mock only those. Tools that belong to an MCP server should be selected via the MCP server's name or key, which mocks all of that server's tools as one unit. Legacy MCP sub-tool names are accepted as aliases for the whole parent MCP."
          },
          "livekit_data": {
            "allOf": [
              {
                "$ref": "#/components/schemas/LivekitRunDataOverride"
              }
            ],
            "description": "Per-run LiveKit overrides (config, agent_name, url). Credentials are always read from the agent/project."
          },
          "concurrency_limit": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Optional cap on how many of this run's calls execute concurrently."
          },
          "personality_id": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Single personality ID override. Merged into personality_ids; prefer personality_ids for multiple."
          },
          "test_profile_id": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Single test profile ID override. Merged into test_profile_ids; prefer test_profile_ids for multiple."
          }
        },
        "required": [
          "scenarios"
        ]
      },
      "RunReviewsRequest": {
        "type": "object",
        "properties": {
          "llm_provider": {
            "enum": [
              "openai",
              "gemini",
              "dspy-gepa-gemini-flash",
              "deepseek-v4-flash"
            ],
            "type": "string",
            "x-spec-enum-id": "6d1d2e77c71d1721",
            "description": "Override the judge provider while running unsaved Labs changes\n\n* `openai` - OpenAI\n* `gemini` - Gemini\n* `dspy-gepa-gemini-flash` - Dspy Gepa Gemini Flash\n* `deepseek-v4-flash` - DeepSeek V4 Flash"
          },
          "evaluation_trigger": {
            "type": "string",
            "description": "Override evaluation trigger setting"
          },
          "evaluation_trigger_prompt": {
            "type": "string",
            "description": "Override evaluation trigger prompt"
          },
          "trigger_type": {
            "enum": [
              "llm_judge",
              "custom_code"
            ],
            "type": "string",
            "x-spec-enum-id": "2adad4b8df61914f",
            "description": "Override evaluation trigger implementation\n\n* `llm_judge` - LLM Judge\n* `custom_code` - Custom Code"
          },
          "evaluation_trigger_custom_code": {
            "type": "string",
            "description": "Override custom-code evaluation trigger"
          },
          "description": {
            "type": "string",
            "description": "Override metric description"
          },
          "type": {
            "enum": [
              "basic",
              "custom_prompt",
              "custom_code",
              "llm_judge"
            ],
            "type": "string",
            "x-spec-enum-id": "b44700c0a6443b40",
            "description": "Override metric type\n\n* `basic` - Basic (Deprecated in favor of LLM Judge)\n* `custom_prompt` - Custom Prompt ( Deprecated in favor of LLM Judge)\n* `custom_code` - Custom Code\n* `llm_judge` - LLM Judge"
          },
          "custom_code": {
            "type": "string",
            "description": "Override custom code"
          },
          "prompt": {
            "type": "string",
            "description": "Override evaluation prompt"
          },
          "metric_description_program": {
            "description": "Advanced metric description configuration"
          },
          "metric_description_variables": {
            "description": "Variables for metric description"
          },
          "evaluation_trigger_program": {
            "description": "Advanced trigger configuration"
          },
          "evaluation_trigger_variables": {
            "description": "Variables for evaluation trigger"
          },
          "skip_save": {
            "type": "boolean",
            "default": false,
            "description": "If true, don't save evaluation results to database (used for internal previews)"
          }
        }
      },
      "RunScenarioResult": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true,
            "description": "\nUnique identifier for the Result\nExample: `123`\n"
          },
          "name": {
            "type": "string",
            "description": "\nName of the Result\nExample: `\"Test Result 1\"`\n",
            "maxLength": 255
          },
          "agent": {
            "type": "integer",
            "readOnly": true,
            "description": "\nID of the AI agent that was tested\nExample: `123`\n"
          },
          "agent_inbound": {
            "type": "boolean",
            "readOnly": true,
            "description": "\nWhether the agent is configured for inbound calls (true) or outbound calls (false)\nExample: `true` or `false`\n"
          },
          "status": {
            "enum": [
              "running",
              "completed",
              "failed",
              "pending",
              "in_progress",
              "evaluating",
              "in_queue",
              "timeout",
              "cancelled",
              "scaling_up"
            ],
            "type": "string",
            "x-spec-enum-id": "623e22fc1eb17833",
            "default": "pending",
            "description": "\nCurrent status of the result\n\n\n* `running` - Running\n* `completed` - Completed\n* `failed` - Failed\n* `pending` - Pending\n* `in_progress` - In Progress\n* `evaluating` - Evaluating\n* `in_queue` - In Queue\n* `timeout` - Timeout\n* `cancelled` - Cancelled\n* `scaling_up` - Scaling Up"
          },
          "success_rate": {
            "type": "number",
            "format": "double",
            "default": 0,
            "description": "Success rate of the test runs as a decimal (0.0 to 1.0)"
          },
          "run_as_text": {
            "type": "boolean",
            "default": false,
            "description": "\nWhether this test was run in text mode instead of voice mode\nExample: `true` or `false`\n"
          },
          "is_cronjob": {
            "type": "string",
            "readOnly": true,
            "description": "\nWhether this result was created by a scheduled cronjob\nExample: `true` or `false`\n"
          },
          "runs": {
            "type": "object",
            "additionalProperties": {},
            "description": "Run summaries for this result. For full run data including transcripts and metric scores, fetch the result detail endpoint — there `runs` is a dict keyed by run ID.",
            "readOnly": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true,
            "description": "\nTimestamp when this test result was created\nExample: `2021-01-01 00:00:00`\n"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true,
            "description": "Timestamp when this test result was last updated"
          }
        },
        "required": [
          "name"
        ]
      },
      "RunScenariosEmail": {
        "type": "object",
        "properties": {
          "agent_id": {
            "type": [
              "integer",
              "null"
            ],
            "description": "ID of the agent to run against. Required if none of the scenarios have an agent."
          },
          "scenarios": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "List of evaluator IDs to run."
          },
          "frequency": {
            "type": "integer",
            "maximum": 100,
            "minimum": 1,
            "description": "Number of times to run each scenario."
          },
          "agent_email": {
            "type": [
              "string",
              "null"
            ],
            "format": "email",
            "description": "Override the agent's configured email address for this run."
          }
        },
        "required": [
          "frequency",
          "scenarios"
        ]
      },
      "RunScenariosRetellWebRTCRequest": {
        "type": "object",
        "properties": {
          "scenarios": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "List of scenario IDs to run"
          },
          "agent_id": {
            "type": "integer",
            "description": "Agent ID (optional if scenarios all belong to one agent)"
          },
          "project_id": {
            "type": "integer"
          },
          "retell_agent_id": {
            "type": "string",
            "description": "Retell agent ID; defaults to agent.assistant_id"
          },
          "frequency": {
            "type": "integer",
            "default": 1
          },
          "name": {
            "type": "string"
          },
          "concurrency_limit": {
            "type": "integer"
          },
          "mock_tool_names": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Names of mock tools to activate for this run. Omit (or send null) to mock every tool configured on the agent; send an empty list to mock none so every tool keeps its original endpoint; send specific names to mock only those."
          }
        },
        "required": [
          "scenarios"
        ]
      },
      "RunScenariosVapiWebRTCRequest": {
        "type": "object",
        "properties": {
          "scenarios": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "List of scenario IDs to run"
          },
          "vapi_assistant_id": {
            "type": "string",
            "description": "The VAPI assistant ID to test against"
          },
          "agent_id": {
            "type": "integer",
            "description": "Agent ID (optional if scenarios all belong to one agent)"
          },
          "project_id": {
            "type": "integer"
          },
          "frequency": {
            "type": "integer",
            "default": 1
          },
          "name": {
            "type": "string"
          },
          "concurrency_limit": {
            "type": "integer"
          },
          "mock_tool_names": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Names of mock tools to activate for this run. Omit (or send null) to mock every tool configured on the agent; send an empty list to mock none so every tool keeps its original endpoint; send specific names to mock only those."
          }
        },
        "required": [
          "scenarios",
          "vapi_assistant_id"
        ]
      },
      "RunScenariosWithWebsockets": {
        "type": "object",
        "properties": {
          "agent": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Agent to use. Required if none of the scenarios have an agent."
          },
          "scenarios": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ScenarioWithWebsocket"
            },
            "description": "List of scenario+websocket pairs. Each element must be an object with two keys: `scenario` (integer evaluator ID) and `websocket_url` (string, ws:// or wss:// URL). Example: [{\"scenario\": 101, \"websocket_url\": \"wss://agent-a.example.com/chat\"}, {\"scenario\": 102, \"websocket_url\": \"wss://agent-b.example.com/chat\"}]"
          },
          "frequency": {
            "type": "integer",
            "maximum": 100,
            "minimum": 1,
            "description": "Frequency to run"
          },
          "mock_tool_names": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "Names of mock tools to activate for this run. Omit (or send null) to mock every tool configured on the agent; send an empty list to mock none so every tool keeps its original endpoint; send specific names to mock only those. Tools that belong to an MCP server should be selected via the MCP server's name or key, which mocks all of that server's tools as one unit. Legacy MCP sub-tool names are accepted as aliases for the whole parent MCP."
          }
        },
        "required": [
          "frequency",
          "scenarios"
        ]
      },
      "RunTraceResponse": {
        "type": "object",
        "properties": {
          "trace_id": {
            "type": "string",
            "description": "OpenTelemetry trace ID associated with the run."
          },
          "spans": {
            "description": "Raw OpenTelemetry trace data returned by the trace backend."
          }
        },
        "required": [
          "spans",
          "trace_id"
        ]
      },
      "Scenario": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "name": {
            "type": "string",
            "description": "Name of the scenario",
            "maxLength": 80
          },
          "agent": {
            "type": "integer",
            "description": "\nAgent ID\nExample: `2142`\n"
          },
          "project": {
            "type": [
              "integer",
              "null"
            ]
          },
          "assistant_id": {
            "type": "string",
            "writeOnly": true,
            "description": "\nAlternative to agent ID - the assistant ID to use for this scenario\nExample: `\"asst_1234567890\"`\n"
          },
          "personality": {
            "type": "integer",
            "description": "\nPersonality ID\nExample: `123`\n"
          },
          "personality_name": {
            "type": "string",
            "readOnly": true,
            "description": "\nName of the personality used in this scenario\nExample: `\"Normal Male\"`\n"
          },
          "agent_name": {
            "type": "string",
            "readOnly": true,
            "description": "\nName of the agent associated with this scenario\nExample: `\"Customer Support Agent\"`\n"
          },
          "tags": {
            "description": "\nTags associated with the scenario\nExample: `[\"tag1\", \"tag2\"]`\n"
          },
          "tool_ids": {
            "description": "\nList of tool IDs to associate with this scenario\nExample: `[\"TOOL_DTMF\", \"TOOL_END_CALL\"]`\n"
          },
          "metrics": {
            "writeOnly": true,
            "description": "\nList of metric IDs to associate with this scenario\nExample: `[123, 456]`\n"
          },
          "metric_names": {
            "type": "string",
            "readOnly": true,
            "description": "\nList of metric names associated with this scenario\nExample: `[\"Metric 1\", \"Metric 2\"]`\n"
          },
          "phone_number": {
            "type": "string",
            "readOnly": true,
            "description": "\nPhone number used for outbound calls in this scenario\nExample: `\"+1234567890\"`\n"
          },
          "outbound_phone_number_data": {
            "allOf": [
              {
                "$ref": "#/components/schemas/PhoneNumberInbound"
              }
            ],
            "readOnly": true,
            "description": "\nPhone number used for outbound calls in this scenario\nExample: `\"+1234567890\"`\n"
          },
          "first_message": {
            "type": "string",
            "description": "First message to be sent to the Main Agent"
          },
          "inbound_phone_number": {
            "type": [
              "integer",
              "null"
            ]
          },
          "inbound_phone_number_data": {
            "allOf": [
              {
                "$ref": "#/components/schemas/PhoneNumberInbound"
              }
            ],
            "readOnly": true,
            "description": "\n(Deprecated) Phone number used for inbound calls in this scenario. Use outbound_phone_number_data instead.\nAfter CEK-6517, both phone_number and inbound_phone_number fields are synced, so outbound_phone_number_data contains the unified phone number for both inbound and outbound calls.\nExample: `{\"id\": 123, \"number\": \"+1234567890\", \"phone_number_id\": \"abc123\"}`\n"
          },
          "instructions": {
            "type": "string",
            "description": "Scenario Instructions"
          },
          "conditional_actions": {
            "writeOnly": true,
            "description": "Structured conditional-actions object for `scenario_type=\"conditional_actions\"`. Use either `conditional_actions` (structured) or `instructions` (plain text) — not both.\n\nExample:\n```json\n{\n  \"role\": \"You are a patient calling to schedule an appointment\",\n  \"conditions\": [\n    {\"id\": 0, \"condition\": \"FIRST_MESSAGE\", \"action\": \"Hi, I need to schedule an appointment\",\n     \"type\": \"standard\", \"fixed_message\": true},\n    {\"id\": 1, \"condition\": \"when the agent asks for your name\",\n     \"action\": \"Provide your full name: John Smith\", \"type\": \"standard\", \"fixed_message\": false}\n  ]\n}\n```"
          },
          "simulation_description": {
            "type": "string",
            "description": "Simulation Description"
          },
          "information_fields": {
            "description": "\nInformation fields associated with the scenario\nExample: `{\"user_name\": \"John Doe\", \"user_email\": \"john.doe@example.com\", \"order_id\": \"1234567890\"}`\n"
          },
          "expected_outcome_prompt": {
            "type": "string",
            "description": "\nExpected Outcome Prompt\nExample: `\"The user should be able to complete the order\"`\n"
          },
          "scenario_language": {
            "enum": [
              "af",
              "ar",
              "bn",
              "bg",
              "zh",
              "cs",
              "da",
              "nl",
              "en",
              "et",
              "fi",
              "fr",
              "de",
              "el",
              "gu",
              "hi",
              "he",
              "hu",
              "id",
              "it",
              "ja",
              "kn",
              "ko",
              "ms",
              "ml",
              "mr",
              "multi",
              "no",
              "pl",
              "pa",
              "pt",
              "ro",
              "ru",
              "sk",
              "es",
              "sv",
              "th",
              "tr",
              "tl",
              "ta",
              "te",
              "uk",
              "vi"
            ],
            "type": "string",
            "x-spec-enum-id": "b822ad429c7b7fec",
            "description": "\nLanguage of the scenario\n\n\n* `af` - Afrikaans\n* `ar` - Arabic\n* `bn` - Bengali\n* `bg` - Bulgarian\n* `zh` - Chinese Simplified\n* `cs` - Czech\n* `da` - Danish\n* `nl` - Dutch\n* `en` - English\n* `et` - Estonian\n* `fi` - Finnish\n* `fr` - French\n* `de` - German\n* `el` - Greek\n* `gu` - Gujarati\n* `hi` - Hindi\n* `he` - Hebrew\n* `hu` - Hungarian\n* `id` - Indonesian\n* `it` - Italian\n* `ja` - Japanese\n* `kn` - Kannada\n* `ko` - Korean\n* `ms` - Malay\n* `ml` - Malayalam\n* `mr` - Marathi\n* `multi` - Multilingual\n* `no` - Norwegian\n* `pl` - Polish\n* `pa` - Punjabi\n* `pt` - Portuguese\n* `ro` - Romanian\n* `ru` - Russian\n* `sk` - Slovak\n* `es` - Spanish\n* `sv` - Swedish\n* `th` - Thai\n* `tr` - Turkish\n* `tl` - Tagalog\n* `ta` - Tamil\n* `te` - Telugu\n* `uk` - Ukrainian\n* `vi` - Vietnamese"
          },
          "scenario_type": {
            "enum": [
              "instruction",
              "real_world_smart",
              "real_world_fixed",
              "conditional_actions"
            ],
            "type": "string",
            "x-spec-enum-id": "db62e37bb530b602",
            "default": "instruction",
            "description": "\nType of scenario (instruction, real_world_smart, or real_world_fixed)\n\n\n* `instruction` - Instruction\n* `real_world_smart` - Real World Smart\n* `real_world_fixed` - Real World Fixed\n* `conditional_actions` - Conditional Actions"
          },
          "suite_type": {
            "enum": [
              "undefined",
              "infrastructure"
            ],
            "type": "string",
            "x-spec-enum-id": "643f6a8cdc799a77",
            "description": "Type of predefined suite (e.g., infrastructure)\n\n* `undefined` - Undefined\n* `infrastructure` - Infrastructure"
          },
          "is_predefined": {
            "type": "boolean",
            "description": "Whether this is a predefined scenario (template)"
          },
          "test_profile": {
            "type": [
              "integer",
              "null"
            ]
          },
          "test_profile_data": {
            "allOf": [
              {
                "$ref": "#/components/schemas/AIAgentTestProfile"
              }
            ],
            "readOnly": true,
            "description": "\nDetails of the test profile associated with this scenario. `information` uses the\nsectioned shape: `main_agent_variables` are sent to the agent under test as\ndynamic variables at call time; `testing_agent_variables` are persona/context\nused by Cekura's simulated caller. Legacy flat dicts (no section keys) still\nwork — at call time they are delivered to both sides for backward compatibility.\nExample:\n```json\n{\n    \"id\": \"<integer>\",\n    \"agent_id\": \"<integer>\",\n    \"name\": \"<string>\",\n    \"information\": {\n        \"main_agent_variables\": {\n            \"user_id\": \"<string>\",\n            \"account_id\": \"<string>\"\n        },\n        \"testing_agent_variables\": {\n            \"user_name\": \"<string>\",\n            \"user_email\": \"<string>\",\n            \"order_id\": \"<string>\"\n        }\n    }\n}\n```\n"
          },
          "dynamic_variable_values": {
            "readOnly": true,
            "description": "REMOVED FROM API. Reads return the historical value for legacy rows (`null` for new rows). Writes are no longer accepted — supplying a non-null value yields a 400 error. Put dynamic-variable values in `test_profile_data.information.main_agent_variables` instead: create the test profile via POST /test-profiles/ and attach it via the `test_profile` field on the scenario."
          },
          "generated_mock_tool_entries": {
            "oneOf": [
              {},
              {
                "type": "null"
              }
            ],
            "description": "Expected mock tool calls for this evaluator. Each entry has shape {tool_id, tool_name, new_entry: {input, output}}. Auto-generated during scenario generation when the agent has mock tools attached; can also be set or edited manually."
          },
          "folder_path": {
            "type": [
              "string",
              "null",
              "null"
            ],
            "description": "Dot-separated path of the folder to assign this evaluator to (e.g. \"Sales.Inbound\"). Folders must be created before use — they are not auto-created. Use `scenarios_create_folder_create` to create each level before assigning evaluators. Example: to use \"Sales.Inbound\", first create \"Sales\", then create \"Inbound\" inside it."
          },
          "max_duration": {
            "type": [
              "integer",
              "null"
            ],
            "description": "\nMax call duration in seconds for this scenario. If not provided or set to null, the scenario will use the project's max_call_duration setting.\nValid range: 10-3600 seconds (10 seconds to 60 minutes)\nExample: `600` (10 minutes)\n"
          }
        },
        "required": [
          "personality"
        ]
      },
      "ScenarioAgentProgress": {
        "type": "object",
        "description": "Response serializer for GET /scenario-agent-progress/?progress_id=...\n\n`status` lifecycle:\n  - in_progress            → LLM still running; poll again\n  - completed              → LLM finished; `result` holds the full response\n  - needs_clarification    → (clarify mode) LLM needs a follow-up answer from user\n  - needs_agent_clarification → (improve mode) LLM needs user to select an agent\n  - cancelled              → user called /cancel-agent/\n  - failed                 → unrecoverable error; `error` is set",
        "properties": {
          "progress_id": {
            "type": "string"
          },
          "session_id": {
            "type": [
              "integer",
              "null"
            ]
          },
          "mode": {
            "type": "string",
            "description": "clarify or improve"
          },
          "status": {
            "type": "string",
            "description": "in_progress | completed | needs_clarification | needs_agent_clarification | cancelled | failed"
          },
          "result": {
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": {},
            "description": "ScenarioAgentResponseSerializer payload; null while status is in_progress"
          },
          "error": {
            "type": [
              "string",
              "null"
            ],
            "description": "Error message when status is failed"
          }
        },
        "required": [
          "mode",
          "progress_id",
          "session_id",
          "status"
        ]
      },
      "ScenarioAgentRequest": {
        "type": "object",
        "description": "Create or improve evaluator scenarios using AI by providing natural-language\nfeedback. This endpoint does not improve the target AI agent itself.\n\nProvide evaluator IDs and your improvement request, and the AI will suggest changes.",
        "properties": {
          "user_message": {
            "type": "string",
            "default": "",
            "description": "Evaluator-scenario request (e.g., 'Make these scenario instructions more detailed'). Do not use for agent prompt/config improvements."
          },
          "agent_id": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Agent ID - optional, automatically inferred from evaluators if not provided"
          },
          "project_id": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Project ID - optional, automatically inferred from evaluators if not provided"
          },
          "session_id": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Session ID for tracking - automatically created if not provided"
          },
          "context": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/ConversationContextItem"
            },
            "description": "\nConversation history for multi-turn improvements. Allows iterative refinement without sessions.\n\nExample:\n```json\n[\n   {\n      \"role\": \"user\",\n      \"content\": \"Add DTMF tool to all evaluators\"\n   },\n   {\n      \"role\": \"assistant\",\n      \"content\": \"Added DTMF tool to 3 evaluators\"\n   },\n   {\n      \"role\": \"user\",\n      \"content\": \"Make the instructions more detailed\"\n   },\n   {\n      \"role\": \"assistant\",\n      \"content\": \"Updated instructions to be more detailed for 3 evaluators\"\n   }\n]\n```\n"
          },
          "num_scenarios": {
            "type": "integer",
            "minimum": 1,
            "default": 1,
            "description": "Number of scenarios to generate in clarify mode"
          },
          "knowledge_base": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "Knowledge Base file IDs for additional context in clarify mode"
          },
          "scenarios": {
            "oneOf": [
              {},
              {
                "type": "null"
              }
            ],
            "description": "Evaluator IDs to improve. Pass as a list of integers `[101, 102]`, a single integer `101`, or the string `\"all\"` to improve all evaluators for the agent. Do not pass IDs as a JSON-stringified list — pass them as a native array."
          },
          "apply_changes": {
            "type": "boolean",
            "default": false,
            "description": "Set to true to apply the AI-suggested changes to your evaluators"
          },
          "updated_scenarios": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": {}
            },
            "description": "AI-suggested changes from previous response - use with apply_changes=true to apply them"
          },
          "agent_selections": {
            "type": "object",
            "additionalProperties": {
              "type": "integer",
              "minimum": 1
            },
            "description": "Structured agent selections: maps scenario_id (as string key) to agent_id. Use this instead of agent_resolution_response."
          },
          "agent_resolution_response": {
            "type": "string",
            "default": "",
            "description": "Deprecated: use agent_selections instead"
          },
          "scenarios_needing_agent": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "Evaluator IDs that required agent selection"
          },
          "pending_tool_calls": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "object",
              "additionalProperties": {}
            },
            "description": "Tool calls held from a previous agent-clarification response"
          },
          "tool_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Tools that will be enabled on the generated evaluators (validated up front)"
          },
          "inbound_phone_numbers": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "Inbound numbers that will be attached to the generated evaluators (validated up front)"
          }
        }
      },
      "ScenarioAgentStartResponse": {
        "type": "object",
        "properties": {
          "progress_id": {
            "type": "string",
            "description": "Use this to poll for results at /scenario-agent-progress/?progress_id={id}"
          },
          "session_id": {
            "type": "integer",
            "description": "Session tracking ID"
          }
        },
        "required": [
          "progress_id",
          "session_id"
        ]
      },
      "ScenarioFolder": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 300
          },
          "path": {
            "type": "string",
            "readOnly": true,
            "description": "Human-readable path with case preservation"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          }
        },
        "required": [
          "name"
        ]
      },
      "ScenarioFolderCreate": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 100
          },
          "parent_path": {
            "type": [
              "string",
              "null"
            ]
          },
          "project_id": {
            "type": "integer"
          }
        },
        "required": [
          "name",
          "project_id"
        ]
      },
      "ScenarioHistory": {
        "type": "object",
        "properties": {
          "history_id": {
            "type": "integer",
            "readOnly": true
          },
          "history_date": {
            "type": "string",
            "format": "date-time"
          },
          "history_type": {
            "enum": [
              "+",
              "~",
              "-"
            ],
            "type": "string",
            "description": "* `+` - Created\n* `~` - Changed\n* `-` - Deleted",
            "x-spec-enum-id": "c2e35addebb4f5da"
          },
          "history_change_reason": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 100
          },
          "history_user": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/UserInline"
              },
              {
                "type": "null"
              }
            ],
            "readOnly": true
          },
          "version_id": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 12
          },
          "version_name": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255
          },
          "metrics_snapshot": {
            "oneOf": [
              {},
              {
                "type": "null"
              }
            ]
          },
          "id": {
            "type": "integer",
            "maximum": 9223372036854776000,
            "minimum": -9223372036854776000,
            "format": "int64"
          },
          "name": {
            "type": "string",
            "description": "Name of the scenario",
            "maxLength": 80
          },
          "project": {
            "type": [
              "integer",
              "null"
            ]
          },
          "agent": {
            "type": [
              "integer",
              "null"
            ]
          },
          "personality": {
            "type": [
              "integer",
              "null"
            ]
          },
          "tags": {
            "description": "\nTags associated with the scenario\nExample: `[\"tag1\", \"tag2\"]`\n"
          },
          "tool_ids": {
            "description": "\nList of tool IDs to associate with this scenario\nExample: `[\"TOOL_DTMF\", \"TOOL_END_CALL\"]`\n"
          },
          "first_message": {
            "type": "string",
            "description": "First message to be sent to the Main Agent"
          },
          "instructions": {
            "type": "string",
            "description": "Scenario Instructions"
          },
          "simulation_description": {
            "type": "string",
            "description": "Simulation Description"
          },
          "information_fields": {
            "description": "\nInformation fields associated with the scenario\nExample: `{\"user_name\": \"John Doe\", \"user_email\": \"john.doe@example.com\", \"order_id\": \"1234567890\"}`\n"
          },
          "expected_outcome_prompt": {
            "type": "string",
            "description": "\nExpected Outcome Prompt\nExample: `\"The user should be able to complete the order\"`\n"
          },
          "scenario_language": {
            "enum": [
              "af",
              "ar",
              "bn",
              "bg",
              "zh",
              "cs",
              "da",
              "nl",
              "en",
              "et",
              "fi",
              "fr",
              "de",
              "el",
              "gu",
              "hi",
              "he",
              "hu",
              "id",
              "it",
              "ja",
              "kn",
              "ko",
              "ms",
              "ml",
              "mr",
              "multi",
              "no",
              "pl",
              "pa",
              "pt",
              "ro",
              "ru",
              "sk",
              "es",
              "sv",
              "th",
              "tr",
              "tl",
              "ta",
              "te",
              "uk",
              "vi",
              "",
              null
            ],
            "type": [
              "string",
              "null"
            ],
            "x-spec-enum-id": "b822ad429c7b7fec",
            "description": "Language of the scenario\n\n* `af` - Afrikaans\n* `ar` - Arabic\n* `bn` - Bengali\n* `bg` - Bulgarian\n* `zh` - Chinese Simplified\n* `cs` - Czech\n* `da` - Danish\n* `nl` - Dutch\n* `en` - English\n* `et` - Estonian\n* `fi` - Finnish\n* `fr` - French\n* `de` - German\n* `el` - Greek\n* `gu` - Gujarati\n* `hi` - Hindi\n* `he` - Hebrew\n* `hu` - Hungarian\n* `id` - Indonesian\n* `it` - Italian\n* `ja` - Japanese\n* `kn` - Kannada\n* `ko` - Korean\n* `ms` - Malay\n* `ml` - Malayalam\n* `mr` - Marathi\n* `multi` - Multilingual\n* `no` - Norwegian\n* `pl` - Polish\n* `pa` - Punjabi\n* `pt` - Portuguese\n* `ro` - Romanian\n* `ru` - Russian\n* `sk` - Slovak\n* `es` - Spanish\n* `sv` - Swedish\n* `th` - Thai\n* `tr` - Turkish\n* `tl` - Tagalog\n* `ta` - Tamil\n* `te` - Telugu\n* `uk` - Ukrainian\n* `vi` - Vietnamese"
          },
          "scenario_type": {
            "enum": [
              "instruction",
              "real_world_smart",
              "real_world_fixed",
              "conditional_actions"
            ],
            "type": "string",
            "x-spec-enum-id": "db62e37bb530b602",
            "description": "Type of scenario\n\n* `instruction` - Instruction\n* `real_world_smart` - Real World Smart\n* `real_world_fixed` - Real World Fixed\n* `conditional_actions` - Conditional Actions"
          },
          "suite_type": {
            "enum": [
              "undefined",
              "infrastructure"
            ],
            "type": "string",
            "x-spec-enum-id": "643f6a8cdc799a77",
            "description": "Type of predefined suite (e.g., infrastructure)\n\n* `undefined` - Undefined\n* `infrastructure` - Infrastructure"
          },
          "is_predefined": {
            "type": "boolean",
            "description": "Whether this is a predefined scenario (template)"
          },
          "max_duration": {
            "type": [
              "integer",
              "null"
            ],
            "maximum": 2147483647,
            "minimum": -2147483648,
            "description": "\nMax call duration in seconds for this scenario. If not set, uses the project's max_call_duration setting.\nExample: `600` (10 minutes)\n"
          },
          "dynamic_variable_values": {
            "oneOf": [
              {},
              {
                "type": "null"
              }
            ],
            "description": "REMOVED FROM API. Historically stored a flat copy of the agent's dynamic-variable values for the scenario. The column is retained read-only for legacy rows; reads still return its historical value, but writes via the API are rejected with a 400. At call time the Run-level helper consults this column ONLY when the attached test_profile is legacy-flat (or absent) — sectioned test profiles are the canonical source and ignore this column. Put dynamic-variable values in `test_profile.information.main_agent_variables` for new scenarios."
          },
          "phone_number": {
            "type": [
              "integer",
              "null"
            ]
          },
          "inbound_phone_number": {
            "type": [
              "integer",
              "null"
            ]
          },
          "test_profile": {
            "type": [
              "integer",
              "null"
            ]
          },
          "folder": {
            "type": [
              "integer",
              "null"
            ]
          },
          "generated_mock_tool_entries": {
            "oneOf": [
              {},
              {
                "type": "null"
              }
            ],
            "description": "Mock tool data generated for this scenario. Format: [{tool_id, tool_name, new_entry: {input, output}}]. Stored for evaluation and debugging purposes."
          }
        },
        "required": [
          "history_date",
          "history_type",
          "scenario_type"
        ]
      },
      "ScenarioImprovementSessionCreate": {
        "type": "object",
        "description": "",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "project": {
            "type": [
              "integer",
              "null"
            ]
          },
          "scenario_ids": {
            "readOnly": true,
            "description": "List of scenario IDs being improved in this session"
          },
          "title": {
            "type": "string",
            "description": "Title for the session (auto-generated from first user message)",
            "maxLength": 255
          },
          "scenario_selection": {
            "writeOnly": true
          }
        }
      },
      "ScenarioImprovementSessionDetail": {
        "type": "object",
        "description": "",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "title": {
            "type": "string",
            "description": "Title for the session (auto-generated from first user message)",
            "maxLength": 255
          },
          "project": {
            "type": [
              "integer",
              "null"
            ]
          },
          "scenario_ids": {
            "description": "List of scenario IDs being improved in this session"
          },
          "conversation_history": {
            "description": "List of conversation items: [{role: 'user'|'assistant', content: str, timestamp: str, tool_calls: [...]}]"
          },
          "status": {
            "enum": [
              "pending",
              "in_progress",
              "completed",
              "cancelled",
              "failed"
            ],
            "type": "string",
            "x-spec-enum-id": "834f792e06398501",
            "description": "Current status of the improvement session\n\n* `pending` - Pending\n* `in_progress` - In Progress\n* `completed` - Completed\n* `cancelled` - Cancelled\n* `failed` - Failed"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "created_by": {
            "type": [
              "integer",
              "null"
            ]
          }
        }
      },
      "ScenarioImprovementSessionList": {
        "type": "object",
        "description": "",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "title": {
            "type": "string",
            "description": "Title for the session (auto-generated from first user message)",
            "maxLength": 255
          },
          "project": {
            "type": [
              "integer",
              "null"
            ]
          },
          "scenario_ids": {
            "description": "List of scenario IDs being improved in this session"
          },
          "status": {
            "enum": [
              "pending",
              "in_progress",
              "completed",
              "cancelled",
              "failed"
            ],
            "type": "string",
            "x-spec-enum-id": "834f792e06398501",
            "description": "Current status of the improvement session\n\n* `pending` - Pending\n* `in_progress` - In Progress\n* `completed` - Completed\n* `cancelled` - Cancelled\n* `failed` - Failed"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "message_count": {
            "type": "string",
            "readOnly": true
          }
        }
      },
      "ScenarioInline": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "agent": {
            "type": [
              "integer",
              "null"
            ]
          },
          "name": {
            "type": "string",
            "description": "Name of the scenario",
            "maxLength": 80
          },
          "personality": {
            "type": [
              "integer",
              "null"
            ]
          },
          "personality_name": {
            "type": "string",
            "readOnly": true
          }
        }
      },
      "ScenarioInstructionsRequest": {
        "type": "object",
        "properties": {
          "agent": {
            "type": "integer"
          },
          "extra_instructions": {
            "type": "string"
          },
          "current_instructions": {
            "type": "string"
          }
        },
        "required": [
          "agent",
          "extra_instructions"
        ]
      },
      "ScenarioList": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true,
            "description": "\nUnique identifier for the AI agent\nExample: `123`\n"
          },
          "name": {
            "type": "string",
            "description": "Name of the scenario",
            "maxLength": 80
          },
          "personality": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Foreign key reference to the personality used in this scenario"
          },
          "personality_name": {
            "type": "string",
            "readOnly": true,
            "description": "\nName of the personality used in this scenario\nExample: `\"Normal Male\"`\n"
          },
          "agent_name": {
            "type": "string",
            "readOnly": true,
            "description": "\nName of the agent associated with this scenario\nExample: `\"Customer Support Agent\"`\n"
          },
          "phone_number": {
            "type": "string",
            "readOnly": true
          },
          "expected_outcome_prompt": {
            "type": "string",
            "readOnly": true,
            "description": "\nExpected outcome prompt for the scenario\nExample: `\"The user should be able to complete the order\"`\n"
          },
          "instructions": {
            "type": "string",
            "description": "\nScenario Instructions - format depends on scenario_type:\n\n**For scenario_type=\"instruction\":**\nPlain text describing the caller's behavior.\nExample: `\"You are a customer calling to inquire about your order status. Be polite and provide order number 12345 when asked.\"`\n\n**For scenario_type=\"conditional_actions\":**\nUse the structured `conditional_actions` field instead. If you must send via this field, pass a JSON-formatted string with role and conditions:\n```json\n{\n  \"role\": \"A friendly customer calling about an appointment\",\n  \"conditions\": [\n    {\n      \"id\": 0,\n      \"condition\": \"FIRST_MESSAGE\",\n      \"action\": \"Hi, I'd like to check on my upcoming appointment <silence time=\\\"1.5s\\\" />\",\n      \"type\": \"standard\",\n      \"fixed_message\": true\n    },\n    {\n      \"id\": 1,\n      \"condition\": \"The agent asks for your name\",\n      \"action\": \"My name is Sarah Johnson\",\n      \"type\": \"standard\",\n      \"fixed_message\": true\n    },\n    {\n      \"id\": 2,\n      \"condition\": \"The agent asks for your date of birth\",\n      \"action\": \"January first, nineteen ninety\",\n      \"type\": \"standard\",\n      \"fixed_message\": true\n    },\n    {\n      \"id\": 3,\n      \"condition\": \"The agent confirms your identity and provides appointment details\",\n      \"action\": \"Thank you, that's all I needed <silence time=\\\"1.0s\\\" />\",\n      \"type\": \"standard\",\n      \"fixed_message\": true\n    },\n    {\n      \"id\": 4,\n      \"condition\": 3,\n      \"action\": \"<endcall />\",\n      \"type\": \"action_followup\",\n      \"fixed_message\": true\n    }\n  ]\n}\n```\n\n**Structure:**\n- `role`: Personality/role description\n- `conditions`: Array with id (0,1,2...), condition (FIRST_MESSAGE | a natural-language third-person description of the main agent's observable action, e.g. `\"The agent asks for your date of birth\"` — matched semantically against the conversation context | integer reference to another condition's id), action (text with SSML `<silence time=\"1.5s\" />` (interruptible) or `<hold time=\"2s\" />` (not interruptible) and markers `[laughter]` or `<endcall />`), type (standard | action_followup), fixed_message (boolean)\n"
          },
          "scenario_language": {
            "enum": [
              "af",
              "ar",
              "bn",
              "bg",
              "zh",
              "cs",
              "da",
              "nl",
              "en",
              "et",
              "fi",
              "fr",
              "de",
              "el",
              "gu",
              "hi",
              "he",
              "hu",
              "id",
              "it",
              "ja",
              "kn",
              "ko",
              "ms",
              "ml",
              "mr",
              "multi",
              "no",
              "pl",
              "pa",
              "pt",
              "ro",
              "ru",
              "sk",
              "es",
              "sv",
              "th",
              "tr",
              "tl",
              "ta",
              "te",
              "uk",
              "vi",
              null
            ],
            "type": [
              "string",
              "null"
            ],
            "x-spec-enum-id": "b822ad429c7b7fec",
            "description": "Language code for the scenario (ISO language code)\n\n* `af` - Afrikaans\n* `ar` - Arabic\n* `bn` - Bengali\n* `bg` - Bulgarian\n* `zh` - Chinese Simplified\n* `cs` - Czech\n* `da` - Danish\n* `nl` - Dutch\n* `en` - English\n* `et` - Estonian\n* `fi` - Finnish\n* `fr` - French\n* `de` - German\n* `el` - Greek\n* `gu` - Gujarati\n* `hi` - Hindi\n* `he` - Hebrew\n* `hu` - Hungarian\n* `id` - Indonesian\n* `it` - Italian\n* `ja` - Japanese\n* `kn` - Kannada\n* `ko` - Korean\n* `ms` - Malay\n* `ml` - Malayalam\n* `mr` - Marathi\n* `multi` - Multilingual\n* `no` - Norwegian\n* `pl` - Polish\n* `pa` - Punjabi\n* `pt` - Portuguese\n* `ro` - Romanian\n* `ru` - Russian\n* `sk` - Slovak\n* `es` - Spanish\n* `sv` - Swedish\n* `th` - Thai\n* `tr` - Turkish\n* `tl` - Tagalog\n* `ta` - Tamil\n* `te` - Telugu\n* `uk` - Ukrainian\n* `vi` - Vietnamese"
          },
          "scenario_type": {
            "enum": [
              "instruction",
              "real_world_smart",
              "real_world_fixed",
              "conditional_actions"
            ],
            "type": "string",
            "x-spec-enum-id": "db62e37bb530b602",
            "default": "instruction",
            "description": "\nType of scenario:\n- `instruction`: Standard instruction-based scenario where instructions field contains plain text\n- `conditional_actions`: Conditional action-based scenario where instructions field contains JSON\n- `real_world_smart`: Real world smart scenario\n- `real_world_fixed`: Real world fixed scenario\n\n\n* `instruction` - Instruction\n* `real_world_smart` - Real World Smart\n* `real_world_fixed` - Real World Fixed\n* `conditional_actions` - Conditional Actions"
          },
          "tags": {
            "description": "\nList of tags associated with this scenario for categorization\nExample: `[\"tag1\", \"tag2\", \"tag3\"]`\n"
          },
          "agent": {
            "type": "integer",
            "description": "Foreign key reference to the AI agent that owns this scenario"
          },
          "inbound_phone_number": {
            "type": [
              "integer",
              "null"
            ],
            "description": "(Deprecated) Foreign key reference to the phone number. Use phone_number field instead. This field is maintained for backward compatibility and will be automatically synced with phone_number."
          },
          "inbound_phone_number_data": {
            "type": "string",
            "readOnly": true,
            "description": "Details of the phone number used for inbound calls"
          },
          "metrics": {
            "type": "string",
            "readOnly": true,
            "description": "List of metrics associated with this scenario for evaluation"
          },
          "metric_names": {
            "type": "string",
            "readOnly": true,
            "description": "\nList of metric names associated with this scenario\nExample: `[\"Metric 1\", \"Metric 2\", \"Metric 3\"]`\n"
          },
          "first_message": {
            "type": "string",
            "default": "Hello",
            "description": "The initial message that the AI agent will send when the scenario starts"
          },
          "tool_ids": {
            "description": "\nList of tool IDs that are available for use in this scenario\nExample: `[\"TOOL_DTML\", \"TOOL_END_CALL\"]`\n"
          },
          "test_profile": {
            "type": [
              "integer",
              "null"
            ],
            "description": "\nTest profile ID\nExample: `123`\n"
          },
          "test_profile_data": {
            "allOf": [
              {
                "$ref": "#/components/schemas/AIAgentTestProfile"
              }
            ],
            "readOnly": true,
            "description": "\nDetails of the test profile associated with this scenario\nExample:\n```json\n{\n    \"id\": \"<integer>\",\n    \"agent\": \"<integer>\",\n    \"name\": \"<string>\",\n    \"information\": {\n        \"user_name\": \"John Doe\",\n        \"user_email\": \"john.doe@example.com\",\n    }\n}\n```\n"
          },
          "dynamic_variable_values": {
            "oneOf": [
              {},
              {
                "type": "null"
              }
            ],
            "description": "REMOVED FROM API. Historically stored a flat copy of the agent's dynamic-variable values for the scenario. The column is retained read-only for legacy rows; reads still return its historical value, but writes via the API are rejected with a 400. At call time the Run-level helper consults this column ONLY when the attached test_profile is legacy-flat (or absent) — sectioned test profiles are the canonical source and ignore this column. Put dynamic-variable values in `test_profile.information.main_agent_variables` for new scenarios."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true,
            "description": "Timestamp when the scenario was created"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true,
            "description": "Timestamp when the scenario was last updated"
          },
          "created_by": {
            "type": "integer",
            "readOnly": true,
            "description": "ID of the user who created this scenario"
          },
          "last_updated_by": {
            "type": "integer",
            "readOnly": true,
            "description": "ID of the user who last updated this scenario"
          },
          "folder_path": {
            "type": [
              "string",
              "null",
              "null"
            ],
            "description": "Dot-separated path of the folder to assign this evaluator to (e.g. \"Sales.Inbound\"). Folders must be created before use — they are not auto-created. Use `scenarios_create_folder_create` to create each level before assigning evaluators. Example: to use \"Sales.Inbound\", first create \"Sales\", then create \"Inbound\" inside it."
          }
        },
        "required": [
          "agent",
          "instructions",
          "name"
        ]
      },
      "ScenarioRestoreRequest": {
        "type": "object",
        "properties": {
          "history_id": {
            "type": "integer"
          }
        },
        "required": [
          "history_id"
        ]
      },
      "ScenarioSerializerV2": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "name": {
            "type": "string",
            "description": "Name of the scenario",
            "maxLength": 80
          },
          "agent": {
            "type": "integer",
            "description": "\nAgent ID\nExample: `2142`\n"
          },
          "project": {
            "type": [
              "integer",
              "null"
            ]
          },
          "assistant_id": {
            "type": "string",
            "writeOnly": true,
            "description": "\nAlternative to agent ID - the assistant ID to use for this scenario\nExample: `\"asst_1234567890\"`\n"
          },
          "personality": {
            "type": "integer",
            "description": "\nPersonality ID\nExample: `123`\n"
          },
          "personality_name": {
            "type": "string",
            "readOnly": true,
            "description": "\nName of the personality used in this scenario\nExample: `\"Normal Male\"`\n"
          },
          "agent_name": {
            "type": "string",
            "readOnly": true,
            "description": "\nName of the agent associated with this scenario\nExample: `\"Customer Support Agent\"`\n"
          },
          "tags": {
            "description": "\nTags associated with the scenario\nExample: `[\"tag1\", \"tag2\"]`\n"
          },
          "tool_ids": {
            "description": "\nList of tool IDs to associate with this scenario\nExample: `[\"TOOL_DTMF\", \"TOOL_END_CALL\"]`\n"
          },
          "metrics": {
            "writeOnly": true,
            "description": "\nList of metric IDs to associate with this scenario\nExample: `[123, 456]`\n"
          },
          "metric_names": {
            "type": "string",
            "readOnly": true,
            "description": "\nList of metric names associated with this scenario\nExample: `[\"Metric 1\", \"Metric 2\"]`\n"
          },
          "phone_number": {
            "type": [
              "integer",
              "null"
            ],
            "description": "\nPhone number ID - Used for both inbound and outbound calls\nExample: `123`\n"
          },
          "outbound_phone_number_data": {
            "allOf": [
              {
                "$ref": "#/components/schemas/PhoneNumberInbound"
              }
            ],
            "readOnly": true,
            "description": "\nPhone number used for outbound calls in this scenario\nExample: `\"+1234567890\"`\n"
          },
          "first_message": {
            "type": "string",
            "description": "First message to be sent to the Main Agent"
          },
          "inbound_phone_number": {
            "type": [
              "integer",
              "null"
            ],
            "description": "\n(Deprecated) Use phone_number instead. This field is maintained for backward compatibility only.\nWhen phone_number is set, this field will be automatically synced.\nExample: `123`\n"
          },
          "inbound_phone_number_data": {
            "allOf": [
              {
                "$ref": "#/components/schemas/PhoneNumberInbound"
              }
            ],
            "readOnly": true,
            "description": "\n(Deprecated) Phone number used for inbound calls in this scenario. Use outbound_phone_number_data instead.\nAfter CEK-6517, both phone_number and inbound_phone_number fields are synced, so outbound_phone_number_data contains the unified phone number for both inbound and outbound calls.\nExample: `{\"id\": 123, \"number\": \"+1234567890\", \"phone_number_id\": \"abc123\"}`\n"
          },
          "instructions": {
            "type": "string",
            "description": "Scenario Instructions"
          },
          "conditional_actions": {
            "writeOnly": true,
            "description": "Structured conditional-actions object for `scenario_type=\"conditional_actions\"`. Use either `conditional_actions` (structured) or `instructions` (plain text) — not both.\n\nExample:\n```json\n{\n  \"role\": \"You are a patient calling to schedule an appointment\",\n  \"conditions\": [\n    {\"id\": 0, \"condition\": \"FIRST_MESSAGE\", \"action\": \"Hi, I need to schedule an appointment\",\n     \"type\": \"standard\", \"fixed_message\": true},\n    {\"id\": 1, \"condition\": \"when the agent asks for your name\",\n     \"action\": \"Provide your full name: John Smith\", \"type\": \"standard\", \"fixed_message\": false}\n  ]\n}\n```"
          },
          "simulation_description": {
            "type": "string",
            "description": "Simulation Description"
          },
          "information_fields": {
            "description": "\nInformation fields associated with the scenario\nExample: `{\"user_name\": \"John Doe\", \"user_email\": \"john.doe@example.com\", \"order_id\": \"1234567890\"}`\n"
          },
          "expected_outcome_prompt": {
            "type": "string",
            "description": "\nExpected Outcome Prompt\nExample: `\"The user should be able to complete the order\"`\n"
          },
          "scenario_language": {
            "enum": [
              "af",
              "ar",
              "bn",
              "bg",
              "zh",
              "cs",
              "da",
              "nl",
              "en",
              "et",
              "fi",
              "fr",
              "de",
              "el",
              "gu",
              "hi",
              "he",
              "hu",
              "id",
              "it",
              "ja",
              "kn",
              "ko",
              "ms",
              "ml",
              "mr",
              "multi",
              "no",
              "pl",
              "pa",
              "pt",
              "ro",
              "ru",
              "sk",
              "es",
              "sv",
              "th",
              "tr",
              "tl",
              "ta",
              "te",
              "uk",
              "vi"
            ],
            "type": "string",
            "x-spec-enum-id": "b822ad429c7b7fec",
            "description": "\nLanguage of the scenario\n\n\n* `af` - Afrikaans\n* `ar` - Arabic\n* `bn` - Bengali\n* `bg` - Bulgarian\n* `zh` - Chinese Simplified\n* `cs` - Czech\n* `da` - Danish\n* `nl` - Dutch\n* `en` - English\n* `et` - Estonian\n* `fi` - Finnish\n* `fr` - French\n* `de` - German\n* `el` - Greek\n* `gu` - Gujarati\n* `hi` - Hindi\n* `he` - Hebrew\n* `hu` - Hungarian\n* `id` - Indonesian\n* `it` - Italian\n* `ja` - Japanese\n* `kn` - Kannada\n* `ko` - Korean\n* `ms` - Malay\n* `ml` - Malayalam\n* `mr` - Marathi\n* `multi` - Multilingual\n* `no` - Norwegian\n* `pl` - Polish\n* `pa` - Punjabi\n* `pt` - Portuguese\n* `ro` - Romanian\n* `ru` - Russian\n* `sk` - Slovak\n* `es` - Spanish\n* `sv` - Swedish\n* `th` - Thai\n* `tr` - Turkish\n* `tl` - Tagalog\n* `ta` - Tamil\n* `te` - Telugu\n* `uk` - Ukrainian\n* `vi` - Vietnamese"
          },
          "scenario_type": {
            "enum": [
              "instruction",
              "real_world_smart",
              "real_world_fixed",
              "conditional_actions"
            ],
            "type": "string",
            "x-spec-enum-id": "db62e37bb530b602",
            "default": "instruction",
            "description": "\nType of scenario (instruction, real_world_smart, or real_world_fixed)\n\n\n* `instruction` - Instruction\n* `real_world_smart` - Real World Smart\n* `real_world_fixed` - Real World Fixed\n* `conditional_actions` - Conditional Actions"
          },
          "suite_type": {
            "enum": [
              "undefined",
              "infrastructure"
            ],
            "type": "string",
            "x-spec-enum-id": "643f6a8cdc799a77",
            "description": "Type of predefined suite (e.g., infrastructure)\n\n* `undefined` - Undefined\n* `infrastructure` - Infrastructure"
          },
          "is_predefined": {
            "type": "boolean",
            "description": "Whether this is a predefined scenario (template)"
          },
          "test_profile": {
            "type": [
              "integer",
              "null"
            ]
          },
          "test_profile_data": {
            "allOf": [
              {
                "$ref": "#/components/schemas/AIAgentTestProfile"
              }
            ],
            "readOnly": true,
            "description": "\nDetails of the test profile associated with this scenario. `information` uses the\nsectioned shape: `main_agent_variables` are sent to the agent under test as\ndynamic variables at call time; `testing_agent_variables` are persona/context\nused by Cekura's simulated caller. Legacy flat dicts (no section keys) still\nwork — at call time they are delivered to both sides for backward compatibility.\nExample:\n```json\n{\n    \"id\": \"<integer>\",\n    \"agent_id\": \"<integer>\",\n    \"name\": \"<string>\",\n    \"information\": {\n        \"main_agent_variables\": {\n            \"user_id\": \"<string>\",\n            \"account_id\": \"<string>\"\n        },\n        \"testing_agent_variables\": {\n            \"user_name\": \"<string>\",\n            \"user_email\": \"<string>\",\n            \"order_id\": \"<string>\"\n        }\n    }\n}\n```\n"
          },
          "dynamic_variable_values": {
            "readOnly": true,
            "description": "REMOVED FROM API. Reads return the historical value for legacy rows (`null` for new rows). Writes are no longer accepted — supplying a non-null value yields a 400 error. Put dynamic-variable values in `test_profile_data.information.main_agent_variables` instead: create the test profile via POST /test-profiles/ and attach it via the `test_profile` field on the scenario."
          },
          "generated_mock_tool_entries": {
            "oneOf": [
              {},
              {
                "type": "null"
              }
            ],
            "description": "Expected mock tool calls for this evaluator. Each entry has shape {tool_id, tool_name, new_entry: {input, output}}. Auto-generated during scenario generation when the agent has mock tools attached; can also be set or edited manually."
          },
          "folder_path": {
            "type": [
              "string",
              "null",
              "null"
            ],
            "description": "Dot-separated path of the folder to assign this evaluator to (e.g. \"Sales.Inbound\"). Folders must be created before use — they are not auto-created. Use `scenarios_create_folder_create` to create each level before assigning evaluators. Example: to use \"Sales.Inbound\", first create \"Sales\", then create \"Inbound\" inside it."
          },
          "max_duration": {
            "type": [
              "integer",
              "null"
            ],
            "description": "\nMax call duration in seconds for this scenario. If not provided or set to null, the scenario will use the project's max_call_duration setting.\nValid range: 10-3600 seconds (10 seconds to 60 minutes)\nExample: `600` (10 minutes)\n"
          }
        },
        "required": [
          "personality"
        ]
      },
      "ScenarioWithWebsocket": {
        "type": "object",
        "properties": {
          "scenario": {
            "type": "integer",
            "description": "Integer ID of the evaluator (scenario) to run."
          },
          "websocket_url": {
            "type": "string",
            "description": "WebSocket URL for this specific scenario (must start with ws:// or wss://). Overrides the agent-level websocket_url for this run only."
          }
        },
        "required": [
          "scenario"
        ]
      },
      "ScenariosBulkDeleteRequest": {
        "type": "object",
        "properties": {
          "scenarios": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "List of evaluator (scenario) IDs to soft-delete."
          },
          "agent_id": {
            "type": "integer",
            "description": "Scope the permission check to a specific agent. Either this or project_id is required."
          },
          "project_id": {
            "type": "integer",
            "description": "Scope the permission check to a specific project. Either this or agent_id is required."
          }
        },
        "required": [
          "scenarios"
        ]
      },
      "ScenariosBulkUpdateRequest": {
        "type": "object",
        "properties": {
          "scenarios": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "List of evaluator (scenario) IDs to update."
          },
          "agent": {
            "type": "integer",
            "description": "Scopes the permission check to a specific agent (either this or `project` is required). When provided, also overrides each evaluator's `agent` to this ID."
          },
          "project": {
            "type": "integer",
            "description": "Scope the permission check to a specific project. Either this or `agent` is required."
          },
          "metric_ids_to_add": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "Metric IDs to attach to each evaluator."
          },
          "metric_ids_to_remove": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "Metric IDs to detach from each evaluator."
          },
          "tool_ids_to_add": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "Tool IDs to attach to each evaluator."
          },
          "tool_ids_to_remove": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "Tool IDs to detach from each evaluator."
          },
          "personality": {
            "type": "integer",
            "description": "Replace each evaluator's personality with this ID."
          },
          "test_profile": {
            "type": "integer",
            "description": "Replace each evaluator's test profile with this ID."
          },
          "append_instruction": {
            "type": "string",
            "description": "Text appended to every evaluator's instructions. Concatenates on each call — not idempotent."
          },
          "first_message": {
            "type": "string",
            "description": "Replace each evaluator's first message."
          },
          "phone_number": {
            "type": "integer",
            "description": "Replace each evaluator's outbound phone number ID."
          },
          "inbound_phone_number": {
            "type": "integer",
            "description": "Replace each evaluator's inbound phone number ID."
          },
          "folder_path": {
            "type": "string",
            "description": "Move every evaluator into this folder. Dot-separated (e.g. \"Sales.Inbound\")."
          },
          "max_duration": {
            "type": "integer",
            "description": "Replace each evaluator's max duration in seconds."
          }
        },
        "required": [
          "scenarios"
        ]
      },
      "SchemaAgentProviderCreate": {
        "type": "object",
        "properties": {
          "type": {
            "enum": [
              "vapi",
              "retell",
              "elevenlabs",
              "cisco",
              "bland",
              "livekit",
              "pipecat",
              "synthflow",
              "agora",
              "koreai",
              "genesys",
              "amazon_connect",
              "telnyx",
              "custom",
              ""
            ],
            "type": "string",
            "x-spec-enum-id": "3f5fcc0e5ae82793",
            "description": "Voice/inbound platform provider type. Valid values: vapi, retell, elevenlabs, bland, livekit, cisco, synthflow, koreai, genesys, amazon_connect, pipecat, custom. Use 'custom' (or omit) for chat-only agents with no voice provider — the chat channel goes in chat_agent_details.type. For a raw-PCM websocket voice agent you host yourself, use type='custom' and put the endpoint in telephony.websocket_url. Text-only channels (sms, whatsapp, agentforce, sierra) belong in chat_agent_details.type, not here.\n\n* `vapi` - Vapi\n* `retell` - Retell\n* `elevenlabs` - Elevenlabs\n* `cisco` - Cisco\n* `bland` - Bland\n* `livekit` - Livekit\n* `pipecat` - Pipecat\n* `synthflow` - Synthflow\n* `agora` - Agora\n* `koreai` - Koreai\n* `genesys` - Genesys\n* `amazon_connect` - Amazon Connect\n* `telnyx` - Telnyx\n* `custom` - Custom (chat-only, no voice provider)"
          },
          "agent_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Agent ID for voice/inbound runs on the provider's platform. For vapi, elevenlabs, retell, synthflow, and bland this is the voice agent ID (for bland it's the persona_id). Bland's pathway_id and retell's chat agent ID go in chat_agent_details.config.agent_id."
          },
          "credentials": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/AgentCredentials"
              },
              {
                "type": "null"
              }
            ]
          },
          "chat_agent_details": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ChatAgentDetails"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional chat/text-mode configuration. Defines which provider handles text-mode test runs. The allowed chat type depends on the voice provider.type."
          },
          "auto_dial_outbound": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Auto-dial the outbound number when running outbound scenarios. Supported for: vapi, retell, elevenlabs, bland, livekit."
          },
          "auto_import_calls": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Auto-import calls from the provider every 30s. Supported for: vapi, retell, elevenlabs."
          },
          "auto_sync_prompt": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Enable one-way prompt sync from the provider to Cekura on a schedule. Cekura re-fetches the provider prompt and updates the agent description; it does not push Cekura description changes back to the provider. Supported for: vapi, retell, elevenlabs, synthflow, telnyx, bland."
          },
          "send_post_conversation_metadata": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Enable Cekura to accept call transcripts pushed by your agent via POST /custom-provider-webhook/. Only for self-hosted (custom) providers."
          },
          "configure_from_provider": {
            "type": "boolean",
            "default": false,
            "description": "When true on create for a cloud provider (vapi/retell/elevenlabs/synthflow), Cekura fetches the assistant's prompt, settings, phone, tools, dynamic variables and knowledge base and configures the agent automatically. Requires agent_id + credentials.api_key. The create response includes a progress_id to poll import-progress/."
          }
        }
      },
      "SchemaCreateScenariosProgressResponse": {
        "type": "object",
        "properties": {
          "agent_id": {
            "type": "integer",
            "description": "ID of the agent associated with the scenario creation"
          },
          "completed_scenarios": {
            "type": "integer",
            "description": "Number of scenarios successfully created"
          },
          "failed_scenarios": {
            "type": "integer",
            "description": "Number of scenarios that failed to create"
          },
          "total_scenarios": {
            "type": "integer",
            "description": "Total number of scenarios being processed"
          },
          "scenarios_list": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Scenario"
            },
            "description": "List of created scenario objects (only included when processing is complete)"
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": {}
            },
            "description": "List of errors encountered during scenario creation"
          }
        },
        "required": [
          "agent_id",
          "completed_scenarios",
          "failed_scenarios",
          "total_scenarios"
        ]
      },
      "SchemaCreateShareableLinkTokenResponse": {
        "type": "object",
        "properties": {
          "token": {
            "type": "string",
            "description": "Unique token identifier for the shareable link, used for authentication and access control"
          },
          "shareable_link": {
            "type": "string",
            "description": "Complete URL for the shareable link that can be distributed to external users"
          }
        },
        "required": [
          "shareable_link",
          "token"
        ]
      },
      "SchemaElevenLabsData": {
        "type": "object",
        "description": "Per-run ElevenLabs overrides. Credentials are read from the agent.",
        "properties": {
          "elevenlabs_base_url_override": {
            "type": [
              "string",
              "null"
            ],
            "description": "Override the ElevenLabs base URL for this run (e.g. a regional or self-hosted endpoint)."
          }
        }
      },
      "SchemaGenerateMetricsMetricCreate": {
        "type": "object",
        "properties": {
          "agent_id": {
            "type": "integer",
            "description": "The ID of the AI agent to generate metrics for. Either agent_id or assistant_id must be provided."
          },
          "assistant_id": {
            "type": "string",
            "description": "The assistant ID to generate metrics for. Either agent_id or assistant_id must be provided."
          },
          "num_metrics": {
            "type": "integer",
            "maximum": 100,
            "minimum": 1,
            "default": 1,
            "description": "Number of metrics to generate"
          }
        }
      },
      "SchemaGenerateMetricsResponse": {
        "type": "object",
        "properties": {
          "progress_id": {
            "type": "string",
            "format": "uuid",
            "description": "UUID to poll the generate_metrics_progress endpoint for status and results"
          }
        },
        "required": [
          "progress_id"
        ]
      },
      "SchemaGenerateScenarios": {
        "type": "object",
        "properties": {
          "agent_id": {
            "type": "integer",
            "description": "ID of the agent to generate evaluator for"
          },
          "assistant_id": {
            "type": "string",
            "description": "Alternative to agent_id - the assistant ID to generate evaluators for"
          },
          "personalities": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "List of personality IDs to use for generated evaluators"
          },
          "num_scenarios": {
            "type": "integer",
            "maximum": 100,
            "minimum": 1,
            "description": "Number of evaluators to generate (1-100)"
          },
          "test_profile": {
            "type": "integer",
            "description": "ID of the test profile to assign to generated evaluators"
          },
          "scenario_type": {
            "enum": [
              "workflow",
              "red_teaming_voice",
              "red_teaming_text"
            ],
            "type": "string",
            "x-spec-enum-id": "42aa0beee566f1ba",
            "default": "workflow",
            "description": "Type of scenarios to generate: workflow (standard scenarios), red_teaming_voice (red teaming with voice-suitable prompts only), or red_teaming_text (red teaming with all prompts)\n\n* `workflow` - workflow\n* `red_teaming_voice` - red_teaming_voice\n* `red_teaming_text` - red_teaming_text"
          },
          "attack_type": {
            "enum": [
              "",
              "system_prompt_leak",
              "data_leak",
              "harmful_content",
              "biased_output",
              "unauthorized_actions",
              "off_task",
              null
            ],
            "type": [
              "string",
              "null"
            ],
            "x-spec-enum-id": "70525e347169b18e",
            "description": "Attack category for red teaming scenarios. Required when scenario_type is red_teaming_voice or red_teaming_text. Categories: system_prompt_leak (attempts to extract the system prompt), data_leak (attempts to extract sensitive data), harmful_content (attempts to generate harmful output), biased_output (attempts to generate biased responses), unauthorized_actions (attempts to trigger unauthorized tool calls or actions), off_task (attempts to derail the conversation away from the agent's purpose)\n\n* `` - \n* `system_prompt_leak` - system_prompt_leak\n* `data_leak` - data_leak\n* `harmful_content` - harmful_content\n* `biased_output` - biased_output\n* `unauthorized_actions` - unauthorized_actions\n* `off_task` - off_task"
          },
          "expected_outcome": {
            "type": [
              "string",
              "null"
            ],
            "description": "Custom expected outcome for the scenario. If not provided, a default is generated based on the attack type."
          },
          "extra_instructions": {
            "type": "string",
            "description": "Additional instructions to guide evaluator generation"
          },
          "inbound_phone_number": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Phone number ID to use for inbound evaluator"
          },
          "first_message": {
            "type": "string",
            "default": "Hello",
            "description": "Initial message to start the conversation",
            "maxLength": 1000
          },
          "generate_expected_outcomes": {
            "type": "boolean",
            "default": false,
            "description": "If true, expected outcomes will be generated for each evaluator"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "List of tags to apply to all generated scenarios"
          },
          "tool_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "List of tool IDs to use for generated evaluators",
            "example": [
              "TOOL_DTMF",
              "TOOL_END_CALL",
              "TOOL_END_CALL_ONLY_ON_TRANSFER"
            ]
          },
          "folder_path": {
            "type": [
              "string",
              "null"
            ],
            "description": "Folder path to assign generated scenarios to (e.g., 'folder_name' or 'parent.child')"
          }
        },
        "required": [
          "num_scenarios"
        ]
      },
      "SchemaPipecatScenario": {
        "type": "object",
        "description": "Schema for individual scenario configuration in Pipecat WebRTC runs.",
        "properties": {
          "scenario": {
            "type": "integer",
            "description": "ID of the scenario to run"
          },
          "pipecat_room_url": {
            "type": "string",
            "description": "Pipecat WebRTC room URL to connect to"
          },
          "pipecat_token": {
            "type": "string",
            "description": "Authentication token for the Pipecat room (optional)"
          },
          "publish_data_message": {
            "description": "Optional JSON data message to publish during the session"
          }
        },
        "required": [
          "pipecat_room_url",
          "scenario"
        ]
      },
      "SchemaPipecatV2Data": {
        "type": "object",
        "description": "Per-run Pipecat Cloud overrides. Credentials are read from the agent/project ProviderCredential.",
        "properties": {
          "pipecat_agent_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pipecat Cloud agent name. Overrides the agent/project saved pipecat_agent_name."
          },
          "config": {
            "description": "Session configuration for this run. Replaces the agent/project saved config — no merge."
          },
          "room_properties": {
            "description": "Daily.co room properties for this run. Replaces the agent/project saved room_properties — no merge."
          }
        }
      },
      "SchemaPipecatV2Scenario": {
        "type": "object",
        "description": "Schema for individual scenario configuration in automated Pipecat Cloud runs.",
        "properties": {
          "scenario": {
            "type": "integer",
            "description": "ID of the scenario to run"
          },
          "publish_data_message": {
            "oneOf": [
              {},
              {
                "type": "null"
              }
            ],
            "description": "Optional JSON data message to publish during the session"
          }
        },
        "required": [
          "scenario"
        ]
      },
      "SchemaPostAIAgentTestProfileExternal": {
        "type": "object",
        "properties": {
          "agent": {
            "type": [
              "integer",
              "null"
            ],
            "description": "ID of the agent. Either agent or project must be provided."
          },
          "project": {
            "type": [
              "integer",
              "null"
            ],
            "description": "ID of the project. Either agent or project must be provided."
          },
          "name": {
            "type": "string",
            "description": "Name of the test profile"
          },
          "information": {
            "type": "object",
            "additionalProperties": {},
            "description": "Test profile information. Use the sectioned shape — `main_agent_variables` (sent to the agent under test as dynamic variables at call time) and `testing_agent_variables` (persona/context used by the simulated caller, not sent to the agent). Legacy flat dicts (no section keys) are still accepted and delivered to both sides for backward compatibility. Example: {\"main_agent_variables\": {\"user_id\": \"U-42\"}, \"testing_agent_variables\": {\"customer_name\": \"John Doe\"}}."
          }
        },
        "required": [
          "name"
        ]
      },
      "SchemaPostAIAgentV2": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true,
            "description": "Agent ID.\nExample: `2142`"
          },
          "name": {
            "type": "string",
            "description": "Agent name. Optional when configure_from_provider is set — it's fetched from the provider.",
            "maxLength": 255
          },
          "description": {
            "type": "string",
            "description": "\nA detailed description of what this agent does and how it should interact\nExample: \n```text\nAI agent for handling customer support inquiries and resolving technical issues\n```\n"
          },
          "project": {
            "type": "integer",
            "description": "The project this agent belongs to"
          },
          "language": {
            "enum": [
              "af",
              "ar",
              "bn",
              "bg",
              "zh",
              "cs",
              "da",
              "nl",
              "en",
              "et",
              "fi",
              "fr",
              "de",
              "el",
              "gu",
              "hi",
              "he",
              "hu",
              "id",
              "it",
              "ja",
              "kn",
              "ko",
              "ms",
              "ml",
              "mr",
              "multi",
              "no",
              "pl",
              "pa",
              "pt",
              "ro",
              "ru",
              "sk",
              "es",
              "sv",
              "th",
              "tr",
              "tl",
              "ta",
              "te",
              "uk",
              "vi"
            ],
            "type": "string",
            "x-spec-enum-id": "b822ad429c7b7fec",
            "default": "en",
            "description": "\nThe primary language this agent uses for communication (e.g. 'en' for English)\n\n\n* `af` - Afrikaans\n* `ar` - Arabic\n* `bn` - Bengali\n* `bg` - Bulgarian\n* `zh` - Chinese Simplified\n* `cs` - Czech\n* `da` - Danish\n* `nl` - Dutch\n* `en` - English\n* `et` - Estonian\n* `fi` - Finnish\n* `fr` - French\n* `de` - German\n* `el` - Greek\n* `gu` - Gujarati\n* `hi` - Hindi\n* `he` - Hebrew\n* `hu` - Hungarian\n* `id` - Indonesian\n* `it` - Italian\n* `ja` - Japanese\n* `kn` - Kannada\n* `ko` - Korean\n* `ms` - Malay\n* `ml` - Malayalam\n* `mr` - Marathi\n* `multi` - Multilingual\n* `no` - Norwegian\n* `pl` - Polish\n* `pa` - Punjabi\n* `pt` - Portuguese\n* `ro` - Romanian\n* `ru` - Russian\n* `sk` - Slovak\n* `es` - Spanish\n* `sv` - Swedish\n* `th` - Thai\n* `tr` - Turkish\n* `tl` - Tagalog\n* `ta` - Tamil\n* `te` - Telugu\n* `uk` - Ukrainian\n* `vi` - Vietnamese"
          },
          "telephony": {
            "allOf": [
              {
                "$ref": "#/components/schemas/AgentTelephony"
              }
            ],
            "writeOnly": true,
            "description": "Phone and SIP/websocket channel configuration."
          },
          "provider": {
            "allOf": [
              {
                "$ref": "#/components/schemas/SchemaAgentProviderCreate"
              }
            ],
            "writeOnly": true,
            "description": "AI platform integration. Nested credentials replace the flat {provider}_api_key fields."
          },
          "agent_speaks_first": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "True = agent speaks first; False = test user speaks first; null = auto-detect."
          },
          "predefined_metrics": {
            "writeOnly": true,
            "description": "predefined metrics to use for the agent"
          },
          "knowledge_base_files": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AgentKnowledgeBaseFileWrite"
            },
            "writeOnly": true,
            "description": "Full desired set of knowledge base files. Reference existing by `id`; add new ones with `file_name` + `content_base64`. Omitted existing files are deleted."
          },
          "enabled_personalities": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "readOnly": true,
            "description": "\nPersonality profiles enabled for this agent\nExample: `[1, 2, 3]`\n"
          },
          "webhook_url": {
            "type": "string",
            "format": "uri",
            "description": "Webhook URL for this agent. When set, overrides the project-level webhook URL for events from this agent."
          },
          "webhook_secret": {
            "type": "string",
            "writeOnly": true,
            "description": "Secret sent in X-CEKURA-SECRET header. Applies when agent webhook_url is set. Write-only — never returned in API responses. Use `webhook_secret_configured` to check whether one is set."
          },
          "webhook_secret_configured": {
            "type": "string",
            "readOnly": true
          },
          "mock_tools": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AgentMockToolWrite"
            },
            "writeOnly": true,
            "description": "Full desired set of mock tools. Items with `id` (or a matching `name`) update existing tools; items without create new ones. Omitted existing tools are deleted."
          },
          "mock_tools_enabled": {
            "type": "boolean",
            "description": "Whether mock tools should be selected by default when configuring a run."
          },
          "mock_tools_provider": {
            "type": [
              "string",
              "null"
            ],
            "readOnly": true,
            "description": "Provider the mock tools were fetched from (vapi, retell, elevenlabs, custom). Null until auto-fetch has been run."
          },
          "dynamic_variables": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AgentDynamicVariableWrite"
            },
            "writeOnly": true,
            "description": "Full desired set of dynamic variable definitions, matched by name. Omitted existing variables are deleted."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true,
            "description": "\nTimestamp when the agent was created\nExample: `\"2021-01-01T00:00:00Z\"`\n"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true,
            "description": "\nTimestamp when the agent was last updated\nExample: `\"2021-01-01T00:00:00Z\"`\n"
          },
          "email_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "email",
            "description": "Email address this agent receives at. When set, enables email-based test runs.",
            "maxLength": 254
          }
        },
        "required": [
          "description"
        ]
      },
      "SchemaPostBulkDeleteResults": {
        "type": "object",
        "properties": {
          "result_ids": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "List of result IDs to soft-delete. Maximum 100 per request.",
            "maxItems": 100,
            "minItems": 1
          }
        },
        "required": [
          "result_ids"
        ]
      },
      "SchemaPostBulkEvaluateResultMetrics": {
        "type": "object",
        "properties": {
          "result_ids": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "Result IDs whose completed/failed runs should be re-evaluated. Maximum 100.",
            "maxItems": 100,
            "minItems": 1
          },
          "metric_ids": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "Metric IDs to re-evaluate against every eligible run of each result.",
            "minItems": 1
          }
        },
        "required": [
          "metric_ids",
          "result_ids"
        ]
      },
      "SchemaPostCopyAgent": {
        "type": "object",
        "properties": {
          "copy_scenarios": {
            "type": "boolean",
            "description": "\nIf true, scenarios will be copied\nExample: `true` or `fase`\n"
          }
        }
      },
      "SchemaPostCreateFromCallLogRequest": {
        "type": "object",
        "properties": {
          "call_log_id": {
            "type": "integer",
            "description": "ID of the call log to create test set from"
          },
          "project": {
            "type": "integer",
            "description": "ID of the project that owns the call log"
          },
          "name": {
            "type": "string",
            "default": "",
            "description": "Optional name for the test set. If not provided, call log ID will be used"
          },
          "metrics": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MetricWithFeedback"
            },
            "description": "List of metrics with optional notes to include in the test set"
          }
        },
        "required": [
          "call_log_id",
          "metrics"
        ]
      },
      "SchemaPostCreateFromCallLogsRequest": {
        "type": "object",
        "properties": {
          "call_logs": {
            "description": "Can be 'all', a positive integer (number of call logs), or a list of call log IDs"
          },
          "project": {
            "type": "integer",
            "description": "ID of the project that owns the call logs"
          },
          "metrics": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MetricWithFeedback"
            },
            "description": "List of metrics with optional notes to include in the test set"
          }
        },
        "required": [
          "call_logs",
          "metrics"
        ]
      },
      "SchemaPostCreateFromRunRequest": {
        "type": "object",
        "properties": {
          "run_id": {
            "type": "integer",
            "description": "ID of the run to create test set from"
          },
          "project": {
            "type": "integer",
            "description": "ID of the project that owns the run"
          },
          "name": {
            "type": "string",
            "default": "",
            "description": "Optional name for the test set. If not provided, run ID will be used"
          },
          "metrics": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MetricWithFeedback"
            },
            "description": "List of metrics with optional notes to include in the test set"
          }
        },
        "required": [
          "metrics",
          "run_id"
        ]
      },
      "SchemaPostCreateScenarios": {
        "type": "object",
        "properties": {
          "agent_id": {
            "type": "integer",
            "description": "\nAgent ID, required if assistant_id is not provided\nExample: `2142`\n"
          },
          "assistant_id": {
            "type": "string",
            "description": "\nAssistant ID, required if agent_id is not provided\nExample: `asst_1234567890`\n"
          },
          "call_logs": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "\nList of call log IDs to create scenarios from. Can also be the string \"all\" to process all call logs.\nExample: `[1, 2, 3]` or `\"all\"`\n"
          },
          "copy_to_agent": {
            "type": [
              "integer",
              "null"
            ],
            "description": "\nOptional agent ID to copy created scenarios to\nExample: `2142`\n"
          },
          "project_id": {
            "type": "integer",
            "description": "\nProject ID. Required when using folder_path.\nExample: `1376`\n"
          },
          "folder_path": {
            "type": [
              "string",
              "null"
            ],
            "description": "\nFolder path to assign the created scenarios to.\nExample: `\"Sales.Inbound\"`\n"
          }
        }
      },
      "SchemaPostCreateShareableLinkToken": {
        "type": "object",
        "properties": {
          "expire_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Optional expiration date/time for the token (ISO 8601 format)"
          }
        }
      },
      "SchemaPostCronJob": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Name for the cronjob"
          },
          "scenarios": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "\nList of scenario IDs to execute\nExample: `[123, 456, 789]`\n"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "\nAlternative to scenarios - List of tags to filter scenario\nExample: `[\"tag1\", \"tag2\", \"tag3\"]`\n"
          },
          "agent": {
            "type": "integer",
            "description": "\nAgent ID. Required when using tags to filter scenarios.\nExample: `123`\n"
          },
          "crontab_expression": {
            "type": "string",
            "description": "\nCron expression for scheduling (e.g. '0 9 * * 1-5' for weekdays at 9am)\nExample: \n- `\"0 9 * * 1-5\"`\n- `\"0 0 * * 0\"`\n"
          },
          "timezone": {
            "enum": [
              "Africa/Abidjan",
              "Africa/Accra",
              "Africa/Addis_Ababa",
              "Africa/Algiers",
              "Africa/Asmara",
              "Africa/Bamako",
              "Africa/Bangui",
              "Africa/Banjul",
              "Africa/Bissau",
              "Africa/Blantyre",
              "Africa/Brazzaville",
              "Africa/Bujumbura",
              "Africa/Cairo",
              "Africa/Casablanca",
              "Africa/Ceuta",
              "Africa/Conakry",
              "Africa/Dakar",
              "Africa/Dar_es_Salaam",
              "Africa/Djibouti",
              "Africa/Douala",
              "Africa/El_Aaiun",
              "Africa/Freetown",
              "Africa/Gaborone",
              "Africa/Harare",
              "Africa/Johannesburg",
              "Africa/Juba",
              "Africa/Kampala",
              "Africa/Khartoum",
              "Africa/Kigali",
              "Africa/Kinshasa",
              "Africa/Lagos",
              "Africa/Libreville",
              "Africa/Lome",
              "Africa/Luanda",
              "Africa/Lubumbashi",
              "Africa/Lusaka",
              "Africa/Malabo",
              "Africa/Maputo",
              "Africa/Maseru",
              "Africa/Mbabane",
              "Africa/Mogadishu",
              "Africa/Monrovia",
              "Africa/Nairobi",
              "Africa/Ndjamena",
              "Africa/Niamey",
              "Africa/Nouakchott",
              "Africa/Ouagadougou",
              "Africa/Porto-Novo",
              "Africa/Sao_Tome",
              "Africa/Tripoli",
              "Africa/Tunis",
              "Africa/Windhoek",
              "America/Adak",
              "America/Anchorage",
              "America/Chicago",
              "America/Denver",
              "America/Los_Angeles",
              "America/New_York",
              "America/Phoenix",
              "America/Sao_Paulo",
              "Asia/Dubai",
              "Asia/Hong_Kong",
              "Asia/Kolkata",
              "Asia/Seoul",
              "Asia/Shanghai",
              "Asia/Singapore",
              "Asia/Tokyo",
              "Australia/Melbourne",
              "Australia/Perth",
              "Australia/Sydney",
              "Europe/Amsterdam",
              "Europe/Berlin",
              "Europe/London",
              "Europe/Madrid",
              "Europe/Moscow",
              "Europe/Paris",
              "Europe/Rome",
              "Pacific/Auckland",
              "Pacific/Honolulu",
              "US/Central",
              "US/Eastern",
              "US/Mountain",
              "US/Pacific",
              "UTC"
            ],
            "type": "string",
            "x-spec-enum-id": "6e7339d971185fa9",
            "description": "\nTimezone for the cronjob (default: Project timezone)\n\n\n* `Africa/Abidjan` - Africa/Abidjan\n* `Africa/Accra` - Africa/Accra\n* `Africa/Addis_Ababa` - Africa/Addis_Ababa\n* `Africa/Algiers` - Africa/Algiers\n* `Africa/Asmara` - Africa/Asmara\n* `Africa/Bamako` - Africa/Bamako\n* `Africa/Bangui` - Africa/Bangui\n* `Africa/Banjul` - Africa/Banjul\n* `Africa/Bissau` - Africa/Bissau\n* `Africa/Blantyre` - Africa/Blantyre\n* `Africa/Brazzaville` - Africa/Brazzaville\n* `Africa/Bujumbura` - Africa/Bujumbura\n* `Africa/Cairo` - Africa/Cairo\n* `Africa/Casablanca` - Africa/Casablanca\n* `Africa/Ceuta` - Africa/Ceuta\n* `Africa/Conakry` - Africa/Conakry\n* `Africa/Dakar` - Africa/Dakar\n* `Africa/Dar_es_Salaam` - Africa/Dar_es_Salaam\n* `Africa/Djibouti` - Africa/Djibouti\n* `Africa/Douala` - Africa/Douala\n* `Africa/El_Aaiun` - Africa/El_Aaiun\n* `Africa/Freetown` - Africa/Freetown\n* `Africa/Gaborone` - Africa/Gaborone\n* `Africa/Harare` - Africa/Harare\n* `Africa/Johannesburg` - Africa/Johannesburg\n* `Africa/Juba` - Africa/Juba\n* `Africa/Kampala` - Africa/Kampala\n* `Africa/Khartoum` - Africa/Khartoum\n* `Africa/Kigali` - Africa/Kigali\n* `Africa/Kinshasa` - Africa/Kinshasa\n* `Africa/Lagos` - Africa/Lagos\n* `Africa/Libreville` - Africa/Libreville\n* `Africa/Lome` - Africa/Lome\n* `Africa/Luanda` - Africa/Luanda\n* `Africa/Lubumbashi` - Africa/Lubumbashi\n* `Africa/Lusaka` - Africa/Lusaka\n* `Africa/Malabo` - Africa/Malabo\n* `Africa/Maputo` - Africa/Maputo\n* `Africa/Maseru` - Africa/Maseru\n* `Africa/Mbabane` - Africa/Mbabane\n* `Africa/Mogadishu` - Africa/Mogadishu\n* `Africa/Monrovia` - Africa/Monrovia\n* `Africa/Nairobi` - Africa/Nairobi\n* `Africa/Ndjamena` - Africa/Ndjamena\n* `Africa/Niamey` - Africa/Niamey\n* `Africa/Nouakchott` - Africa/Nouakchott\n* `Africa/Ouagadougou` - Africa/Ouagadougou\n* `Africa/Porto-Novo` - Africa/Porto-Novo\n* `Africa/Sao_Tome` - Africa/Sao_Tome\n* `Africa/Tripoli` - Africa/Tripoli\n* `Africa/Tunis` - Africa/Tunis\n* `Africa/Windhoek` - Africa/Windhoek\n* `America/Adak` - America/Adak\n* `America/Anchorage` - America/Anchorage\n* `America/Chicago` - America/Chicago\n* `America/Denver` - America/Denver\n* `America/Los_Angeles` - America/Los_Angeles\n* `America/New_York` - America/New_York\n* `America/Phoenix` - America/Phoenix\n* `America/Sao_Paulo` - America/Sao_Paulo\n* `Asia/Dubai` - Asia/Dubai\n* `Asia/Hong_Kong` - Asia/Hong_Kong\n* `Asia/Kolkata` - Asia/Kolkata\n* `Asia/Seoul` - Asia/Seoul\n* `Asia/Shanghai` - Asia/Shanghai\n* `Asia/Singapore` - Asia/Singapore\n* `Asia/Tokyo` - Asia/Tokyo\n* `Australia/Melbourne` - Australia/Melbourne\n* `Australia/Perth` - Australia/Perth\n* `Australia/Sydney` - Australia/Sydney\n* `Europe/Amsterdam` - Europe/Amsterdam\n* `Europe/Berlin` - Europe/Berlin\n* `Europe/London` - Europe/London\n* `Europe/Madrid` - Europe/Madrid\n* `Europe/Moscow` - Europe/Moscow\n* `Europe/Paris` - Europe/Paris\n* `Europe/Rome` - Europe/Rome\n* `Pacific/Auckland` - Pacific/Auckland\n* `Pacific/Honolulu` - Pacific/Honolulu\n* `US/Central` - US/Central\n* `US/Eastern` - US/Eastern\n* `US/Mountain` - US/Mountain\n* `US/Pacific` - US/Pacific\n* `UTC` - UTC"
          },
          "personality": {
            "type": "integer",
            "description": "DEPRECATED: Use personalities instead"
          },
          "personalities": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "\nList of personalities to use for test execution. Multiple personalities can be assigned to run tests with different configurations.\nExample: `[1, 2, 3]` (personality IDs)\n"
          },
          "run_as_text": {
            "type": "boolean",
            "default": false,
            "description": "DEPRECATED: Use execution_mode instead. Run scenarios as text-based chat instead of voice calls"
          },
          "execution_mode": {
            "enum": [
              "voice",
              "text",
              "sip",
              "vapi_webrtc",
              "retell_webrtc",
              "elevenlabs",
              "ello",
              "livekit_v2",
              "pipecat_v2",
              "agora"
            ],
            "type": "string",
            "x-spec-enum-id": "aef421315acd0ca3",
            "default": "voice",
            "description": "\nExecution mode for the cron job. Choices: voice, text, sip\nExample: `\"voice\"`, `\"text\"`, or `\"sip\"`\n\n\n* `voice` - Voice\n* `text` - Text\n* `sip` - SIP\n* `vapi_webrtc` - VAPI WebRTC\n* `retell_webrtc` - Retell WebRTC\n* `elevenlabs` - ElevenLabs\n* `ello` - Ello\n* `livekit_v2` - LiveKit\n* `pipecat_v2` - Pipecat\n* `agora` - Agora"
          }
        },
        "required": [
          "crontab_expression"
        ]
      },
      "SchemaPostDeleteRuns": {
        "type": "object",
        "properties": {
          "run_ids": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "List of run IDs to delete"
          }
        },
        "required": [
          "run_ids"
        ]
      },
      "SchemaPostMetricEdit": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "name": {
            "type": "string",
            "description": "Name of the metric"
          },
          "description": {
            "type": "string",
            "description": "Description of what this metric evaluates"
          },
          "audio_enabled": {
            "type": "boolean",
            "description": "Whether this metric evaluates audio content"
          },
          "prompt": {
            "type": "string",
            "description": "The evaluation prompt used for this metric"
          },
          "project": {
            "type": "integer",
            "description": "ID of the project this metric belongs to."
          },
          "agents": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "List of agent IDs to enable this project-level metric for. Only applicable when project is set."
          },
          "assistant_id": {
            "type": "string",
            "description": "External identifier for the assistant"
          },
          "type": {
            "enum": [
              "basic",
              "custom_prompt",
              "custom_code",
              "llm_judge"
            ],
            "type": "string",
            "x-spec-enum-id": "b44700c0a6443b40",
            "description": "Type of metric (`llm_judge` recommended; `basic` and `custom_prompt` are deprecated)\n\n* `basic` - Basic (Deprecated in favor of LLM Judge)\n* `custom_prompt` - Custom Prompt ( Deprecated in favor of LLM Judge)\n* `custom_code` - Custom Code\n* `llm_judge` - LLM Judge"
          },
          "eval_type": {
            "enum": [
              "binary",
              "continuous_qualitative",
              "numeric",
              "enum"
            ],
            "type": "string",
            "x-spec-enum-id": "b40eac6824409cc2",
            "description": "Output shape of the evaluation score. Accepts canonical (binary, continuous_qualitative, numeric, enum); legacy binary_workflow_adherence and binary_qualitative are accepted and mapped to binary.\n\n* `binary` - Binary\n* `continuous_qualitative` - Continuous Qualitative\n* `numeric` - Numeric\n* `enum` - Enum"
          },
          "enum_values": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Possible values for enum-type metrics (list of strings, e.g. [\"resolved\", \"escalated\", \"abandoned\"])"
          },
          "display_order": {
            "type": "integer",
            "description": "Order in which to display this metric in the UI"
          },
          "configuration": {
            "type": "object",
            "additionalProperties": {},
            "description": "Per-metric configuration.\n\nSome predefined metrics carry **per-agent** configuration, keyed by agent id: `configuration[<key>] = {\"<agent_id>\": <value>}`. On read, every agent attached to the metric is returned; on write, only the agent ids you include are updated.\n\nCall-level keys (not per-agent):\n* **Detect Silence** — `silence_duration` (int, seconds, default 10): minimum mutual silence before flagging a failure.\n* **Infrastructure Issues** — `infra_issues_timeout` (int, seconds, default 10): max seconds before the Main Agent must respond after the Testing Agent finishes speaking.\n\nPer-agent keys (each value is `{\"<agent_id>\": <value>}`):\n* **Dropoff Node** — `nodes`: `{\"<agent_id>\": [{name, description}]}` — conversation stages used to classify where a call dropped off.\n* **Topic of Call** — `nodes`: `{\"<agent_id>\": [{name, description}]}` — topic categories used to classify each call.\n* **Pronunciation Check** — `pronunciation_words`: `{\"<agent_id>\": [[word, phonemes], ...]}` — how specific words should be pronounced (e.g. {\"42\": [[\"Cekura\", \"suh-KYUR-uh\"]]}).\n* **Letterwise Pronunciation** — `spelling_word_types`: `{\"<agent_id>\": [\"name\", \"email\", ...]}` — word categories the Main Agent must spell out letter-by-letter.\n* **Hallucination** — `hallucination_kb_files`: `{\"<agent_id>\": [file_id, ...]}` — KnowledgeBaseFile IDs used as the source of truth for fact-checking."
          },
          "add_to_new_agents": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "When enabled, this metric is automatically assigned to new agents created in the project."
          },
          "simulation_enabled": {
            "type": "boolean",
            "description": "\nEnable this metric for simulations.\nExample: `true` or `false`\n        "
          },
          "observability_enabled": {
            "type": "boolean",
            "description": "\nEnable this metric for observability.\nExample: `true` or `false`\n        "
          },
          "sampling_enabled": {
            "type": "boolean",
            "description": "Enable sampling for this metric using project-level sample rate"
          },
          "evaluation_trigger": {
            "enum": [
              "always",
              "automatic",
              "custom"
            ],
            "type": "string",
            "x-spec-enum-id": "ecd3c02e0e393ef5",
            "default": "always",
            "description": "When to run this metric.\n\n* `always` — evaluate every call (default)\n* `automatic` — system decides based on call content\n* `custom` — only evaluate when `evaluation_trigger_prompt` condition is met\n\n* `always` - Always\n* `automatic` - Automatic\n* `custom` - Custom"
          },
          "evaluation_trigger_prompt": {
            "type": "string",
            "description": "LLM prompt that decides whether to evaluate this call. Only used when `evaluation_trigger=custom` and `trigger_type=llm_judge`.\nExample: \"Did the agent offer a refund?\""
          },
          "trigger_type": {
            "enum": [
              "llm_judge",
              "custom_code"
            ],
            "type": "string",
            "x-spec-enum-id": "2adad4b8df61914f",
            "default": "llm_judge",
            "description": "How to evaluate the trigger condition. Only relevant when `evaluation_trigger=custom`.\n\n* `llm_judge` — use `evaluation_trigger_prompt` (default)\n* `custom_code` — use `evaluation_trigger_custom_code`\n\n* `llm_judge` - LLM Judge\n* `custom_code` - Custom Code"
          },
          "evaluation_trigger_custom_code": {
            "type": "string",
            "description": "Python code to evaluate the trigger condition. Only used when `evaluation_trigger=custom` and `trigger_type=custom_code`."
          },
          "custom_code": {
            "type": "string",
            "description": "Python code that implements the metric evaluation. Required when `type=custom_code`. Must define a function `evaluate(transcript, ...) -> bool | float | str`."
          }
        },
        "required": [
          "assistant_id",
          "audio_enabled",
          "configuration",
          "description",
          "display_order",
          "eval_type",
          "name",
          "project",
          "prompt",
          "type"
        ]
      },
      "SchemaPostReRunResultDetail": {
        "type": "object",
        "properties": {
          "run_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "List of run IDs",
            "minItems": 1
          },
          "metric_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "List of metric IDs to evaluate",
            "minItems": 1
          }
        },
        "required": [
          "metric_ids",
          "run_ids"
        ]
      },
      "SchemaPostRunScenarios": {
        "type": "object",
        "properties": {
          "agent_id": {
            "type": "integer",
            "description": "ID of the agent to run evaluators for"
          },
          "assistant_id": {
            "type": "string",
            "writeOnly": true,
            "description": "\nAlternative to agent ID - the assistant ID to use for this scenario\nExample: `\"asst_1234567890\"`\n"
          },
          "scenarios": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "\nList of evaluator IDs to run. Either scenarios, tags, or folder_path must be provided.\nExample: `[11, 22, 33]`\n\nTo run evaluators by tag or folder, use the `tags` or `folder_path` fields instead.\n"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "\nList of tags to filter evaluators to run. Either evaluators or tags must be provided.\nExample: `[\"tag1\", \"tag2\", \"tag3\"]`\n"
          },
          "folder_path": {
            "type": "string",
            "description": "\nDot-separated folder path to select evaluators from (e.g. `\"Sales.Inbound\"`).\nMutually exclusive with `scenarios` and `tags`. Requires `project_id`.\n"
          },
          "project_id": {
            "type": "integer",
            "description": "\nProject ID. Required when using `folder_path` (or when passing a folder path string via `scenarios`).\nExample: `1376`\n"
          },
          "frequency": {
            "type": "integer",
            "minimum": 1,
            "default": 1,
            "description": "\nThe number of times each evaluator will run\nExample: `1`\n"
          },
          "name": {
            "type": "string",
            "description": "Label text for result"
          },
          "outbound_phone_number": {
            "type": "string",
            "description": "\nOverride the phone number to use for outbound calls.\nExample: \"+1234567890\"\n"
          },
          "personality_ids": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "integer"
            },
            "description": "\nList of personality IDs to override for this run. If not provided, uses the scenario's default personality.\nExample: `[123, 456, 789]`\n"
          },
          "test_profile_ids": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "integer"
            },
            "description": "\nList of test profile IDs to override for this run. If not provided, uses the scenario's default test profile.\nExample: `[123, 456, 789]`\n"
          },
          "personality_id": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Single personality ID override. Merged into personality_ids; prefer personality_ids for multiple."
          },
          "test_profile_id": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Single test profile ID override. Merged into test_profile_ids; prefer test_profile_ids for multiple."
          },
          "mode": {
            "enum": [
              "same_number",
              "different_numbers"
            ],
            "type": "string",
            "x-spec-enum-id": "9ea0c9743bd9d873",
            "default": "same_number",
            "description": "Using same or different phone numbers for each evaluation\n\n* `same_number` - same_number\n* `different_numbers` - different_numbers"
          },
          "agent_number": {
            "type": "string",
            "description": "\nOverride the phone number from which the agent under test receives the call during outbound runs.\nThis allows overriding the default agent contact number for testing purposes.\nExample: \"+1234567890\"\n"
          },
          "concurrency_limit": {
            "type": "integer",
            "minimum": 1,
            "description": "\nCap on the number of evaluator runs executed in parallel. Default: unbounded (subject to your provider's rate limits).\nUse this to avoid hitting provider rate limits on large frequency or folder runs.\nExample: `5`\n"
          },
          "mock_tool_names": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "\nNames of mock tools to activate for this run. Cekura swaps those tools' URLs to mock endpoints while the\nrun is active and restores the originals when it finishes. Omit (or send null) to mock every tool\nconfigured on the agent; send an empty list to mock none so every tool keeps its original endpoint.\nExample: `[\"get_appointments\", \"cancel_booking\"]`\n"
          }
        }
      },
      "SchemaPostRunScenariosApiChat": {
        "type": "object",
        "description": "Schema for the run_scenarios_api_chat endpoint (customer-driven pull mode).\nSame selection fields as the other run endpoints (agent_id, scenarios/tags/\nfolder_path, frequency, personality/test-profile overrides) plus `timeout`.",
        "properties": {
          "agent_id": {
            "type": "integer",
            "description": "ID of the agent to run evaluators for"
          },
          "assistant_id": {
            "type": "string",
            "writeOnly": true,
            "description": "\nAlternative to agent ID - the assistant ID to use for this scenario\nExample: `\"asst_1234567890\"`\n"
          },
          "name": {
            "type": "string",
            "description": "Label text for result"
          },
          "scenarios": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "\nList of evaluator IDs to run. Either scenarios, tags, or folder_path must be provided.\nExample: `[11, 22, 33]`\n\nTo run evaluators by tag or folder, use the `tags` or `folder_path` fields instead.\n"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "\nList of tags to filter evaluators to run. Either evaluators or tags must be provided.\nExample: `[\"tag1\", \"tag2\", \"tag3\"]`\n"
          },
          "folder_path": {
            "type": "string",
            "description": "\nDot-separated folder path to select evaluators from (e.g. `\"Sales.Inbound\"`).\nMutually exclusive with `scenarios` and `tags`. Requires `project_id`.\n"
          },
          "project_id": {
            "type": "integer",
            "description": "\nProject ID. Required when using `folder_path` (or when passing a folder path string via `scenarios`).\nExample: `1376`\n"
          },
          "frequency": {
            "type": "integer",
            "minimum": 1,
            "default": 1,
            "description": "\nThe number of times each evaluator will run\nExample: `1`\n"
          },
          "personality_ids": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "integer"
            },
            "description": "Personality IDs to override for this run. Defaults to each scenario's personality."
          },
          "test_profile_ids": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "integer"
            },
            "description": "Test-profile IDs to override for this run. Defaults to each scenario's test profile."
          },
          "timeout": {
            "type": [
              "integer",
              "null"
            ],
            "maximum": 3600,
            "minimum": 1,
            "description": "Overall run timeout in seconds — the whole conversation's max lifetime (NOT a per-message timeout). When it elapses the run is finalized and scored automatically. Defaults to the project's configured duration. Capped at 3600 (1 hour)."
          }
        }
      },
      "SchemaPostRunScenariosChirp": {
        "type": "object",
        "description": "Schema for the run_scenarios_chirp endpoint (raw-PCM WebSocket voice).",
        "properties": {
          "agent_id": {
            "type": "integer",
            "description": "ID of the agent to run evaluators for"
          },
          "assistant_id": {
            "type": "string",
            "writeOnly": true,
            "description": "\nAlternative to agent ID - the assistant ID to use for this scenario\nExample: `\"asst_1234567890\"`\n"
          },
          "scenarios": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "\nList of evaluator IDs to run. Either scenarios, tags, or folder_path must be provided.\nExample: `[11, 22, 33]`\n\nTo run evaluators by tag or folder, use the `tags` or `folder_path` fields instead.\n"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "\nList of tags to filter evaluators to run. Either evaluators or tags must be provided.\nExample: `[\"tag1\", \"tag2\", \"tag3\"]`\n"
          },
          "folder_path": {
            "type": "string",
            "description": "\nDot-separated folder path to select evaluators from (e.g. `\"Sales.Inbound\"`).\nMutually exclusive with `scenarios` and `tags`. Requires `project_id`.\n"
          },
          "project_id": {
            "type": "integer",
            "description": "\nProject ID. Required when using `folder_path` (or when passing a folder path string via `scenarios`).\nExample: `1376`\n"
          },
          "frequency": {
            "type": "integer",
            "minimum": 1,
            "default": 1,
            "description": "\nThe number of times each evaluator will run\nExample: `1`\n"
          },
          "name": {
            "type": "string",
            "description": "Label text for result"
          },
          "outbound_phone_number": {
            "type": "string",
            "description": "\nOverride the phone number to use for outbound calls.\nExample: \"+1234567890\"\n"
          },
          "personality_ids": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "integer"
            },
            "description": "\nList of personality IDs to override for this run. If not provided, uses the scenario's default personality.\nExample: `[123, 456, 789]`\n"
          },
          "test_profile_ids": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "integer"
            },
            "description": "\nList of test profile IDs to override for this run. If not provided, uses the scenario's default test profile.\nExample: `[123, 456, 789]`\n"
          },
          "personality_id": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Single personality ID override. Merged into personality_ids; prefer personality_ids for multiple."
          },
          "test_profile_id": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Single test profile ID override. Merged into test_profile_ids; prefer test_profile_ids for multiple."
          },
          "mode": {
            "enum": [
              "same_number",
              "different_numbers"
            ],
            "type": "string",
            "x-spec-enum-id": "9ea0c9743bd9d873",
            "default": "same_number",
            "description": "Using same or different phone numbers for each evaluation\n\n* `same_number` - same_number\n* `different_numbers` - different_numbers"
          },
          "agent_number": {
            "type": "string",
            "description": "\nOverride the phone number from which the agent under test receives the call during outbound runs.\nThis allows overriding the default agent contact number for testing purposes.\nExample: \"+1234567890\"\n"
          },
          "concurrency_limit": {
            "type": "integer",
            "minimum": 1,
            "description": "\nCap on the number of evaluator runs executed in parallel. Default: unbounded (subject to your provider's rate limits).\nUse this to avoid hitting provider rate limits on large frequency or folder runs.\nExample: `5`\n"
          },
          "mock_tool_names": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "\nNames of mock tools to activate for this run. Cekura swaps those tools' URLs to mock endpoints while the\nrun is active and restores the originals when it finishes. Omit (or send null) to mock every tool\nconfigured on the agent; send an empty list to mock none so every tool keeps its original endpoint.\nExample: `[\"get_appointments\", \"cancel_booking\"]`\n"
          },
          "websocket_url": {
            "type": "string",
            "description": "Override the agent's stored raw-PCM WebSocket endpoint (telephony.websocket_url) for this run."
          }
        }
      },
      "SchemaPostRunScenariosElevenLabs": {
        "type": "object",
        "description": "Schema for the run_scenarios_elevenlabs endpoint.",
        "properties": {
          "agent_id": {
            "type": "integer",
            "description": "ID of the agent to run evaluators for"
          },
          "assistant_id": {
            "type": "string",
            "writeOnly": true,
            "description": "\nAlternative to agent ID - the assistant ID to use for this scenario\nExample: `\"asst_1234567890\"`\n"
          },
          "scenarios": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "\nList of evaluator IDs to run. Either scenarios, tags, or folder_path must be provided.\nExample: `[11, 22, 33]`\n\nTo run evaluators by tag or folder, use the `tags` or `folder_path` fields instead.\n"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "\nList of tags to filter evaluators to run. Either evaluators or tags must be provided.\nExample: `[\"tag1\", \"tag2\", \"tag3\"]`\n"
          },
          "folder_path": {
            "type": "string",
            "description": "\nDot-separated folder path to select evaluators from (e.g. `\"Sales.Inbound\"`).\nMutually exclusive with `scenarios` and `tags`. Requires `project_id`.\n"
          },
          "project_id": {
            "type": "integer",
            "description": "\nProject ID. Required when using `folder_path` (or when passing a folder path string via `scenarios`).\nExample: `1376`\n"
          },
          "frequency": {
            "type": "integer",
            "minimum": 1,
            "default": 1,
            "description": "\nThe number of times each evaluator will run\nExample: `1`\n"
          },
          "name": {
            "type": "string",
            "description": "Label text for result"
          },
          "outbound_phone_number": {
            "type": "string",
            "description": "\nOverride the phone number to use for outbound calls.\nExample: \"+1234567890\"\n"
          },
          "personality_ids": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "integer"
            },
            "description": "\nList of personality IDs to override for this run. If not provided, uses the scenario's default personality.\nExample: `[123, 456, 789]`\n"
          },
          "test_profile_ids": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "integer"
            },
            "description": "\nList of test profile IDs to override for this run. If not provided, uses the scenario's default test profile.\nExample: `[123, 456, 789]`\n"
          },
          "personality_id": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Single personality ID override. Merged into personality_ids; prefer personality_ids for multiple."
          },
          "test_profile_id": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Single test profile ID override. Merged into test_profile_ids; prefer test_profile_ids for multiple."
          },
          "mode": {
            "enum": [
              "same_number",
              "different_numbers"
            ],
            "type": "string",
            "x-spec-enum-id": "9ea0c9743bd9d873",
            "default": "same_number",
            "description": "Using same or different phone numbers for each evaluation\n\n* `same_number` - same_number\n* `different_numbers` - different_numbers"
          },
          "agent_number": {
            "type": "string",
            "description": "\nOverride the phone number from which the agent under test receives the call during outbound runs.\nThis allows overriding the default agent contact number for testing purposes.\nExample: \"+1234567890\"\n"
          },
          "concurrency_limit": {
            "type": "integer",
            "minimum": 1,
            "description": "\nCap on the number of evaluator runs executed in parallel. Default: unbounded (subject to your provider's rate limits).\nUse this to avoid hitting provider rate limits on large frequency or folder runs.\nExample: `5`\n"
          },
          "mock_tool_names": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "\nNames of mock tools to activate for this run. Cekura swaps those tools' URLs to mock endpoints while the\nrun is active and restores the originals when it finishes. Omit (or send null) to mock every tool\nconfigured on the agent; send an empty list to mock none so every tool keeps its original endpoint.\nExample: `[\"get_appointments\", \"cancel_booking\"]`\n"
          },
          "elevenlabs_agent_id": {
            "type": "string",
            "description": "ElevenLabs agent ID to test against. Overrides the agent's stored assistant_id for this run."
          },
          "elevenlabs_data": {
            "allOf": [
              {
                "$ref": "#/components/schemas/SchemaElevenLabsData"
              }
            ],
            "description": "Per-run ElevenLabs overrides (e.g. elevenlabs_base_url_override). Credentials are read from the agent."
          }
        }
      },
      "SchemaPostRunScenariosPipecat": {
        "type": "object",
        "description": "Schema for the run_scenarios_pipecat endpoint, which runs scenarios using Pipecat WebRTC.\nTotal runs: one per entry in `scenarios` (no frequency multiplier on this endpoint).",
        "properties": {
          "scenarios": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SchemaPipecatScenario"
            },
            "description": "List of scenarios to run with their Pipecat WebRTC configuration"
          },
          "agent": {
            "type": "integer",
            "description": "Agent ID to run the scenarios against. If omitted, the agent is derived from the first scenario's configured agent."
          },
          "mock_tool_names": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "Names of mock tools to activate for this run. Omit (or send null) to mock every tool configured on the agent; send an empty list to mock none so every tool keeps its original endpoint; send specific names to mock only those."
          }
        },
        "required": [
          "scenarios"
        ]
      },
      "SchemaPostRunScenariosPipecatV2": {
        "type": "object",
        "description": "Schema for the run_scenarios_pipecat_v2 endpoint with automated Pipecat Cloud integration.\nUses Pipecat Cloud SDK to automatically create sessions and Daily.co rooms.",
        "properties": {
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional name for the scenario result"
          },
          "frequency": {
            "type": "integer",
            "maximum": 100,
            "minimum": 1,
            "default": 1,
            "description": "Number of times to run each scenario (default: 1)"
          },
          "scenarios": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SchemaPipecatV2Scenario"
            },
            "description": "List of scenarios to run with automated Pipecat Cloud session creation"
          },
          "personality_ids": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "integer"
            },
            "description": "List of personality IDs to override for this run. If not provided, uses the scenario's default personality."
          },
          "test_profile_ids": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "integer"
            },
            "description": "List of test profile IDs to override for this run. If not provided, uses the scenario's default test profile."
          },
          "mock_tool_names": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "Names of mock tools to activate for this run. Omit (or send null) to mock every tool configured on the agent; send an empty list to mock none so every tool keeps its original endpoint; send specific names to mock only those."
          },
          "personality_id": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Single personality ID override. Merged into personality_ids; prefer personality_ids for multiple."
          },
          "test_profile_id": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Single test profile ID override. Merged into test_profile_ids; prefer test_profile_ids for multiple."
          },
          "pipecat_data": {
            "allOf": [
              {
                "$ref": "#/components/schemas/SchemaPipecatV2Data"
              }
            ],
            "description": "Per-run Pipecat Cloud overrides (pipecat_agent_name, config, room_properties). Credentials are read from the agent/project."
          },
          "concurrency_limit": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Optional cap on how many of this run's calls execute concurrently."
          }
        },
        "required": [
          "scenarios"
        ]
      },
      "SchemaPostRunScenariosSip": {
        "type": "object",
        "description": "Schema for the run_scenarios_sip endpoint.",
        "properties": {
          "agent_id": {
            "type": "integer",
            "description": "ID of the agent to run evaluators for"
          },
          "assistant_id": {
            "type": "string",
            "writeOnly": true,
            "description": "\nAlternative to agent ID - the assistant ID to use for this scenario\nExample: `\"asst_1234567890\"`\n"
          },
          "scenarios": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "\nList of evaluator IDs to run. Either scenarios, tags, or folder_path must be provided.\nExample: `[11, 22, 33]`\n\nTo run evaluators by tag or folder, use the `tags` or `folder_path` fields instead.\n"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "\nList of tags to filter evaluators to run. Either evaluators or tags must be provided.\nExample: `[\"tag1\", \"tag2\", \"tag3\"]`\n"
          },
          "folder_path": {
            "type": "string",
            "description": "\nDot-separated folder path to select evaluators from (e.g. `\"Sales.Inbound\"`).\nMutually exclusive with `scenarios` and `tags`. Requires `project_id`.\n"
          },
          "project_id": {
            "type": "integer",
            "description": "\nProject ID. Required when using `folder_path` (or when passing a folder path string via `scenarios`).\nExample: `1376`\n"
          },
          "frequency": {
            "type": "integer",
            "minimum": 1,
            "default": 1,
            "description": "\nThe number of times each evaluator will run\nExample: `1`\n"
          },
          "name": {
            "type": "string",
            "description": "Label text for result"
          },
          "outbound_phone_number": {
            "type": "string",
            "description": "\nOverride the phone number to use for outbound calls.\nExample: \"+1234567890\"\n"
          },
          "personality_ids": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "integer"
            },
            "description": "\nList of personality IDs to override for this run. If not provided, uses the scenario's default personality.\nExample: `[123, 456, 789]`\n"
          },
          "test_profile_ids": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "integer"
            },
            "description": "\nList of test profile IDs to override for this run. If not provided, uses the scenario's default test profile.\nExample: `[123, 456, 789]`\n"
          },
          "personality_id": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Single personality ID override. Merged into personality_ids; prefer personality_ids for multiple."
          },
          "test_profile_id": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Single test profile ID override. Merged into test_profile_ids; prefer test_profile_ids for multiple."
          },
          "mode": {
            "enum": [
              "same_number",
              "different_numbers"
            ],
            "type": "string",
            "x-spec-enum-id": "9ea0c9743bd9d873",
            "default": "same_number",
            "description": "Using same or different phone numbers for each evaluation\n\n* `same_number` - same_number\n* `different_numbers` - different_numbers"
          },
          "agent_number": {
            "type": "string",
            "description": "\nOverride the phone number from which the agent under test receives the call during outbound runs.\nThis allows overriding the default agent contact number for testing purposes.\nExample: \"+1234567890\"\n"
          },
          "concurrency_limit": {
            "type": "integer",
            "minimum": 1,
            "description": "\nCap on the number of evaluator runs executed in parallel. Default: unbounded (subject to your provider's rate limits).\nUse this to avoid hitting provider rate limits on large frequency or folder runs.\nExample: `5`\n"
          },
          "mock_tool_names": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "\nNames of mock tools to activate for this run. Cekura swaps those tools' URLs to mock endpoints while the\nrun is active and restores the originals when it finishes. Omit (or send null) to mock every tool\nconfigured on the agent; send an empty list to mock none so every tool keeps its original endpoint.\nExample: `[\"get_appointments\", \"cancel_booking\"]`\n"
          },
          "sip_endpoint": {
            "type": "string",
            "description": "Override the agent's stored SIP endpoint for this run."
          }
        }
      },
      "SchemaPostRunScenariosText": {
        "type": "object",
        "description": "Schema for the run_scenarios_text endpoint, which runs scenarios in text mode\n(SMS, chat, or agent-hosted websocket).",
        "properties": {
          "agent_id": {
            "type": "integer",
            "description": "ID of the agent to run evaluators for"
          },
          "assistant_id": {
            "type": "string",
            "writeOnly": true,
            "description": "\nAlternative to agent ID - the assistant ID to use for this scenario\nExample: `\"asst_1234567890\"`\n"
          },
          "name": {
            "type": "string",
            "description": "Label text for result"
          },
          "scenarios": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "\nList of evaluator IDs to run. Either scenarios, tags, or folder_path must be provided.\nExample: `[11, 22, 33]`\n\nTo run evaluators by tag or folder, use the `tags` or `folder_path` fields instead.\n"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "\nList of tags to filter evaluators to run. Either evaluators or tags must be provided.\nExample: `[\"tag1\", \"tag2\", \"tag3\"]`\n"
          },
          "folder_path": {
            "type": "string",
            "description": "\nDot-separated folder path to select evaluators from (e.g. `\"Sales.Inbound\"`).\nMutually exclusive with `scenarios` and `tags`. Requires `project_id`.\n"
          },
          "project_id": {
            "type": "integer",
            "description": "\nProject ID. Required when using `folder_path` (or when passing a folder path string via `scenarios`).\nExample: `1376`\n"
          },
          "frequency": {
            "type": "integer",
            "minimum": 1,
            "default": 1,
            "description": "\nThe number of times each evaluator will run\nExample: `1`\n"
          },
          "websocket_url": {
            "type": "string",
            "description": "If provided, the simulated caller connects to this websocket URL instead of using the agent's configured text/SMS gateway. Use for agents that expose a websocket endpoint for text testing. Bypasses the normal `agent.can_run_as_text()` check."
          },
          "websocket_headers": {
            "type": "object",
            "additionalProperties": {},
            "description": "Headers to send on the websocket connection for this run. Merged over the agent's configured `websocket_headers` — keys provided here win. System `X-VOCERA-*` headers cannot be overridden."
          },
          "personality_ids": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "integer"
            },
            "description": "List of personality IDs to override for this run. If not provided, uses the scenario's default personality."
          },
          "test_profile_ids": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "integer"
            },
            "description": "List of test profile IDs to override for this run. If not provided, uses the scenario's default test profile."
          },
          "agent_number": {
            "type": "string",
            "description": "\nOverride the phone number from which the agent under test receives the call during outbound runs.\nThis allows overriding the default agent contact number for testing purposes.\nExample: \"+1234567890\"\n"
          },
          "outbound_phone_number": {
            "type": "string",
            "description": "\nOverride the phone number to use for outbound calls.\nExample: \"+1234567890\"\n"
          },
          "concurrency_limit": {
            "type": "integer",
            "minimum": 1,
            "description": "\nCap on the number of evaluator runs executed in parallel. Default: unbounded (subject to your provider's rate limits).\nUse this to avoid hitting provider rate limits on large frequency or folder runs.\nExample: `5`\n"
          },
          "mock_tool_names": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "\nNames of mock tools to activate for this run. Cekura swaps those tools' URLs to mock endpoints while the\nrun is active and restores the originals when it finishes. Omit (or send null) to mock every tool\nconfigured on the agent; send an empty list to mock none so every tool keeps its original endpoint.\nExample: `[\"get_appointments\", \"cancel_booking\"]`\n"
          }
        }
      },
      "SchemaPostScenario": {
        "type": "object",
        "properties": {
          "agent": {
            "type": [
              "integer",
              "null"
            ],
            "description": "ID of the agent. Either agent or project must be provided."
          },
          "project": {
            "type": [
              "integer",
              "null"
            ],
            "description": "ID of the project. Either agent or project must be provided."
          },
          "assistant_id": {
            "type": "string",
            "writeOnly": true,
            "description": "\nAlternative to agent ID - the assistant ID to use for this scenario\nExample: `\"asst_1234567890\"`\n"
          },
          "name": {
            "type": "string",
            "description": "Name of the evaluator"
          },
          "personality": {
            "type": "integer",
            "description": "The personality of the evaluator"
          },
          "scenario_type": {
            "enum": [
              "instruction",
              "conditional_actions"
            ],
            "type": "string",
            "x-spec-enum-id": "97f8e4b948b4e205",
            "default": "instruction",
            "description": "\nType of scenario to create:\n- `instruction`: Standard instruction-based scenario where the instructions field contains plain text\n- `conditional_actions`: Conditional action-based scenario where the instructions field contains a JSON structure\n\nDefault: `instruction`\n\n\n* `instruction` - Instruction\n* `conditional_actions` - Conditional Actions"
          },
          "instructions": {
            "type": "string",
            "description": "\nScenario Instructions - the format depends on the scenario_type:\n\n**For scenario_type=\"instruction\":**\nProvide plain text instructions that describe the scenario behavior.\nExample: `\"You are a customer calling to inquire about your order status. Be polite and provide order number 12345 when asked.\"`\n\n**For scenario_type=\"conditional_actions\":**\nUse the structured `conditional_actions` field instead. If you send via `instructions`, pass a JSON-formatted string with the following structure:\n\n```json\n{\n  \"role\": \"A friendly customer calling about an appointment\",\n  \"conditions\": [\n    {\n      \"id\": 0,\n      \"condition\": \"FIRST_MESSAGE\",\n      \"action\": \"Hi, I'd like to check on my upcoming appointment <silence time=\\\"1.5s\\\" />\",\n      \"type\": \"standard\",\n      \"fixed_message\": true\n    },\n    {\n      \"id\": 1,\n      \"condition\": \"The agent asks for your name\",\n      \"action\": \"My name is Sarah Johnson\",\n      \"type\": \"standard\",\n      \"fixed_message\": true\n    },\n    {\n      \"id\": 2,\n      \"condition\": \"The agent asks for your date of birth\",\n      \"action\": \"January first, nineteen ninety\",\n      \"type\": \"standard\",\n      \"fixed_message\": true\n    },\n    {\n      \"id\": 3,\n      \"condition\": \"The agent confirms your identity and provides appointment details\",\n      \"action\": \"Thank you, that's all I needed <silence time=\\\"1.0s\\\" />\",\n      \"type\": \"standard\",\n      \"fixed_message\": true\n    },\n    {\n      \"id\": 4,\n      \"condition\": 3,\n      \"action\": \"<endcall />\",\n      \"type\": \"action_followup\",\n      \"fixed_message\": true\n    }\n  ]\n}\n```\n\n**Note:** When sent via `instructions`, the value must be a JSON-formatted string (e.g. `JSON.stringify(...)` / `json.dumps(...)`). For new integrations, use the structured `conditional_actions` field below.\n\n**Structure Details:**\n\n- **`role`** (string): Personality/role description for the scenario actor\n\n- **`conditions`** (array): Ordered list of conditional actions that define the conversation flow\n\n  **Each condition object has:**\n  - **`id`** (integer): Unique sequential identifier (0, 1, 2, 3...)\n\n  - **`condition`** (string | integer): The trigger that activates this action\n    - `\"FIRST_MESSAGE\"` — Triggers at conversation start (use for `id: 0`)\n    - Natural-language description of the main agent's observable action, written from a third-person observer perspective (e.g. `\"The agent asks for your date of birth\"`, `\"The agent confirms the cancellation\"`). Matched semantically against the conversation context.\n    - Integer (e.g. `3`) — References another condition's `id` for sequential `action_followup` chaining\n\n  - **`action`** (string): What the scenario actor says or does\n    - **SSML pause tags:** `<silence time=\"1.5s\" />` (interruptible) or `<hold time=\"2s\" />` (not interruptible). `<silence>` lets the main agent jump in mid-pause; `<hold>` enforces dead air.\n    - **Emotion markers:** `[laughter]`, `[sigh]`, etc. (can repeat like `[laughter] [laughter]`)\n    - **Special actions:** `<endcall />` to end the call\n\n  - **`type`** (string): Either `\"standard\"` (normal response) or `\"action_followup\"` (fires on the testing agent's next turn after the referenced condition — one main-agent reply elapses in between, regardless of its content; never fires in the same turn as its parent)\n\n  - **`fixed_message`** (boolean): Set to `true` for fixed responses, `false` for dynamic\n\n**Usage Tips:**\n- Always start with `id: 0` and `condition: \"FIRST_MESSAGE\"`\n- Write conditions as third-person descriptions of what the main agent does (e.g. `\"The agent confirms the cancellation\"`)\n- Use the last condition to trigger `<endcall />` for clean call termination\n- Combine SSML tags and emotion markers naturally: `\"Great <silence time=\\\"1.5s\\\" /> [laughter] [laughter]\"`\n"
          },
          "conditional_actions": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ConditionalActions"
              }
            ],
            "description": "Structured conditional-actions object for `scenario_type=\"conditional_actions\"`. Use either `conditional_actions` (structured) or `instructions` (plain text) — not both."
          },
          "expected_outcome_prompt": {
            "type": "string",
            "description": "\nExpected Outcome Prompt\nExample: `\"The user should be able to complete the order\"`\n"
          },
          "metrics": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "\nList of metric IDs to associate with this evaluator\nExample: `[123, 456, 789]`\n"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "\nList of tags to associate with the evaluator\nExample: `[\"tag1\", \"tag2\", \"tag3\"]`\n"
          },
          "tool_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "List of tool IDs to use for evaluator",
            "example": [
              "TOOL_DTMF",
              "TOOL_END_CALL",
              "TOOL_END_CALL_ONLY_ON_TRANSFER"
            ]
          },
          "test_profile": {
            "type": "integer",
            "description": "The test profile ID to use for the evaluator"
          },
          "phone_number": {
            "type": "integer",
            "description": "The phone number ID to use for the evaluator (works for both inbound and outbound)"
          },
          "inbound_phone_number": {
            "type": "integer",
            "description": "(Deprecated) The inbound phone number ID to use for the evaluator. Use phone_number instead, which works for both inbound and outbound."
          },
          "folder_path": {
            "type": [
              "string",
              "null"
            ],
            "description": "Dot-separated path of the folder to assign this evaluator to (e.g. \"Sales.Inbound\"). Folders must be created before use — they are not auto-created. Use `scenarios_create_folder_create` to create each level before assigning evaluators. Example: to use \"Sales.Inbound\", first create \"Sales\", then create \"Inbound\" inside it."
          },
          "generated_mock_tool_entries": {
            "oneOf": [
              {},
              {
                "type": "null"
              }
            ],
            "description": "Expected mock tool calls for this evaluator. Each entry has shape {tool_id, tool_name, new_entry: {input, output}}. Auto-generated during scenario generation when the agent has mock tools attached; can also be set or edited manually."
          }
        },
        "required": [
          "name",
          "personality"
        ]
      },
      "SchemaPostSimulateScenario": {
        "type": "object",
        "properties": {
          "personality": {
            "type": "integer",
            "description": "ID of the personality to use in the simulation"
          },
          "agent": {
            "type": "integer",
            "description": "ID of the agent to use in the simulation"
          },
          "assistant_id": {
            "type": "string",
            "description": "Assistant ID to use in the simulation"
          },
          "transcript_json": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SimulateScenarioTranscriptMessage"
            },
            "description": "JSON representation of the conversation transcript"
          },
          "name": {
            "type": "string",
            "description": "Name for the simulated scenario"
          },
          "expected_outcome_prompt": {
            "type": "string",
            "description": "Prompt describing the expected outcome of the scenario"
          },
          "folder_path": {
            "type": [
              "string",
              "null"
            ],
            "description": "Folder path to assign the scenario to (e.g. 'folder_name' or 'parent.child')"
          }
        },
        "required": [
          "transcript_json"
        ]
      },
      "SchemaScenario": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "name": {
            "type": "string",
            "description": "Name of the evaluator"
          },
          "agent": {
            "type": "integer",
            "description": "\nAgent ID\nExample: `2142`\n"
          },
          "project": {
            "type": [
              "integer",
              "null"
            ]
          },
          "assistant_id": {
            "type": "string",
            "writeOnly": true,
            "description": "\nAlternative to agent ID - the assistant ID to use for this scenario\nExample: `\"asst_1234567890\"`\n"
          },
          "personality": {
            "type": "integer",
            "description": "ID of the personality"
          },
          "personality_name": {
            "type": "string",
            "description": "Name of the personality"
          },
          "agent_name": {
            "type": "string",
            "readOnly": true,
            "description": "\nName of the agent associated with this scenario\nExample: `\"Customer Support Agent\"`\n"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "\nList of tags of the evaluators\nExample: `[\"tag1\", \"tag2\", \"tag3\"]`\n"
          },
          "tool_ids": {
            "description": "\nList of tool IDs to associate with this scenario\nExample: `[\"TOOL_DTMF\", \"TOOL_END_CALL\"]`\n"
          },
          "metrics": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "\nList of metric IDs\nExample: `[123, 456, 789]`\n"
          },
          "metric_names": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "\nList of metric names\nExample: `[\"Metric 1\", \"Metric 2\", \"Metric 3\"]`\n"
          },
          "phone_number": {
            "type": "string",
            "description": "Phone number eg: +17776666333"
          },
          "outbound_phone_number_data": {
            "allOf": [
              {
                "$ref": "#/components/schemas/PhoneNumberInbound"
              }
            ],
            "readOnly": true,
            "description": "\nPhone number used for outbound calls in this scenario\nExample: `\"+1234567890\"`\n"
          },
          "first_message": {
            "type": "string",
            "description": "First message of the evaluator"
          },
          "inbound_phone_number": {
            "type": [
              "integer",
              "null"
            ]
          },
          "inbound_phone_number_data": {
            "allOf": [
              {
                "$ref": "#/components/schemas/PhoneNumberInbound"
              }
            ],
            "readOnly": true,
            "description": "\n(Deprecated) Phone number used for inbound calls in this scenario. Use outbound_phone_number_data instead.\nAfter CEK-6517, both phone_number and inbound_phone_number fields are synced, so outbound_phone_number_data contains the unified phone number for both inbound and outbound calls.\nExample: `{\"id\": 123, \"number\": \"+1234567890\", \"phone_number_id\": \"abc123\"}`\n"
          },
          "instructions": {
            "type": "string",
            "description": "\nScenario Instructions - format depends on scenario_type:\n- For `instruction` type: Plain text instructions\n- For `conditional_actions` type: JSON string with role and conditions array. Each condition has id, condition trigger (FIRST_MESSAGE, a natural-language third-person description of the main agent's observable action — e.g. `\"The agent asks for your date of birth\"`, matched semantically — or an integer reference to another condition's id), action (text with optional `<silence time=\"1.5s\" />` (interruptible) or `<hold time=\"2s\" />` (not interruptible) and `[laughter]` tags), type (standard/action_followup), and fixed_message flag\n"
          },
          "conditional_actions": {
            "writeOnly": true,
            "description": "Structured conditional-actions object for `scenario_type=\"conditional_actions\"`. Use either `conditional_actions` (structured) or `instructions` (plain text) — not both.\n\nExample:\n```json\n{\n  \"role\": \"You are a patient calling to schedule an appointment\",\n  \"conditions\": [\n    {\"id\": 0, \"condition\": \"FIRST_MESSAGE\", \"action\": \"Hi, I need to schedule an appointment\",\n     \"type\": \"standard\", \"fixed_message\": true},\n    {\"id\": 1, \"condition\": \"when the agent asks for your name\",\n     \"action\": \"Provide your full name: John Smith\", \"type\": \"standard\", \"fixed_message\": false}\n  ]\n}\n```"
          },
          "simulation_description": {
            "type": "string",
            "description": "Simulation Description"
          },
          "information_fields": {
            "type": "object",
            "additionalProperties": {},
            "description": "\nInformation fields of the evaluator\nExample:\n```json\n{\n    \"user_name\": \"John Doe\",\n    \"user_email\": \"john.doe@example.com\",\n}\n```\n"
          },
          "expected_outcome_prompt": {
            "type": "string",
            "description": "\nExpected outcome prompt of the evaluator\nExample: `\"The user should be able to complete the order\"`\n"
          },
          "scenario_language": {
            "enum": [
              "af",
              "ar",
              "bn",
              "bg",
              "zh",
              "cs",
              "da",
              "nl",
              "en",
              "et",
              "fi",
              "fr",
              "de",
              "el",
              "gu",
              "hi",
              "he",
              "hu",
              "id",
              "it",
              "ja",
              "kn",
              "ko",
              "ms",
              "ml",
              "mr",
              "multi",
              "no",
              "pl",
              "pa",
              "pt",
              "ro",
              "ru",
              "sk",
              "es",
              "sv",
              "th",
              "tr",
              "tl",
              "ta",
              "te",
              "uk",
              "vi"
            ],
            "type": "string",
            "x-spec-enum-id": "b822ad429c7b7fec",
            "description": "\nLanguage of the scenario\n\n\n* `af` - Afrikaans\n* `ar` - Arabic\n* `bn` - Bengali\n* `bg` - Bulgarian\n* `zh` - Chinese Simplified\n* `cs` - Czech\n* `da` - Danish\n* `nl` - Dutch\n* `en` - English\n* `et` - Estonian\n* `fi` - Finnish\n* `fr` - French\n* `de` - German\n* `el` - Greek\n* `gu` - Gujarati\n* `hi` - Hindi\n* `he` - Hebrew\n* `hu` - Hungarian\n* `id` - Indonesian\n* `it` - Italian\n* `ja` - Japanese\n* `kn` - Kannada\n* `ko` - Korean\n* `ms` - Malay\n* `ml` - Malayalam\n* `mr` - Marathi\n* `multi` - Multilingual\n* `no` - Norwegian\n* `pl` - Polish\n* `pa` - Punjabi\n* `pt` - Portuguese\n* `ro` - Romanian\n* `ru` - Russian\n* `sk` - Slovak\n* `es` - Spanish\n* `sv` - Swedish\n* `th` - Thai\n* `tr` - Turkish\n* `tl` - Tagalog\n* `ta` - Tamil\n* `te` - Telugu\n* `uk` - Ukrainian\n* `vi` - Vietnamese"
          },
          "scenario_type": {
            "type": "string",
            "description": "\nType of scenario:\n- `instruction`: Standard instruction-based scenario (plain text instructions)\n- `conditional_actions`: Conditional action-based scenario (JSON with role, conditions, SSML tags, emotion markers)\n- `real_world_smart`: Real world smart scenario\n- `real_world_fixed`: Real world fixed scenario\n"
          },
          "suite_type": {
            "enum": [
              "undefined",
              "infrastructure"
            ],
            "type": "string",
            "x-spec-enum-id": "643f6a8cdc799a77",
            "description": "Type of predefined suite (e.g., infrastructure)\n\n* `undefined` - Undefined\n* `infrastructure` - Infrastructure"
          },
          "is_predefined": {
            "type": "boolean",
            "description": "Whether this is a predefined scenario (template)"
          },
          "test_profile": {
            "type": [
              "integer",
              "null"
            ]
          },
          "test_profile_data": {
            "allOf": [
              {
                "$ref": "#/components/schemas/AIAgentTestProfile"
              }
            ],
            "readOnly": true,
            "description": "\nDetails of the test profile associated with this scenario. `information` uses the\nsectioned shape: `main_agent_variables` are sent to the agent under test as\ndynamic variables at call time; `testing_agent_variables` are persona/context\nused by Cekura's simulated caller. Legacy flat dicts (no section keys) still\nwork — at call time they are delivered to both sides for backward compatibility.\nExample:\n```json\n{\n    \"id\": \"<integer>\",\n    \"agent_id\": \"<integer>\",\n    \"name\": \"<string>\",\n    \"information\": {\n        \"main_agent_variables\": {\n            \"user_id\": \"<string>\",\n            \"account_id\": \"<string>\"\n        },\n        \"testing_agent_variables\": {\n            \"user_name\": \"<string>\",\n            \"user_email\": \"<string>\",\n            \"order_id\": \"<string>\"\n        }\n    }\n}\n```\n"
          },
          "dynamic_variable_values": {
            "readOnly": true,
            "description": "REMOVED FROM API. Reads return the historical value for legacy rows (`null` for new rows). Writes are no longer accepted — supplying a non-null value yields a 400 error. Put dynamic-variable values in `test_profile_data.information.main_agent_variables` instead: create the test profile via POST /test-profiles/ and attach it via the `test_profile` field on the scenario."
          },
          "generated_mock_tool_entries": {
            "oneOf": [
              {},
              {
                "type": "null"
              }
            ],
            "description": "Expected mock tool calls for this evaluator. Each entry has shape {tool_id, tool_name, new_entry: {input, output}}. Auto-generated during scenario generation when the agent has mock tools attached; can also be set or edited manually."
          },
          "folder_path": {
            "type": [
              "string",
              "null",
              "null"
            ],
            "description": "Dot-separated path of the folder to assign this evaluator to (e.g. \"Sales.Inbound\"). Folders must be created before use — they are not auto-created. Use `scenarios_create_folder_create` to create each level before assigning evaluators. Example: to use \"Sales.Inbound\", first create \"Sales\", then create \"Inbound\" inside it."
          },
          "max_duration": {
            "type": [
              "integer",
              "null"
            ],
            "description": "\nMax call duration in seconds for this scenario. If not provided or set to null, the scenario will use the project's max_call_duration setting.\nValid range: 10-3600 seconds (10 seconds to 60 minutes)\nExample: `600` (10 minutes)\n"
          }
        }
      },
      "SchemaUpdateAIAgentExternal": {
        "type": "object",
        "description": "Update an AI voice agent.",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true,
            "description": "Agent ID.\nExample: `2142`"
          },
          "agent_name": {
            "type": "string",
            "description": "\nA descriptive name for your agent\nExample: \n- `\"Customer Service Assistant\"`\n- `\"Sales Bot\"`\n",
            "maxLength": 255
          },
          "contact_number": {
            "type": "string",
            "description": "\nPhone number assigned to this agent for calls (must start with + followed by digits, min 8 chars)\nExample: `\"+1234567890\"`\n",
            "maxLength": 30
          },
          "inbound": {
            "type": "boolean",
            "description": "Whether this agent handles inbound calls.\n- If true, our agent will call you on above number.\n- If false, your agent will have to call our agent.\n\nExample: `true` or `false`\n"
          },
          "description": {
            "type": "string",
            "description": "\nA detailed description of what this agent does and how it should interact\nExample: \n```text\nAI agent for handling customer support inquiries and resolving technical issues\n```\n"
          },
          "language": {
            "enum": [
              "af",
              "ar",
              "bn",
              "bg",
              "zh",
              "cs",
              "da",
              "nl",
              "en",
              "et",
              "fi",
              "fr",
              "de",
              "el",
              "gu",
              "hi",
              "he",
              "hu",
              "id",
              "it",
              "ja",
              "kn",
              "ko",
              "ms",
              "ml",
              "mr",
              "multi",
              "no",
              "pl",
              "pa",
              "pt",
              "ro",
              "ru",
              "sk",
              "es",
              "sv",
              "th",
              "tr",
              "tl",
              "ta",
              "te",
              "uk",
              "vi"
            ],
            "type": "string",
            "x-spec-enum-id": "b822ad429c7b7fec",
            "default": "en",
            "description": "\nThe primary language this agent uses for communication (e.g. 'en' for English)\n\n\n* `af` - Afrikaans\n* `ar` - Arabic\n* `bn` - Bengali\n* `bg` - Bulgarian\n* `zh` - Chinese Simplified\n* `cs` - Czech\n* `da` - Danish\n* `nl` - Dutch\n* `en` - English\n* `et` - Estonian\n* `fi` - Finnish\n* `fr` - French\n* `de` - German\n* `el` - Greek\n* `gu` - Gujarati\n* `hi` - Hindi\n* `he` - Hebrew\n* `hu` - Hungarian\n* `id` - Indonesian\n* `it` - Italian\n* `ja` - Japanese\n* `kn` - Kannada\n* `ko` - Korean\n* `ms` - Malay\n* `ml` - Malayalam\n* `mr` - Marathi\n* `multi` - Multilingual\n* `no` - Norwegian\n* `pl` - Polish\n* `pa` - Punjabi\n* `pt` - Portuguese\n* `ro` - Romanian\n* `ru` - Russian\n* `sk` - Slovak\n* `es` - Spanish\n* `sv` - Swedish\n* `th` - Thai\n* `tr` - Turkish\n* `tl` - Tagalog\n* `ta` - Tamil\n* `te` - Telugu\n* `uk` - Ukrainian\n* `vi` - Vietnamese"
          },
          "assistant_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "\nExternal assistant service identifier (minimum 10 characters).\nExample: `\"asst_abc123xyz\"`.\n\nNote: `assistant_id` alone does NOT substitute for provider credentials. Providers like VAPI, Retell, and Bland still require their respective `*_api_key` to be set.\n",
            "maxLength": 255
          },
          "chat_assistant_id": {
            "type": "string",
            "description": "\nChat / provider-specific assistant identifier (minimum 10 characters).\nExample: `\"chat_asst_abc123xyz\"`.\n\nRequired for `assistant_provider` values:\n- `retell` — the Retell agent id (used for voice too, despite the field name).\n- `bland` — the Bland pathway_id (Bland calls it pathway_id internally).\n- `sms` / `whatsapp` — the text-channel assistant id.\n",
            "maxLength": 255
          },
          "websocket_url": {
            "type": [
              "string",
              "null"
            ],
            "description": "\nWebSocket endpoint URL for real-time communication\nExample: `\"wss://api.example.com/ws\"`\n"
          },
          "websocket_headers": {
            "type": "object",
            "additionalProperties": {},
            "description": "\nHeaders to be sent to the websocket server\n"
          },
          "llm_system_prompt": {
            "type": "string",
            "description": "\nSystem prompt that defines the agent's behavior and personality\nExample: \n```text\nYou are a helpful customer service agent. Always be polite and professional.\n```\n"
          },
          "llm_model": {
            "enum": [
              "gpt-4o",
              "gpt-4o-mini",
              "gpt-4.1",
              "gpt-4.1-mini",
              "claude-sonnet-4-5-20250929"
            ],
            "type": "string",
            "x-spec-enum-id": "50e3b52be1ccac3f",
            "default": "gpt-4o",
            "description": "\nThe LLM model to use for simulating user responses\n\n\n* `gpt-4o` - gpt-4o\n* `gpt-4o-mini` - gpt-4o-mini\n* `gpt-4.1` - gpt-4.1\n* `gpt-4.1-mini` - gpt-4.1-mini\n* `claude-sonnet-4-5-20250929` - claude-sonnet-4-5"
          },
          "llm_temperature": {
            "type": "number",
            "format": "double",
            "default": 0,
            "description": "\nControls randomness in responses (0.0-2.0, lower = more focused)\nExample: `0.5`\n"
          },
          "llm_max_tokens": {
            "type": "integer",
            "default": 4096,
            "description": "\nMaximum length of simulated responses in tokens\nExample: `4096`\n"
          },
          "outbound_auto_call": {
            "type": "boolean",
            "default": false,
            "description": "\nWhether to automatically call the outbound number\nExample: `False` or `True`\n"
          },
          "sip_endpoint": {
            "type": [
              "string",
              "null"
            ],
            "description": "SIP endpoint URL for direct SIP-based phone calls.\nExample: `\"sip:agent@cekura.ai\"` or `\"sip:contact@domain.com\"`\nLeave empty if SIP calling is not configured for this agent.",
            "maxLength": 255
          },
          "sip_auth": {
            "oneOf": [
              {},
              {
                "type": "null"
              }
            ],
            "description": "\nSIP authentication credentials\nExample: `{\"username\": \"user123\", \"password\": \"pass123\"}`\n"
          },
          "websocket_voice_url": {
            "type": [
              "string",
              "null"
            ],
            "description": "Raw-PCM (16kHz 16-bit mono) websocket endpoint for direct websocket-based voice calls",
            "maxLength": 255
          },
          "websocket_auth": {
            "oneOf": [
              {},
              {
                "type": "null"
              }
            ],
            "description": "\nWebsocket Basic Auth credentials\nExample: `{\"username\": \"user123\", \"password\": \"pass123\"}`\n"
          },
          "predefined_metrics": {
            "writeOnly": true,
            "description": "predefined metrics to use for the agent"
          },
          "knowledge_base_files": {
            "type": "string",
            "readOnly": true,
            "description": "\nList of knowledge base files attached to the agent\nExample: `[1, 2, 3]`\n"
          },
          "transcript_provider": {
            "enum": [
              "vapi",
              "retell",
              "synthflow",
              "elevenlabs",
              "bland",
              "livekit",
              "pipecat",
              "koreai",
              "custom",
              "cisco",
              "genesys",
              "agora",
              "amazon_connect",
              "telnyx",
              ""
            ],
            "type": "string",
            "x-spec-enum-id": "2b38755f8404d645",
            "default": "",
            "description": "\nService provider for speech-to-text transcription\n\n\n* `vapi` - Vapi\n* `retell` - Retell\n* `synthflow` - Synthflow\n* `elevenlabs` - Elevenlabs\n* `bland` - Bland\n* `livekit` - Livekit\n* `pipecat` - Pipecat\n* `koreai` - Kore\n* `custom` - Custom\n* `cisco` - Cisco\n* `genesys` - Genesys\n* `agora` - Agora\n* `amazon_connect` - Amazon Connect\n* `telnyx` - Telnyx"
          },
          "assistant_provider": {
            "enum": [
              "vapi",
              "retell",
              "elevenlabs",
              "vocera",
              "sms",
              "whatsapp",
              "self_hosted",
              "agentforce",
              "cisco",
              "bland",
              "livekit",
              "pipecat",
              "synthflow",
              "agora",
              "koreai",
              "genesys",
              "amazon_connect",
              "telnyx",
              "sierra",
              ""
            ],
            "type": "string",
            "x-spec-enum-id": "be289759a77f8b31",
            "default": "",
            "description": "\nService provider for the AI assistant functionality. Valid values (live enum):\n\n- `self_hosted` — websocket or observation-only; no api_key needed. Use `websocket_url` + `websocket_headers` for text-mode runs.\n- `vapi` — requires `vapi_api_key`; optional `assistant_id`, `vapi_data.public_key`.\n- `retell` — requires `retell_api_key` AND `chat_assistant_id` (used for voice too).\n- `bland` — requires `bland_api_key`; `assistant_id` is the Bland persona_id (voice), `chat_assistant_id` the pathway_id (text); `bland_data.encrypted_key` for Twilio.\n- `livekit` — requires `livekit_api_key` + `livekit_data.url`; `livekit_data.api_secret` is needed at run time for WebRTC.\n- `elevenlabs` — requires `elevenlabs_api_key`.\n- `agentforce` — requires `agentforce_client_secret` + `agentforce_data`.\n- `sierra` — requires `sierra_agent_token`; optional `sierra_data` (host, api_secret). Chat/text runs only.\n- `amazon_connect` — requires `amazon_connect_data` with `snippet_id` and `connect_host`; optional `amazon_connect_security_token` and `region`.\n- `cisco` — Cisco Webex.\n- `vocera` — Cekura-hosted.\n- `sms` / `whatsapp` — text-only channels; use `chat_assistant_id`.\n- `\"\"` (empty) — unset; agent is not runnable until a provider is configured.\n\nNote: the serializer also exposes `pipecat_*`, `synthflow_*`, `koreai_*`, `genesys_*`, `custom_provider_*` fields, but those provider values are not currently selectable in this enum.\n\n\n* `vapi` - Vapi\n* `retell` - Retell\n* `elevenlabs` - Elevenlabs\n* `vocera` - Vocera\n* `sms` - Sms\n* `whatsapp` - Whatsapp\n* `self_hosted` - Self Hosted\n* `agentforce` - Agentforce\n* `cisco` - Cisco\n* `bland` - Bland\n* `livekit` - Livekit\n* `pipecat` - Pipecat\n* `synthflow` - Synthflow\n* `agora` - Agora\n* `koreai` - Koreai\n* `genesys` - Genesys\n* `amazon_connect` - Amazon Connect\n* `telnyx` - Telnyx\n* `sierra` - Sierra"
          },
          "vapi_api_key": {
            "type": "string",
            "writeOnly": true,
            "description": "\nAPI key for VAPI service provider. Required when `assistant_provider=\"vapi\"`.\nExample: `\"vapi_api_key_123\"`\n"
          },
          "vapi_api_key_configured": {
            "type": "string",
            "readOnly": true
          },
          "vapi_public_key_configured": {
            "type": "string",
            "readOnly": true
          },
          "retell_api_key": {
            "type": "string",
            "writeOnly": true,
            "description": "\nAPI key for Retell service provider. Required when `assistant_provider=\"retell\"` (along with `chat_assistant_id`).\nExample: `\"retell_api_key_123\"`\n"
          },
          "retell_api_key_configured": {
            "type": "string",
            "readOnly": true
          },
          "elevenlabs_api_key": {
            "type": "string",
            "writeOnly": true,
            "description": "\nAPI key for ElevenLabs voice synthesis service. Required when `assistant_provider=\"elevenlabs\"`.\nExample: `\"elevenlabs_api_key_123\"`\n"
          },
          "elevenlabs_api_key_configured": {
            "type": "string",
            "readOnly": true
          },
          "bland_api_key": {
            "type": "string",
            "writeOnly": true,
            "description": "\nAPI key for Bland service provider. Required when `assistant_provider=\"bland\"`. Pair with `assistant_id` (Bland persona_id) for voice, or `chat_assistant_id` (Bland pathway_id) for text-mode runs.\nExample: `\"bland_api_key_123\"`\n"
          },
          "bland_api_key_configured": {
            "type": "string",
            "readOnly": true
          },
          "bland_data": {
            "type": "string",
            "description": "\nBland additional configuration. Pass `encrypted_key` containing the Twilio credential bundle.\nExample: `{\"encrypted_key\": \"twillio_encrypted_key\"}`\n"
          },
          "livekit_api_key": {
            "type": "string",
            "writeOnly": true,
            "description": "\nAPI key for LiveKit service provider. Required together with `livekit_data.url` when `assistant_provider=\"livekit\"`.\nExample: `\"livekit_api_key_123\"`\n"
          },
          "livekit_api_key_configured": {
            "type": "string",
            "readOnly": true
          },
          "livekit_data": {
            "type": "string",
            "description": "\nLiveKit additional data (api_secret, url, and config). `url` is required alongside `livekit_api_key` when `assistant_provider=\"livekit\"`;\n`api_secret` is optional to save but needed at run time for WebRTC token minting.\nOn response, secrets are masked (the `api_secret` key is stripped and replaced with `api_secret_configured: true`).\n"
          },
          "pipecat_api_key": {
            "type": "string",
            "writeOnly": true,
            "description": "\nAPI key for Pipecat/Daily.co service provider\nExample: `\"pipecat_api_key_123\"`\n"
          },
          "pipecat_api_key_configured": {
            "type": "string",
            "readOnly": true
          },
          "pipecat_data": {
            "type": "string",
            "description": "\nPipecat/Daily.co additional data (webhook_url and config)\n"
          },
          "koreai_client_secret": {
            "type": "string",
            "writeOnly": true,
            "description": "\nClient secret key for Kore.ai service provider\nExample: `\"client_secret_key_123\"`\n"
          },
          "koreai_client_secret_configured": {
            "type": "string",
            "readOnly": true
          },
          "koreai_api_key_configured": {
            "type": "string",
            "readOnly": true
          },
          "koreai_data": {
            "type": "string",
            "description": "\nKore.ai additional data.\nFor the RTM runner: {\"api_secret\": \"<xo-webclient API key>\", \"host\": \"platform.kore.ai\"}\nFor transcript fetch: {\"client_id\": \"cs-...\", \"bot_id\": \"st-...\", \"host\": \"bots.kore.ai\"}\napi_secret is encrypted at rest automatically.\n"
          },
          "genesys_client_secret": {
            "type": "string",
            "writeOnly": true,
            "description": "\nClient secret key for Genesys Cloud service provider\n"
          },
          "genesys_client_secret_configured": {
            "type": "string",
            "readOnly": true
          },
          "genesys_data": {
            "type": "string",
            "description": "\nGenesys Cloud additional data - client_id and region\n"
          },
          "agentforce_client_secret": {
            "type": "string",
            "writeOnly": true,
            "description": "\nClient secret for Salesforce Agentforce OAuth2 authentication\nExample: `\"3EG7HHH...\"`\n"
          },
          "agentforce_client_secret_configured": {
            "type": "string",
            "readOnly": true
          },
          "agentforce_data": {
            "type": "string",
            "description": "\nAgentforce additional data - client_id, domain, and agent_id\nExample: `{\"client_id\": \"sd7a8...\", \"domain\": \"https://example.sandbox.my.salesforce.com\", \"agent_id\": \"0Xx...\"}`\n"
          },
          "sierra_agent_token": {
            "type": "string",
            "writeOnly": true,
            "description": "\nSierra Headless API agent token. Required when `assistant_provider=\"sierra\"`.\n"
          },
          "sierra_agent_token_configured": {
            "type": "string",
            "readOnly": true
          },
          "sierra_data": {
            "type": "string",
            "description": "\nSierra additional configuration. Optional keys: `host` (API host, defaults to api.sierra.chat) and `api_secret` (bearer API key, only needed when the Sierra org enforces Headless API authentication; encrypted at rest).\nExample: `{\"host\": \"api.sierra.chat\"}`\n"
          },
          "amazon_connect_security_token": {
            "type": "string",
            "writeOnly": true,
            "description": "x-amz-security-token for Amazon Connect authenticated chat widgets."
          },
          "amazon_connect_security_token_configured": {
            "type": "string",
            "readOnly": true
          },
          "amazon_connect_data": {
            "type": "string",
            "description": "Amazon Connect config: snippet_id (required), connect_host (required), region (default us-east-1)."
          },
          "custom_provider_api_key": {
            "type": "string",
            "writeOnly": true,
            "description": "\nAPI key for custom service provider\nExample: `\"custom_api_key_123\"`\n"
          },
          "custom_provider_api_key_configured": {
            "type": "string",
            "readOnly": true
          },
          "custom_provider_data": {
            "type": "string",
            "description": "\nAdditional configuration data for custom service provider\n"
          },
          "vapi_data": {
            "type": "string",
            "description": "\nVAPI additional configuration data\nExample: `{\"public_key\": \"your-vapi-public-key\", \"trigger_url\": \"https://example.com/trigger\"}`\n"
          },
          "retell_data": {
            "type": "string",
            "description": "\nRetell additional configuration data\nExample: `{\"trigger_url\": \"https://example.com/trigger\"}`\n"
          },
          "elevenlabs_data": {
            "type": "string",
            "description": "\nElevenLabs additional configuration data\nExample: `{\"trigger_url\": \"https://example.com/trigger\"}`\n"
          },
          "agora_api_key": {
            "type": "string",
            "writeOnly": true,
            "description": "\nSecret sent in the session-endpoint auth header (default `X-Cekura-Secret`) when fetching Agora join details. Write-only.\n"
          },
          "agora_data": {
            "type": "string",
            "description": "\nConfiguration for the Agora session endpoint that mints per-call join details.\nSupported keys:\n  `session_endpoint_url` (required): endpoint Cekura calls per run.\n  `client_id` (required): sent in the request body.\n  `auth_header_name` (optional): header carrying the secret (default `X-Cekura-Secret`).\n  `request_method` (optional): GET or POST (default POST).\nExample: `{\"session_endpoint_url\": \"https://your-host/cekura/v1/sessions\", \"client_id\": \"abc\"}`\n"
          },
          "synthflow_api_key": {
            "type": "string",
            "writeOnly": true,
            "description": "\nAPI key for Synthflow service provider\nExample: `\"synthflow_api_key_123\"`\n"
          },
          "synthflow_api_key_configured": {
            "type": "string",
            "readOnly": true
          },
          "synthflow_data": {
            "type": "string",
            "description": "\nSynthflow additional configuration data\nExample: `{\"synthflow_base_url_override\": \"https://api.synthflow.ai\"}`\n"
          },
          "telnyx_api_key": {
            "type": "string",
            "writeOnly": true,
            "description": "\nAPI key for Telnyx AI Assistants\nExample: `\"telnyx_api_key_123\"`\n"
          },
          "telnyx_api_key_configured": {
            "type": "string",
            "readOnly": true
          },
          "enabled_personalities": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "readOnly": true,
            "description": "\nPersonality profiles enabled for this agent\nExample: `[1, 2, 3]`\n"
          },
          "dropoff_nodes": {
            "description": "Configuration for conversation dropoff points.\nExample: `{\"timeout\": 30, \"max_retries\": 3}`"
          },
          "topic_nodes": {
            "description": "Configuration for topic classification nodes.\nExample: `{\"billing\": \"handle_billing\", \"support\": \"handle_support\"}`"
          },
          "pronunciation_words": {
            "oneOf": [
              {},
              {
                "type": "null"
              }
            ],
            "description": "List of words with phonemes for pronunciation analysis.\nExample: `[[\"hello\", \"HH AH L OW\"], [\"world\", \"W ER L D\"]]`"
          },
          "spelling_word_types": {
            "oneOf": [
              {},
              {
                "type": "null"
              }
            ],
            "description": "List of word types/categories to check for spelling analysis.\nExample: `[\"name\", \"postcode\", \"email\", \"address\"]`"
          },
          "auto_update_dropoff_nodes": {
            "type": "boolean",
            "description": "Whether to automatically update the dropoff nodes based on the agent description"
          },
          "auto_update_topic_nodes": {
            "type": "boolean",
            "description": "Whether to automatically update the topic nodes based on the agent description"
          },
          "hallucination_metric_kb_files": {
            "type": "array",
            "items": {
              "type": [
                "integer",
                "null"
              ]
            },
            "description": "Knowledge base files used for hallucination metric"
          },
          "outbound_numbers": {
            "description": "List of phone numbers authorized to place outbound calls for this agent.\nExample: `[\"+1234567890\", \"+0987654321\"]`\n\nUsed for webhook validation — when an inbound webhook arrives, the system\nchecks whether the calling number is in this list (falls back to\n`contact_number` if the list is empty). Actual call placement for test runs\nuses the scenario's configured phone number or a number allocated from the\norganisation's phone pool."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true,
            "description": "\nTimestamp when the agent was created\nExample: `\"2021-01-01T00:00:00Z\"`\n"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true,
            "description": "\nTimestamp when the agent was last updated\nExample: `\"2021-01-01T00:00:00Z\"`\n"
          },
          "auto_fetch_calls_enabled": {
            "type": "boolean",
            "default": false,
            "description": "Enable automatic fetching of calls every 30 seconds (VAPI/Retell/ElevenLabs/Bland)"
          },
          "auto_sync_prompt_enabled": {
            "type": "boolean",
            "description": "Enable one-way prompt sync from the provider to Cekura on a schedule. Cekura re-fetches the provider prompt and updates the agent description; it does not push Cekura description changes back to the provider. Supported providers: vapi, retell, elevenlabs, synthflow, telnyx, bland."
          },
          "agent_gives_first_message": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Whether the main agent (not the testing agent) will give the first message. True = agent speaks first (testing agent won't generate a first message). False = testing agent speaks first (first message will be generated). None = preference not yet set."
          },
          "webhook_url": {
            "type": "string",
            "format": "uri",
            "description": "Webhook URL for this agent. When set, overrides the project-level webhook URL for events from this agent."
          },
          "webhook_secret": {
            "type": "string",
            "writeOnly": true,
            "description": "Secret sent in X-CEKURA-SECRET header. Applies when agent webhook_url is set. Write-only — never returned in API responses. Use `webhook_secret_configured` to check whether one is set."
          },
          "webhook_secret_configured": {
            "type": "string",
            "readOnly": true
          },
          "email_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "email",
            "description": "Email address this agent receives at. When set, enables email-based test runs.",
            "maxLength": 254
          }
        },
        "required": [
          "agent_name",
          "description",
          "inbound"
        ]
      },
      "SelfHostedChatConfig": {
        "type": "object",
        "description": "Self-hosted websocket chat configuration.",
        "properties": {
          "url": {
            "type": "string",
            "description": "WebSocket endpoint URL (wss://) to connect for text-mode test runs."
          },
          "headers": {
            "type": "object",
            "additionalProperties": {},
            "description": "Optional headers to send on the WebSocket upgrade request, e.g. {\"Authorization\": \"Bearer token\"}."
          },
          "websocket_secret": {
            "type": "string",
            "writeOnly": true,
            "description": "Secret sent as the X-VOCERA-SECRET header on the WebSocket upgrade (write-only — masked in responses)."
          }
        },
        "required": [
          "url"
        ],
        "title": "Self-hosted (WebSocket)"
      },
      "SelfHostedConfig": {
        "type": "object",
        "description": "Self-hosted provider configuration.",
        "properties": {
          "send_post_conversation_metadata": {
            "type": "boolean",
            "description": "Enable Cekura to accept call transcripts pushed by your agent via POST /custom-provider-webhook/. Set to true when your agent sends its own transcripts to Cekura after each call."
          },
          "trigger_url": {
            "type": "string",
            "description": "URL Cekura calls to create outbound phone calls. Required to enable auto_dial_outbound for the custom provider; must answer 2xx within 30s."
          },
          "trigger_secret": {
            "type": "string",
            "writeOnly": true,
            "description": "Optional shared secret sent as the X-CEKURA-SECRET header on trigger URL requests, so your endpoint can reject calls it didn't expect. Write-only — responses expose trigger_secret_configured instead."
          }
        },
        "title": "Self-hosted"
      },
      "SierraChatConfig": {
        "type": "object",
        "description": "Sierra chat configuration.",
        "properties": {
          "agent_token": {
            "type": "string",
            "description": "Sierra Headless API agent token (write-only — masked in responses)."
          },
          "host": {
            "type": "string",
            "description": "Sierra API host. Defaults to api.sierra.chat; customer-specific hosts differ."
          },
          "api_secret": {
            "type": "string",
            "description": "Bearer API key, only needed when the Sierra org enforces Headless API authentication (write-only — masked in responses)."
          }
        },
        "required": [
          "agent_token"
        ]
      },
      "SimplifyPromptProgressResponse": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "description": "queued, processing, completed, or failed"
          },
          "original_prompt": {
            "type": "string"
          },
          "simplified_prompt": {
            "type": "string"
          },
          "skipped_simplification": {
            "type": "boolean"
          },
          "metric_id": {
            "type": "integer"
          },
          "error": {
            "type": "string"
          }
        },
        "required": [
          "status"
        ]
      },
      "SimplifyPromptRequest": {
        "type": "object",
        "properties": {
          "original_prompt": {
            "type": "string",
            "description": "The verbose prompt to simplify"
          },
          "metric_id": {
            "type": "integer",
            "description": "Optional metric ID. If provided and metric is already optimized, returns stored instructions instead of simplifying."
          }
        },
        "required": [
          "original_prompt"
        ]
      },
      "SimplifyPromptResponse": {
        "type": "object",
        "properties": {
          "simplified_prompt": {
            "type": "string"
          },
          "original_prompt": {
            "type": "string"
          },
          "skipped_simplification": {
            "type": "boolean"
          },
          "progress_id": {
            "type": "string",
            "description": "Returned when async processing is needed. Poll simplify_prompt_progress for result."
          }
        }
      },
      "SimulateScenarioTranscriptMessage": {
        "type": "object",
        "properties": {
          "role": {
            "enum": [
              "Main Agent",
              "Testing Agent",
              "Function Call",
              "Function Call Result"
            ],
            "type": "string",
            "description": "* `Main Agent` - Main Agent\n* `Testing Agent` - Testing Agent\n* `Function Call` - Function Call\n* `Function Call Result` - Function Call Result",
            "x-spec-enum-id": "b888e3924515fb52"
          },
          "time": {
            "type": "string",
            "readOnly": true
          },
          "content": {
            "type": "string"
          },
          "end_time": {
            "type": "number",
            "format": "double"
          },
          "start_time": {
            "type": "number",
            "format": "double"
          },
          "data": {
            "$ref": "#/components/schemas/TranscriptFunctionCallData"
          }
        },
        "required": [
          "role"
        ]
      },
      "SlackWorkspace": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "team_name": {
            "type": "string",
            "readOnly": true
          },
          "channel_id": {
            "type": "string",
            "maxLength": 255
          },
          "organization": {
            "type": "integer",
            "readOnly": true
          },
          "is_verified": {
            "type": "boolean",
            "readOnly": true
          },
          "project": {
            "type": [
              "integer",
              "null"
            ]
          },
          "scopes": {
            "type": "string",
            "readOnly": true
          },
          "has_files_write": {
            "type": "string",
            "readOnly": true
          }
        }
      },
      "Subscription": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "organization": {
            "type": [
              "integer",
              "null"
            ],
            "readOnly": true
          },
          "stripe_subscription_id": {
            "type": "string",
            "readOnly": true
          },
          "is_active": {
            "type": "boolean",
            "readOnly": true
          },
          "status": {
            "type": "string",
            "readOnly": true
          },
          "is_trial": {
            "type": "string",
            "readOnly": true
          },
          "pack": {
            "allOf": [
              {
                "$ref": "#/components/schemas/PackInline"
              }
            ],
            "readOnly": true
          },
          "next_billing_cost": {
            "type": "string",
            "readOnly": true
          },
          "has_payment_method": {
            "type": "string",
            "readOnly": true
          },
          "is_stripe_managed": {
            "type": "string",
            "readOnly": true
          },
          "can_switch_to_payg": {
            "type": "string",
            "readOnly": true
          },
          "first_paid_seat_plan_offer": {
            "type": "string",
            "readOnly": true
          },
          "seat_payment_overdue_since": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "readOnly": true,
            "description": "When a renewal payment for this perpetual plan's seat subscription first failed. Once older than SUBSCRIPTION_GRACE_PERIOD_DAYS, billable members other than the free-plan owner are blocked at the API level until the payment is fixed. Cleared when a seat invoice is paid."
          },
          "last_payment_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "expire_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "cancelled_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "readOnly": true,
            "description": "Timestamp when the subscription was cancelled (is_active set to False)."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          }
        }
      },
      "SubscriptionStatus": {
        "type": "object",
        "properties": {
          "status": {
            "enum": [
              "active",
              "trial",
              "expired",
              "inactive"
            ],
            "type": "string",
            "x-spec-enum-id": "00a3c2044965e0ec",
            "description": "One-shot lifecycle signal for the subscription.\n\n* `active` - active\n* `trial` - trial\n* `expired` - expired\n* `inactive` - inactive"
          },
          "is_active": {
            "type": "boolean",
            "description": "Whether the subscription row is flagged active."
          },
          "is_trial": {
            "type": "boolean",
            "description": "True if the customer is on a trial pack."
          },
          "pack_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Display name of the current pack."
          },
          "expire_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the current billing period ends."
          },
          "last_payment_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Timestamp of the last successful charge."
          },
          "days_until_expiry": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Days until `expire_at`; negative if already past."
          },
          "created_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the subscription was first created."
          },
          "pack": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/SubscriptionStatusPack"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "created_at",
          "days_until_expiry",
          "expire_at",
          "is_active",
          "is_trial",
          "last_payment_at",
          "pack",
          "pack_name",
          "status"
        ]
      },
      "SubscriptionStatusPack": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Pack display name."
          },
          "max_concurrent_runs_limit": {
            "type": "integer",
            "description": "Maximum parallel call/voice runs allowed by the plan."
          },
          "max_concurrent_chat_runs_limit": {
            "type": "integer",
            "description": "Maximum parallel chat runs allowed by the plan."
          },
          "max_agents_limit": {
            "type": "integer",
            "description": "Maximum agents allowed by the plan (`-1` = unlimited)."
          },
          "max_members_limit": {
            "type": "integer",
            "description": "Maximum org members allowed by the plan (`-1` = unlimited)."
          },
          "max_projects_limit": {
            "type": "integer",
            "description": "Maximum projects allowed by the plan (`-1` = unlimited)."
          },
          "billing_type": {
            "type": "string",
            "description": "Pack billing type, e.g. `subscription` or `self_serve`."
          },
          "subscription_overage": {
            "type": "string",
            "format": "decimal",
            "pattern": "^-?\\d{0,3}(?:\\.\\d{0,2})?$",
            "description": "Price per credit for overage purchases. `-1` disables overage."
          }
        },
        "required": [
          "billing_type",
          "max_agents_limit",
          "max_concurrent_chat_runs_limit",
          "max_concurrent_runs_limit",
          "max_members_limit",
          "max_projects_limit",
          "name",
          "subscription_overage"
        ]
      },
      "SynthflowConfig": {
        "type": "object",
        "description": "Synthflow provider configuration.",
        "properties": {
          "synthflow_base_url_override": {
            "type": "string",
            "description": "Optional custom base URL for Synthflow API, e.g. for EU residency. Leave empty to use the default endpoint."
          }
        },
        "title": "Synthflow"
      },
      "TestProfileData": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Test Profile ID"
          },
          "name": {
            "type": "string",
            "description": "Test Profile name"
          },
          "information": {
            "type": "object",
            "additionalProperties": {},
            "description": "\nInformation of the test profile\nExample:\n```json\n{\n    \"user_name\": \"John Doe\",\n    \"user_email\": \"john.doe@example.com\",\n}\n```\n"
          }
        },
        "required": [
          "id",
          "information",
          "name"
        ]
      },
      "TestSetDetail": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "agent": {
            "type": "integer"
          },
          "name": {
            "type": "string",
            "description": "\nName of the test set\nExample: `\"Test Set 1\"`\n",
            "maxLength": 255
          },
          "transcript": {
            "type": "string",
            "description": "Full text transcript of the call.\nExample: \n```text\n[00:01] Testing Agent: Hello. \n[00:02] Main Agent: Hello, how can I help you today?\n[00:03] Testing Agent: Well, I mean, sure. What time exactly are we talking about here\n[00:04] Main Agent: 6 PM.\n[00:05] Testing Agent: Great. I'll book that for you. Just a sec.\n[00:06] Main Agent: Okay.\n```\n"
          },
          "transcript_object": {
            "oneOf": [
              {},
              {
                "type": "null"
              }
            ]
          },
          "voice_recording": {
            "type": "string",
            "format": "uri",
            "writeOnly": true
          },
          "voice_recording_url": {
            "type": "string",
            "readOnly": true,
            "description": "Audio URL"
          },
          "call_end_reason": {
            "type": "string",
            "description": "Reason why the call ended.\nExample: \n- `\"customer-ended-call\"`\n- `\"agent-ended-call\"`\n",
            "maxLength": 255
          },
          "duration": {
            "type": "string",
            "readOnly": true,
            "description": "Call duration in minutes in MM:SS format.\nExample: `01:10`"
          },
          "source_model": {
            "enum": [
              "CallLog",
              "Run"
            ],
            "type": "string",
            "description": "* `CallLog` - Call Log\n* `Run` - Run",
            "x-spec-enum-id": "1d8f6db20c0b4cac",
            "readOnly": true
          },
          "source_id": {
            "type": "string",
            "readOnly": true
          },
          "metric_reviews": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MetricReviewInline"
            },
            "readOnly": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true,
            "description": "When this record was created.\nExample: `2024-03-15T10:30:45Z`"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true,
            "description": "When this record was last updated.\nExample: `2024-03-15T10:35:11Z`"
          }
        },
        "required": [
          "agent",
          "voice_recording"
        ]
      },
      "TestSetInline": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "agent": {
            "type": "integer"
          },
          "name": {
            "type": "string",
            "description": "\nName of the test set\nExample: `\"Test Set 1\"`\n",
            "maxLength": 255
          },
          "transcript": {
            "type": "string",
            "description": "Full text transcript of the call.\nExample: \n```text\n[00:01] Testing Agent: Hello. \n[00:02] Main Agent: Hello, how can I help you today?\n[00:03] Testing Agent: Well, I mean, sure. What time exactly are we talking about here\n[00:04] Main Agent: 6 PM.\n[00:05] Testing Agent: Great. I'll book that for you. Just a sec.\n[00:06] Main Agent: Okay.\n```\n"
          },
          "voice_recording_url": {
            "type": "string",
            "readOnly": true
          },
          "call_end_reason": {
            "type": "string",
            "description": "Reason why the call ended.\nExample: \n- `\"customer-ended-call\"`\n- `\"agent-ended-call\"`\n",
            "maxLength": 255
          },
          "duration": {
            "type": "string",
            "readOnly": true
          },
          "source_model": {
            "enum": [
              "CallLog",
              "Run"
            ],
            "type": "string",
            "description": "* `CallLog` - Call Log\n* `Run` - Run",
            "x-spec-enum-id": "1d8f6db20c0b4cac",
            "readOnly": true
          },
          "source_id": {
            "type": "string",
            "readOnly": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true,
            "description": "When this record was created.\nExample: `2024-03-15T10:30:45Z`"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true,
            "description": "When this record was last updated.\nExample: `2024-03-15T10:35:11Z`"
          }
        },
        "required": [
          "agent"
        ]
      },
      "TestSuiteSpecUpload": {
        "type": "object",
        "description": "Accepts a spec as a JSON body or an uploaded file.\n\nCI posts JSON directly; the dashboard uploads the same file the customer has\nin their repo. Both land in ``spec``.",
        "properties": {
          "spec": {
            "description": "The test-suite spec. Use this when posting JSON directly."
          },
          "file": {
            "type": "string",
            "format": "uri",
            "description": "A .json spec file. Use this instead of 'spec' for uploads."
          },
          "agent_id": {
            "type": "integer",
            "description": "Agent to test. Overrides 'agent_id' in the spec, letting one spec file run against several environments."
          },
          "name": {
            "type": "string",
            "description": "Label for this run. Defaults to the spec's suite name.",
            "maxLength": 255
          },
          "channel": {
            "enum": [
              "voice",
              "text",
              "elevenlabs"
            ],
            "type": "string",
            "x-spec-enum-id": "173ddbb9888b2f07",
            "description": "How to reach the agent: 'voice' for a phone call (the default), 'text' for chat, 'elevenlabs' for an ElevenLabs WebRTC session.\n\n* `voice` - voice\n* `text` - text\n* `elevenlabs` - elevenlabs"
          }
        }
      },
      "TokenRefresh": {
        "type": "object",
        "properties": {
          "access": {
            "type": "string",
            "readOnly": true
          },
          "refresh": {
            "type": "string",
            "writeOnly": true
          }
        },
        "required": [
          "refresh"
        ]
      },
      "Tool": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "name": {
            "type": "string",
            "description": "Name of the tool - must be less than 64 characters and contain only alphanumerics, underscores, hyphens, and spaces between words (no leading or trailing spaces)",
            "maxLength": 255
          },
          "description": {
            "type": "string",
            "description": "\nDescription of the mock tool.\nExample: \"This tool retrieves user data from the database based on user ID\"\n"
          },
          "information": {
            "description": "\nInformation of the tool - must be a list of input-output mappings.\nExample:\n```json\n[\n    {\n        \"input\": {\"user_id\": 1},\n        \"output\": {\"name\": \"John Doe\", \"age\": 30, \"email\": \"john@example.com\"}\n    },\n    {\n        \"input\": {\"user_id\": 2},\n        \"output\": {\"name\": \"Jane Smith\", \"age\": 25, \"email\": \"jane@example.com\"}\n    }\n]\n```\n"
          },
          "freetext_params": {
            "description": "Parameter names skipped during mock matching because they are free-text (e.g. [\"notes\", \"reason\"])"
          },
          "mock_url": {
            "type": "string",
            "readOnly": true,
            "description": "Per-tool webhook URL. None if this Tool is served through an MCP endpoint."
          },
          "served_via": {
            "type": "string",
            "readOnly": true,
            "description": "How this tool is accessed at runtime. `{'type': 'direct'}` for standalone tools; `{'type': 'mcp', 'mock_index': N, 'url': '.../mcp/N/', 'server_name': ...}` for MCP sub-tools."
          },
          "mcp_server": {
            "type": "string",
            "readOnly": true,
            "description": "MCP server this tool was fetched from, as `{'name', 'key'}`. Null for standalone (non-MCP) tools. Server-managed — ignored on writes."
          }
        },
        "required": [
          "name"
        ]
      },
      "TranscriptFunctionCallData": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "arguments": {
            "oneOf": [
              {},
              {
                "type": "null"
              }
            ]
          },
          "result": {
            "oneOf": [
              {},
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "UsageChartResponse": {
        "type": "object",
        "properties": {
          "field_name": {
            "type": "string"
          },
          "chart_type": {
            "type": "string"
          },
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": {}
            }
          },
          "aggregation_function": {
            "type": "string"
          },
          "time_period": {
            "type": "string"
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {}
          }
        },
        "required": [
          "aggregation_function",
          "chart_type",
          "data",
          "field_name",
          "metadata",
          "time_period"
        ]
      },
      "UserAPIKey": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "name": {
            "type": "string"
          },
          "organization_name": {
            "type": "string",
            "readOnly": true
          },
          "project": {
            "type": [
              "integer",
              "null"
            ]
          },
          "project_name": {
            "type": "string",
            "readOnly": true
          },
          "key": {
            "type": "string",
            "readOnly": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          }
        }
      },
      "UserConfiguration": {
        "type": "object",
        "description": "",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "project": {
            "type": "integer",
            "description": "The project this configuration belongs to"
          },
          "agent": {
            "type": "integer",
            "description": "The agent this configuration belongs to"
          },
          "name": {
            "type": "string",
            "description": "Name of the configuration",
            "maxLength": 255
          },
          "configuration_type": {
            "enum": [
              "undefined",
              "runs_overview"
            ],
            "type": "string",
            "x-spec-enum-id": "bf0bea22f65083a0",
            "description": "Type of configuration\n\n* `undefined` - Undefined\n* `runs_overview` - Runs Overview"
          },
          "data": {
            "description": "Configuration data stored as key-value pairs"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          }
        },
        "required": [
          "configuration_type",
          "data",
          "name",
          "project"
        ]
      },
      "UserInline": {
        "type": "object",
        "description": "",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "name": {
            "type": "string",
            "maxLength": 255
          },
          "email": {
            "type": "string",
            "format": "email",
            "maxLength": 254
          }
        },
        "required": [
          "email",
          "name"
        ]
      },
      "UserMembership": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "organization": {
            "type": [
              "integer",
              "null"
            ],
            "readOnly": true
          },
          "organization_name": {
            "type": "string",
            "readOnly": true
          },
          "project": {
            "type": [
              "integer",
              "null"
            ]
          },
          "project_name": {
            "type": "string",
            "readOnly": true
          },
          "user": {
            "allOf": [
              {
                "$ref": "#/components/schemas/UserInline"
              }
            ],
            "readOnly": true
          },
          "role": {
            "enum": [
              "admin",
              "member",
              "view_only",
              "labs",
              "labs_view_only",
              "insights_view"
            ],
            "type": "string",
            "description": "* `admin` - Admin\n* `member` - Member\n* `view_only` - View Only\n* `labs` - Labs\n* `labs_view_only` - Labs View Only\n* `insights_view` - Insights View Only",
            "x-spec-enum-id": "dc933c4519c4289a"
          },
          "is_email_notify_enabled": {
            "type": "boolean"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          }
        },
        "required": [
          "project"
        ]
      },
      "VapiConfig": {
        "type": "object",
        "description": "VAPI provider configuration.",
        "properties": {
          "public_key": {
            "type": "string",
            "description": "VAPI Public Key for WebRTC sessions only. Not required for telephony or chat testing."
          },
          "trigger_url": {
            "type": "string",
            "description": "URL Cekura calls to create outbound VAPI phone calls."
          },
          "trigger_secret": {
            "type": "string",
            "writeOnly": true,
            "description": "Optional shared secret sent as the X-CEKURA-SECRET header on trigger URL requests, so your endpoint can reject calls it didn't expect. Write-only — responses expose trigger_secret_configured instead."
          }
        },
        "title": "VAPI"
      },
      "View": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "project": {
            "type": "integer"
          },
          "name": {
            "type": "string",
            "description": "Name of the view",
            "maxLength": 255
          },
          "filter_config": {
            "description": "Filter configuration with agent_ids and extensible fields"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          }
        },
        "required": [
          "name",
          "project"
        ]
      },
      "Widget": {
        "type": "object",
        "description": "Widget configuration. Key rules:\n- `line` / `pie`: set `field` only (e.g. `\"duration\"`, `\"call_ended_reason\"`). No aggregation needed.\n- `bar`: set `field` + `aggregation_function` (e.g. `\"count\"`) + `time_period` (e.g. `\"day\"`).\n- `stat`: leave `field` empty — returns total_calls, success_rate, avg_duration, p95_latency.\n- `field = \"metric_evaluations.value\"`: `metric` (integer metric ID) is **required**.\n  Get valid IDs from `GET /test_framework/v1/metrics?agent_id=<id>`.\n- `effective_filters` (read-only): merged dashboard + widget filters — useful for debugging.",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "dashboard": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Dashboard this widget belongs to"
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional name/title for the widget",
            "maxLength": 255
          },
          "filters": {
            "type": [
              "object",
              "null"
            ],
            "description": "Filter conditions to scope the data. See the [Dashboards guide](https://docs.cekura.ai/documentation/guides/dashboards#filters) for supported fields, operators, and syntax.",
            "properties": {
              "field": {
                "type": "string",
                "description": "Field name to filter on",
                "examples": [
                  "success",
                  "duration",
                  "timestamp",
                  "metadata.region",
                  "metric_evaluations.value"
                ]
              },
              "op": {
                "type": "string",
                "enum": [
                  "eq",
                  "neq",
                  "gt",
                  "gte",
                  "lt",
                  "lte",
                  "contains",
                  "startswith",
                  "endswith",
                  "in",
                  "isnull",
                  "regex"
                ],
                "description": "Comparison operator"
              },
              "value": {
                "description": "Value to compare against. Type depends on the field and operator."
              },
              "operator": {
                "type": "string",
                "enum": [
                  "and",
                  "or",
                  "same_row"
                ],
                "description": "Logical operator to combine conditions"
              },
              "conditions": {
                "type": "array",
                "description": "List of filter conditions or nested groups",
                "items": {}
              }
            },
            "examples": [
              {
                "field": "success",
                "op": "eq",
                "value": true
              },
              {
                "operator": "and",
                "conditions": [
                  {
                    "field": "timestamp",
                    "op": "gte",
                    "value": "today-7d"
                  },
                  {
                    "field": "duration",
                    "op": "gte",
                    "value": 60
                  }
                ]
              }
            ]
          },
          "effective_filters": {
            "type": "object",
            "description": "Merged filters from dashboard and widget (read-only). Can be used with the call logs API filters_v2 parameter.",
            "properties": {
              "field": {
                "type": "string",
                "description": "Field name to filter on",
                "examples": [
                  "success",
                  "duration",
                  "timestamp",
                  "metadata.region",
                  "metric_evaluations.value"
                ]
              },
              "op": {
                "type": "string",
                "enum": [
                  "eq",
                  "neq",
                  "gt",
                  "gte",
                  "lt",
                  "lte",
                  "contains",
                  "startswith",
                  "endswith",
                  "in",
                  "isnull",
                  "regex"
                ],
                "description": "Comparison operator"
              },
              "value": {
                "description": "Value to compare against. Type depends on the field and operator."
              },
              "operator": {
                "type": "string",
                "enum": [
                  "and",
                  "or",
                  "same_row"
                ],
                "description": "Logical operator to combine conditions"
              },
              "conditions": {
                "type": "array",
                "description": "List of filter conditions or nested groups",
                "items": {}
              }
            },
            "examples": [
              {
                "field": "success",
                "op": "eq",
                "value": true
              },
              {
                "operator": "and",
                "conditions": [
                  {
                    "field": "timestamp",
                    "op": "gte",
                    "value": "today-7d"
                  },
                  {
                    "field": "duration",
                    "op": "gte",
                    "value": 60
                  }
                ]
              }
            ],
            "readOnly": true
          },
          "chart_type": {
            "enum": [
              "line",
              "bar",
              "pie",
              "stat"
            ],
            "type": "string",
            "x-spec-enum-id": "458699e47c376d15",
            "description": "Type of chart to display\n\n* `line` - Line\n* `bar` - Bar\n* `pie` - Pie\n* `stat` - Stat"
          },
          "data_type": {
            "enum": [
              "numeric",
              "boolean",
              "string",
              "datetime",
              "dynamic",
              "",
              null
            ],
            "type": [
              "string",
              "null"
            ],
            "x-spec-enum-id": "553dbfa7e4c5fb6a",
            "description": "Data type of the field being plotted (optional, can be inferred)\n\n* `numeric` - Numeric\n* `boolean` - Boolean\n* `string` - String\n* `datetime` - DateTime\n* `dynamic` - Dynamic"
          },
          "field": {
            "type": "string",
            "description": "Field name to plot. See the [Dashboards guide](https://docs.cekura.ai/documentation/guides/dashboards#supported-fields) for available fields, valid chart types, and aggregation combinations.",
            "examples": [
              "duration",
              "success",
              "call_ended_reason",
              "metric_evaluations.value",
              "metadata.region"
            ],
            "default": "",
            "maxLength": 255
          },
          "metric": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Metric to use when field is 'metric_evaluations.value'"
          },
          "metric_name": {
            "type": "string",
            "readOnly": true,
            "description": "Name of the metric (if metric is set)"
          },
          "time_period": {
            "enum": [
              "hour",
              "day",
              "week",
              "month",
              "",
              null
            ],
            "type": [
              "string",
              "null"
            ],
            "x-spec-enum-id": "c3b53047d634938d",
            "description": "Time period for aggregation (for bar charts)\n\n* `hour` - Hour\n* `day` - Day\n* `week` - Week\n* `month` - Month"
          },
          "aggregation_function": {
            "enum": [
              "count",
              "sum",
              "avg",
              "min",
              "max",
              "p50",
              "p95",
              "p99",
              "",
              null
            ],
            "type": [
              "string",
              "null"
            ],
            "x-spec-enum-id": "be3fac57dbd138ef",
            "description": "Aggregation function to apply (for bar charts)\n\n* `count` - Count\n* `sum` - Sum\n* `avg` - Average\n* `min` - Minimum\n* `max` - Maximum\n* `p50` - 50th Percentile (Median)\n* `p95` - 95th Percentile\n* `p99` - 99th Percentile"
          },
          "group_by": {
            "oneOf": [
              {},
              {
                "type": "null"
              }
            ],
            "description": "Optional group-by configuration. Field group: `{\"type\": \"field\", \"field\": \"agent.id\"}`. Time bucket: `{\"type\": \"bucket\", \"interval\": 3600000}` (interval in milliseconds). Leave null or empty for no grouping."
          },
          "metadata": {
            "oneOf": [
              {},
              {
                "type": "null"
              }
            ],
            "description": "Frontend metadata (e.g., position, size, styling)"
          },
          "created_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "readOnly": true,
            "description": "When the widget was created"
          },
          "updated_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "readOnly": true,
            "description": "When the widget was last updated"
          }
        },
        "required": [
          "chart_type"
        ]
      },
      "WidgetDataResponse": {
        "type": "object",
        "properties": {
          "widget_id": {
            "type": "integer"
          },
          "field_name": {
            "type": "string"
          },
          "chart_type": {
            "type": "string"
          },
          "data": {
            "type": "array",
            "description": "Chart data. Format depends on `chart_type`:\n\n**Line chart:** `[{id, timestamp, value}, ...]`\n\n**Bar chart:** `[{time_interval, value, sample_count}, ...]`\n\n**Pie chart:** `[{label, value, percentage}, ...]`\n\nSee the [Dashboards guide](https://docs.cekura.ai/documentation/guides/dashboards#chart-output-formats) for full examples.",
            "items": {
              "type": "object"
            },
            "examples": [
              [
                {
                  "id": 1,
                  "timestamp": "2025-11-03T10:30:00Z",
                  "value": 45
                },
                {
                  "id": 2,
                  "timestamp": "2025-11-03T11:15:00Z",
                  "value": 62
                }
              ],
              [
                {
                  "time_interval": "2025-11-03T00:00:00Z",
                  "value": 4.5,
                  "sample_count": 10
                },
                {
                  "time_interval": "2025-11-04T00:00:00Z",
                  "value": 3.2,
                  "sample_count": 8
                }
              ],
              [
                {
                  "label": "customer_ended_call",
                  "value": 320,
                  "percentage": 45.7
                },
                {
                  "label": "agent_ended_call",
                  "value": 210,
                  "percentage": 30
                }
              ]
            ]
          },
          "aggregation_function": {
            "type": [
              "string",
              "null"
            ]
          },
          "time_period": {
            "type": [
              "string",
              "null"
            ]
          },
          "group_by": {
            "oneOf": [
              {},
              {
                "type": "null"
              }
            ]
          },
          "can_group_by": {
            "type": "boolean",
            "default": false
          },
          "metadata": {
            "type": "object",
            "description": "Additional metadata about the plotted data. See the [Dashboards guide](https://docs.cekura.ai/documentation/guides/dashboards#widget-data) for details.",
            "properties": {
              "display_name": {
                "type": "string",
                "description": "Human-readable name of the field"
              },
              "data_type": {
                "type": "string",
                "enum": [
                  "numeric",
                  "boolean",
                  "string",
                  "datetime",
                  "dynamic"
                ],
                "description": "Resolved data type of the field"
              },
              "filter_value": {
                "description": "The filter value used (e.g. metric ID), or null",
                "nullable": true
              }
            }
          }
        },
        "required": [
          "aggregation_function",
          "chart_type",
          "data",
          "field_name",
          "group_by",
          "metadata",
          "time_period",
          "widget_id"
        ]
      },
      "_PRFile": {
        "type": "object",
        "properties": {
          "path": {
            "type": "string",
            "description": "Repo-relative file path."
          },
          "content": {
            "type": [
              "string",
              "null"
            ],
            "description": "New file contents; null to delete the path."
          }
        },
        "required": [
          "path"
        ]
      }
    },
    "securitySchemes": {
      "api_key": {
        "type": "apiKey",
        "in": "header",
        "name": "X-CEKURA-API-KEY",
        "description": "API Key Authentication. It should be included in the header of each request."
      },
      "embedded_session": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "description": "Embedded-dashboard session token. Internal."
      },
      "lambda_token": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "description": "Internal Lambda-to-backend token."
      },
      "oauth2": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "description": "OAuth access token issued by Cekura for connected apps."
      },
      "patronus_agent_token": {
        "type": "apiKey",
        "in": "header",
        "name": "X-CEKURA-PIPECAT-AGENT-TOKEN",
        "description": "Internal Patronus agent token."
      },
      "pipecat_agent_token": {
        "type": "apiKey",
        "in": "header",
        "name": "X-CEKURA-PIPECAT-AGENT-TOKEN",
        "description": "Internal Pipecat/Patronus agent token."
      },
      "product_chat_sandbox": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "description": "Product-chat sandbox token. Internal."
      },
      "shareable_link": {
        "type": "apiKey",
        "in": "header",
        "name": "X-VOCERA-SHAREABLE-LINK-TOKEN",
        "description": "Share-link token scoped to a single shared resource."
      },
      "supabase_session": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "description": "Cekura dashboard session token. Not a customer API credential."
      },
      "supabase_session_inactive_allowed": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "description": "Cekura dashboard session token, accepted before account activation. Not a customer API credential."
      },
      "support_bot_oauth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "description": "Internal Cekura support-bot token."
      }
    }
  },
  "servers": [
    {
      "url": "https://api.cekura.ai"
    }
  ],
  "x-mint": {
    "mcp": {
      "enabled": true
    }
  }
}