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

# Update Call

> Update call settings or context variables.



## OpenAPI

````yaml /api-reference/openapi.json patch /calls/{call_id}
openapi: 3.1.0
info:
  title: Truedy API
  description: >-
    Truedy Public API - Build voice AI agents and make automated phone calls.


    ## Authentication

    All requests require **Authorization: Bearer <your_api_key>**.

    Get your API key from the [Truedy Dashboard](https://app.truedy.ai).


    ## Response Format

    All successful responses follow this format:

    ```json

    {
      "data": { /* resource or list of resources */ },
      "meta": {
        "request_id": "req_xxx",
        "ts": "2026-03-03T20:30:21.310278Z"
      },
      "pagination": { /* optional, for list endpoints */ }
    }

    ```


    ## Error Handling

    Errors return appropriate HTTP status codes with structured error messages.
    Always check the `error` field in the response body for details.
  version: 1.0.0
servers:
  - url: https://api.truedy.ai/api/public/v1
    description: Truedy Public API
security:
  - BearerAuth: []
paths:
  /calls/{call_id}:
    patch:
      tags:
        - Calls
      summary: Update Call
      description: Update call settings or context variables.
      operationId: update_call
      parameters:
        - name: call_id
          in: path
          required: true
          description: Call ID
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CallUpdateRequest'
            examples:
              update_settings:
                summary: Update call settings
                value:
                  call_settings:
                    recording_enabled: false
                    greeting: Updated greeting
              update_variables:
                summary: Update context variables
                value:
                  variables:
                    status: premium
                    account_updated: true
      responses:
        '200':
          description: Call updated successfully
          content:
            application/json:
              schema:
                type: object
                required:
                  - data
                  - meta
                properties:
                  data:
                    $ref: '#/components/schemas/CallResponse'
                  meta:
                    $ref: '#/components/schemas/ResponseMeta'
              example:
                data:
                  id: call_a1b2c3d4
                  status: completed
                  direction: outbound
                  agent_id: agt_f9447372
                  to: '+12125551234'
                  from: '+18005559876'
                  duration_seconds: 142
                  recording_url: https://recordings.truedy.ai/call_a1b2c3d4.mp3
                  transcript_url: https://api.truedy.ai/calls/call_a1b2c3d4/transcript
                  summary: Customer inquired about refund policy. Issue resolved.
                  cost_credits: 24
                  metadata:
                    campaign_id: batch_c3d4e5f6
                    priority: high
                  started_at: '2026-04-05T10:00:00Z'
                  ended_at: '2026-04-05T10:02:22Z'
                  created_at: '2026-04-05T09:59:58Z'
                  updated_at: '2026-04-05T10:02:22Z'
                meta:
                  request_id: req_32e7531c
                  ts: '2026-04-05T10:22:00Z'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Call not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '429':
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    CallUpdateRequest:
      type: object
      properties:
        call_settings:
          description: Updated call settings
          properties:
            recording_enabled:
              type: boolean
            transcription_enabled:
              type: boolean
            greeting:
              type: string
          type:
            - object
            - 'null'
        variables:
          description: Update custom variables
          example:
            status: updated
          type:
            - object
            - 'null'
    CallResponse:
      type: object
      required:
        - id
        - status
        - created_at
      properties:
        id:
          type: string
          description: Unique call identifier
          example: call_a1b2c3d4
        agent_id:
          description: ID of the agent used for this call
          example: agt_f9447372
          type:
            - string
            - 'null'
        phone_number:
          description: Phone number (destination for outbound, source for inbound)
          example: '+15551234567'
          type:
            - string
            - 'null'
        from_number:
          description: Originating phone number
          example: '+15559876543'
          type:
            - string
            - 'null'
        to_number:
          description: Destination phone number
          example: '+15551234567'
          type:
            - string
            - 'null'
        direction:
          enum:
            - inbound
            - outbound
          description: Call direction
          example: outbound
          type:
            - string
            - 'null'
        status:
          type: string
          enum:
            - queued
            - ringing
            - in_progress
            - completed
            - failed
          description: Current call status
          example: completed
        duration_seconds:
          description: Call duration in seconds
          example: 247
          type:
            - integer
            - 'null'
        cost_usd:
          description: Estimated or actual cost in USD
          example: 0.42
          type:
            - number
            - 'null'
        summary:
          description: AI-generated call summary
          example: >-
            Customer inquired about billing and was provided with account
            information.
          type:
            - string
            - 'null'
        short_summary:
          description: Short summary if available
          example: Billing inquiry - resolved
          type:
            - string
            - 'null'
        recording_url:
          description: URL to the call recording if available
          example: https://storage.truedy.ai/recordings/call_a1b2c3d4.mp3
          type:
            - string
            - 'null'
        transcript:
          description: Call transcript (structure varies)
          example: []
        sentiment:
          enum:
            - positive
            - neutral
            - negative
          description: AI-classified sentiment
          example: positive
          type:
            - string
            - 'null'
        started_at:
          format: date-time
          description: When the call started
          example: '2026-03-03T20:25:00.000000Z'
          type:
            - string
            - 'null'
        ended_at:
          format: date-time
          description: When the call ended
          example: '2026-03-03T20:29:47.000000Z'
          type:
            - string
            - 'null'
        created_at:
          type: string
          format: date-time
          description: When the call was created
          example: '2026-03-03T20:24:55.310278Z'
        updated_at:
          format: date-time
          description: When the call was last updated
          example: '2026-03-03T20:29:47.310278Z'
          type:
            - string
            - 'null'
    ResponseMeta:
      type: object
      required:
        - request_id
        - ts
      properties:
        request_id:
          type: string
          description: Unique request identifier for debugging and support
          example: req_32e7531c-8
        ts:
          type: string
          format: date-time
          description: Server timestamp when the response was generated
          example: '2026-03-03T20:30:21.310278Z'
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              description: Error code
              example: not_found
            message:
              type: string
              description: Human-readable error message
              example: The requested resource does not exist
            details:
              description: Additional error context
              example:
                resource: agent
                id: agt_invalid
              type:
                - object
                - 'null'
    HTTPValidationError:
      type: object
      properties:
        detail:
          type: array
          items:
            type: object
            properties:
              loc:
                type: array
              msg:
                type: string
              type:
                type: string
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: >-
        API key authentication. Include your API key in the Authorization
        header: Bearer <your_api_key>

````