v1

latestOpenAPI 3.1.0MIT2026-07-132429592.7 MB

Create a ChatKit session.

post/chatkit/sessions

Request body

userstring required

A free-form string that identifies your end user; ensures this Session can access other objects that have the same user scope.

Response

Success

idstring required

Identifier for the ChatKit session.

object'chatkit.session' required

Type discriminator that is always chatkit.session.

expires_atinteger required

Unix timestamp (in seconds) for when the session expires.

client_secretstring required

Ephemeral client secret that authenticates session requests.

userstring required

User identifier associated with the session.

max_requests_per_1_minuteinteger required

Convenience copy of the per-minute request limit.

status'active' | 'expired' | 'cancelled' required

Example response

{
  "id": "cksess_123",
  "object": "chatkit.session",
  "client_secret": "ek_token_123",
  "expires_at": 1712349876,
  "workflow": {
    "id": "workflow_alpha",
    "version": "2024-10-01T00:00:00.000Z"
  },
  "user": "user_789",
  "rate_limits": {
    "max_requests_per_1_minute": 60
  },
  "max_requests_per_1_minute": 60,
  "status": "cancelled",
  "chatkit_configuration": {
    "automatic_thread_titling": {
      "enabled": true
    },
    "file_upload": {
      "enabled": true,
      "max_file_size": 16,
      "max_files": 20
    },
    "history": {
      "enabled": true,
      "recent_threads": 10
    }
  }
}