SMAO API Documentation
Public APIAssistants

Create an assistant

POST
/assistants

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. To use one of your organization's purchased numbers instead, send its id from GET /phone-numbers as phone_number_id: a number that is not available to your organization returns 404, one taken meanwhile 409. Cross-resource refs (prompt_id, knowledge_group_ids, etc.) are validated to belong to your organization before the assistant is saved.

Authorization

bearerAuth
AuthorizationBearer <token>

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

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/assistants" \  -H "Content-Type: application/json" \  -d '{    "name": "Sarah",    "language": "de",    "voice_id": "cgSgspJ2msm6clMCkdW9",    "company_name": "Example GmbH",    "company_industry": "Logistics",    "introduction": "Hello, how can I help you today?"  }'
{  "data": {    "id": "string",    "name": "string",    "description": "string",    "language": "de",    "voice_id": "string",    "record_call": true,    "speed": 0.7,    "tts_style_level": 0,    "background_ambience": "clean",    "appointment_booking_enabled": true,    "contextual_asr_correction_enabled": true,    "allow_preferred_language": true,    "whitelist": true,    "introduction": "string",    "company_name": "string",    "company_industry": "string",    "phone_number": "string",    "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"    ],    "pre_call_webhook": {      "enabled": true,      "url": "string",      "method": "GET",      "headers": {        "property1": "string",        "property2": "string"      },      "body_template": "string",      "timeout_ms": 500,      "auth": {        "type": "none",        "header_name": "string",        "username": "string"      }    },    "created_at": "2019-08-24T14:15:22Z",    "updated_at": "2019-08-24T14:15:22Z"  }}