Create Session

Beta

Authentication

AuthorizationBearer

Retrieve your API Key from Dashboard.

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:
expirationSecondsdoubleOptional60-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.
assistantOverridesobjectOptional

These are the overrides for the assistant configuration. Use this to provide variable values and other overrides when using assistantId. Variable substitution will be applied to the assistant’s messages and other text-based fields.

squadIdstringOptional
This is the squad ID associated with this session. Use this when referencing an existing squad.
squadobjectOptional
This is the squad configuration for this session. Use this when creating a new squad configuration. If squadId 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.
customerIdstringOptional
This is the customerId of the customer 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.
createdAtdatetime
This is the ISO 8601 timestamp indicating when the session was created.
updatedAtdatetime
This is the ISO 8601 timestamp indicating when the session was last updated.
costdouble
This is the cost of the session in USD.
costslist of objects
These are the costs of individual components of the session in USD.
namestring<=40 characters

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

statusenum
This is the current status of the session. Can be either 'active' or 'completed'.
Allowed values:
expirationSecondsdouble60-2592000

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

assistantIdstring
This is the ID of the assistant associated with this session. Use this when referencing an existing assistant.
assistantobject
This is the assistant configuration for this session. Use this when creating a new assistant configuration. If assistantId is provided, this will be ignored.
assistantOverridesobject

These are the overrides for the assistant configuration. Use this to provide variable values and other overrides when using assistantId. Variable substitution will be applied to the assistant’s messages and other text-based fields.

squadIdstring
This is the squad ID associated with this session. Use this when referencing an existing squad.
squadobject
This is the squad configuration for this session. Use this when creating a new squad configuration. If squadId is provided, this will be ignored.
messageslist of objects
This is an array of chat messages in the session.
customerobject
This is the customer information associated with this session.
customerIdstring
This is the customerId of the customer associated with this session.
phoneNumberIdstring
This is the ID of the phone number associated with this session.
phoneNumberobject
This is the phone number configuration for this session.
artifactobject
These are the artifacts that were extracted from the session messages. They are only available after the session has completed. The artifact plan from the assistant or active assistant of squad is used to generate the artifact. Currently the only supported fields of assistant artifact plan are: - structuredOutputIds