Send Message
Endpoint used to send a message to the agent.
Request Example
Section titled “Request Example”curl --request POST \ --url https://kratos.api.toolzz.com.br/api/v1/chat/send-message \ --header 'Authorization: Bearer TOKEN_HERE' \ --header 'Content-Type: application/json' \ --data ' { "message": "<string>", "conversationId": "<string>", "botId": "<uuid>" }'Response Example
Section titled “Response Example”{ "message": { "content": "<string>", "conversationId": "<string>", "transferToAgent": true, "targetBotId": "<uuid>" }}Request description
Section titled “Request description”Access Token
Section titled “Access Token”| Parameter | Type | Description | Required |
|---|---|---|---|
Authorization | String | Access token (“Bearer” must be before the token) | Yes |
Body Parameters
Section titled “Body Parameters”| Parameter | Type | Description | Required |
|---|---|---|---|
message | String | The text content of the message to be sent to the agent. | Yes |
conversationId | String | Unique identifier of the conversation session. | No |
botId | UUID | Unique identifier of the agent (bot). | Yes |
Response description
Section titled “Response description”| Key | Type | Description |
|---|---|---|
message | Object | Object containing the interaction details and routing metadata. |
message.content | String | Textual content of the generated response or system message. |
message.conversationId | String | Unique identifier of the active conversation. |
message.transferToAgent | Boolean | Indicates if the conversation should be transferred to a human agent or another support level. |
message.targetBotId | UUID | Identifier of the target Agent if the transfer occurs between bots. |
Security
Section titled “Security”To access this endpoint, it is necessary to send a valid access token through the authorization header (Authorization) of the request. Additionally, the API is protected by other security measures to safeguard user data.
To access your access token, follow these steps:
- Log in to the ToolzzAI platform
- Click on “Settings”
- Click on “Access Token”
- Copy the access token
