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

# Start Call

> Start an outbound call using a workspace agent. Requires 'to_phone' (required), optional 'from_phone', 'record' (defaults to true), and 'parameters' (key-value pairs for call personalization). Supports both Clerk JWT (dashboard) and API key authentication. For API key auth, the key must have the 'start_call' scope.



## OpenAPI

````yaml POST /api/v1/workspaces/{workspace_id}/agents/{agent_id}/start-call
openapi: 3.1.0
info:
  title: Hefferon AI Platform
  description: This is the API for the Hefferon AI Platform.
  version: '0.1'
servers: []
security: []
paths:
  /api/v1/workspaces/{workspace_id}/agents/{agent_id}/start-call:
    post:
      tags:
        - Workspaces
      summary: Start Call
      description: >-
        Start an outbound call using a workspace agent. Requires 'to_phone'
        (required), optional 'from_phone', 'record' (defaults to true), and
        'parameters' (key-value pairs for call personalization). Supports both
        Clerk JWT (dashboard) and API key authentication. For API key auth, the
        key must have the 'start_call' scope.
      operationId: >-
        start_call_api_v1_workspaces__workspace_id__agents__agent_id__start_call_post
      parameters:
        - name: workspace_id
          in: path
          required: true
          schema:
            type: string
            title: Workspace Id
        - name: agent_id
          in: path
          required: true
          schema:
            type: string
            title: Agent Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CallWorkspaceCreateRequest'
      responses:
        '201':
          description: Call started successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CallCreateResponse'
        '401':
          description: Invalid access token or API key
          content:
            application/json:
              example:
                error: Unauthorized
        '403':
          description: API key lacks required scope or wrong workspace
          content:
            application/json:
              examples:
                wrong_workspace:
                  summary: API key not authorized for this workspace
                  value:
                    error: API key not authorized for this workspace
                missing_scope:
                  summary: API key lacks required scope
                  value:
                    error: 'API key lacks required scope: start_call'
        '404':
          description: Not Found
          content:
            application/json:
              examples:
                number_not_found:
                  summary: Number not found in workspace
                  value:
                    error: Number not found in workspace
                workspace_not_found:
                  summary: Workspace not found
                  value:
                    error: Workspace not found
                agent_not_found:
                  summary: Number without Agent
                  value:
                    error: Number not associated with an agent
        '422':
          description: Invalid request body
          content:
            application/json:
              example:
                detail:
                  - type: missing
                    loc:
                      - body
                      - to_phone
                    msg: Field required
                    input: {}
        '500':
          description: Internal Server Error
          content:
            application/json:
              example:
                error: Internal server error. Please try again later.
      security:
        - HTTPBearer: []
components:
  schemas:
    CallWorkspaceCreateRequest:
      properties:
        to_phone:
          type: string
          title: To Phone
          description: To phone number
        from_phone:
          anyOf:
            - type: string
            - type: 'null'
          title: From Phone
          description: From phone number
        record:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Record
          description: Whether to record the call
          default: true
        parameters:
          anyOf:
            - additionalProperties:
                type: string
              type: object
            - type: 'null'
          title: Parameters
          description: Optional user-defined key-value pairs
      type: object
      required:
        - to_phone
      title: CallWorkspaceCreateRequest
      description: >-
        Request schema for starting a call. 'from_phone' is
        optional;'Parameters' includes custom key-value data that can be used in
        the call.
      examples:
        - parameters:
            Department: IT
            Language: English
            Location: Sydney
            Role: Linux Administrator
            fullName: John Doe
          to_phone: '+61451660338'
    CallCreateResponse:
      properties:
        to_phone:
          type: string
          title: To Phone
          description: To phone number
        from_phone:
          anyOf:
            - type: string
            - type: 'null'
          title: From Phone
          description: From phone number
        record:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Record
          description: Whether to record the call
          default: true
        created_by:
          type: string
          title: Created By
          description: Created by
        status:
          $ref: '#/components/schemas/CallStatus'
          description: Call status
          default: created
        created_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Created At
          description: Call created at
      type: object
      required:
        - to_phone
        - created_by
      title: CallCreateResponse
      description: Response schema for starting a call
      examples:
        - created_at: '2021-07-22T00:00:00+00:00'
          created_by: example@gmail.com
          from_phone: '+61298063002'
          status: created
          to_phone: '+61451660338'
    CallStatus:
      type: string
      enum:
        - created
        - initiated
        - connected
        - inprogress
        - completed
        - failed
      title: CallStatus
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````