Anakin.ai API
  1. Chatbot
Anakin.ai API
  • Getting started
  • API Versions
  • Apps
    • Chatbot
      • Conversation with Chatbot
        POST
    • QuickApp
      • Run a Quick App
  • Meta
    • Get all API versions
      GET
  1. Chatbot

Conversation with Chatbot

POST
/v1/chatbots/{appId}/messages
Send message to a particular thread or start a new thread.
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.anakin.ai/v1/chatbots/1344/messages' \
--header 'X-Anakin-Api-Version;' \
--header 'Content-Type: application/json' \
--data-raw '{
    "content": "Say this is a test!",
    "stream": true
}'
Response Response Example
200 - Non-streaming response - Success
{
  "content": "This is a test!",
  "threadId": "CM88W9SLrm712ozLA4Pz5Xmhzoj5EIcf"
}

Request

Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
Path Params
appId
string 
required
Example:
1344
Header Params
X-Anakin-Api-Version
string 
required
The Anakin.ai API is versioned. The API version name is based on the date when the API version was released.
Default:
2024-05-06
Body Params application/json
content
MessageContent
required
The message to send to the Chatbot.
One of
The text contents of the message.
stream
boolean 
optional
Whether to stream back partial progress. If true, returns a stream of events that happen during the conversation as server-sent events, terminating when the conversation enters a terminal state with a data: [DONE] message.
Default:
false
threadId
string 
optional
If provided, message will be sent to the thread with this threadId. Otherwise, message will be sent to a new thread.
Threads and Messages represent a conversation session between an Chatbot and a user.
Examples

Responses

🟢200Non-streaming response
application/json
Body
content
MessageContent
required
The content of the message in array of text and/or images.
One of
The text contents of the message.
threadId
string 
required
The ID of the thread to which this message belongs.
Threads and Messages represent a conversation session between an Chatbot and a user.
🟢200Streaming Response
Modified at 2024-07-26 03:44:20
Previous
API Versions
Next
Run a Quick App
Built with