Skip to main content
POST
/
api
/
v2
/
web-widgets
Create Web Widget
curl --request POST \
  --url https://api.voiceaiwrapper.app/api/v2/web-widgets \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "voice_campaign_id": "Vm9pY2VDYW1wYWlnbjoxMjM=",
  "config": {
    "mode": [
      "voice"
    ],
    "theme": "light",
    "position": "bottom-right",
    "title": "AI Assistant",
    "subtitle": "Get instant help from our AI",
    "ctaButtonText": "Start Conversation",
    "accentColor": "#3b82f6",
    "ctaButtonColor": "#3b82f6"
  },
  "voice_assistant_id": "asst_abc123",
  "chat_assistant_id": "asst_chat123"
}
'
{
  "status": "success",
  "message": "Web widget created successfully",
  "data": {
    "web_widget_id": "<string>",
    "voice_campaign_id": "<string>",
    "config": {},
    "created_at": "2023-11-07T05:31:56Z"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Web widget configuration

voice_campaign_id
string
required

Global ID of the inbound voice campaign for this widget. Required.

Example:

"Vm9pY2VDYW1wYWlnbjoxMjM="

config
object
required

Widget appearance and behaviour configuration. Required. All fields inside config are optional and will use defaults if not provided.

Example:
{
"mode": ["voice"],
"theme": "light",
"position": "bottom-right",
"title": "AI Assistant",
"subtitle": "Get instant help from our AI",
"ctaButtonText": "Start Conversation",
"accentColor": "#3b82f6",
"ctaButtonColor": "#3b82f6"
}
voice_assistant_id
string

Provider-native ID of the voice assistant. Required when config.mode includes 'voice'.

Example:

"asst_abc123"

chat_assistant_id
string

Provider-native ID of the chat assistant. Required when config.mode includes 'chat'.

Example:

"asst_chat123"

Response

Web widget created successfully. Returns widget ID, campaign ID, and configuration.

status
string
Example:

"success"

message
string
Example:

"Web widget created successfully"

data
object