Update embed
PUT
https://app.sulus.ai/api/assistants/{assistantId}/embed
Save the widget configuration
Authentication
Send a bearer token created on your dashboard's Developer page:
Authorization: Bearer <YOUR_API_KEY>
Path parameters
assistantId
string
Required
The assistant's public id (UUID).
Validation:
uuid — the public assistant_idRequest body
embed_config
object
Required
Widget appearance/behaviour settings.
Validation:
required|arrayStored in
assistants.widget_embed_configembed_config.mode
string
Optional
Validation:
sometimes|in:chatStored in
assistants.widget_embed_configErrors
| Status | Meaning | Body |
|---|---|---|
404 |
Assistant not found, or outside your account scope | {"success":false,"message":"Assistant not found"} |
422 |
Validation failed | {"message":"…","errors":{"field":["…"]}} |
401 |
Missing or invalid bearer token | |
403 |
Feature assistants not enabled for the account |
Notes
- `mode` is always forced to `"chat"` on save regardless of what is submitted — it is the only supported widget mode today.
curl --request PUT \
--url https://app.sulus.ai/api/assistants/{assistantId}/embed \
--header 'Authorization: Bearer <YOUR_API_KEY>' \
--header 'Content-Type: application/json' \
--data '{
"embed_config": {
"mode": "chat",
"theme": "light",
"position": "bottom-right",
"size": "full",
"radius": "medium",
"chatStorage": "session",
"chatStorageKey": "",
"baseColor": "#FFFFFF",
"accentColor": "#2563eb",
"baseBgColor": "",
"ctaButtonColor": "#000000",
"ctaButtonTextColor": "#FFFFFF",
"mainLabel": "Chat with Acme Dental",
"ctaTitle": "Need help booking?",
"ctaSubtitle": "We'\''re online now.",
"startButtonText": "Start",
"endButtonText": "End Call",
"emptyChatMessage": "Hi! How can I help you today?",
"chatPlaceholder": "Type your message...",
"firstChatMessage": "",
"chatEndMessage": "",
"emptyVoiceMessage": "",
"emptyVoiceActiveMessage": "",
"emptyHybridMessage": "",
"showTranscript": false,
"requireConsent": true,
"consentTitle": "Before we start",
"termsContent": "Calls and chats may be recorded for quality and training purposes."
}
}'
import requests
url = "https://app.sulus.ai/api/assistants/{assistantId}/embed"
headers = {"Authorization": "Bearer <YOUR_API_KEY>"}
payload = {
"embed_config": {
"mode": "chat",
"theme": "light",
"position": "bottom-right",
"size": "full",
"radius": "medium",
"chatStorage": "session",
"chatStorageKey": "",
"baseColor": "#FFFFFF",
"accentColor": "#2563eb",
"baseBgColor": "",
"ctaButtonColor": "#000000",
"ctaButtonTextColor": "#FFFFFF",
"mainLabel": "Chat with Acme Dental",
"ctaTitle": "Need help booking?",
"ctaSubtitle": "We're online now.",
"startButtonText": "Start",
"endButtonText": "End Call",
"emptyChatMessage": "Hi! How can I help you today?",
"chatPlaceholder": "Type your message...",
"firstChatMessage": "",
"chatEndMessage": "",
"emptyVoiceMessage": "",
"emptyVoiceActiveMessage": "",
"emptyHybridMessage": "",
"showTranscript": false,
"requireConsent": true,
"consentTitle": "Before we start",
"termsContent": "Calls and chats may be recorded for quality and training purposes."
}
}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
url := "https://app.sulus.ai/api/assistants/{assistantId}/embed"
payload := strings.NewReader(`{
"embed_config": {
"mode": "chat",
"theme": "light",
"position": "bottom-right",
"size": "full",
"radius": "medium",
"chatStorage": "session",
"chatStorageKey": "",
"baseColor": "#FFFFFF",
"accentColor": "#2563eb",
"baseBgColor": "",
"ctaButtonColor": "#000000",
"ctaButtonTextColor": "#FFFFFF",
"mainLabel": "Chat with Acme Dental",
"ctaTitle": "Need help booking?",
"ctaSubtitle": "We're online now.",
"startButtonText": "Start",
"endButtonText": "End Call",
"emptyChatMessage": "Hi! How can I help you today?",
"chatPlaceholder": "Type your message...",
"firstChatMessage": "",
"chatEndMessage": "",
"emptyVoiceMessage": "",
"emptyVoiceActiveMessage": "",
"emptyHybridMessage": "",
"showTranscript": false,
"requireConsent": true,
"consentTitle": "Before we start",
"termsContent": "Calls and chats may be recorded for quality and training purposes."
}
}`)
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <YOUR_API_KEY>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}
Response
200
{
"success": true,
"data": {
"assistant_id": "9f8e7d6c-5b4a-4c3d-8e2f-1a2b3c4d5e6f",
"embed_config": {
"mode": "chat",
"theme": "light",
"position": "bottom-right",
"size": "full",
"radius": "medium",
"chatStorage": "session",
"chatStorageKey": "",
"baseColor": "#FFFFFF",
"accentColor": "#2563eb",
"baseBgColor": "",
"ctaButtonColor": "#000000",
"ctaButtonTextColor": "#FFFFFF",
"mainLabel": "Chat with Acme Dental",
"ctaTitle": "Need help booking?",
"ctaSubtitle": "We're online now.",
"startButtonText": "Start",
"endButtonText": "End Call",
"emptyChatMessage": "Hi! How can I help you today?",
"chatPlaceholder": "Type your message...",
"firstChatMessage": "",
"chatEndMessage": "",
"emptyVoiceMessage": "",
"emptyVoiceActiveMessage": "",
"emptyHybridMessage": "",
"showTranscript": false,
"requireConsent": true,
"consentTitle": "Before we start",
"termsContent": "Calls and chats may be recorded for quality and training purposes."
},
"public_key": "pk_live_7f6e5d4c3b2a19081726354453627384",
"embed_html": "<script src=\"https://app.sulus.ai/assets/sulus/widget.umd.js\" async type=\"text/javascript\"></script>\n\n<sulus-widget\n api-url=\"https://app.sulus.ai/api/embed/widget\"\n assistant-id=\"9f8e7d6c-5b4a-4c3d-8e2f-1a2b3c4d5e6f\"\n public-key=\"pk_live_7f6e5d4c3b2a19081726354453627384\"\n mode=\"chat\"\n theme=\"light\"\n position=\"bottom-right\"\n size=\"full\"\n radius=\"medium\"\n base-color=\"#FFFFFF\"\n accent-color=\"#2563eb\"\n cta-button-color=\"#000000\"\n cta-button-text-color=\"#FFFFFF\"\n main-label=\"Chat with Acme Dental\"\n cta-title=\"Need help booking?\"\n cta-subtitle=\"We're online now.\"\n start-button-text=\"Start\"\n end-button-text=\"End Call\"\n empty-chat-message=\"Hi! How can I help you today?\"\n chat-placeholder=\"Type your message...\"\n consent-title=\"Before we start\"\n terms-content=\"Calls and chats may be recorded for quality and training purposes.\"\n require-consent=\"true\"\n></sulus-widget>"
}
}
Response — PUT
/assistants/{assistantId}/embed
200
{
"success": true,
"data": {
"assistant_id": "9f8e7d6c-5b4a-4c3d-8e2f-1a2b3c4d5e6f",
"embed_config": {
"mode": "chat",
"theme": "light",
"position": "bottom-right",
"size": "full",
"radius": "medium",
"chatStorage": "session",
"chatStorageKey": "",
"baseColor": "#FFFFFF",
"accentColor": "#2563eb",
"baseBgColor": "",
"ctaButtonColor": "#000000",
"ctaButtonTextColor": "#FFFFFF",
"mainLabel": "Chat with Acme Dental",
"ctaTitle": "Need help booking?",
"ctaSubtitle": "We're online now.",
"startButtonText": "Start",
"endButtonText": "End Call",
"emptyChatMessage": "Hi! How can I help you today?",
"chatPlaceholder": "Type your message...",
"firstChatMessage": "",
"chatEndMessage": "",
"emptyVoiceMessage": "",
"emptyVoiceActiveMessage": "",
"emptyHybridMessage": "",
"showTranscript": false,
"requireConsent": true,
"consentTitle": "Before we start",
"termsContent": "Calls and chats may be recorded for quality and training purposes."
},
"public_key": "pk_live_7f6e5d4c3b2a19081726354453627384",
"embed_html": "<script src=\"https://app.sulus.ai/assets/sulus/widget.umd.js\" async type=\"text/javascript\"></script>\n\n<sulus-widget\n api-url=\"https://app.sulus.ai/api/embed/widget\"\n assistant-id=\"9f8e7d6c-5b4a-4c3d-8e2f-1a2b3c4d5e6f\"\n public-key=\"pk_live_7f6e5d4c3b2a19081726354453627384\"\n mode=\"chat\"\n theme=\"light\"\n position=\"bottom-right\"\n size=\"full\"\n radius=\"medium\"\n base-color=\"#FFFFFF\"\n accent-color=\"#2563eb\"\n cta-button-color=\"#000000\"\n cta-button-text-color=\"#FFFFFF\"\n main-label=\"Chat with Acme Dental\"\n cta-title=\"Need help booking?\"\n cta-subtitle=\"We're online now.\"\n start-button-text=\"Start\"\n end-button-text=\"End Call\"\n empty-chat-message=\"Hi! How can I help you today?\"\n chat-placeholder=\"Type your message...\"\n consent-title=\"Before we start\"\n terms-content=\"Calls and chats may be recorded for quality and training purposes.\"\n require-consent=\"true\"\n></sulus-widget>"
}
}