Create Session

Beta

Headers

AuthorizationstringRequired

Bearer authentication of the form Bearer <token>, where token is your auth token.

Request

This endpoint expects an object.
namestringOptional<=40 characters

This is a user-defined name for the session. Maximum length is 40 characters.

statusenumOptional
This is the current status of the session. Can be either 'active' or 'completed'.
Allowed values:
expirationSecondsdoubleOptional>=60<=2592000

Session expiration time in seconds. Defaults to 24 hours (86400 seconds) if not set.

assistantIdstringOptional
This is the ID of the assistant associated with this session. Use this when referencing an existing assistant.
assistantobjectOptional
This is the assistant configuration for this session. Use this when creating a new assistant configuration. If assistantId is provided, this will be ignored.
messageslist of objectsOptional
This is an array of chat messages in the session.
customerobjectOptional
This is the customer information associated with this session.
phoneNumberIdstringOptional
This is the ID of the phone number associated with this session.
phoneNumberobjectOptional
This is the phone number configuration for this session.

Response

idstring
This is the unique identifier for the session.
orgIdstring
This is the unique identifier for the organization that owns this session.
createdAtstringformat: "date-time"
This is the ISO 8601 timestamp indicating when the session was created.
updatedAtstringformat: "date-time"
This is the ISO 8601 timestamp indicating when the session was last updated.
namestring or null<=40 characters

This is a user-defined name for the session. Maximum length is 40 characters.

statusenum or null
This is the current status of the session. Can be either 'active' or 'completed'.
Allowed values:
expirationSecondsdouble or null>=60<=2592000

Session expiration time in seconds. Defaults to 24 hours (86400 seconds) if not set.

assistantIdstring or null
This is the ID of the assistant associated with this session. Use this when referencing an existing assistant.
assistantobject or null
This is the assistant configuration for this session. Use this when creating a new assistant configuration. If assistantId is provided, this will be ignored.
messageslist of objects or null
This is an array of chat messages in the session.
customerobject or null
This is the customer information associated with this session.
phoneNumberIdstring or null
This is the ID of the phone number associated with this session.
phoneNumberobject or null
This is the phone number configuration for this session.