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

Request Body

Required

ParameterTypeDescription
namestringDisplay name (≤120 chars)
providerstringopenai | gemini | groq | anthropic
modelstringMust be valid for the chosen provider — see /v2.0/assistants/options

Channel (optional)

ParameterTypeDescription
channel.activatebooleanWhen true, resolve and bind a channel from the org
channel.platformstringwhatsapp | instagram | messengerDefault: whatsapp
channel.brandNumberstringOptional WhatsApp number disambiguator (only needed if the org has multiple)

AI configuration

ParameterTypeDescription
systemPromptstring≤32000 chars
maxTokensnumber1–8000Default: 250
temperaturenumber0–1Default: 0.7
topPnumber0–1Default: 1
toolsstring[]Array of tool ObjectId strings
voiceEnabledbooleanDetect voice messages
imageEnabledbooleanDetect/understand images
mediaInToolResponsesbooleanAllow tools to return media URLs to the assistant
memoryMinutesnumber0–10080 (1 week). How long the AI remembers the conversationDefault: 60

Behavior

ParameterTypeDescription
messageDelaynumber3–60 seconds. Buffer before replyingDefault: 3
typingEnabledbooleanShow typing indicatorDefault: true
sendSeenbooleanSend read receiptsDefault: true
enableCommandstringKeyword that re-enables the assistant for a contact
disableCommandstringKeyword that disables the assistant for a contact
disableDurationnumberMinutes the assistant stays disabled after disableCommandDefault: 30
disableOnInterruptbooleanDisable when a human agent jumps into the conversationDefault: true
groupChatEnabledbooleanReply inside group chats
groupActivateOnMentionbooleanIn groups, only reply when @mentioned

Voice (TTS)

ParameterTypeDescription
voiceResponseEnabledbooleanReply with synthesized voice messages
voiceProviderstringgemini | sarvam | minimax | elevenlabsDefault: gemini
voiceModelstringTTS model — see /v2.0/assistants/optionsDefault: gemini-2.5-flash-preview-tts
voiceNamestringVoice character — see /v2.0/assistants/optionsDefault: Zephyr
voicePromptstringCustom synthesis prompt (style / tone)

Audience filter

ParameterTypeDescription
phoneNumbersListstring[]Allow / deny list of phone numbers
isNumbersExcludedbooleantrue → list is a deny list (default); false → list is an allow listDefault: true

Safety & cost controls

ParameterTypeDescription
promptCacheEnabledbooleanOpt-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
abuseLimitobjectPer-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.enabledbooleanMaster switch. If the abuseLimit object is sent at all, this defaults to true.Default: true
abuseLimit.msgsPerWindownumberMax inbound messages allowed per sliding window. 0 disables this axis.Default: 25
abuseLimit.msgsWindowSecondsnumberSliding-window size for the message-count axis (≥1 second).Default: 600
abuseLimit.imagesPerWindownumberMax image messages per window. 0 disables this axis.Default: 5
abuseLimit.imagesWindowSecondsnumberSliding-window size for the image-count axis (≥1 second).Default: 300
abuseLimit.tokensPerWindownumberMax model tokens consumed per window. 0 disables this axis.Default: 50000
abuseLimit.tokensWindowSecondsnumberSliding-window size for the token-budget axis (≥1 second).Default: 900
abuseLimit.blockMinutesnumberHow long the exclusion stays in force once tripped (≥1).Default: 60
abuseLimit.cooldownMessagestringOptional 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"
}