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

# Fetch a call

> Returns an individual call identified by its CallSid. This endpoint is eventually consistent.



## OpenAPI

````yaml https://telnyx-openapi-ng.s3.us-east-1.amazonaws.com/texml/calls.yml get /texml/Accounts/{account_sid}/Calls/{call_sid}
openapi: 3.1.0
info:
  title: Telnyx TeXML Calls API
  version: 2.0.0
  description: API for managing TeXML Calls.
  contact:
    email: support@telnyx.com
servers:
  - url: https://api.telnyx.com/v2
security:
  - bearerAuth: []
tags:
  - name: Command
    description: TeXML command operations
  - name: Callbacks
    description: Webhook callbacks for call events
paths:
  /texml/Accounts/{account_sid}/Calls/{call_sid}:
    get:
      tags:
        - TeXML REST Commands
      summary: Fetch a call
      description: >-
        Returns an individual call identified by its CallSid. This endpoint is
        eventually consistent.
      operationId: GetTexmlCall
      parameters:
        - $ref: '#/components/parameters/CallSid'
        - $ref: '#/components/parameters/AccountSid'
      responses:
        '200':
          $ref: '#/components/responses/GetCallResponse'
        '404':
          $ref: '#/components/responses/call-scripting_NotFoundResponse'
      x-codeSamples:
        - lang: JavaScript
          source: >-
            import Telnyx from 'telnyx';


            const client = new Telnyx({
              apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
            });


            const call = await client.texml.accounts.calls.retrieve('call_sid',
            { account_sid: 'account_sid' });


            console.log(call.account_sid);
        - lang: Python
          source: |-
            import os
            from telnyx import Telnyx

            client = Telnyx(
                api_key=os.environ.get("TELNYX_API_KEY"),  # This is the default and can be omitted
            )
            call = client.texml.accounts.calls.retrieve(
                call_sid="call_sid",
                account_sid="account_sid",
            )
            print(call.account_sid)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/team-telnyx/telnyx-go\"\n\t\"github.com/team-telnyx/telnyx-go/option\"\n)\n\nfunc main() {\n\tclient := telnyx.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tcall, err := client.Texml.Accounts.Calls.Get(\n\t\tcontext.TODO(),\n\t\t\"call_sid\",\n\t\ttelnyx.TexmlAccountCallGetParams{\n\t\t\tAccountSid: \"account_sid\",\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", call.AccountSid)\n}\n"
        - lang: Java
          source: >-
            package com.telnyx.sdk.example;


            import com.telnyx.sdk.client.TelnyxClient;

            import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;

            import
            com.telnyx.sdk.models.texml.accounts.calls.CallRetrieveParams;

            import
            com.telnyx.sdk.models.texml.accounts.calls.CallRetrieveResponse;


            public final class Main {
                private Main() {}

                public static void main(String[] args) {
                    TelnyxClient client = TelnyxOkHttpClient.fromEnv();

                    CallRetrieveParams params = CallRetrieveParams.builder()
                        .accountSid("account_sid")
                        .callSid("call_sid")
                        .build();
                    CallRetrieveResponse call = client.texml().accounts().calls().retrieve(params);
                }
            }
        - lang: Ruby
          source: >-
            require "telnyx"


            telnyx = Telnyx::Client.new(api_key: "My API Key")


            call = telnyx.texml.accounts.calls.retrieve("call_sid", account_sid:
            "account_sid")


            puts(call)
        - lang: CLI
          source: |-
            telnyx texml:accounts:calls retrieve \
              --api-key 'My API Key' \
              --account-sid account_sid \
              --call-sid call_sid
components:
  parameters:
    CallSid:
      name: call_sid
      in: path
      required: true
      description: The CallSid that identifies the call to update.
      schema:
        type: string
    AccountSid:
      name: account_sid
      in: path
      required: true
      description: The id of the account the resource belongs to.
      schema:
        type: string
  responses:
    GetCallResponse:
      description: Call resource.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/CallResource'
    call-scripting_NotFoundResponse:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/call-scripting_ResourceNotFoundError'
  schemas:
    CallResource:
      type: object
      title: Call resource
      example:
        account_sid: 61bf923e-5e4d-4595-a110-56190ea18a1b
        answered_by: human
        caller_name: '+13122010094'
        date_created: Thu, 15 Jun 2023 09:56:45 +0000
        date_updated: Thu, 15 Jun 2023 09:56:56 +0000
        direction: inbound
        duration: '11'
        end_time: Thu, 15 Jun 2023 09:56:56 +0000
        from: '+13123456789'
        from_formatted: (312) 345-6789
        sid: v3:KBnLO0ZK3DhKM5s7bE9VluaSmKsOchKht_fUYvxcp8ysbmzCCtpkmA
        start_time: Thu, 15 Jun 2023 09:56:45 +0000
        status: completed
        to: '+13987654321'
        to_formatted: (398) 765-4321
        uri: >-
          /v2/texml/Accounts/61bf923e-5e4d-4595-a110-56190ea18a1b/Calls/v3:KBnLO0ZK3DhKM5s7bE9VluaSmKsOchKht_fUYvxcp8ysbmzCCtpkmA.json
      properties:
        account_sid:
          type: string
          description: The id of the account the resource belongs to.
          example: 61bf923e-5e4d-4595-a110-56190ea18a1b
        answered_by:
          type: string
          description: >-
            The value of the answering machine detection result, if this feature
            was enabled for the call.
          enum:
            - human
            - machine
            - not_sure
          example: human
        caller_name:
          type: string
          description: Caller ID, if present.
          example: CALLER
        date_created:
          type: string
          description: The timestamp of when the resource was created.
          example: Thu, 15 Jun 2023 09:56:45 +0000
        date_updated:
          type: string
          description: The timestamp of when the resource was last updated.
          example: Thu, 15 Jun 2023 09:56:45 +0000
        direction:
          type: string
          description: The direction of this call.
          enum:
            - inbound
            - outbound
          example: inbound
        duration:
          type: string
          description: The duration of this call, given in seconds.
          example: '12'
        end_time:
          type: string
          description: The end time of this call.
          example: Thu, 15 Jun 2023 09:56:45 +0000
        from:
          type: string
          description: The phone number or SIP address that made this call.
          example: '+13123456789'
        from_formatted:
          type: string
          description: The from number formatted for display.
          example: (312) 345-6789
        price:
          type: string
          description: >-
            The price of this call, the currency is specified in the price_unit
            field. Only populated when the call cost feature is enabled for the
            account.
          example: '0.10'
        price_unit:
          type: string
          description: The unit in which the price is given.
          example: USD
        sid:
          type: string
          description: The identifier of this call.
          example: v3:KBnLO0ZK3DhKM5s7bE9VluaSmKsOchKht_fUYvxcp8ysbmzCCtpkmA
        start_time:
          type: string
          description: The start time of this call.
          example: Thu, 15 Jun 2023 09:56:45 +0000
        status:
          type: string
          description: The status of this call.
          enum:
            - ringing
            - in-progress
            - canceled
            - completed
            - failed
            - busy
            - no-answer
          example: completed
        to:
          type: string
          description: The phone number or SIP address that received this call.
          example: '+13987654321'
        to_formatted:
          type: string
          description: The to number formatted for display.
          example: (398) 765-4321
        uri:
          type: string
          description: The relative URI for this call.
          example: >-
            /v2/texml/Accounts/61bf923e-5e4d-4595-a110-56190ea18a1b/Calls/v3:KBnLO0ZK3DhKM5s7bE9VluaSmKsOchKht_fUYvxcp8ysbmzCCtpkmA.json
    call-scripting_ResourceNotFoundError:
      type: object
      title: Resource not found
      example:
        errors:
          - detail: Resource not found
      properties:
        errors:
          type: array
          items:
            type: object
            properties:
              detail:
                type: string
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````