API Reference
API Reference

Send New Message

Send a new message

POST/api/v1/agents/test/messages

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

This endpoint has no declared parameters.

Request body

application/json

body TestMessage required
8 fields
service_namestringrequired

Name of the service producing the message

sourcestringrequired

Name of the source of the message - identifies the user, like an email or username.

textstring | nulloptional

The text of the message

test_idstringrequired

Channel-manager-side ID of the session (see Session.channel_manager_sid)

agent_idstringrequired

ID of the agent with which the chat is taking place

Pattern ^[1-9][0-9]*$
org_namestring | nulloptional

Unused: Name of the organization associated with the agent

override_timestampstring | nulloptional

Override for the timestamp of the message

session_startbooleanoptional

Whether this message is the start of a new session

Default false
Request 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_idstringrequired

Channel-manager-side ID of the session (see Session.channel_manager_sid)

agent_idstringrequired

ID of the agent with which the chat is taking place

textstringoptional

The text of the message that elicited the response

responseunspecified | nullrequired

The response from the agent

response_textstringoptional

The 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[]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"
    }
  ]
}