Create Assistant
Creates an AI assistant. Pass channel.activate: true to wire it to the org’s WhatsApp / Instagram / Messenger channel in the same call. If another assistant currently owns that channel, it’s automatically detached.
POST/v2.0/assistants
Plan limit
Creation is gated by
max_models. Hitting the limit returns 403 LIMIT_EXCEEDED.Request Body
Required
| Parameter | Type | Description |
|---|---|---|
| name | string | Display name (≤120 chars) |
| provider | string | openai | gemini | groq | anthropic |
| model | string | Must be valid for the chosen provider — see /v2.0/assistants/options |
Channel (optional)
| Parameter | Type | Description |
|---|---|---|
| channel.activate | boolean | When true, resolve and bind a channel from the org |
| channel.platform | string | whatsapp | instagram | messengerDefault: whatsapp |
| channel.brandNumber | string | Optional WhatsApp number disambiguator (only needed if the org has multiple) |
AI configuration
| Parameter | Type | Description |
|---|---|---|
| systemPrompt | string | ≤32000 chars |
| maxTokens | number | 1–8000Default: 250 |
| temperature | number | 0–1Default: 0.7 |
| topP | number | 0–1Default: 1 |
| tools | string[] | Array of tool ObjectId strings |
| voiceEnabled | boolean | Detect voice messages |
| imageEnabled | boolean | Detect/understand images |
| mediaInToolResponses | boolean | Allow tools to return media URLs to the assistant |
| memoryMinutes | number | 0–10080 (1 week). How long the AI remembers the conversationDefault: 60 |
Behavior
| Parameter | Type | Description |
|---|---|---|
| messageDelay | number | 3–60 seconds. Buffer before replyingDefault: 3 |
| typingEnabled | boolean | Show typing indicatorDefault: true |
| sendSeen | boolean | Send read receiptsDefault: true |
| enableCommand | string | Keyword that re-enables the assistant for a contact |
| disableCommand | string | Keyword that disables the assistant for a contact |
| disableDuration | number | Minutes the assistant stays disabled after disableCommandDefault: 30 |
| disableOnInterrupt | boolean | Disable when a human agent jumps into the conversationDefault: true |
| groupChatEnabled | boolean | Reply inside group chats |
| groupActivateOnMention | boolean | In groups, only reply when @mentioned |
Voice (TTS)
| Parameter | Type | Description |
|---|---|---|
| voiceResponseEnabled | boolean | Reply with synthesized voice messages |
| voiceProvider | string | gemini | sarvam | minimax | elevenlabsDefault: gemini |
| voiceModel | string | TTS model — see /v2.0/assistants/optionsDefault: gemini-2.5-flash-preview-tts |
| voiceName | string | Voice character — see /v2.0/assistants/optionsDefault: Zephyr |
| voicePrompt | string | Custom synthesis prompt (style / tone) |
Audience filter
| Parameter | Type | Description |
|---|---|---|
| phoneNumbersList | string[] | Allow / deny list of phone numbers |
| isNumbersExcluded | boolean | true → list is a deny list (default); false → list is an allow listDefault: true |
Safety & cost controls
| Parameter | Type | Description |
|---|---|---|
| promptCacheEnabled | boolean | Opt-in to Gemini context caching (consumed by the AI service). Only takes effect for Gemini AI-Studio models with system prompts of ≥1024 tokens. Off by default — turning it on can dramatically cut input-token cost when the same system prompt is reused.Default: false |
| abuseLimit | object | Per-customer abuse limiter — auto-blocks a chatter that trips ANY of three sliding-window axes (messages / images / tokens). On trip, an AIExclusion row is written and the chatbot.customer_blocked event fires so dashboards / automations can react. Omit the field to leave it disabled. See sub-fields below. |
| abuseLimit.enabled | boolean | Master switch. If the abuseLimit object is sent at all, this defaults to true.Default: true |
| abuseLimit.msgsPerWindow | number | Max inbound messages allowed per sliding window. 0 disables this axis.Default: 25 |
| abuseLimit.msgsWindowSeconds | number | Sliding-window size for the message-count axis (≥1 second).Default: 600 |
| abuseLimit.imagesPerWindow | number | Max image messages per window. 0 disables this axis.Default: 5 |
| abuseLimit.imagesWindowSeconds | number | Sliding-window size for the image-count axis (≥1 second).Default: 300 |
| abuseLimit.tokensPerWindow | number | Max model tokens consumed per window. 0 disables this axis.Default: 50000 |
| abuseLimit.tokensWindowSeconds | number | Sliding-window size for the token-budget axis (≥1 second).Default: 900 |
| abuseLimit.blockMinutes | number | How long the exclusion stays in force once tripped (≥1).Default: 60 |
| abuseLimit.cooldownMessage | string | Optional message sent to the customer when they're blocked. ≤500 chars. Empty string = silent block.Default: "" |
Example
curl -X POST https://api.sendiee.com/v2.0/assistants \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Sales bot",
"description": "Handles inbound product enquiries",
"provider": "openai",
"model": "gpt-4.1",
"systemPrompt": "You are a helpful sales assistant for Acme.",
"memoryMinutes": 120,
"voiceEnabled": true,
"imageEnabled": true,
"channel": { "activate": true, "platform": "whatsapp" }
}'Response
{
"success": true,
"data": {
"modelId": "kQ8z3cR7hV2bWa",
"name": "Sales bot",
"platform": "whatsapp",
"isActive": true,
"isConnected": true,
"channel": {
"platform": "whatsapp",
"phone": "917012345678",
"pageId": null,
"wabaId": "664a...",
"instanceId": null
},
"ai": {
"provider": "openai",
"model": "gpt-4.1",
"maxTokens": 250,
"temperature": 0.7,
"topP": 1,
"systemPrompt": "...",
"promptCacheEnabled": false
},
"safety": {
"abuseLimit": {
"enabled": false,
"msgsPerWindow": 25,
"msgsWindowSeconds": 600,
"imagesPerWindow": 5,
"imagesWindowSeconds": 300,
"tokensPerWindow": 50000,
"tokensWindowSeconds": 900,
"blockMinutes": 60,
"cooldownMessage": ""
}
},
"createdAt": "2026-04-29T05:18:42.000Z"
}
}Validation failure (422)
{
"error": true,
"code": "ASSISTANT_VALIDATION_FAILED",
"message": "Payload failed validation",
"details": [
{
"path": "model",
"code": "MODEL_INVALID_FOR_PROVIDER",
"message": "model \"claude-haiku-4-5-20251001\" is not valid for provider \"openai\". See GET /v2.0/assistants/options for supported values."
},
{
"path": "memoryMinutes",
"code": "MEMORY_MINUTES_INVALID",
"message": "memoryMinutes must be between 0 and 10080 (1 week)"
}
]
}Channel not available (409)
{
"error": true,
"code": "WABA_NOT_FOUND",
"message": "No active WhatsApp Business Account found for this organization"
}