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

# List Call Sessions

> List Call Sessions.

### Authorizations

<ParamField header="X-Api-Key" type="string" required>
  Your Agni API key used to authenticate the request. Pass it in the `X-Api-Key` header. Find or rotate it from your Ravan AI account settings.
</ParamField>

***

### Query Parameters

<ParamField query="page" type="integer">
  The page number to return. Page numbering starts at `1`.
</ParamField>

<ParamField query="page_size" type="integer">
  The number of records to return per page.
</ParamField>

<ParamField query="agent_id" type="string">
  The unique ID of the agent that should own, handle, or be assigned to this resource. Use the `id` returned by the Agent API.
</ParamField>

<ParamField query="status" type="string">
  Filters or sets the current status of the resource. Use one of the status values supported by the endpoint.
</ParamField>

<ParamField query="channel" type="string">
  Filters calls by channel. Common values include `voice`, `web`, and `sip`.
</ParamField>

<ParamField query="caller_number" type="string">
  Filters results by the caller phone number in E.164 format. Example: `+14157774444`.
</ParamField>

<ParamField query="search" type="string">
  A search string used to filter matching records by supported text fields.
</ParamField>

<ParamField query="sort_by" type="string">
  The field to sort results by. Use one of the fields supported by the endpoint.
</ParamField>

<ParamField query="sort_order" type="string">
  The sort direction. Use `asc` for ascending order or `desc` for descending order.
</ParamField>

<ParamField query="started_after" type="string">
  Filters calls that started after this ISO 8601 timestamp.
</ParamField>

<ParamField query="started_before" type="string">
  Filters calls that started before this ISO 8601 timestamp.
</ParamField>

***

### Response

<ResponseField name="success" type="boolean">
  Whether the request succeeded.
</ResponseField>

<ResponseField name="message" type="string">
  Human-readable status message.
</ResponseField>

<ResponseField name="data" type="object">
  Returned data.

  <Expandable title="data">
    <ResponseField name="callSessions" type="array">
      Array of call session objects.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseExample>
  ```json 200 theme={null}
  {
    "success": <boolean>,
    "message": "<string>",
    "data": {
      "callSessions": [
        {
          "id": "<string>",
          "agentId": "<string>",
          "organizationId": "<string>",
          "roomId": "<string>",
          "callerNumber": "<string>",
          "calleeNumber": "<string>",
          "callerName": "<string>",
          "callerEmail": "<string>",
          "channel": "<string>",
          "status": "<string>",
          "summary": "<string>",
          "metadata": {},
          "errorMessage": "<string>",
          "disconnectReason": "<string>",
          "promptDynamicVariables": {},
          "extractDynamicVariables": null,
          "callLatencyMs": <integer>,
          "startedAt": "<string>",
          "endedAt": "<string>",
          "durationSec": <integer>,
          "createdAt": "<string>",
          "recordingUrl": "<string>",
          "costTotal": "<string>",
          "agentName": "<string>",
          "postCallAnalysisResult": {},
          "creditBreakdown": {
            "channel": "<string>",
            "duration_sec": <integer>,
            "model_credits": <number>,
            "provider_credits": <number>,
            "provider_managed": <boolean>,
            "telephony_type": "<string>",
            "total_credits": <number>
          }
        }
      ]
    }
  }
  ```
</ResponseExample>


## OpenAPI

````yaml GET /api/v1/calling/call-sessions
openapi: 3.0.1
info:
  title: Agni API
  version: 1.0.0
  description: >-
    Agni API for managing agents, tools, widget settings, telephony, and
    integrations.
servers:
  - url: https://api.ravan.ai
security:
  - X-Api-Key: []
tags:
  - name: AgentService
  - name: AgentToolService
  - name: WidgetSettingsService
  - name: PhoneService
  - name: AppointmentService
  - name: GHLService
  - name: CalComService
  - name: CampaignService
  - name: ContactService
  - name: CallingService
  - name: RAGService
  - name: ModelService
  - name: HealthService
paths:
  /api/v1/calling/call-sessions:
    get:
      tags:
        - CallingService
      summary: List Call Sessions
      operationId: ListCallSessions
      parameters:
        - name: page
          in: query
          schema:
            type: integer
            default: 1
          description: Page number
        - name: page_size
          in: query
          schema:
            type: integer
            default: 20
          description: Results per page
        - name: agent_id
          in: query
          schema:
            type: string
          description: Filter by agent ID
        - name: status
          in: query
          schema:
            type: string
          description: Filter by status
        - name: channel
          in: query
          schema:
            type: string
          description: Filter by channel
        - name: caller_number
          in: query
          schema:
            type: string
          description: Filter by caller number
        - name: search
          in: query
          schema:
            type: string
          description: Search term
        - name: sort_by
          in: query
          schema:
            type: string
          description: Sort field
        - name: sort_order
          in: query
          schema:
            type: string
          description: Sort order (asc/desc)
        - name: started_after
          in: query
          schema:
            type: string
          description: Filter after (ISO 8601)
        - name: started_before
          in: query
          schema:
            type: string
          description: Filter before (ISO 8601)
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListCallSessionsResponse'
              example:
                success: true
                message: <string>
                data:
                  callSessions:
                    - id: <string>
                      agentId: <string>
                      organizationId: <string>
                      roomId: <string>
                      callerNumber: <string>
                      calleeNumber: <string>
                      callerName: <string>
                      callerEmail: <string>
                      channel: <string>
                      status: <string>
                      summary: <string>
                      metadata: {}
                      errorMessage: <string>
                      disconnectReason: <string>
                      promptDynamicVariables: {}
                      extractDynamicVariables: null
                      callLatencyMs: 0
                      startedAt: <string>
                      endedAt: <string>
                      durationSec: 0
                      createdAt: <string>
                      recordingUrl: <string>
                      costTotal: <string>
                      agentName: <string>
                      postCallAnalysisResult: {}
                      creditBreakdown:
                        channel: <string>
                        duration_sec: 0
                        model_credits: 0
                        provider_credits: 0
                        provider_managed: true
                        telephony_type: <string>
                        total_credits: 0
components:
  schemas:
    ListCallSessionsResponse:
      type: object
      properties:
        success:
          type: boolean
        message:
          type: string
        data:
          $ref: '#/components/schemas/ListCallSessionsData'
      example:
        success: true
        message: <string>
        data:
          callSessions:
            - id: <string>
              agentId: <string>
              organizationId: <string>
              roomId: <string>
              callerNumber: <string>
              calleeNumber: <string>
              callerName: <string>
              callerEmail: <string>
              channel: <string>
              status: <string>
              summary: <string>
              metadata: {}
              errorMessage: <string>
              disconnectReason: <string>
              promptDynamicVariables: {}
              extractDynamicVariables: null
              callLatencyMs: 0
              startedAt: <string>
              endedAt: <string>
              durationSec: 0
              createdAt: <string>
              recordingUrl: <string>
              costTotal: <string>
              agentName: <string>
              postCallAnalysisResult: {}
              creditBreakdown:
                channel: <string>
                duration_sec: 0
                model_credits: 0
                provider_credits: 0
                provider_managed: true
                telephony_type: <string>
                total_credits: 0
    ListCallSessionsData:
      type: object
      properties:
        callSessions:
          type: array
          items:
            $ref: '#/components/schemas/CallSession'
      example:
        callSessions:
          - id: <string>
            agentId: <string>
            organizationId: <string>
            roomId: <string>
            callerNumber: <string>
            calleeNumber: <string>
            callerName: <string>
            callerEmail: <string>
            channel: <string>
            status: <string>
            summary: <string>
            metadata: {}
            errorMessage: <string>
            disconnectReason: <string>
            promptDynamicVariables: {}
            extractDynamicVariables: null
            callLatencyMs: 0
            startedAt: <string>
            endedAt: <string>
            durationSec: 0
            createdAt: <string>
            recordingUrl: <string>
            costTotal: <string>
            agentName: <string>
            postCallAnalysisResult: {}
            creditBreakdown:
              channel: <string>
              duration_sec: 0
              model_credits: 0
              provider_credits: 0
              provider_managed: true
              telephony_type: <string>
              total_credits: 0
    CallSession:
      type: object
      properties:
        id:
          type: string
          description: Session ID
        agentId:
          type: string
          description: Agent ID
        organizationId:
          type: string
          description: Organization ID
        roomId:
          type: string
          description: LiveKit room ID
        callerNumber:
          type: string
          description: Caller phone number
        calleeNumber:
          type: string
          description: Callee phone number
        callerName:
          type: string
          description: Caller name
        callerEmail:
          type: string
          description: Caller email
        channel:
          type: string
          description: Call channel
        status:
          type: string
          description: Call status
        summary:
          type: string
          description: Call summary
        metadata:
          type: object
          description: Custom metadata
        errorMessage:
          type: string
          description: Error message, if any
        disconnectReason:
          type: string
          description: Reason for disconnect
        promptDynamicVariables:
          type: object
          description: Prompt dynamic variables used for the call
        extractDynamicVariables:
          type: object
          nullable: true
          description: Extracted dynamic variables returned after the call
        callLatencyMs:
          type: integer
          description: Call latency in milliseconds
        startedAt:
          type: string
          description: Start timestamp
        endedAt:
          type: string
          description: End timestamp
        durationSec:
          type: integer
          description: Duration in seconds
        createdAt:
          type: string
          description: Creation timestamp
        recordingUrl:
          type: string
          description: Pre-signed recording URL
        costTotal:
          type: string
          description: Total call cost
        agentName:
          type: string
          description: Agent name
        postCallAnalysisResult:
          type: object
          description: Post-call analysis result
        creditBreakdown:
          $ref: '#/components/schemas/CreditBreakdown'
      example:
        id: <string>
        agentId: <string>
        organizationId: <string>
        roomId: <string>
        callerNumber: <string>
        calleeNumber: <string>
        callerName: <string>
        callerEmail: <string>
        channel: <string>
        status: <string>
        summary: <string>
        metadata: {}
        errorMessage: <string>
        disconnectReason: <string>
        promptDynamicVariables: {}
        extractDynamicVariables: null
        callLatencyMs: 0
        startedAt: <string>
        endedAt: <string>
        durationSec: 0
        createdAt: <string>
        recordingUrl: <string>
        costTotal: <string>
        agentName: <string>
        postCallAnalysisResult: {}
        creditBreakdown:
          channel: <string>
          duration_sec: 0
          model_credits: 0
          provider_credits: 0
          provider_managed: true
          telephony_type: <string>
          total_credits: 0
    CreditBreakdown:
      type: object
      properties:
        channel:
          type: string
        duration_sec:
          type: integer
        model_credits:
          type: number
        provider_credits:
          type: number
        provider_managed:
          type: boolean
        telephony_type:
          type: string
        total_credits:
          type: number
  securitySchemes:
    X-Api-Key:
      type: apiKey
      in: header
      name: X-Api-Key

````