> ## 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.

# List browser sessions

> Lists sessions for the authenticated org. Optional status filter.



## OpenAPI

````yaml /openapi/source/external/agent-browser/agent-browser.json get /browser_sessions
openapi: 3.1.0
info:
  version: 1.0.0
  title: Telnyx API
  x-latency-category: interactive
  x-endpoint-cost: light
  description: >-
    Isolated, short-lived browser sessions for AI agents — navigate, observe,
    click, fill, and screenshot through one API.


    ## Authentication


    All endpoints require a Telnyx API key sent as a Bearer token in the
    `Authorization` header.


    ## Session Quota


    Creating a session is subject to a concurrent-session quota per
    organization. When capacity is exhausted, create returns `429
    quota_exceeded` with `retryable: true`. Close unneeded active sessions or
    wait for capacity before retrying.


    ## Error Responses


    Request errors use `{ "error": { "code": string, "message": string,
    "retryable": boolean } }`. Execution failures are reported on action
    resources with HTTP 200 and `data.status` set to `failed` or `unknown`. A
    request can also return HTTP 503 `execution_lost`; inspect action and
    session state before retrying because the action may already have taken
    effect.
  contact:
    email: support@telnyx.com
servers:
  - url: https://api.telnyx.com/v2
    description: Telnyx API v2
security:
  - bearerAuth: []
tags:
  - name: Browser Sessions
    description: Create, list, get, and close browser sessions.
  - name: Actions
    description: >-
      Execute browser actions: navigate, observe, click, fill, select, press,
      scroll, wait_for, screenshot, batch.
  - name: Artifacts
    description: Download screenshots and other artifacts.
paths:
  /browser_sessions:
    get:
      tags:
        - Browser Sessions
      summary: List browser sessions
      description: Lists sessions for the authenticated org. Optional status filter.
      operationId: ListBrowserSessions
      parameters:
        - name: status
          in: query
          required: false
          schema:
            type: string
            enum:
              - provisioning
              - ready
              - closing
              - closed
              - failed
              - expired
      responses:
        '200':
          description: List of sessions
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Session'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
      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
            });

            // Automatically fetches more pages as needed.
            for await (const response of client.browserSessions.list()) {
              console.log(response);
            }
        - 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
            )
            page = client.browser_sessions.list()
            print(page.data)
        - 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\tbrowserSessions, err := client.BrowserSessions.List(context.TODO())\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", browserSessions.Data)\n}\n"
        - lang: Java
          source: |-
            package com.telnyx.sdk.example;

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

            public final class Main {
                private Main() {}

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

                    var page = client.browserSessions().list();
                }
            }
        - lang: Ruby
          source: |-
            require "telnyx"

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

            page = telnyx.browser_sessions.list

            puts(page)
        - lang: PHP
          source: >-
            <?php


            require_once dirname(__DIR__) . '/vendor/autoload.php';


            use Telnyx\Client;

            use Telnyx\Core\Exceptions\APIException;


            $client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API
            Key');


            try {
              $page = $client->browserSessions->list();

              var_dump($page);
            } catch (APIException $e) {
              echo $e->getMessage();
            }
        - lang: CLI
          source: |-
            telnyx browser-sessions list \
              --api-key 'My API Key'
components:
  schemas:
    Session:
      type: object
      properties:
        id:
          type: string
          example: bsess_3b108e10-906a-486e-9132-196726ba7979
        status:
          type: string
          enum:
            - provisioning
            - ready
            - closing
            - closed
            - failed
            - expired
        failure_reason:
          type:
            - string
            - 'null'
        policy:
          type: object
          properties:
            allowed_domains:
              type: array
              items:
                type: string
          required:
            - allowed_domains
        limits:
          type: object
          properties:
            lifetime_s:
              type: integer
            idle_timeout_s:
              type: integer
          required:
            - lifetime_s
            - idle_timeout_s
        metadata:
          type: object
          additionalProperties: true
        created_at:
          type: string
          format: date-time
        ready_at:
          type:
            - string
            - 'null'
          format: date-time
        last_activity_at:
          type:
            - string
            - 'null'
          format: date-time
        expires_at:
          type:
            - string
            - 'null'
          format: date-time
        closed_at:
          type:
            - string
            - 'null'
          format: date-time
      required:
        - id
        - status
        - failure_reason
        - policy
        - limits
        - metadata
        - created_at
        - ready_at
        - last_activity_at
        - expires_at
        - closed_at
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
            retryable:
              type: boolean
          required:
            - code
            - message
            - retryable
      required:
        - error
    GatewayError:
      type: object
      required:
        - errors
      properties:
        errors:
          type: array
          items:
            type: object
            required:
              - code
              - title
            properties:
              code:
                type: string
              title:
                type: string
              detail:
                type: string
              source:
                type: object
                properties:
                  pointer:
                    type: string
              meta:
                type: object
                properties:
                  url:
                    type: string
                    format: uri
  responses:
    BadRequest:
      description: Invalid request — validation error or invalid parameters.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: validation_error
              message: >-
                invalid request: policy.allowed_domains must have at least 1
                item(s)
              retryable: false
    Unauthorized:
      description: Unauthorized — missing or invalid API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GatewayError'
          example:
            errors:
              - code: '10009'
                title: Authentication failed
                detail: Could not find any usable credentials in the request.
                source:
                  pointer: /
                meta:
                  url: https://developers.telnyx.com/docs/overview/errors/10009
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````