Create a chat history entry
Save chat history items of a Replica belonging to the logged in user.
Headers
-
X-API-Version
string Default value is
2025-03-25
.
Path parameters
-
replicaUUID
string(uuid) Required The UUID of the Replica
Body
-
content
string Required Content of the message
Minimum length is
1
. -
source
string The place where the conversation is happening, which informs where the message should be saved in the chat history.
Values are
discord
,telegram
,embed
,web
, ortelegram_autopilot
. -
discord_data
object Discord information about the message
Additional properties are NOT allowed.
POST
/v1/replicas/{replicaUUID}/chat/history
curl \
--request POST 'https://api.sensay.io/v1/replicas/03db5651-cb61-4bdf-9ef0-89561f7c9c53/chat/history' \
--header "X-ORGANIZATION-SECRET: $API_KEY" \
--header "X-USER-ID: $API_KEY" \
--header "Content-Type: application/json" \
--header "X-API-Version: 2025-03-25" \
--data '{"content":"How did you handle the immense pressure during the Civil War?","source":"discord","discord_data":{"channel_id":"string","channel_name":"string","author_id":"string","author_name":"string","message_id":"string","created_at":"string","server_id":"string","server_name":"string"}}'
Request examples
# Headers
X-API-Version: 2025-03-25
# Payload
{
"content": "How did you handle the immense pressure during the Civil War?",
"source": "discord",
"discord_data": {
"channel_id": "string",
"channel_name": "string",
"author_id": "string",
"author_name": "string",
"message_id": "string",
"created_at": "string",
"server_id": "string",
"server_name": "string"
}
}
Response examples (200)
{
"success": true
}