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

# Start Call

> Starts a Call



## OpenAPI

````yaml POST /call
openapi: 3.0.1
info:
  title: Altur API
  description: >-
    An API aimed to allow third-party developers to interact with the Altur
    platform through a RESTful interface.
  license:
    name: MIT
  version: '1.0'
servers:
  - url: https://api.altur.io/api/v1.0
security:
  - apiKeyAuth: []
paths:
  /call:
    post:
      description: Starts a Call
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                agent_id:
                  description: >-
                    Unique identifier of the Agent that will participate in the
                    Call (formerly Chatbot or Assistant)
                  type: string
                  format: uuid4
                phone_number_to:
                  description: E.164 formatted phone number of the EndUser to call
                  type: string
                  format: e164
                end_user_display_name:
                  description: Display name of the EndUser to call
                  type: string
                end_user_context:
                  description: Context of the EndUser to call
                  oneOf:
                    - type: string
                    - type: object
                initial_message:
                  description: >-
                    Initial message the Agent will say upon the call being
                    answered
                  type: string
              required:
                - agent_id
                - phone_number_to
      responses:
        '200':
          description: Call response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Call'
        '400':
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Agent not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Call:
      type: object
      properties:
        id:
          description: Unique identifier for the Call
          type: string
        thread:
          $ref: '#/components/schemas/Thread'
        type:
          description: Type of the Call
          type: string
          enum:
            - inbound
            - outbound
        status:
          description: Status of the Call
          type: string
          enum:
            - created
            - queued
            - ringing
            - in-progress
            - forwarding
            - ended
            - busy
            - no-answer
            - failed
        answered_by:
          description: Who or what answered the Call
          type: string
          enum:
            - human
            - machine
            - unknown
        created_at:
          description: Datetime from when the Call was created
          type: string
          format: date-time
        started_at:
          description: Datetime from when the Call was started
          type: string
          format: date-time
        ended_at:
          description: Datetime from when the Call was ended
          type: string
          format: date-time
        duration:
          description: Duration of the Call in seconds
          type: integer
        billable_duration:
          description: Billable duration of the Call in seconds
          type: integer
        policy_evaluation:
          $ref: '#/components/schemas/PolicyEvaluation'
          description: Policy compliance evaluation results
    Error:
      required:
        - error
        - message
      type: object
      properties:
        error:
          type: integer
          format: int32
        message:
          type: string
    Thread:
      type: object
      properties:
        id:
          description: Unique identifier for the Thread
          type: string
        agent:
          $ref: '#/components/schemas/Agent'
        end_user:
          $ref: '#/components/schemas/EndUser'
        integration:
          $ref: '#/components/schemas/Integration'
        updated_at:
          description: Last time the Thread was updated
          type: string
          format: date-time
        active:
          description: >-
            Boolean describing if automatic responses by the Agent are active on
            this Thread
          type: boolean
        blocked:
          description: Boolean describing if Thread is blocked
          type: boolean
        tags:
          description: Tags assigned to Thread
          type: array
          items:
            $ref: '#/components/schemas/Tag'
        assigned_to:
          description: Users assigned to Thread
          type: array
          items:
            $ref: '#/components/schemas/User'
    PolicyEvaluation:
      type: object
      description: >-
        Policy compliance evaluation results for a call. Score and count fields
        will be null when the call has not been evaluated (e.g., not sampled, no
        active policies, or evaluation still pending). The policies array will
        be empty in these cases.
      properties:
        score:
          description: >-
            Compliance score from 0 to 10. Formula: (policies_met /
            applicable_policies) * 10. Null if no applicable policies or
            evaluation not run.
          type: number
          format: float
          nullable: true
        policies_evaluated_count:
          description: Total number of policies evaluated
          type: integer
          nullable: true
        policies_met_count:
          description: Number of policies that were met
          type: integer
          nullable: true
        policies_not_applicable_count:
          description: Number of policies marked as not applicable
          type: integer
          nullable: true
        completed:
          description: Whether the policy evaluation has been completed
          type: boolean
        completed_at:
          description: When the evaluation was completed
          type: string
          format: date-time
          nullable: true
        policies:
          description: Per-policy evaluation results
          type: array
          items:
            $ref: '#/components/schemas/PolicyEvaluationItem'
    Agent:
      type: object
      properties:
        id:
          description: Unique identifier for the Agent
          type: string
          format: uuid4
        name:
          description: Name of the Agent
          type: string
    EndUser:
      type: object
      properties:
        id:
          description: Unique identifier for the EndUser
          type: string
          format: uuid4
        display_name:
          description: EndUser's display name
          type: string
        integration_type:
          description: Enum representing the Integration's channel
          type: string
          enum:
            - api
            - whatsapp
        info:
          description: >-
            EndUser's information valuable for interactions with Agents or human
            agents
          type: string
      required:
        - id
        - display_name
        - integration
    Integration:
      type: object
      properties:
        id:
          description: Unique identifier for the Integration
          type: string
        type:
          description: Enum representing the Integration's channel
          type: string
          enum:
            - api
            - whatsapp
      required:
        - id
        - type
    Tag:
      type: object
      properties:
        id:
          description: Unique identifier for the Tag
          type: string
        name:
          description: Name given to the Tag
          type: string
        color:
          description: Color used for in-app display of Tag
          type: string
          enum:
            - blue
            - green
            - red
            - pink
            - purple
            - orange
            - yellow
      required:
        - id
        - name
        - color
    User:
      type: object
      properties:
        id:
          description: Unique identifier for the User
          type: string
        email:
          description: User's email address
          type: string
        first_name:
          description: User's first name
          type: string
        last_name:
          description: User's last name
          type: string
      required:
        - id
        - email
    PolicyEvaluationItem:
      type: object
      description: Individual policy evaluation result
      properties:
        policy_id:
          description: Unique identifier of the policy
          type: string
        policy_name:
          description: Name of the policy
          type: string
        result:
          description: Evaluation result
          type: string
          enum:
            - met
            - not_met
            - not_applicable
        explanation:
          description: LLM-generated explanation of the evaluation
          type: string
        evaluated_at:
          description: When this policy was evaluated
          type: string
          format: date-time
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        Add `api-key YOUR_API_SECRET_KEY` as the value of the `Authorization`
        header.

````