> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.telekesher.dev/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.telekesher.dev/_mcp/server.

# List sessions

GET https://api.telekesher.dev/v1/sessions

List [sessions](/api/sessions) owned by your app, newest first (by `created_at`).
This endpoint is not paginated — there is no cursor or page token. By
default **all** matching sessions are returned in a single call.
`limit` is optional and not clamped: omit it to return everything, or
set it to cap the number returned. When `limit` is set and more
sessions match than fit, `has_more` is `true`.

The optional `caller_id`, `did`, `state`, `created_after` and
`created_before` filters narrow the result set. They are
AND-combined — a session must satisfy every supplied filter to appear.
`has_more` reflects matches **after** filtering.

Reference: https://docs.telekesher.dev/api/sessions/list

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: voice-api
  version: 1.0.0
paths:
  /v1/sessions:
    get:
      operationId: listSessions
      summary: List sessions
      description: >-
        List [sessions](/api/sessions) owned by your app, newest first (by
        `created_at`).

        This endpoint is not paginated — there is no cursor or page token. By

        default **all** matching sessions are returned in a single call.

        `limit` is optional and not clamped: omit it to return everything, or

        set it to cap the number returned. When `limit` is set and more

        sessions match than fit, `has_more` is `true`.


        The optional `caller_id`, `did`, `state`, `created_after` and

        `created_before` filters narrow the result set. They are

        AND-combined — a session must satisfy every supplied filter to appear.

        `has_more` reflects matches **after** filtering.
      tags:
        - callControl
      parameters:
        - name: limit
          in: query
          description: |-
            Optional cap on the number of sessions to return. Omit to return
            every matching session; when set, at most this many are returned and
            `has_more` indicates whether more matched. A non-positive value
            returns `400`.
          required: false
          schema:
            type: integer
        - name: caller_id
          in: query
          description: |-
            Filter to sessions whose caller exactly matches this canonical
            E.164 value. The schema validates country-neutral syntax only; this
            historical-data filter does not apply current trunk policy.
          required: false
          schema:
            type: string
        - name: did
          in: query
          description: |-
            Filter to sessions whose called DID exactly matches this canonical
            E.164 value. The schema validates country-neutral syntax only; this
            historical-data filter does not apply current trunk policy.
          required: false
          schema:
            type: string
        - name: state
          in: query
          description: >-
            Filter to sessions in this lifecycle state. Any other value returns
            `400`.
          required: false
          schema:
            $ref: '#/components/schemas/V1SessionsGetParametersState'
        - name: created_after
          in: query
          description: |-
            Inclusive lower bound on `created_at` (RFC 3339 UTC string).
            Only sessions created at or after this instant are returned. An
            invalid RFC 3339 value returns `400`.
          required: false
          schema:
            type: string
            format: date-time
        - name: created_before
          in: query
          description: |-
            Exclusive upper bound on `created_at` (RFC 3339 UTC string).
            Only sessions created strictly before this instant are returned. An
            invalid RFC 3339 value returns `400`.
          required: false
          schema:
            type: string
            format: date-time
        - name: Authorization
          in: header
          description: >-
            Application auth. Send `Authorization: Bearer <app_uuid>:<api_key>`.
            See
            [Authentication](https://voice-platform.docs.buildwithfern.com/api/authentication)
            for details.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: The matching sessions.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SessionListResponse'
        '400':
          description: >-
            Missing `Authorization`, malformed Bearer credentials, or an

            invalid query parameter — a non-positive `limit`, an unparseable

            `caller_id`/`did`, a `state` outside the enum, or an invalid RFC
            3339

            `created_after`/`created_before`. A syntactically valid credential

            with an invalid API key returns `401` instead. Body is the standard
            error

            envelope, e.g. `{"success":false,"error":"Invalid limit (must be a

            positive integer)","code":"invalid_request","trace_id":"..."}`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListSessionsRequestBadRequestError'
        '401':
          description: >-
            The Bearer credential is syntactically valid but its API key is
            invalid. Missing `Authorization` or malformed Bearer credentials
            return `400`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListSessionsRequestUnauthorizedError'
        '413':
          description: >-
            The matched set exceeds the system result ceiling. Narrow the query

            with filters and retry. The ceiling is checked before `limit`, so a

            smaller `limit` does not avoid it. Body is the standard error
            envelope

            with `code: result_set_too_large`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListSessionsRequestContentTooLargeError'
        '429':
          description: >-
            Rate limit exceeded — a per-command, per-room, or per-app token
            bucket was empty. The `retry_after` field gives the integer seconds
            to wait before retrying.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListSessionsRequestTooManyRequestsError'
        '500':
          description: Internal gateway error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListSessionsRequestInternalServerError'
servers:
  - url: https://api.telekesher.dev
    description: Gateway server
components:
  schemas:
    V1SessionsGetParametersState:
      type: string
      enum:
        - new
        - connecting
        - ringing
        - early_media
        - answered
        - ended
      title: V1SessionsGetParametersState
    SessionState:
      type: string
      enum:
        - new
        - connecting
        - ringing
        - early_media
        - answered
        - ended
      description: |-
        Current lifecycle state of the session. `connecting` applies to a
        `websocket` session whose backend WebSocket has not yet connected.
      title: SessionState
    SessionType:
      type: string
      enum:
        - phone_in
        - phone_out
        - sip
        - webrtc
        - websocket
        - unknown
      description: |-
        The nature of the session:
        - `phone_in`: inbound phone call from a carrier
        - `phone_out`: outbound phone call placed with `dial`
        - `sip`: a registered SIP device
        - `webrtc`: a WebRTC client
        - `websocket`: a standalone WebSocket session with no phone leg
        - `unknown`: could not be determined
      title: SessionType
    Session:
      type: object
      properties:
        caller_id:
          type: string
          description: >-
            Caller ID in canonical international E.164 format with leading `+`

            (e.g. `+972527121102`). Empty for `websocket` sessions (no phone
            leg).
        created_at:
          type: string
          format: date-time
          description: |-
            When the session was created, as an RFC 3339 / ISO 8601 UTC string
            (e.g. "2025-05-06T12:41:36.000Z"). Storage resolution is one second,
            so the millisecond fraction is always `.000`. Empty string if the
            originating timestamp is missing or unparseable.
        did:
          type: string
          description: >-
            Called DID in canonical E.164 format with leading `+` (e.g.
            `+972747713001`).

            Empty for `websocket` sessions (no phone leg).
        session_uuid:
          type: string
          description: Opaque session identifier. Return it to the API exactly as received.
        state:
          $ref: '#/components/schemas/SessionState'
          description: |-
            Current lifecycle state of the session. `connecting` applies to a
            `websocket` session whose backend WebSocket has not yet connected.
        type:
          $ref: '#/components/schemas/SessionType'
          description: |-
            The nature of the session:
            - `phone_in`: inbound phone call from a carrier
            - `phone_out`: outbound phone call placed with `dial`
            - `sip`: a registered SIP device
            - `webrtc`: a WebRTC client
            - `websocket`: a standalone WebSocket session with no phone leg
            - `unknown`: could not be determined
      required:
        - created_at
        - session_uuid
        - state
        - type
      description: |-
        The opaque, 6-field view of a session. Identical shape on
        `GET /v1/sessions/{uuid}` and each item of `GET /v1/sessions`.
      title: Session
    SessionListResponse:
      type: object
      properties:
        has_more:
          type: boolean
          description: True when more sessions matched than were returned.
        sessions:
          type: array
          items:
            $ref: '#/components/schemas/Session'
      required:
        - has_more
        - sessions
      title: SessionListResponse
    V1SessionsGetResponsesContentApplicationJsonSchemaCode:
      type: string
      enum:
        - invalid_request
        - payload_too_large
        - result_set_too_large
        - unauthorized
        - forbidden
        - not_found
        - conflict
        - recording_not_active
        - room_full
        - rate_limited
        - unavailable
        - internal
      description: >-
        Stable, machine-readable error class from a closed set of twelve values.
        Branch on this for programmatic handling. New codes are only added with
        a documented API change. Maps to the HTTP status as follows:
        `invalid_request` (400/415/422), `payload_too_large` and
        `result_set_too_large` (413), `unauthorized` (401), `forbidden` (403),
        `not_found` (404), `recording_not_active` (400); `conflict` and
        `room_full` (409), `rate_limited` (429), `unavailable` (502/503/529),
        `internal` (500).


        Note: `413` is the only status shared by two codes — `payload_too_large`
        means the request body exceeded its size cap, while
        `result_set_too_large` means a list response exceeded the system result
        ceiling (narrow the query with filters and retry).


        Note: `unavailable` is the only code that maps to multiple HTTP
        statuses, which represent different retry conditions: `502` means a
        command dependency could not accept the request, `503` means a required
        service (including the idempotency store) is temporarily unavailable,
        and `529` means the gateway is overloaded with no spare capacity. Use
        the HTTP status and operation description, not just `code`, to
        distinguish them.
      title: V1SessionsGetResponsesContentApplicationJsonSchemaCode
    ListSessionsRequestBadRequestError:
      type: object
      properties:
        code:
          $ref: >-
            #/components/schemas/V1SessionsGetResponsesContentApplicationJsonSchemaCode
          description: >-
            Stable, machine-readable error class from a closed set of twelve
            values. Branch on this for programmatic handling. New codes are only
            added with a documented API change. Maps to the HTTP status as
            follows: `invalid_request` (400/415/422), `payload_too_large` and
            `result_set_too_large` (413), `unauthorized` (401), `forbidden`
            (403), `not_found` (404), `recording_not_active` (400); `conflict`
            and `room_full` (409), `rate_limited` (429), `unavailable`
            (502/503/529), `internal` (500).


            Note: `413` is the only status shared by two codes —
            `payload_too_large` means the request body exceeded its size cap,
            while `result_set_too_large` means a list response exceeded the
            system result ceiling (narrow the query with filters and retry).


            Note: `unavailable` is the only code that maps to multiple HTTP
            statuses, which represent different retry conditions: `502` means a
            command dependency could not accept the request, `503` means a
            required service (including the idempotency store) is temporarily
            unavailable, and `529` means the gateway is overloaded with no spare
            capacity. Use the HTTP status and operation description, not just
            `code`, to distinguish them.
        error:
          type: string
          description: >-
            Human-readable, English-only error message. For display only —
            phrasing may change without notice, so branch on `code`, not on this
            string.
        retry_after:
          type: integer
          description: >-
            Integer seconds to wait before retrying. Present on `429` (the time
            until the denying token bucket refills by one token) and on `529`
            (overload back-off hint). Mirrors the `Retry-After` response header.
        success:
          type: boolean
      required:
        - code
        - error
        - success
      title: ListSessionsRequestBadRequestError
    ListSessionsRequestUnauthorizedError:
      type: object
      properties:
        code:
          $ref: >-
            #/components/schemas/V1SessionsGetResponsesContentApplicationJsonSchemaCode
          description: >-
            Stable, machine-readable error class from a closed set of twelve
            values. Branch on this for programmatic handling. New codes are only
            added with a documented API change. Maps to the HTTP status as
            follows: `invalid_request` (400/415/422), `payload_too_large` and
            `result_set_too_large` (413), `unauthorized` (401), `forbidden`
            (403), `not_found` (404), `recording_not_active` (400); `conflict`
            and `room_full` (409), `rate_limited` (429), `unavailable`
            (502/503/529), `internal` (500).


            Note: `413` is the only status shared by two codes —
            `payload_too_large` means the request body exceeded its size cap,
            while `result_set_too_large` means a list response exceeded the
            system result ceiling (narrow the query with filters and retry).


            Note: `unavailable` is the only code that maps to multiple HTTP
            statuses, which represent different retry conditions: `502` means a
            command dependency could not accept the request, `503` means a
            required service (including the idempotency store) is temporarily
            unavailable, and `529` means the gateway is overloaded with no spare
            capacity. Use the HTTP status and operation description, not just
            `code`, to distinguish them.
        error:
          type: string
          description: >-
            Human-readable, English-only error message. For display only —
            phrasing may change without notice, so branch on `code`, not on this
            string.
        retry_after:
          type: integer
          description: >-
            Integer seconds to wait before retrying. Present on `429` (the time
            until the denying token bucket refills by one token) and on `529`
            (overload back-off hint). Mirrors the `Retry-After` response header.
        success:
          type: boolean
      required:
        - code
        - error
        - success
      title: ListSessionsRequestUnauthorizedError
    ListSessionsRequestContentTooLargeError:
      type: object
      properties:
        code:
          $ref: >-
            #/components/schemas/V1SessionsGetResponsesContentApplicationJsonSchemaCode
          description: >-
            Stable, machine-readable error class from a closed set of twelve
            values. Branch on this for programmatic handling. New codes are only
            added with a documented API change. Maps to the HTTP status as
            follows: `invalid_request` (400/415/422), `payload_too_large` and
            `result_set_too_large` (413), `unauthorized` (401), `forbidden`
            (403), `not_found` (404), `recording_not_active` (400); `conflict`
            and `room_full` (409), `rate_limited` (429), `unavailable`
            (502/503/529), `internal` (500).


            Note: `413` is the only status shared by two codes —
            `payload_too_large` means the request body exceeded its size cap,
            while `result_set_too_large` means a list response exceeded the
            system result ceiling (narrow the query with filters and retry).


            Note: `unavailable` is the only code that maps to multiple HTTP
            statuses, which represent different retry conditions: `502` means a
            command dependency could not accept the request, `503` means a
            required service (including the idempotency store) is temporarily
            unavailable, and `529` means the gateway is overloaded with no spare
            capacity. Use the HTTP status and operation description, not just
            `code`, to distinguish them.
        error:
          type: string
          description: >-
            Human-readable, English-only error message. For display only —
            phrasing may change without notice, so branch on `code`, not on this
            string.
        retry_after:
          type: integer
          description: >-
            Integer seconds to wait before retrying. Present on `429` (the time
            until the denying token bucket refills by one token) and on `529`
            (overload back-off hint). Mirrors the `Retry-After` response header.
        success:
          type: boolean
      required:
        - code
        - error
        - success
      title: ListSessionsRequestContentTooLargeError
    ListSessionsRequestTooManyRequestsError:
      type: object
      properties:
        code:
          $ref: >-
            #/components/schemas/V1SessionsGetResponsesContentApplicationJsonSchemaCode
          description: >-
            Stable, machine-readable error class from a closed set of twelve
            values. Branch on this for programmatic handling. New codes are only
            added with a documented API change. Maps to the HTTP status as
            follows: `invalid_request` (400/415/422), `payload_too_large` and
            `result_set_too_large` (413), `unauthorized` (401), `forbidden`
            (403), `not_found` (404), `recording_not_active` (400); `conflict`
            and `room_full` (409), `rate_limited` (429), `unavailable`
            (502/503/529), `internal` (500).


            Note: `413` is the only status shared by two codes —
            `payload_too_large` means the request body exceeded its size cap,
            while `result_set_too_large` means a list response exceeded the
            system result ceiling (narrow the query with filters and retry).


            Note: `unavailable` is the only code that maps to multiple HTTP
            statuses, which represent different retry conditions: `502` means a
            command dependency could not accept the request, `503` means a
            required service (including the idempotency store) is temporarily
            unavailable, and `529` means the gateway is overloaded with no spare
            capacity. Use the HTTP status and operation description, not just
            `code`, to distinguish them.
        error:
          type: string
          description: >-
            Human-readable, English-only error message. For display only —
            phrasing may change without notice, so branch on `code`, not on this
            string.
        retry_after:
          type: integer
          description: >-
            Integer seconds to wait before retrying. Present on `429` (the time
            until the denying token bucket refills by one token) and on `529`
            (overload back-off hint). Mirrors the `Retry-After` response header.
        success:
          type: boolean
      required:
        - code
        - error
        - retry_after
        - success
      title: ListSessionsRequestTooManyRequestsError
    ListSessionsRequestInternalServerError:
      type: object
      properties:
        code:
          $ref: >-
            #/components/schemas/V1SessionsGetResponsesContentApplicationJsonSchemaCode
          description: >-
            Stable, machine-readable error class from a closed set of twelve
            values. Branch on this for programmatic handling. New codes are only
            added with a documented API change. Maps to the HTTP status as
            follows: `invalid_request` (400/415/422), `payload_too_large` and
            `result_set_too_large` (413), `unauthorized` (401), `forbidden`
            (403), `not_found` (404), `recording_not_active` (400); `conflict`
            and `room_full` (409), `rate_limited` (429), `unavailable`
            (502/503/529), `internal` (500).


            Note: `413` is the only status shared by two codes —
            `payload_too_large` means the request body exceeded its size cap,
            while `result_set_too_large` means a list response exceeded the
            system result ceiling (narrow the query with filters and retry).


            Note: `unavailable` is the only code that maps to multiple HTTP
            statuses, which represent different retry conditions: `502` means a
            command dependency could not accept the request, `503` means a
            required service (including the idempotency store) is temporarily
            unavailable, and `529` means the gateway is overloaded with no spare
            capacity. Use the HTTP status and operation description, not just
            `code`, to distinguish them.
        error:
          type: string
          description: >-
            Human-readable, English-only error message. For display only —
            phrasing may change without notice, so branch on `code`, not on this
            string.
        retry_after:
          type: integer
          description: >-
            Integer seconds to wait before retrying. Present on `429` (the time
            until the denying token bucket refills by one token) and on `529`
            (overload back-off hint). Mirrors the `Retry-After` response header.
        success:
          type: boolean
      required:
        - code
        - error
        - success
      title: ListSessionsRequestInternalServerError
  securitySchemes:
    bearerAppAuth:
      type: http
      scheme: bearer
      description: >-
        Application auth. Send `Authorization: Bearer <app_uuid>:<api_key>`. See
        [Authentication](https://voice-platform.docs.buildwithfern.com/api/authentication)
        for details.

```

## Examples



**Response**

```json
{
  "has_more": true,
  "sessions": [
    {
      "created_at": "2025-05-06T12:41:36.000Z",
      "session_uuid": "acW68-7f3c1d2e-9a4b-4c8d-b1e2-3f4a5b6c7d8e",
      "state": "answered",
      "type": "phone_out",
      "caller_id": "+972527121102",
      "did": "+972747713001"
    }
  ]
}
```

**SDK Code**

```python
import requests

url = "https://api.telekesher.dev/v1/sessions"

querystring = {"caller_id":"+972527121102","created_after":"2025-05-06T12:40:00.000Z","created_before":"2025-05-06T13:40:00.000Z","did":"+972747713001"}

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers, params=querystring)

print(response.json())
```

```javascript
const url = 'https://api.telekesher.dev/v1/sessions?caller_id=%2B972527121102&created_after=2025-05-06T12%3A40%3A00.000Z&created_before=2025-05-06T13%3A40%3A00.000Z&did=%2B972747713001';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.telekesher.dev/v1/sessions?caller_id=%2B972527121102&created_after=2025-05-06T12%3A40%3A00.000Z&created_before=2025-05-06T13%3A40%3A00.000Z&did=%2B972747713001"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.telekesher.dev/v1/sessions?caller_id=%2B972527121102&created_after=2025-05-06T12%3A40%3A00.000Z&created_before=2025-05-06T13%3A40%3A00.000Z&did=%2B972747713001")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.telekesher.dev/v1/sessions?caller_id=%2B972527121102&created_after=2025-05-06T12%3A40%3A00.000Z&created_before=2025-05-06T13%3A40%3A00.000Z&did=%2B972747713001")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.telekesher.dev/v1/sessions?caller_id=%2B972527121102&created_after=2025-05-06T12%3A40%3A00.000Z&created_before=2025-05-06T13%3A40%3A00.000Z&did=%2B972747713001', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.telekesher.dev/v1/sessions?caller_id=%2B972527121102&created_after=2025-05-06T12%3A40%3A00.000Z&created_before=2025-05-06T13%3A40%3A00.000Z&did=%2B972747713001");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.telekesher.dev/v1/sessions?caller_id=%2B972527121102&created_after=2025-05-06T12%3A40%3A00.000Z&created_before=2025-05-06T13%3A40%3A00.000Z&did=%2B972747713001")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```