Create a Chat Agent
Saves the instructions and settings a text conversation should follow. A new Chat Agent may need review before it can run production chats; the response review_status reports whether it is approved or pending review.
Body·
- Type: stringanalysis
_prompt required - Properties: 1Type:analysis
_schema required - Properties: 1Type:input
_schema required - Type: stringinstructionsrequired
The instructions the agent follows for each chat. Use
$nameor${name}to insert a top-level input property. Declare every placeholder ininput_schema.properties. Supply every referenced value in the chat'sinputs, even if the schema does not require it. Use$$for a literal dollar sign. Nested property paths are not supported. - Type: stringnamemin length:1required
- Type: stringchat
_ended _webhook _url min length:1Format: urinullableHTTPS URL Resia POSTs a chat.ended event to each time a chat this Chat Agent runs reaches a terminal status. The body is a JSON WebhookEvent: {"type": "chat.ended", "chat": ...}, where chat is the same ChatDetail that GET /v1/chats/{chat_id} returns. Resia makes one immediate attempt when the chat ends and retries a failed delivery on a fixed schedule; any 2xx response is success. The chat's id repeats unchanged across retries, so treat a repeated chat.id as a duplicate. Treat the complete URL as a credential: delivery authenticity is HTTPS plus URL secrecy. Null clears the webhook and stops pending deliveries.
- Type: stringdescriptionmin length:1max length:280nullable
Responses
- application/json
- application/json
curl /v1/chat-agents \
--request POST \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
--data '{
"name": "",
"description": "",
"chat_ended_webhook_url": "",
"instructions": "",
"input_schema": {
"additionalProperty": "anything"
},
"analysis_prompt": "",
"analysis_schema": {
"additionalProperty": "anything"
}
}'
{
"name": "string",
"description": "string",
"chat_ended_webhook_url": "https://example.com",
"instructions": "string",
"input_schema": {
"additionalProperty": "anything"
},
"analysis_prompt": "string",
"analysis_schema": {
"additionalProperty": "anything"
},
"id": "string",
"review_status": "pending_review",
"is_active": true,
"created_at": "2026-09-24T21:09:12.206Z",
"submitted_at": "2026-09-24T21:09:12.206Z",
"active_updated_at": "2026-09-24T21:09:12.206Z",
"archived_at": "2026-09-24T21:09:12.206Z"
}
