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

# List Client Sessions

> Returns a list of all [client sessions](https://docs.seam.co/core-concepts/authentication/client-session-tokens).



## OpenAPI

````yaml /openapi.json post /client_sessions/list
openapi: 3.0.0
info:
  title: Seam Connect
  version: 1.0.0
servers:
  - url: https://connect.getseam.com
security: []
tags:
  - description: access_codes
    name: /access_codes
  - description: acs
    name: /acs
  - description: action_attempts
    name: /action_attempts
  - description: client_sessions
    name: /client_sessions
  - description: connected_accounts
    name: /connected_accounts
  - description: connect_webviews
    name: /connect_webviews
  - description: devices
    name: /devices
  - description: events
    name: /events
  - description: health
    name: /health
  - description: locks
    name: /locks
  - description: networks
    name: /networks
  - description: noise_sensors
    name: /noise_sensors
  - description: phones
    name: /phones
  - description: thermostats
    name: /thermostats
  - description: user_identities
    name: /user_identities
  - description: webhooks
    name: /webhooks
  - description: workspaces
    name: /workspaces
paths:
  /client_sessions/list:
    post:
      tags:
        - /client_sessions
      summary: List Client Sessions
      description: >-
        Returns a list of all [client
        sessions](https://docs.seam.co/core-concepts/authentication/client-session-tokens).
      operationId: clientSessionsListPost
      requestBody:
        content:
          application/json:
            schema:
              properties:
                client_session_id:
                  description: ID of the client session that you want to retrieve.
                  type: string
                connect_webview_id:
                  description: >-
                    ID of the [Connect
                    Webview](https://docs.seam.co/core-concepts/connect-webviews)
                    for which you want to retrieve client sessions.
                  type: string
                user_identifier_key:
                  description: >-
                    Your user ID for the user by which you want to filter client
                    sessions.
                  type: string
                user_identity_id:
                  description: >-
                    ID of the [user
                    identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity)
                    for which you want to retrieve client sessions.
                  type: string
                without_user_identifier_key:
                  description: >-
                    Indicates whether to retrieve only client sessions without
                    associated user identifier keys.
                  type: boolean
              type: object
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  client_sessions:
                    items:
                      $ref: '#/components/schemas/client_session'
                    type: array
                  ok:
                    type: boolean
                required:
                  - client_sessions
                  - ok
                type: object
          description: OK
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
      security:
        - api_key: []
        - pat_with_workspace: []
        - console_session_with_workspace: []
      x-codeSamples:
        - lang: javascript
          label: Seam SDK
          source: |-
            await seam.clientSessions.list({
              client_session_id: "a083ce0f-8b03-4081-ac9a-1ad2ce6aaabc",
            });

            /*
            [
              {
                "client_session_id": "a083ce0f-8b03-4081-ac9a-1ad2ce6aaabc",
                "connect_webview_ids": [
                  "e0f522d4-a7b6-4f65-ba90-11cde67a893a"
                ],
                "connected_account_ids": [
                  "c35ecf64-474a-466a-95a6-7b35cb4c8bb4"
                ],
                "created_at": "2025-06-15T16:54:17.946309Z",
                "customer_id": "e387e15f-be27-47ad-881f-4a6fc5460c57",
                "device_count": 1,
                "expires_at": "2025-06-18T06:10:42.000Z",
                "token": "seam_cst1891oqCmD_6dBwV8PJ2Fsoe9dWYVyMfVHq",
                "user_identifier_key": "jane_doe",
                "user_identity_id": "b4ce8233-3b35-4d2d-82ec-d48513684f0a",
                "workspace_id": "b887bf84-9849-4454-a562-cf84293d9781"
              }
            ]
            */
        - lang: bash
          label: cURL
          source: >-
            curl --include --request POST
            "https://connect.getseam.com/client_sessions/list" \
              --header "Authorization: Bearer $SEAM_API_KEY" \
              --json @- <<EOF
            {
              "client_session_id": "a083ce0f-8b03-4081-ac9a-1ad2ce6aaabc"
            }

            EOF


            # Response:

            # {

            #   "client_sessions": [

            #     {

            #       "client_session_id": "a083ce0f-8b03-4081-ac9a-1ad2ce6aaabc",

            #       "connect_webview_ids": [

            #         "e0f522d4-a7b6-4f65-ba90-11cde67a893a"

            #       ],

            #       "connected_account_ids": [

            #         "c35ecf64-474a-466a-95a6-7b35cb4c8bb4"

            #       ],

            #       "created_at": "2025-06-15T16:54:17.946309Z",

            #       "customer_id": "e387e15f-be27-47ad-881f-4a6fc5460c57",

            #       "device_count": 1,

            #       "expires_at": "2025-06-18T06:10:42.000Z",

            #       "token": "seam_cst1891oqCmD_6dBwV8PJ2Fsoe9dWYVyMfVHq",

            #       "user_identifier_key": "jane_doe",

            #       "user_identity_id": "b4ce8233-3b35-4d2d-82ec-d48513684f0a",

            #       "workspace_id": "b887bf84-9849-4454-a562-cf84293d9781"

            #     }

            #   ]

            # }
        - lang: python
          label: Seam SDK
          source: >-
            seam.client_sessions.list(client_session_id="a083ce0f-8b03-4081-ac9a-1ad2ce6aaabc")


            # [
                ClientSession(
                    client_session_id="a083ce0f-8b03-4081-ac9a-1ad2ce6aaabc",
                    connect_webview_ids=["e0f522d4-a7b6-4f65-ba90-11cde67a893a"],
                    connected_account_ids=["c35ecf64-474a-466a-95a6-7b35cb4c8bb4"],
                    created_at="2025-06-15T16:54:17.946309Z",
                    customer_id="e387e15f-be27-47ad-881f-4a6fc5460c57",
                    device_count=1,
                    expires_at="2025-06-18T06:10:42.000Z",
                    token="seam_cst1891oqCmD_6dBwV8PJ2Fsoe9dWYVyMfVHq",
                    user_identifier_key="jane_doe",
                    user_identity_id="b4ce8233-3b35-4d2d-82ec-d48513684f0a",
                    workspace_id="b887bf84-9849-4454-a562-cf84293d9781",
                )
            ]
        - lang: ruby
          label: Seam SDK
          source: >-
            seam.client_sessions.list(client_session_id:
            "a083ce0f-8b03-4081-ac9a-1ad2ce6aaabc")


            # => [
              {
                "client_session_id" => "a083ce0f-8b03-4081-ac9a-1ad2ce6aaabc",
                "connect_webview_ids" => ["e0f522d4-a7b6-4f65-ba90-11cde67a893a"],
                "connected_account_ids" => ["c35ecf64-474a-466a-95a6-7b35cb4c8bb4"],
                "created_at" => "2025-06-15T16:54:17.946309Z",
                "customer_id" => "e387e15f-be27-47ad-881f-4a6fc5460c57",
                "device_count" => 1,
                "expires_at" => "2025-06-18T06:10:42.000Z",
                "token" => "seam_cst1891oqCmD_6dBwV8PJ2Fsoe9dWYVyMfVHq",
                "user_identifier_key" => "jane_doe",
                "user_identity_id" => "b4ce8233-3b35-4d2d-82ec-d48513684f0a",
                "workspace_id" => "b887bf84-9849-4454-a562-cf84293d9781",
              },
            ]
        - lang: php
          label: Seam SDK
          source: |-
            $seam->client_sessions->list(
                client_session_id: "a083ce0f-8b03-4081-ac9a-1ad2ce6aaabc",
            );

            // [
                [
                    "client_session_id" => "a083ce0f-8b03-4081-ac9a-1ad2ce6aaabc",
                    "connect_webview_ids" => ["e0f522d4-a7b6-4f65-ba90-11cde67a893a"],
                    "connected_account_ids" => ["c35ecf64-474a-466a-95a6-7b35cb4c8bb4"],
                    "created_at" => "2025-06-15T16:54:17.946309Z",
                    "customer_id" => "e387e15f-be27-47ad-881f-4a6fc5460c57",
                    "device_count" => 1,
                    "expires_at" => "2025-06-18T06:10:42.000Z",
                    "token" => "seam_cst1891oqCmD_6dBwV8PJ2Fsoe9dWYVyMfVHq",
                    "user_identifier_key" => "jane_doe",
                    "user_identity_id" => "b4ce8233-3b35-4d2d-82ec-d48513684f0a",
                    "workspace_id" => "b887bf84-9849-4454-a562-cf84293d9781",
                ],
            ];
        - lang: bash
          label: Seam CLI
          source: >-
            seam client-sessions list --client_session_id
            "a083ce0f-8b03-4081-ac9a-1ad2ce6aaabc"


            # [

            #   {

            #     "client_session_id": "a083ce0f-8b03-4081-ac9a-1ad2ce6aaabc",

            #     "connect_webview_ids": [

            #       "e0f522d4-a7b6-4f65-ba90-11cde67a893a"

            #     ],

            #     "connected_account_ids": [

            #       "c35ecf64-474a-466a-95a6-7b35cb4c8bb4"

            #     ],

            #     "created_at": "2025-06-15T16:54:17.946309Z",

            #     "customer_id": "e387e15f-be27-47ad-881f-4a6fc5460c57",

            #     "device_count": 1,

            #     "expires_at": "2025-06-18T06:10:42.000Z",

            #     "token": "seam_cst1891oqCmD_6dBwV8PJ2Fsoe9dWYVyMfVHq",

            #     "user_identifier_key": "jane_doe",

            #     "user_identity_id": "b4ce8233-3b35-4d2d-82ec-d48513684f0a",

            #     "workspace_id": "b887bf84-9849-4454-a562-cf84293d9781"

            #   }

            # ]
components:
  schemas:
    client_session:
      description: >-
        Represents a [client
        session](https://docs.seam.co/core-concepts/authentication/client-session-tokens).
        If you want to restrict your users' access to their own devices, use
        client sessions.
      properties:
        client_session_id:
          description: >-
            ID of the [client
            session](https://docs.seam.co/core-concepts/authentication/client-session-tokens).
          format: uuid
          type: string
        connect_webview_ids:
          description: >-
            IDs of the [Connect
            Webviews](https://docs.seam.co/core-concepts/connect-webviews)
            associated with the [client
            session](https://docs.seam.co/core-concepts/authentication/client-session-tokens).
          items:
            format: uuid
            type: string
          type: array
        connected_account_ids:
          description: >-
            IDs of the [connected
            accounts](https://docs.seam.co/core-concepts/connected-accounts)
            associated with the [client
            session](https://docs.seam.co/core-concepts/authentication/client-session-tokens).
          items:
            format: uuid
            type: string
          type: array
        created_at:
          description: >-
            Date and time at which the [client
            session](https://docs.seam.co/core-concepts/authentication/client-session-tokens)
            was created.
          format: date-time
          type: string
        customer_key:
          description: >-
            Customer key associated with the [client
            session](https://docs.seam.co/core-concepts/authentication/client-session-tokens).
          type: string
        device_count:
          description: >-
            Number of devices associated with the [client
            session](https://docs.seam.co/core-concepts/authentication/client-session-tokens).
          format: float
          type: number
        expires_at:
          description: >-
            Date and time at which the [client
            session](https://docs.seam.co/core-concepts/authentication/client-session-tokens)
            expires.
          format: date-time
          type: string
        token:
          description: >-
            Client session token associated with the [client
            session](https://docs.seam.co/core-concepts/authentication/client-session-tokens).
          type: string
        user_identifier_key:
          description: >-
            Your user ID for the user associated with the [client
            session](https://docs.seam.co/core-concepts/authentication/client-session-tokens).
          nullable: true
          type: string
        user_identity_id:
          description: >-
            ID of the [user
            identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity)
            associated with the client session.
          format: uuid
          type: string
        user_identity_ids:
          deprecated: true
          description: >-
            IDs of the [user
            identities](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity)
            associated with the client session.
          items:
            format: uuid
            type: string
          type: array
          x-deprecated: Use `user_identity_id` instead.
        workspace_id:
          description: >-
            ID of the [workspace](https://docs.seam.co/core-concepts/workspaces)
            associated with the [client
            session](https://docs.seam.co/core-concepts/authentication/client-session-tokens).
          format: uuid
          type: string
      required:
        - client_session_id
        - workspace_id
        - created_at
        - expires_at
        - token
        - user_identifier_key
        - device_count
        - connected_account_ids
        - connect_webview_ids
        - user_identity_ids
      type: object
      x-route-path: /client_sessions
  securitySchemes:
    api_key:
      bearerFormat: API Key
      scheme: bearer
      type: http
    pat_with_workspace:
      bearerFormat: API Token
      scheme: bearer
      type: http
    console_session_with_workspace:
      bearerFormat: Console Session Token
      scheme: bearer
      type: http

````