curl --request POST \
--url https://api.upon-ai.com/api/chat-agents \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"workspaceId": 42,
"agent_name": "Website Concierge",
"response_engine": {
"type": "uponai-llm",
"llm_id": "llm_1ab234cde567fgh"
},
"auto_close_message": "Thanks for chatting with UponAI.",
"end_chat_after_silence_ms": 600000,
"webhook_url": "https://example.com/hooks/chat-events",
"webhook_events": [
"chat_started",
"chat_ended",
"chat_analyzed"
],
"timezone": "America/New_York",
"is_public": true,
"data_storage_setting": "everything_except_pii",
"data_storage_retention_days": 30,
"post_chat_analysis_model": "gpt-4.1-mini",
"post_chat_analysis_data": [
{
"type": "chat_summary",
"name": "summary",
"description": "Short summary of the completed chat."
}
],
"uponai_dynamic_variables": {
"customer_tier": "enterprise"
}
}
'