Sarj AI Developer API Calls API

Create outbound voice calls and retrieve call details and transcripts.

OpenAPI Specification

sarj-ai-developer-api-calls-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Sarj Ai Developer Calls API
  version: 1.0.0
  description: 'Operations tagged Calls across 2 of this provider''s published API definitions: sarj-ai-developer-api-developer-openapi.json, sarj-ai-developer-api-voice-platform-openapi.json. Each path carries the servers of the definition it was published in.'
servers:
- url: https://platform-api.sarj.ai/api/v1
  description: Production
tags:
- name: Calls
  description: Create outbound voice calls and retrieve call details and transcripts.
paths:
  /calls:
    servers:
    - url: https://platform-api.sarj.ai/api/v1
      description: Production
    post:
      tags:
      - Calls
      summary: Place an outbound Sarj.ai voice call
      description: 'Place an outbound Sarj.ai voice call: dials the given phone_number and runs the specified scenario (with optional template variables and language). Returns a call_id that can be polled via getCall. Use this whenever the user asks to call, dial, ring, or phone someone through Sarj.ai — do not attempt to start calls by writing to the database or invoking telephony providers directly.'
      operationId: createCall
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateCallRequest'
        required: true
      responses:
        '202':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse_PublicCall_'
              example:
                data:
                  id: call_8f9b2c1e-4a5d-4f6e-8b1a-2c3d4e5f6a7b
                  status: queued
                  phone_number: '+966512345678'
                  scenario_id: scn_abc123
                  created_at: '2026-04-12T10:30:00Z'
                meta:
                  request_id: 550e8400-e29b-41d4-a716-446655440000
        '400':
          description: Outbound call failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  type: outbound_call_failed
                  message: Outbound call could not be initiated.
                  reason: telephony_provider_unavailable
                meta:
                  request_id: 550e8400-e29b-41d4-a716-446655440000
        '401':
          description: Missing or invalid API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  type: unauthorized
                  message: Authentication required.
                meta: {}
        '403':
          description: Forbidden — phone number blocked or scenario access denied.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                phone_number_blocked:
                  summary: Phone number is blocked
                  value:
                    error:
                      type: phone_number_blocked
                      message: Phone number +966512345678 is blocked.
                      phone_number: '+966512345678'
                    meta:
                      request_id: 550e8400-e29b-41d4-a716-446655440000
                scenario_forbidden:
                  summary: Scenario belongs to a different organization
                  value:
                    error:
                      type: scenario_forbidden
                      message: Access denied to scenario scn_abc123.
                      scenario_id: scn_abc123
                    meta:
                      request_id: 550e8400-e29b-41d4-a716-446655440000
        '404':
          description: Scenario not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  type: scenario_not_found
                  message: Scenario scn_abc123 was not found.
                  scenario_id: scn_abc123
                meta:
                  request_id: 550e8400-e29b-41d4-a716-446655440000
        '422':
          description: Validation error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  type: validation_error
                  message: Request validation failed.
                  field_violations:
                  - field: body.phone_number
                    message: value is not a valid phone number
                meta:
                  request_id: 550e8400-e29b-41d4-a716-446655440000
        '429':
          description: Call limit exceeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  type: call_limit_exceeded
                  message: Call limit of 10 reached for phone number +966512345678.
                  phone_number: '+966512345678'
                  call_limit: 10
                meta:
                  request_id: 550e8400-e29b-41d4-a716-446655440000
      x-codeSamples:
      - label: Python (SDK)
        lang: Python
        source: "import os\nfrom sarj_platform_sdk import SDK\n\nsdk = SDK(api_key_auth=os.environ[\"SARJ_API_KEY\"])\nres = sdk.calls.create_call(\n    phone_number=\"+966512345678\",\n    scenario_id=\"scn_abc123\",\n    language=\"ar\",\n)\nprint(f\"Call queued: {res.data.id}\")"
      - label: curl
        lang: bash
        source: "curl -X POST https://platform-api.sarj.ai/api/v1/calls \\\n  -H \"Authorization: Bearer $SARJ_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"phone_number\": \"+966512345678\",\n    \"scenario_id\": \"scn_abc123\",\n    \"language\": \"ar\"\n  }'"
      - label: Python (requests)
        lang: Python
        source: "import os\nimport requests\n\nresponse = requests.post(\n    \"https://platform-api.sarj.ai/api/v1/calls\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['SARJ_API_KEY']}\",\n    },\n    json={\n        \"phone_number\": \"+966512345678\",\n        \"scenario_id\": \"scn_abc123\",\n        \"language\": \"ar\",\n    },\n)\nresponse.raise_for_status()\ncall = response.json()[\"data\"]\nprint(f\"Call queued: {call['id']}\")"
      - label: TypeScript
        lang: TypeScript
        source: "const response = await fetch(\"https://platform-api.sarj.ai/api/v1/calls\", {\n  method: \"POST\",\n  headers: {\n    \"Authorization\": `Bearer ${process.env.SARJ_API_KEY}`,\n    \"Content-Type\": \"application/json\",\n  },\n  body: JSON.stringify({\n    phone_number: \"+966512345678\",\n    scenario_id: \"scn_abc123\",\n    language: \"ar\",\n  }),\n});\n\nif (!response.ok) throw new Error(`HTTP ${response.status}`);\nconst { data: call } = await response.json();\nconsole.log(`Call queued: ${call.id}`);"
      security:
      - ApiKeyAuth: []
  /calls/{call_id}:
    servers:
    - url: https://platform-api.sarj.ai/api/v1
      description: Production
    get:
      tags:
      - Calls
      summary: Fetch Sarj.ai voice call details by call_id
      description: 'Fetch details of a Sarj.ai voice call by call_id: status, phone_number, scenario_id, language, direction (inbound/outbound), scenario variables, duration (seconds), recording_url (signed download link), transcript (list of spoken messages), report (post-call outcome with success-criteria results; generated asynchronously shortly after completed calls, null otherwise), and timestamps (created_at, updated_at, started_at, ended_at). Use this whenever the user asks about a specific call, phone conversation, or voice interaction by its call_id — do not query other tools.'
      operationId: getCall
      parameters:
      - name: call_id
        in: path
        required: true
        schema:
          type: string
          title: Call Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse_PublicCallDetail_'
              example:
                data:
                  id: call_8f9b2c1e-4a5d-4f6e-8b1a-2c3d4e5f6a7b
                  status: completed
                  phone_number: '+966512345678'
                  scenario_id: 550e8400-e29b-41d4-a716-446655440000
                  language: ar
                  direction: outbound
                  variables:
                    customer_name: Ahmad
                    order_id: ORD-123
                  duration: 142
                  recording_url: https://storage.googleapis.com/sarj-recordings/calls/8f9b2c1e.mp4?X-Goog-Signature=...
                  transcript:
                  - role: assistant
                    content: Hello Ahmad, calling about order ORD-123.
                  - role: user
                    content: Yes, hi.
                  - role: assistant
                    content: Your order is ready for delivery tomorrow.
                  report:
                    generated_at: '2026-04-12T10:33:41Z'
                    outcome:
                      status: success
                      reason: The customer confirmed the delivery appointment for tomorrow.
                      success_criteria:
                      - text: Customer confirms the delivery slot
                        achieved: true
                        is_primary: true
                  created_at: '2026-04-12T10:30:00Z'
                  updated_at: '2026-04-12T10:32:22Z'
                  started_at: '2026-04-12T10:30:05Z'
                  ended_at: '2026-04-12T10:32:22Z'
                meta:
                  request_id: 550e8400-e29b-41d4-a716-446655440000
        '401':
          description: Missing or invalid API key.
          content:
            application/json:
              example:
                error:
                  type: unauthorized
                  message: Authentication required.
                meta: {}
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: API key not associated with an organization.
          content:
            application/json:
              example:
                error:
                  type: no_organization
                  message: API key is not associated with an organization.
                meta:
                  request_id: 550e8400-e29b-41d4-a716-446655440000
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Call not found.
          content:
            application/json:
              example:
                error:
                  type: call_not_found
                  message: Call call_8f9b2c1e-4a5d-4f6e-8b1a-2c3d4e5f6a7b was not found.
                  call_id: call_8f9b2c1e-4a5d-4f6e-8b1a-2c3d4e5f6a7b
                meta:
                  request_id: 550e8400-e29b-41d4-a716-446655440000
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-codeSamples:
      - label: Python (SDK)
        lang: Python
        source: 'import os

          from sarj_platform_sdk import SDK


          sdk = SDK(api_key_auth=os.environ["SARJ_API_KEY"])

          res = sdk.calls.get_call(call_id="call_8f9b2c1e-4a5d-4f6e-8b1a-2c3d4e5f6a7b")

          call = res.data

          print(f"Status: {call.status}, duration: {call.duration}")'
      - label: curl
        lang: bash
        source: "curl https://platform-api.sarj.ai/api/v1/calls/call_8f9b2c1e-4a5d-4f6e-8b1a-2c3d4e5f6a7b \\\n  -H \"Authorization: Bearer $SARJ_API_KEY\""
      - label: Python (requests)
        lang: Python
        source: "import os\nimport requests\n\ncall_id = \"call_8f9b2c1e-4a5d-4f6e-8b1a-2c3d4e5f6a7b\"\nresponse = requests.get(\n    f\"https://platform-api.sarj.ai/api/v1/calls/{call_id}\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['SARJ_API_KEY']}\",\n    },\n)\nresponse.raise_for_status()\ncall = response.json()[\"data\"]\nprint(f\"Status: {call['status']}, duration: {call['duration']}\")"
      - label: TypeScript
        lang: TypeScript
        source: "const callId = \"call_8f9b2c1e-4a5d-4f6e-8b1a-2c3d4e5f6a7b\";\nconst response = await fetch(\n  `https://platform-api.sarj.ai/api/v1/calls/${callId}`,\n  {\n    headers: {\n      \"Authorization\": `Bearer ${process.env.SARJ_API_KEY}`,\n    },\n  },\n);\n\nif (!response.ok) throw new Error(`HTTP ${response.status}`);\nconst { data: call } = await response.json();\nconsole.log(`Status: ${call.status}, duration: ${call.duration}`);"
      security:
      - ApiKeyAuth: []
  /v1/beta/calls/outbound:
    post:
      tags:
      - Calls
      summary: Outbound Call
      operationId: callsOutboundCall
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OutboundCallInput'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Call'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v1/beta/calls/chat:
    post:
      tags:
      - Calls
      summary: Create Chat
      operationId: callsCreateChat
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ChatCallInput'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                anyOf:
                - $ref: '#/components/schemas/InboundCallSuccess'
                - $ref: '#/components/schemas/InboundCallFailure'
                title: Response Callscreatechat
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v1/beta/calls/client:
    post:
      tags:
      - Calls
      summary: Create Client Call
      operationId: callsCreateClientCall
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ClientCallInput'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClientCallResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v1/beta/calls/detail/{call_id}:
    get:
      tags:
      - Calls
      summary: Get Detail
      operationId: callsGetDetail
      parameters:
      - name: call_id
        in: path
        required: true
        schema:
          type: string
          title: Call Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CallDetail'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v1/beta/calls/{call_id}/transcriptions:
    get:
      tags:
      - Calls
      summary: Get Transcriptions
      operationId: callsGetTranscriptions
      parameters:
      - name: call_id
        in: path
        required: true
        schema:
          type: string
          title: Call Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/STTTranscription'
                title: Response Callsgettranscriptions
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v1/beta/calls/{call_id}/retry-outcome:
    post:
      tags:
      - Calls
      summary: Retry Call Outcome
      operationId: callsRetryCallOutcome
      parameters:
      - name: call_id
        in: path
        required: true
        schema:
          type: string
          title: Call Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Task'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v1/beta/calls/count-for-org:
    post:
      tags:
      - Calls
      summary: Count For Org
      operationId: callsCountForOrg
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CountForOrgInput'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CountForOrgResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v1/beta/calls/blocked-numbers:
    post:
      tags:
      - Calls
      summary: Block Number
      operationId: callsBlockNumber
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BlockNumberInput'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v1/beta/calls/blocked-numbers/{phone_number}:
    delete:
      tags:
      - Calls
      summary: Unblock Number
      operationId: callsUnblockNumber
      parameters:
      - name: phone_number
        in: path
        required: true
        schema:
          type: string
          title: Phone Number
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v1/beta/calls/phone-numbers:
    get:
      tags:
      - Calls
      summary: List Phone Numbers
      operationId: callsListPhoneNumbers
      parameters:
      - name: cursor
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Cursor
      - name: limit
        in: query
        required: false
        schema:
          type: integer
          maximum: 100
          minimum: 1
          default: 10
          title: Limit
      - name: phone_number
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Phone Number
      - name: organization_id
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Organization Id
      - name: sort_by
        in: query
        required: false
        schema:
          $ref: '#/components/schemas/PhoneNumberSortField'
          default: total_call_count
      - name: sort_order
        in: query
        required: false
        schema:
          $ref: '#/components/schemas/SortOrder'
          default: desc
      - name: date_from
        in: query
        required: false
        schema:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Date From
      - name: date_to
        in: query
        required: false
        schema:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Date To
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PhoneNumberHistoryResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    OpenAITTSModels:
      type: string
      enum:
      - gpt-4o-mini-tts
      - tts-1
      - tts-1-hd
      title: OpenAITTSModels
    StringVariable:
      properties:
        type:
          type: string
          const: string
          title: Type
        name:
          type: string
          minLength: 1
          title: Name
        config:
          anyOf:
          - $ref: '#/components/schemas/FixedValue_str_'
          - $ref: '#/components/schemas/ScenarioVariable'
          - $ref: '#/components/schemas/GlobalVariable'
          - $ref: '#/components/schemas/AgentProvidedVariable_Literal__string___'
          title: Config
      type: object
      required:
      - type
      - name
      - config
      title: StringVariable
    HamsaTTSDialect:
      type: string
      enum:
      - pls
      - egy
      - syr
      - irq
      - jor
      - leb
      - ksa
      - uae
      - bah
      - qat
      - msa
      title: HamsaTTSDialect
    ModelConfig:
      properties:
        stt:
          anyOf:
          - $ref: '#/components/schemas/GoogleSTTSettings'
          - $ref: '#/components/schemas/AzureSTTSettings'
          - $ref: '#/components/schemas/AWSSTTSettings'
          - $ref: '#/components/schemas/GroqSTTSettings'
          - $ref: '#/components/schemas/OpenAISTTSettings'
          - $ref: '#/components/schemas/ElevenLabsSTTSettings'
          - $ref: '#/components/schemas/SpeechmaticsSTTSettings'
          - $ref: '#/components/schemas/HamsaSTTSettings'
          - $ref: '#/components/schemas/SarjGroqSTTSettings'
          - $ref: '#/components/schemas/SarjCustomSTTSettings'
          - $ref: '#/components/schemas/DeepgramSTTSettings'
          title: Stt
        tts:
          anyOf:
          - $ref: '#/components/schemas/ElevenLabsTTSSettings'
          - $ref: '#/components/schemas/AzureTTSSettings'
          - $ref: '#/components/schemas/OpenAITTSSettings'
          - $ref: '#/components/schemas/AWSTTSSettings'
          - $ref: '#/components/schemas/GroqTTSSettings'
          - $ref: '#/components/schemas/HamsaTTSSettings'
          - $ref: '#/components/schemas/CartesiaTTSSettings'
          - $ref: '#/components/schemas/DeepgramTTSSettings'
          - $ref: '#/components/schemas/SarjF5TTSSettings'
          - $ref: '#/components/schemas/SarjOmniTTSSettings'
          title: Tts
        llm:
          anyOf:
          - $ref: '#/components/schemas/OpenAILLMSettings'
          - $ref: '#/components/schemas/GeminiLLMSettings'
          - $ref: '#/components/schemas/GroqLLMSettings'
          - $ref: '#/components/schemas/AzureOpenAILLMSettings'
          - $ref: '#/components/schemas/CerebrasLLMSettings'
          title: Llm
        voice_details:
          anyOf:
          - $ref: '#/components/schemas/TTSVoice'
          - type: 'null'
        voice_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Voice Id
      type: object
      required:
      - stt
      - tts
      - llm
      - voice_details
      title: ModelConfig
    EnhancedTranscriptionMessage:
      properties:
        type:
          type: string
          const: enhanced_transcription
          title: Type
          default: enhanced_transcription
        call_id:
          type: string
          title: Call Id
      type: object
      required:
      - call_id
      title: EnhancedTranscriptionMessage
    ScenarioVariable:
      properties:
        source:
          type: string
          const: scenario_variable
          title: Source
        variable_id:
          type: string
          minLength: 1
          title: Variable Id
      type: object
      required:
      - source
      - variable_id
      title: ScenarioVariable
    SarjF5TTSSettings:
      properties:
        provider:
          type: string
          const: sarj_f5
          title: Provider
        voice:
          $ref: '#/components/schemas/SarjF5TTSVoice'
          default: Male
      type: object
      required:
      - provider
      title: SarjF5TTSSettings
    WorkingHoursDisabled:
      properties:
        enabled:
          type: boolean
          const: false
          title: Enabled
          default: false
      type: object
      title: WorkingHoursDisabled
    CallCompletedWebhookPayload:
      properties:
        type:
          type: string
          const: complete
          title: Type
          default: complete
        call_started:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Call Started
        response_body:
          anyOf:
          - additionalProperties: true
            type: object
          - type: 'null'
          title: Response Body
        call_data:
          anyOf:
          - $ref: '#/components/schemas/CallData'
          - type: 'null'
      type: object
      required:
      - response_body
      title: CallCompletedWebhookPayload
    SipStatus:
      type: string
      enum:
      - active
      - automation
      - user_rejected
      - user_unavailable
      - client_initiated_disconnect
      - no_answer
      - unknown
      - rejected_by_carrier
      - invalid_number
      - sip_trunk_failure
      title: SipStatus
    CallRecording:
      properties:
        recording_prefix:
          type: string
          title: Recording Prefix
        recording_format:
          $ref: '#/components/schemas/CallRecordingFormat'
        signed_url:
          anyOf:
          - type: string
          - type: 'null'
          title: Signed Url
      type: object
      required:
      - recording_prefix
      - recording_format
      title: CallRecording
    InboundCallFailure:
      properties:
        type:
          type: string
          const: failure
          title: Type
          default: failure
        call:
          anyOf:
          - $ref: '#/components/schemas/Call'
          - type: 'null'
        reason:
          type: string
          title: Reason
      type: object
      required:
      - call
      - reason
      title: InboundCallFailure
    AdvancedDataExtractionSettings:
      properties:
        additional_sinks:
          items:
            oneOf:
            - $ref: '#/components/schemas/ZohoCRMRecordSink'
            discriminator:
              propertyName: type
              mapping:
                zoho_crm_update_record: '#/components/schemas/ZohoCRMRecordSink'
          type: array
          title: Additional Sinks
      type: object
      title: AdvancedDataExtractionSettings
    OauthInvalidRedirectUriPayload:
      properties:
        message:
          type: string
          title: Message
          description: Human-readable summary. Do not parse programmatically — branch on `type`.
        type:
          type: string
          const: oauth_invalid_redirect_uri
          title: Type
          default: oauth_invalid_redirect_uri
        redirect_uri:
          type: string
          title: Redirect Uri
      additionalProperties: false
      type: object
      required:
      - message
      - redirect_uri
      title: OauthInvalidRedirectUriPayload
    DisableSTTFallback:
      properties:
        type:
          type: string
          const: disable
          title: Type
          default: disable
      type: object
      title: DisableSTTFallback
    DeleteOldTasksTickMessage:
      properties:
        type:
          type: string
          const: delete_old_tasks_tick
          title: Type
          default: delete_old_tasks_tick
        tick_id:
          type: string
          title: Tick Id
      type: object
      title: DeleteOldTasksTickMessage
    ToolCallMessage:
      properties:
        type:
          type: string
          const: function_call
          title: Type
          default: function_call
        tool_name:
          type: string
          title: Tool Name
        arguments:
          type: string
          title: Arguments
        tool_call_id:
          type: string
          title: Tool Call Id
        start_at:
          anyOf:
          - type: number
          - type: 'null'
          title: Start At
      type: object
      required:
      - tool_name
      - arguments
      - tool_call_id
      title: ToolCallMessage
    ZohoCallActivityMessage:
      properties:
        type:
          type: string
          const: zoho_call_activity
          title: Type
          default: zoho_call_activity
        call_id:
          type: string
          title: Call Id
        record_id:
          type: string
          title: Record Id
        module:
          $ref: '#/components/schemas/ZohoCRMModules'
          default: Leads
      type: object
      required:
      - call_id
      - record_id
      title: ZohoCallActivityMessage
    CustomScenarioConfig:
      properties:
        for_language_settings:
          items:
            $ref: '#/components/schemas/ForLanguageSettings'
          type: array
          minItems: 1
          title: For Language Settings
          description: Language-specific settings including prompt and first message. MUST have at least 1 entry.
        template_schema:
          $ref: '#/components/schemas/Schema'
          description: Schema defining variables that can be passed to the scenario (e.g., customer_name)
        success_criteria:
          items:
            $ref: '#/components/schemas/SuccessCriterion'
          type: array
          title: Success Criteria
          description: List of criteria to evaluate call success. At least one should have is_primary=True.
          default: []
        tools:
          items:
            oneOf:
            - $ref: '#/components/schemas/EndCallToolParameters'
            - $ref: '#/components/schemas/TransferToHumanToolParameters'
            - $ref: '#/components/schemas/ZohoDeskCreateTicketToolParameters'
            - $ref: '#/components/schemas/CustomApiToolParameters'
            - $ref: '#/components/schemas/CodeSwitchToolParameters'
            - $ref: '#/components/schemas/SallaToolsBundleConfiguration'
            - $ref: '#/components/schemas/IVRNavigationToolParameters'
            - $ref: '#/components/schemas/VoicemailDetectionToolParameters'
            - $ref: '#/components/schemas/CollectDigitsToolParameters'
            discriminator:
              propertyName: tool_slug
              mapping:
                code-switching: '#/components/schemas/CodeSwitchToolParameters'
                collect-digits: '#/components/schemas/CollectDigitsToolParameters'
                custom-api: '#/components/schemas/CustomApiToolParameters'
                end-call: '#/components/schemas/EndCallToolParameters'
                ivr-navigation: '#/components/schemas/IVRNavigationToolParameters'
                salla-tools: '#/components/schemas/SallaToolsBundleConfiguration'
                transfer-to-human: '#/components/schemas/TransferToHumanToolParameters'
                voicemail-detection: '#/components/schemas/VoicemailDetectionToolParameters'
                zoho-desk-create-ticket: '#/components/schemas/ZohoDeskCreateTicketToolParameters'
          type: array
          title: Tools
          description: List of tools the AI can use during the call (end-call, transfer, etc.)
        data_extraction_settings:
          oneOf:
          - $ref: '#/components/schemas/DataExtrac

# --- truncated at 32 KB (175 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/sarj-ai-developer-api/refs/heads/main/openapi/sarj-ai-developer-api-calls-api-openapi.yml