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

# Create Test From Call

> Draft a test case from a real call: the caller's side becomes the script and the call's failed success criteria (or `focus`) the scoring rubric. The call's variables are replayed. Saved to the suite unless `save` is false.



## OpenAPI

````yaml POST /test-suites/{id}/tests/from-call
openapi: 3.1.0
info:
  title: RevRing Voice AI API
  description: >-
    RevRing Voice AI platform API for managing AI voice agents, phone calls, SIP
    trunks, and analytics. Build intelligent voice applications that can handle
    inbound and outbound phone calls with AI-powered conversational agents.
  version: 1.0.0
  contact:
    name: RevRing Support
    url: https://revring.ai
servers:
  - url: https://api.revring.ai/v1
    description: Production API
security:
  - apiKeyAuth: []
tags:
  - name: Messaging Connections
    description: Connect messaging providers so agents can send text messages
  - name: Messages
    description: Send text messages and read your message log
  - name: Conversations
    description: List and clear managed conversation threads
  - name: SIP Trunks
    description: Manage SIP trunks for connecting agents to the phone network
  - name: Agents
    description: Manage AI voice agents and their configuration
  - name: Agent Folders
    description: Organize agents into folders for dashboard navigation
  - name: Calls
    description: Manage and query phone calls
  - name: Analytics
    description: Get analytics and metrics about your calls
  - name: Knowledge Bases
    description: >-
      Manage knowledge bases and sources for agent retrieval-augmented
      generation
  - name: Test Suites
    description: Manage test suites, test cases, and test runs for agent evaluation
  - name: Voices
    description: Browse the voices available to your organization for agent speech
  - name: Webhooks
    description: Webhook delivery settings for your organization
paths:
  /test-suites/{id}/tests/from-call:
    post:
      tags:
        - Test Suites
      summary: Create Test From Call
      description: >-
        Draft a test case from a real call: the caller's side becomes the script
        and the call's failed success criteria (or `focus`) the scoring rubric.
        The call's variables are replayed. Saved to the suite unless `save` is
        false.
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: Test suite ID
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - callId
              properties:
                callId:
                  type: string
                focus:
                  type: string
                  maxLength: 1000
                  description: >-
                    What the test should check; defaults to the call's failed
                    criteria
                save:
                  type: boolean
                  default: true
      responses:
        '200':
          description: 'Draft (save: false)'
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      saved:
                        type: boolean
                      test:
                        type: object
                        properties:
                          name:
                            type: string
                          script:
                            type: string
                          scoringRubric:
                            type: string
                          variables:
                            type: object
                            nullable: true
        '201':
          description: Test created
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      saved:
                        type: boolean
                      test:
                        type: object
        '400':
          description: call_has_no_conversation
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  message:
                    type: string
        '404':
          description: suite_not_found or call_not_found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  message:
                    type: string
components:
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        API key for authentication. Generate API keys from the RevRing
        dashboard.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.