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·

required
application/json
  • Properties: 1
  • Properties: 1
  • The instructions the agent follows for each chat. Use $name or ${name} to insert a top-level input property. Declare every placeholder in input_schema.properties. Supply every referenced value in the chat's inputs, even if the schema does not require it. Use $$ for a literal dollar sign. Nested property paths are not supported.

  • HTTPS 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.

Responses

  • application/json
  • application/json
Request Example for post/v1/chat-agents
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"
}