Send New Message
Send a new message
/api/v1/agents/test/messagesAuthentication
Syllable-API-KeyrequiredSend Syllable-API-Key in the header.
Need a credential? Create or manage an API token in the Syllable Console.
Parameters
This endpoint has no declared parameters.
Request body
application/json
body
TestMessage
required
8 fields
service_namestringrequiredName of the service producing the message
sourcestringrequiredName of the source of the message - identifies the user, like an email or username.
textstring | nulloptionalThe text of the message
test_idstringrequiredChannel-manager-side ID of the session (see Session.channel_manager_sid)
agent_idstringrequiredID of the agent with which the chat is taking place
^[1-9][0-9]*$org_namestring | nulloptionalUnused: Name of the organization associated with the agent
override_timestampstring | nulloptionalOverride for the timestamp of the message
session_startbooleanoptionalWhether this message is the start of a new session
falseRequest example
{
"service_name": "string",
"source": "string",
"text": "string",
"test_id": "string",
"agent_id": "string",
"org_name": "string",
"override_timestamp": "string",
"session_start": false
}Responses
200Successful Response
application/json
response
TestMessageResponse
required
5 fields
test_idstringrequiredChannel-manager-side ID of the session (see Session.channel_manager_sid)
agent_idstringrequiredID of the agent with which the chat is taking place
textstringoptionalThe text of the message that elicited the response
responseunspecified | nullrequiredThe response from the agent
response_textstringoptionalThe text of the response
Response example
{
"test_id": "string",
"agent_id": "string",
"text": "string",
"response": "string",
"response_text": "string"
}422Validation Error
application/json
response
HTTPValidationError
required
1 field
detailValidationError[]optionalItem schema
itemsValidationErrorrequired3 fields
locstring | integer[]requiredItem schema
itemsstring | integerrequired2 options
Option 1stringrequiredOption 2integerrequiredmsgstringrequiredtypestringrequiredResponse example
{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string"
}
]
}
