API Reference
API Reference

Sessions List

GET/api/v1/sessions/

Authentication

Syllable-API-Keyrequired

Send Syllable-API-Key in the header.

Need a credential? Create or manage an API token in the Syllable Console.

Parameters

Query parameters

page integer | null query optional

The page number from which to start (0-based)

Default 0Minimum 0Example 0
limit integer query optional

The maximum number of items to return

Default 25Minimum 0Example 25
search_fields enum<string>[] query optional

String names of fields to search. Correspond by index to search field values

Default []Example name
Item schema
itemsenum<string>required

Names of session fields supported for filtering/sorting on list endpoint.

Allowed values ["timestamp","session_id","conversation_id","channel_manager_service","channel_manager_type","channel_manager_sid","agent_type","agent_id","agent_name","prompt_id","prompt_name","source","target","duration","is_outbound","is_legacy","is_test"]
search_field_values string[] query optional

Values of fields to search. Correspond by index to search fields. Unless field name contains "list", an individual search field value cannot be a list

Default []Example Some Object Name
Item schema
itemsstringrequired
order_by enum<string> | null query optional

The field whose value should be used to order the results

Allowed values ["timestamp","session_id","conversation_id","channel_manager_service","channel_manager_type","channel_manager_sid","agent_type","agent_id","agent_name","prompt_id","prompt_name","source","target","duration","is_outbound","is_legacy","is_test"]Example name
order_by_direction enum<string> | null query optional

The direction in which to order the results

Allowed values ["asc","desc"]
fields enum<string>[] | null query optional

The fields to include in the response

Default []Example []
Item schema
itemsenum<string>required

Names of session fields supported for filtering/sorting on list endpoint.

Allowed values ["timestamp","session_id","conversation_id","channel_manager_service","channel_manager_type","channel_manager_sid","agent_type","agent_id","agent_name","prompt_id","prompt_name","source","target","duration","is_outbound","is_legacy","is_test"]
start_datetime string | null query optional

The start datetime for filtering results

Example 2023-01-01T00:00:00Z
end_datetime string | null query optional

The end datetime for filtering results

Example 2024-01-01T00:00:00Z

Responses

200Successful Response

application/json

response ListResponse_Session_ required
5 fields
itemsSession[]required

List of items returned from the query

Item schema
itemsSessionrequired

A session is a building block of a conversation.

24 fields
timestampstring (date-time)required

Timestamp of the session

session_idstring | nulloptional

Internal ID of the session, generated based on interaction details

conversation_idstring | nulloptional

ID of the conversation of which the session is a part

channel_manager_servicestring | nulloptional

Name of the service used to facilitate the session

channel_manager_typestring | nulloptional

Type of the service used to facilitate the session

channel_manager_sidstring | nulloptional

Channel-manager-side ID of the session (different from session_id)

agent_idstring | nulloptional

ID of the agent with which the session occurred

agent_namestring | nulloptional

Name of the agent with which the session occurred

agent_typestring | nulloptional

Type of the agent with which the session occurred

agent_timezonestring | nulloptional

Timezone of the agent with which the session occurred

prompt_idstring | nulloptional

ID of the prompt used by the agent with which the session occurred

prompt_namestring | nulloptional

Name of the prompt used by the agent with which the session occurred

prompt_versionstring | nulloptional

Legacy prompt version timestamp used by the agent with which the session occurred

prompt_version_numberinteger | nulloptional

Prompt version number used by the agent with which the session occurred (new system)

durationnumber | nulloptional

Duration of the session in seconds

session_label_idstring | nulloptional

ID of the label (listing the quality of the session and any issues that occurred) associated with the session

sourcestring | nulloptional

Source of the session (e.g., for an inbound session, the user's phone number/username/email)

targetstring | nulloptional

The name of the channel target associated with the agent at the time of the session (see ChannelTargetResponse.target)

is_legacyboolean | nulloptional

Whether the session occurred on the legacy Syllable system

is_testboolean | nulloptional

Whether the session is a test session

is_outboundboolean | nulloptional

Whether the session direction is outbound (true) or inbound (false).

user_terminatedboolean | nulloptional

Whether the voice session was ended by the recipient (outbound) / caller (inbound). False if the user was transferred or there was an error. Unset if the session was not a voice session.

transfer_voicemail_detectedboolean | nulloptional

Whether a voicemail was detected during the transfer leg of the session

override_timestampstring | nulloptional

ISO 8601 datetime used to override the session's current time. Set only for test sessions that supplied a datetime override; otherwise null.

pageintegerrequired

The page number of the results (0-based)

page_sizeintegerrequired

The number of items returned per page

total_pagesinteger | nulloptional

The total number of pages of results given the indicated page size

total_countinteger | nulloptional

The total number of items returned from the query

Response example
{
  "items": [
    {
      "timestamp": "string",
      "session_id": "string",
      "conversation_id": "string",
      "channel_manager_service": "string",
      "channel_manager_type": "string",
      "channel_manager_sid": "string",
      "agent_id": "string",
      "agent_name": "string",
      "agent_type": "string",
      "agent_timezone": "string",
      "prompt_id": "string",
      "prompt_name": "string",
      "prompt_version": "string",
      "prompt_version_number": "string",
      "duration": "string",
      "session_label_id": "string",
      "source": "string",
      "target": "string",
      "is_legacy": "string",
      "is_test": "string",
      "is_outbound": "string",
      "user_terminated": "string",
      "transfer_voicemail_detected": "string",
      "override_timestamp": "string"
    }
  ],
  "page": 0,
  "page_size": 0,
  "total_pages": "string",
  "total_count": "string"
}
422Validation Error

application/json

response HTTPValidationError required
1 field
detailValidationError[]optional
Item schema
itemsValidationErrorrequired
3 fields
locstring | integer[]required
Item schema
itemsstring | integerrequired
2 options
Option 1stringrequired
Option 2integerrequired
msgstringrequired
typestringrequired
Response example
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}