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

# Create Test Profile

> Create a new test profile



## OpenAPI

````yaml post /test_framework/v1/test-profiles/
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/test-profiles/:
    post:
      tags:
        - test_framework
      description: Create a new test profile
      operationId: test-profiles-create
      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
      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: ''
      security:
        - api_key: []
components:
  schemas:
    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
    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: |

            Name of the agent associated with this test profile
            Example: `"Customer Support Agent"`
        name:
          type: string
          maxLength: 255
        information:
          description: >

            Variables for the test profile, split by which agent receives them.

            ```json

            {
                "main_agent_variables": {"user_id": "U-123"},
                "testing_agent_variables": {"user_name": "John Doe", "user_email": "john.doe@example.com"}
            }

            ```

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


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

````