Skip to main content
POST
https://prod-contactswing-fastapi-962560522883.us-central1.run.app
/
v2
/
new_assistants
Create Voice Assistant
curl --request POST \
  --url https://prod-contactswing-fastapi-962560522883.us-central1.run.app/v2/new_assistants \
  --header 'Authorization: <authorization>'
{
  "ctx_id": "<string>",
  "data": {
    "assistant_id": "<string>",
    "name": "<string>"
  }
}

Authorizations

Authorization
string
required
Enter your ContactSwing JWT Bearer token.

Query Parameters

force
boolean
Force recreate (overwrite existing). Example: true

Request Body

name
string
required
Assistant display name. Example: "My Voice AI Agent"
type
string
required
Assistant type: "VOICE_INCOMING"
model
string
required
LLM model: "cw-llm-1"
api_keys
array
required
API key configuration [{"api_key_id":442,"type":"MODEL"}]
instructions
string
required
Detailed agent instructions and guidelines
prompts
object
Agent prompts with agent and goal fields
phone_number
string
Assigned phone number. Example: "+13465507166"
kb_id
string
Knowledge base ID

Voice & Behavior Settings

synthesizer
string
TTS: "AZURE"
voice_id
string
Voice: "en-US-BrianNeural"
language
string
Language: "english"
behaviour.speed
string
Speech speed: "medium"
action_ids
array
Linked action IDs []

Response

201 Created - Assistant created successfully
ctx_id
string
Request context ID
data
object
assistant_id
string
New assistant ID
name
string
Assistant name
400 Bad Request - Invalid configuration or missing API keys 401 Unauthorized - Invalid token