Create a Client Session

Creates a new client session.

Creates a new client session.

Code

await seam.clientSessions.create({
  customer_id: "e387e15f-be27-47ad-881f-4a6fc5460c57",
  customer_key: "My Company",
  user_identifier_key: "jane_doe",
  connect_webview_ids: ["dafe6400-7484-4fd1-8c17-1c901b444250"],
  connected_account_ids: ["8062d457-e28e-481f-aecc-509905627511"],
  user_identity_id: "89765fd3-6193-4d63-8605-e77f75356555",
  expires_at: "2025-06-19T15:22:40.000Z",
});

Output

{
  "client_session_id": "c2cbd177-1ace-414b-bb1e-9f129e4a05c1",
  "connect_webview_ids": ["dafe6400-7484-4fd1-8c17-1c901b444250"],
  "connected_account_ids": ["8062d457-e28e-481f-aecc-509905627511"],
  "created_at": "2025-06-15T16:54:17.946309Z",
  "customer_id": "e387e15f-be27-47ad-881f-4a6fc5460c57",
  "device_count": 1,
  "expires_at": "2025-06-19T15:22:40.000Z",
  "token": "seam_cst1891oqCmD_6dBwV8PJ2Fsoe9dWYVyMfVHq",
  "user_identifier_key": "jane_doe",
  "user_identity_id": "89765fd3-6193-4d63-8605-e77f75356555",
  "workspace_id": "b887bf84-9849-4454-a562-cf84293d9781"
}
Authentication Methods
  • API key

  • Personal access token Must also include the seam-workspace header in the request.

  • Publishable key

To learn more, see Authentication.

Request Parameters

connect_webview_ids Array of Strings

IDs of the Connect Webviews for which you want to create a client session.


connected_account_ids Array of Strings

IDs of the connected accounts for which you want to create a client session.


customer_id String

Customer ID that you want to associate with the new client session.


customer_key String

Customer key that you want to associate with the new client session.


expires_at String

Date and time at which the client session should expire, in ISO 8601 format.


user_identifier_key String

Your user ID for the user for whom you want to create a client session.


user_identity_id String

ID of the user identity for which you want to create a client session.


user_identity_ids Array of Strings

IDs of the user identities that you want to associate with the client session.


Response

client_session

{
  "client_session_id": "c2cbd177-1ace-414b-bb1e-9f129e4a05c1",
  "connect_webview_ids": ["550e8400-e29b-41d4-a716-446655440000"],
  "connected_account_ids": ["f47ac10b-58cc-4372-a567-0e02b2c3d479"],
  "created_at": "2025-06-15T16:54:17.946309Z",
  "customer_id": "77eccc4e-c8bc-4c7d-b83c-cb853ed3bade",
  "device_count": 1,
  "expires_at": "2025-06-17T16:54:17.946309Z",
  "token": "seam_cst1891oqCmB_6dBwV8PJ2Fsoe9dWYVyMfVHq",
  "user_identifier_key": "user_id_1",
  "user_identity_id": "a6e93f84-565e-47d7-8908-1ca71ada373c",
  "user_identity_ids": ["a6e93f84-565e-47d7-8908-1ca71ada373c"],
  "workspace_id": "b887bf84-9849-4454-a562-cf84293d9781"
}

Last updated

Was this helpful?