Voiceflow bearer token
curl --request PATCH \
--url https://realtime-api.voiceflow.com/v1/stable/widget \
--header 'Authorization: Bearer <token>'
--header 'Content-Type: application/json' \
--data '{
"type": "chat",
"chat": {
"renderMode": "<WidgetSettingsChatRenderMode>",
"headerImage": "<WidgetSettingsChatSettingsHeaderImage>",
"agentImage": "<WidgetSettingsChatSettingsAgentImage>",
"banner": "<WidgetSettingsChatSettingsBanner>",
"placeholderText": "<string>",
"disclaimer": "<WidgetSettingsChatDisclaimer>",
"aiDisclaimer": "<WidgetSettingsChatSettingsAIDisclaimer>",
"handoffToAgentImageURL": "<string>",
"streamingDisabled": true,
"responseLoader": "<WidgetSettingsChatSettingsResponseLoader>",
"voiceInput": true,
"voiceOutput": true,
"voiceOutputMuted": true,
"voiceMode": true,
"notificationSound": true,
"fileUpload": "<WidgetSettingsChatSettingsFileUpload>",
"csat": "<WidgetSettingsChatSettingsCSAT>"
},
"voice": {
"renderMode": "<WidgetSettingsVoiceRenderMode>",
"content": "<WidgetSettingsVoiceSettingsContent>"
},
"common": {
"sideSpacing": "<string>",
"bottomSpacing": "<string>",
"width": "<string>",
"position": "<WidgetSettingsWidgetPosition>",
"fontFamily": "<string>",
"primaryColor": {
"color": "<string>",
"palette": "<WidgetSettingsColorPalette>"
},
"poweredBy": true,
"launcher": "<WidgetSettingsCommonSettingsLauncher>",
"footerLink": "<WidgetSettingsCommonSettingsFooterLink>",
"persistence": "<WidgetSettingsChatPersistence>",
"featureFlags": "<WidgetSettingsCommonSettingsFeatureFlags>"
},
"security": {
"approvedDomains": "<WidgetSettingsSecuritySettingsApprovedDomains>",
"disableTranscript": true,
"isTranscriptDownloadEnabled": true
}
}'const response = await fetch('https://realtime-api.voiceflow.com/v1/stable/widget?projectID=<projectID>&environmentAlias=<environmentAlias>', {
method: 'PATCH',
headers: {
Authorization: 'Bearer <token>',
'Content-Type': 'application/json',
},
body: JSON.stringify({
"type": "chat",
"chat": {
"renderMode": "<WidgetSettingsChatRenderMode>",
"headerImage": "<WidgetSettingsChatSettingsHeaderImage>",
"agentImage": "<WidgetSettingsChatSettingsAgentImage>",
"banner": "<WidgetSettingsChatSettingsBanner>",
"placeholderText": "<string>",
"disclaimer": "<WidgetSettingsChatDisclaimer>",
"aiDisclaimer": "<WidgetSettingsChatSettingsAIDisclaimer>",
"handoffToAgentImageURL": "<string>",
"streamingDisabled": true,
"responseLoader": "<WidgetSettingsChatSettingsResponseLoader>",
"voiceInput": true,
"voiceOutput": true,
"voiceOutputMuted": true,
"voiceMode": true,
"notificationSound": true,
"fileUpload": "<WidgetSettingsChatSettingsFileUpload>",
"csat": "<WidgetSettingsChatSettingsCSAT>"
},
"voice": {
"renderMode": "<WidgetSettingsVoiceRenderMode>",
"content": "<WidgetSettingsVoiceSettingsContent>"
},
"common": {
"sideSpacing": "<string>",
"bottomSpacing": "<string>",
"width": "<string>",
"position": "<WidgetSettingsWidgetPosition>",
"fontFamily": "<string>",
"primaryColor": {
"color": "<string>",
"palette": "<WidgetSettingsColorPalette>"
},
"poweredBy": true,
"launcher": "<WidgetSettingsCommonSettingsLauncher>",
"footerLink": "<WidgetSettingsCommonSettingsFooterLink>",
"persistence": "<WidgetSettingsChatPersistence>",
"featureFlags": "<WidgetSettingsCommonSettingsFeatureFlags>"
},
"security": {
"approvedDomains": "<WidgetSettingsSecuritySettingsApprovedDomains>",
"disableTranscript": true,
"isTranscriptDownloadEnabled": true
}
}),
});
const data = await response.json();import requests
response = requests.patch(
'https://realtime-api.voiceflow.com/v1/stable/widget?projectID=<projectID>&environmentAlias=<environmentAlias>',
headers={'Authorization': 'Bearer <token>'},
json={
"type": "chat",
"chat": {
"renderMode": "<WidgetSettingsChatRenderMode>",
"headerImage": "<WidgetSettingsChatSettingsHeaderImage>",
"agentImage": "<WidgetSettingsChatSettingsAgentImage>",
"banner": "<WidgetSettingsChatSettingsBanner>",
"placeholderText": "<string>",
"disclaimer": "<WidgetSettingsChatDisclaimer>",
"aiDisclaimer": "<WidgetSettingsChatSettingsAIDisclaimer>",
"handoffToAgentImageURL": "<string>",
"streamingDisabled": True,
"responseLoader": "<WidgetSettingsChatSettingsResponseLoader>",
"voiceInput": True,
"voiceOutput": True,
"voiceOutputMuted": True,
"voiceMode": True,
"notificationSound": True,
"fileUpload": "<WidgetSettingsChatSettingsFileUpload>",
"csat": "<WidgetSettingsChatSettingsCSAT>"
},
"voice": {
"renderMode": "<WidgetSettingsVoiceRenderMode>",
"content": "<WidgetSettingsVoiceSettingsContent>"
},
"common": {
"sideSpacing": "<string>",
"bottomSpacing": "<string>",
"width": "<string>",
"position": "<WidgetSettingsWidgetPosition>",
"fontFamily": "<string>",
"primaryColor": {
"color": "<string>",
"palette": "<WidgetSettingsColorPalette>"
},
"poweredBy": True,
"launcher": "<WidgetSettingsCommonSettingsLauncher>",
"footerLink": "<WidgetSettingsCommonSettingsFooterLink>",
"persistence": "<WidgetSettingsChatPersistence>",
"featureFlags": "<WidgetSettingsCommonSettingsFeatureFlags>"
},
"security": {
"approvedDomains": "<WidgetSettingsSecuritySettingsApprovedDomains>",
"disableTranscript": True,
"isTranscriptDownloadEnabled": True
}
},
)
data = response.json()vf widget update --project-id <projectID> --environment-alias <environmentAlias> \
< body.json{
"message": "<string>"
}Update widget
Changes the widget configuration on the environment’s draft version, such as its surface, colors, launcher, disclaimers, or approved domains. The change reaches visitors once the environment is published.
Paste in your agent
1. Set up Voiceflow by following https://www.voiceflow.com/agents/setup 2. Read https://www.voiceflow.com/docs/api-reference/widget/update-widget.md — the Voiceflow documentation page "Update widget". Use it to help me with this part of Voiceflow and answer my questions. Refer to https://www.voiceflow.com/docs/llms.txt if you need related documentation.
curl --request PATCH \
--url https://realtime-api.voiceflow.com/v1/stable/widget \
--header 'Authorization: Bearer <token>'
--header 'Content-Type: application/json' \
--data '{
"type": "chat",
"chat": {
"renderMode": "<WidgetSettingsChatRenderMode>",
"headerImage": "<WidgetSettingsChatSettingsHeaderImage>",
"agentImage": "<WidgetSettingsChatSettingsAgentImage>",
"banner": "<WidgetSettingsChatSettingsBanner>",
"placeholderText": "<string>",
"disclaimer": "<WidgetSettingsChatDisclaimer>",
"aiDisclaimer": "<WidgetSettingsChatSettingsAIDisclaimer>",
"handoffToAgentImageURL": "<string>",
"streamingDisabled": true,
"responseLoader": "<WidgetSettingsChatSettingsResponseLoader>",
"voiceInput": true,
"voiceOutput": true,
"voiceOutputMuted": true,
"voiceMode": true,
"notificationSound": true,
"fileUpload": "<WidgetSettingsChatSettingsFileUpload>",
"csat": "<WidgetSettingsChatSettingsCSAT>"
},
"voice": {
"renderMode": "<WidgetSettingsVoiceRenderMode>",
"content": "<WidgetSettingsVoiceSettingsContent>"
},
"common": {
"sideSpacing": "<string>",
"bottomSpacing": "<string>",
"width": "<string>",
"position": "<WidgetSettingsWidgetPosition>",
"fontFamily": "<string>",
"primaryColor": {
"color": "<string>",
"palette": "<WidgetSettingsColorPalette>"
},
"poweredBy": true,
"launcher": "<WidgetSettingsCommonSettingsLauncher>",
"footerLink": "<WidgetSettingsCommonSettingsFooterLink>",
"persistence": "<WidgetSettingsChatPersistence>",
"featureFlags": "<WidgetSettingsCommonSettingsFeatureFlags>"
},
"security": {
"approvedDomains": "<WidgetSettingsSecuritySettingsApprovedDomains>",
"disableTranscript": true,
"isTranscriptDownloadEnabled": true
}
}'const response = await fetch('https://realtime-api.voiceflow.com/v1/stable/widget?projectID=<projectID>&environmentAlias=<environmentAlias>', {
method: 'PATCH',
headers: {
Authorization: 'Bearer <token>',
'Content-Type': 'application/json',
},
body: JSON.stringify({
"type": "chat",
"chat": {
"renderMode": "<WidgetSettingsChatRenderMode>",
"headerImage": "<WidgetSettingsChatSettingsHeaderImage>",
"agentImage": "<WidgetSettingsChatSettingsAgentImage>",
"banner": "<WidgetSettingsChatSettingsBanner>",
"placeholderText": "<string>",
"disclaimer": "<WidgetSettingsChatDisclaimer>",
"aiDisclaimer": "<WidgetSettingsChatSettingsAIDisclaimer>",
"handoffToAgentImageURL": "<string>",
"streamingDisabled": true,
"responseLoader": "<WidgetSettingsChatSettingsResponseLoader>",
"voiceInput": true,
"voiceOutput": true,
"voiceOutputMuted": true,
"voiceMode": true,
"notificationSound": true,
"fileUpload": "<WidgetSettingsChatSettingsFileUpload>",
"csat": "<WidgetSettingsChatSettingsCSAT>"
},
"voice": {
"renderMode": "<WidgetSettingsVoiceRenderMode>",
"content": "<WidgetSettingsVoiceSettingsContent>"
},
"common": {
"sideSpacing": "<string>",
"bottomSpacing": "<string>",
"width": "<string>",
"position": "<WidgetSettingsWidgetPosition>",
"fontFamily": "<string>",
"primaryColor": {
"color": "<string>",
"palette": "<WidgetSettingsColorPalette>"
},
"poweredBy": true,
"launcher": "<WidgetSettingsCommonSettingsLauncher>",
"footerLink": "<WidgetSettingsCommonSettingsFooterLink>",
"persistence": "<WidgetSettingsChatPersistence>",
"featureFlags": "<WidgetSettingsCommonSettingsFeatureFlags>"
},
"security": {
"approvedDomains": "<WidgetSettingsSecuritySettingsApprovedDomains>",
"disableTranscript": true,
"isTranscriptDownloadEnabled": true
}
}),
});
const data = await response.json();import requests
response = requests.patch(
'https://realtime-api.voiceflow.com/v1/stable/widget?projectID=<projectID>&environmentAlias=<environmentAlias>',
headers={'Authorization': 'Bearer <token>'},
json={
"type": "chat",
"chat": {
"renderMode": "<WidgetSettingsChatRenderMode>",
"headerImage": "<WidgetSettingsChatSettingsHeaderImage>",
"agentImage": "<WidgetSettingsChatSettingsAgentImage>",
"banner": "<WidgetSettingsChatSettingsBanner>",
"placeholderText": "<string>",
"disclaimer": "<WidgetSettingsChatDisclaimer>",
"aiDisclaimer": "<WidgetSettingsChatSettingsAIDisclaimer>",
"handoffToAgentImageURL": "<string>",
"streamingDisabled": True,
"responseLoader": "<WidgetSettingsChatSettingsResponseLoader>",
"voiceInput": True,
"voiceOutput": True,
"voiceOutputMuted": True,
"voiceMode": True,
"notificationSound": True,
"fileUpload": "<WidgetSettingsChatSettingsFileUpload>",
"csat": "<WidgetSettingsChatSettingsCSAT>"
},
"voice": {
"renderMode": "<WidgetSettingsVoiceRenderMode>",
"content": "<WidgetSettingsVoiceSettingsContent>"
},
"common": {
"sideSpacing": "<string>",
"bottomSpacing": "<string>",
"width": "<string>",
"position": "<WidgetSettingsWidgetPosition>",
"fontFamily": "<string>",
"primaryColor": {
"color": "<string>",
"palette": "<WidgetSettingsColorPalette>"
},
"poweredBy": True,
"launcher": "<WidgetSettingsCommonSettingsLauncher>",
"footerLink": "<WidgetSettingsCommonSettingsFooterLink>",
"persistence": "<WidgetSettingsChatPersistence>",
"featureFlags": "<WidgetSettingsCommonSettingsFeatureFlags>"
},
"security": {
"approvedDomains": "<WidgetSettingsSecuritySettingsApprovedDomains>",
"disableTranscript": True,
"isTranscriptDownloadEnabled": True
}
},
)
data = response.json()vf widget update --project-id <projectID> --environment-alias <environmentAlias> \
< body.json{
"message": "<string>"
}Authorizations
Query Parameters
Body
Chat-surface fields to change, merged one level deep into the stored chat block: what you send replaces its stored counterpart and everything else is kept. A nested object (banner, headerImage, disclaimer, csat, …) replaces the stored one outright, so send it complete. placeholderText and aiDisclaimer need the Webchat Premium entitlement and disclaimer the widget-security one: without it the whole request is refused with 403 and nothing is written, including the other fields sent alongside it.
Show child attributes
Voice-surface fields to change, merged one level deep into the stored voice block. content is a nested object: it replaces the stored one outright, so send every line of call-screen copy, not just the one you are changing.
Shared-chrome fields to change, merged one level deep into the stored common block. A nested object (launcher, footerLink) replaces the stored one outright, so send it complete. primaryColor is the exception and merges too: send color on its own to recolor the widget and the shade palette is regenerated from it, send palette on its own to hand-tune the shades against the stored color, or send both together. poweredBy, fontFamily, footerLink and primaryColor.palette need the Webchat Premium entitlement — primaryColor.color on its own does not — and without it the whole request is refused with 403 and nothing is written, including the other fields sent alongside it.
Show child attributes
Show child attributes
The ten shades derived from color, keyed 50 through 900. Send it to override the generated shades — that is the part which needs the Webchat Premium entitlement. Omit it to have it regenerated from color.
Replaces the stored security block in full — unlike the other blocks it has no partial form. Requires a plan entitlement: without one the whole request is refused with 403 and nothing is written, including the other fields sent alongside it.
Was this page helpful?
Thanks for your feedback.