curl -X POST https://api.sitespeak.ai/v1/{chatbot_id}/query \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"prompt": "What is SiteSpeakAI?",
"conversation_id": "unique-conversation-id",
"format": "markdown"
}'
const response = await fetch('https://api.sitespeak.ai/v1/{chatbot_id}/query', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_TOKEN',
'Content-Type': 'application/json'
},
body: JSON.stringify({
prompt: 'What is SiteSpeakAI?',
conversation_id: 'unique-conversation-id',
format: 'markdown'
})
});
const data = await response.json();
console.log(data);
Query
Query Chatbot
Queries your chatbot and returns the answer and URLs used to find the answer
POST
/
v1
/
{chatbot_id}
/
query
curl -X POST https://api.sitespeak.ai/v1/{chatbot_id}/query \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"prompt": "What is SiteSpeakAI?",
"conversation_id": "unique-conversation-id",
"format": "markdown"
}'
const response = await fetch('https://api.sitespeak.ai/v1/{chatbot_id}/query', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_TOKEN',
'Content-Type': 'application/json'
},
body: JSON.stringify({
prompt: 'What is SiteSpeakAI?',
conversation_id: 'unique-conversation-id',
format: 'markdown'
})
});
const data = await response.json();
console.log(data);
Path Parameters
| Name | Type | Description |
|---|---|---|
| chatbot_id* | String | The ID of your chatbot. You can find the ID on the settings page for your chatbot. |
Headers
| Name | Type | Description |
|---|---|---|
| Authorization* | String | Bearer |
Body
| Name | Type | Description |
|---|---|---|
| prompt* | String | The question or query text that you would like to send to your chatbot to answer. |
| conversation_id | String | A unique identifier to group questions and answers sent to your chatbot. |
| format | String | Can be either html or markdown. Defaults to return the response text in markdown. |
curl -X POST https://api.sitespeak.ai/v1/{chatbot_id}/query \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"prompt": "What is SiteSpeakAI?",
"conversation_id": "unique-conversation-id",
"format": "markdown"
}'
const response = await fetch('https://api.sitespeak.ai/v1/{chatbot_id}/query', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_TOKEN',
'Content-Type': 'application/json'
},
body: JSON.stringify({
prompt: 'What is SiteSpeakAI?',
conversation_id: 'unique-conversation-id',
format: 'markdown'
})
});
const data = await response.json();
console.log(data);
Response
- 200 Success
- 401 Permission denied
{
"text": "The answer to your question...",
"urls": ["https://example.com/1", "https://example.com/2"]
}
Returns when the API token is invalid or missing.
Last modified on January 21, 2026
⌘I