> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cekura.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Run Evaluator Email

> Execute evaluators against an email agent. Cekura sends an email to the agent and simulates the full conversation via inbound webhook.



## OpenAPI

````yaml post /test_framework/v1/scenarios/run_scenarios_email/
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.
servers:
  - url: https://api.cekura.ai
security: []
paths:
  /test_framework/v1/scenarios/run_scenarios_email/:
    post:
      tags:
        - Evaluators
      summary: Run evaluators against an email agent
      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.


        The 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.


        **Run-count:** total conversations = `len(scenarios) × frequency`.


        **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.


        **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'.
      operationId: scenarios-run-email_2
      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
      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: ''
      security:
        - api_key: []
components:
  schemas:
    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
    RunScenarioResult:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
          description: |

            Unique identifier for the Result
            Example: `123`
        name:
          type: string
          description: |

            Name of the Result
            Example: `"Test Result 1"`
          maxLength: 255
        agent:
          type: integer
          readOnly: true
          description: |

            ID of the AI agent that was tested
            Example: `123`
        agent_inbound:
          type: boolean
          readOnly: true
          description: >

            Whether the agent is configured for inbound calls (true) or outbound
            calls (false)

            Example: `true` or `false`
        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: |-

            Current status of the result


            * `running` - Running
            * `completed` - Completed
            * `failed` - Failed
            * `pending` - Pending
            * `in_progress` - In Progress
            * `evaluating` - Evaluating
            * `in_queue` - In Queue
            * `timeout` - Timeout
            * `cancelled` - Cancelled
            * `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: |

            Whether this test was run in text mode instead of voice mode
            Example: `true` or `false`
        is_cronjob:
          type: string
          readOnly: true
          description: |

            Whether this result was created by a scheduled cronjob
            Example: `true` or `false`
        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: |

            Timestamp when this test result was created
            Example: `2021-01-01 00:00:00`
        updated_at:
          type: string
          format: date-time
          readOnly: true
          description: Timestamp when this test result was last updated
      required:
        - name
  securitySchemes:
    api_key:
      type: apiKey
      name: X-CEKURA-API-KEY
      in: header
      description: >-
        API Key Authentication. It should be included in the header of each
        request.

````