SMAO API Documentation
Public APIAssistants

Create an assistant

Creates a new assistant and provisions a phone number for it. The phone_number field on the response is assigned by the platform — callers cannot set or change it via this API. Cross-resource refs (prompt_id, knowledge_group_ids, etc.) are validated to belong to your organization before the assistant is saved.

POST
/assistants
AuthorizationBearer <token>

API key in the Authorization: Bearer <key> header. Keys are created in the SMAO dashboard (Settings → API Keys).

In: header

namestring
Length1 <= length <= 100
description?string
Default""
Lengthlength <= 500
languagestring

BCP-47-ish language code from the platform-supported list.

Value in"de" | "en" | "fr" | "it" | "de-CH" | "es" | "pt" | "tr" | "sv" | "fi"
voice_idstring

Voice provider voice ID. Must be one of the platform-supported values; the full list is available via the dashboard. Sending an unknown ID returns 400.

company_namestring
Length1 <= length <= 200
company_industrystring
Length1 <= length <= 200
introductionstring
Length1 <= length <= 5000
record_call?boolean
pickup_delay?integer
Range0 <= value <= 5
speed?number

Voice playback rate multiplier. Some voices only support 0.8–1.2; out-of-range values for such voices return 400.

Range0.7 <= value <= 1.2
tts_style?string

Voice style. Omit to use natural.

Value in"consistent" | "natural" | "expressive"
background_ambience?string

Background ambience bed mixed under the assistant voice during phone calls. Omit to use clean (no bed).

Value in"clean" | "office"
interruptable?boolean
appointment_booking_enabled?boolean
allow_preferred_language?boolean
whitelist?boolean
prompt_id?string|null
Match^[a-f0-9]{24}$
email_prompt_id?string|null
Match^[a-f0-9]{24}$
knowledge_group_ids?array<string>
Default[]
glossary_group_ids?array<string>
Default[]
pronunciation_group_ids?array<string>
Default[]
forwarding_group_ids?array<string>
Default[]
contact_group_ids?array<string>
Default[]
calendar_ids?array<string>
Default[]
Itemsitems <= 1
tool_ids?array<string>
Default[]
analysis_ids?array<string>
Default[]

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://api.smao.ai/api/v1/assistants" \  -H "Content-Type: application/json" \  -d '{    "name": "string",    "language": "de",    "voice_id": "string",    "company_name": "string",    "company_industry": "string",    "introduction": "string"  }'
{
  "data": {
    "id": "65f8fa6f1a9d8e0012ab34cd",
    "name": "Sarah",
    "description": "Receptionist assistant for inbound calls.",
    "language": "de",
    "voice_id": "cgSgspJ2msm6clMCkdW9",
    "record_call": true,
    "pickup_delay": 5,
    "speed": 0.7,
    "tts_style": "consistent",
    "background_ambience": "clean",
    "interruptable": true,
    "appointment_booking_enabled": true,
    "allow_preferred_language": true,
    "whitelist": true,
    "introduction": "string",
    "company_name": "string",
    "company_industry": "string",
    "phone_number": "+491701234567",
    "carrier": "string",
    "prompt_id": "string",
    "email_prompt_id": "string",
    "knowledge_group_ids": [
      "string"
    ],
    "glossary_group_ids": [
      "string"
    ],
    "pronunciation_group_ids": [
      "string"
    ],
    "forwarding_group_ids": [
      "string"
    ],
    "contact_group_ids": [
      "string"
    ],
    "calendar_ids": [
      "string"
    ],
    "tool_ids": [
      "string"
    ],
    "analysis_ids": [
      "string"
    ],
    "created_at": "2019-08-24T14:15:22Z",
    "updated_at": "2019-08-24T14:15:22Z"
  }
}
{
  "error": {
    "code": "validation_failed",
    "message": "Validation failed"
  }
}
{
  "error": {
    "code": "unauthorized",
    "message": "Missing API key"
  }
}
{
  "error": {
    "code": "subscription_required",
    "message": "This feature is not available in your current subscription. Please upgrade to a higher plan"
  }
}
{
  "error": {
    "code": "forbidden",
    "message": "No permission"
  }
}
{
  "error": {
    "code": "not_found",
    "message": "Not found"
  }
}
{
  "error": {
    "code": "conflict",
    "message": "Group is assigned to an assistant"
  }
}
{
  "error": {
    "code": "rate_limit_exceeded",
    "message": "Rate limit exceeded"
  }
}
{
  "error": {
    "code": "internal_error",
    "message": "An unexpected error occurred."
  }
}