Create Session

CreateSession creates a new session resource.

Use this method to initialize a new conversation session. Provide a CreateSessionRequest containing the desired session details.

Request: CreateSessionRequest Response: Session

HTTP: POST /v1/conversation/sessions

Query parameters

sessionIdstringOptional

session_id is a client-assigned identifier for the Session.

Request

This endpoint expects an object.
profilestringRequired
The profile associated with the session.
displayNamestringRequired

display_name is the title of the session.

sessionTypeintegerRequired

session_type defines the type of the session, such as Public, Private, or Temporary.

ownerslist of stringsRequired
owners contains the list of owners of the session.
defaultChannelslist of integersRequired

default_channels specifies the default channels for the session.

namestringOptional

name is the resource identifier for the Session. It follows the format “sessions/{session}” and uniquely identifies a Session resource.

descriptionstringOptional
description provides a brief overview of the session.
allowedUserslist of stringsOptional

allowed_users contains the list of users allowed in the session.

optionsobjectOptional
options contains various options for the session.
secretKeystringOptional

secret_key is the secret key for the session.

Response

OK
profilestring
The profile associated with the session.
displayNamestring

display_name is the title of the session.

sessionTypeinteger

session_type defines the type of the session, such as Public, Private, or Temporary.

ownerslist of strings
owners contains the list of owners of the session.
defaultChannelslist of integers

default_channels specifies the default channels for the session.

namestring

name is the resource identifier for the Session. It follows the format “sessions/{session}” and uniquely identifies a Session resource.

descriptionstring
description provides a brief overview of the session.
sessionIdstringRead-only
The unique identifier for the session, often sourced from a NATS subject or a dedicated ID.
allowedUserslist of strings

allowed_users contains the list of users allowed in the session.

optionsobject
options contains various options for the session.
secretKeystring

secret_key is the secret key for the session.

createTimedatetimeRead-only
Output only. The time at which the session was created.
updateTimedatetimeRead-only
Output only. The time at which the session was last updated.

Errors

400
Bad Request Error