curl --request POST \
--url https://api.sigmamind.ai/v1/chats/response \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"chatId": "chat_nZ9hHYAANJbhLwZv",
"input": "Where is my order?"
}
'import requests
url = "https://api.sigmamind.ai/v1/chats/response"
payload = {
"chatId": "chat_nZ9hHYAANJbhLwZv",
"input": "Where is my order?"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({chatId: 'chat_nZ9hHYAANJbhLwZv', input: 'Where is my order?'})
};
fetch('https://api.sigmamind.ai/v1/chats/response', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sigmamind.ai/v1/chats/response",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'chatId' => 'chat_nZ9hHYAANJbhLwZv',
'input' => 'Where is my order?'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.sigmamind.ai/v1/chats/response"
payload := strings.NewReader("{\n \"chatId\": \"chat_nZ9hHYAANJbhLwZv\",\n \"input\": \"Where is my order?\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.sigmamind.ai/v1/chats/response")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"chatId\": \"chat_nZ9hHYAANJbhLwZv\",\n \"input\": \"Where is my order?\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sigmamind.ai/v1/chats/response")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"chatId\": \"chat_nZ9hHYAANJbhLwZv\",\n \"input\": \"Where is my order?\"\n}"
response = http.request(request)
puts response.read_body{
"chatId": "chat_d17T6uReChpyfFeP",
"createdAt": "2021-04-20T10:00:00.000Z",
"status": "ended",
"response": [
{
"id": "item_G9YdhDqua0EngI1G",
"role": "assistant",
"type": "message",
"content": [
"Hello! My name is Grace, and I'm calling on behalf of SigmaMind AI. Am I speaking with Michael?"
]
}
],
"agent": {
"name": "New AI Agent",
"agentId": "agent_D5D0p7TUs66TTAEAx",
"status": "Live"
}
}{
"error": "Bad Request",
"message": "Invalid request parameters",
"path": "/v1/chats",
"status": 400,
"timestamp": "2026-05-05T10:06:43.632Z"
}{
"error": "Unauthorized",
"message": "X-API-Key is missing or invalid",
"path": "/v1/chats",
"status": 401,
"timestamp": "2026-05-05T10:06:43.632Z"
}{
"error": "Forbidden",
"message": "Access denied for this resource",
"path": "/v1/chats",
"status": 403,
"timestamp": "2026-05-05T10:06:43.632Z"
}{
"error": "Not Found",
"message": "The requested resource was not found",
"path": "/v1/chats",
"status": 404,
"timestamp": "2026-05-05T10:06:43.632Z"
}{
"error": "Internal Server Error",
"message": "Unexpected server error",
"path": "/v1/chats",
"status": 500,
"timestamp": "2026-05-05T10:06:43.632Z"
}Chat Completion
Submits a new customer message to an in_progress chat session and returns the agent’s reply. The session must be active — calls against an ended session will be rejected. Returns the agent’s response and updated session state.
curl --request POST \
--url https://api.sigmamind.ai/v1/chats/response \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"chatId": "chat_nZ9hHYAANJbhLwZv",
"input": "Where is my order?"
}
'import requests
url = "https://api.sigmamind.ai/v1/chats/response"
payload = {
"chatId": "chat_nZ9hHYAANJbhLwZv",
"input": "Where is my order?"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({chatId: 'chat_nZ9hHYAANJbhLwZv', input: 'Where is my order?'})
};
fetch('https://api.sigmamind.ai/v1/chats/response', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sigmamind.ai/v1/chats/response",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'chatId' => 'chat_nZ9hHYAANJbhLwZv',
'input' => 'Where is my order?'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.sigmamind.ai/v1/chats/response"
payload := strings.NewReader("{\n \"chatId\": \"chat_nZ9hHYAANJbhLwZv\",\n \"input\": \"Where is my order?\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.sigmamind.ai/v1/chats/response")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"chatId\": \"chat_nZ9hHYAANJbhLwZv\",\n \"input\": \"Where is my order?\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sigmamind.ai/v1/chats/response")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"chatId\": \"chat_nZ9hHYAANJbhLwZv\",\n \"input\": \"Where is my order?\"\n}"
response = http.request(request)
puts response.read_body{
"chatId": "chat_d17T6uReChpyfFeP",
"createdAt": "2021-04-20T10:00:00.000Z",
"status": "ended",
"response": [
{
"id": "item_G9YdhDqua0EngI1G",
"role": "assistant",
"type": "message",
"content": [
"Hello! My name is Grace, and I'm calling on behalf of SigmaMind AI. Am I speaking with Michael?"
]
}
],
"agent": {
"name": "New AI Agent",
"agentId": "agent_D5D0p7TUs66TTAEAx",
"status": "Live"
}
}{
"error": "Bad Request",
"message": "Invalid request parameters",
"path": "/v1/chats",
"status": 400,
"timestamp": "2026-05-05T10:06:43.632Z"
}{
"error": "Unauthorized",
"message": "X-API-Key is missing or invalid",
"path": "/v1/chats",
"status": 401,
"timestamp": "2026-05-05T10:06:43.632Z"
}{
"error": "Forbidden",
"message": "Access denied for this resource",
"path": "/v1/chats",
"status": 403,
"timestamp": "2026-05-05T10:06:43.632Z"
}{
"error": "Not Found",
"message": "The requested resource was not found",
"path": "/v1/chats",
"status": 404,
"timestamp": "2026-05-05T10:06:43.632Z"
}{
"error": "Internal Server Error",
"message": "Unexpected server error",
"path": "/v1/chats",
"status": 500,
"timestamp": "2026-05-05T10:06:43.632Z"
}Authorizations
Authenticate every request by passing your API key in the X-API-Key header. To get your key, go to Dashboard → API Keys and create or copy your Production API key.
Body
Response
OK
Unique identity for a chat
"chat_d17T6uReChpyfFeP"
The timestamp when the call record was created.
"2021-04-20T10:00:00.000Z"
Status of the chat
in_progress, ended, error "ended"
Agent response of the last user message
Show child attributes
Show child attributes
[
{
"id": "item_G9YdhDqua0EngI1G",
"role": "assistant",
"type": "message",
"content": [
"Hello! My name is Grace, and I'm calling on behalf of SigmaMind AI. Am I speaking with Michael?"
]
}
]
Agent assigned to handle all calls in this campaign. Contains the agent's ID, name, and current status. All contacts in the campaign's contact list will be called using this agent.
Show child attributes
Show child attributes