const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
agentId: '<string>',
name: '<string>',
enabled: true,
features: [{enabled: true}],
widgetAppearance: {theme: '<string>', position: '<string>', colors: {}, customStyles: {}},
description: '<string>',
origins: ['<string>'],
tools: ['<string>']
})
};
fetch('https://blackbox.dasha.ai/api/v1/web-integrations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request PUT \
--url https://blackbox.dasha.ai/api/v1/web-integrations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"agentId": "<string>",
"name": "<string>",
"enabled": true,
"features": [
{
"enabled": true
}
],
"widgetAppearance": {
"theme": "<string>",
"position": "<string>",
"colors": {},
"customStyles": {}
},
"description": "<string>",
"origins": [
"<string>"
],
"tools": [
"<string>"
]
}
'import requests
url = "https://blackbox.dasha.ai/api/v1/web-integrations"
payload = {
"agentId": "<string>",
"name": "<string>",
"enabled": True,
"features": [{ "enabled": True }],
"widgetAppearance": {
"theme": "<string>",
"position": "<string>",
"colors": {},
"customStyles": {}
},
"description": "<string>",
"origins": ["<string>"],
"tools": ["<string>"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text){
"agentId": "<string>",
"name": "<string>",
"enabled": true,
"features": [
{
"name": "AllowWebCall",
"enabled": true
}
],
"widgetAppearance": {
"theme": "<string>",
"position": "<string>",
"colors": {},
"customStyles": {}
},
"integrationId": "<string>",
"orgId": "<string>",
"createdTime": "2023-11-07T05:31:56Z",
"lastUpdateTime": "2023-11-07T05:31:56Z",
"tokens": [
{
"tokenId": "<string>",
"name": "<string>",
"token": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"expiresAt": "2023-11-07T05:31:56Z",
"lastUsedAt": "2023-11-07T05:31:56Z"
}
],
"description": "<string>",
"origins": [
"<string>"
],
"tools": [
"<string>"
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "error",
"message": "<string>"
}Update web integration
Updates an existing web integration configuration including features, origins, and settings.
const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
agentId: '<string>',
name: '<string>',
enabled: true,
features: [{enabled: true}],
widgetAppearance: {theme: '<string>', position: '<string>', colors: {}, customStyles: {}},
description: '<string>',
origins: ['<string>'],
tools: ['<string>']
})
};
fetch('https://blackbox.dasha.ai/api/v1/web-integrations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request PUT \
--url https://blackbox.dasha.ai/api/v1/web-integrations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"agentId": "<string>",
"name": "<string>",
"enabled": true,
"features": [
{
"enabled": true
}
],
"widgetAppearance": {
"theme": "<string>",
"position": "<string>",
"colors": {},
"customStyles": {}
},
"description": "<string>",
"origins": [
"<string>"
],
"tools": [
"<string>"
]
}
'import requests
url = "https://blackbox.dasha.ai/api/v1/web-integrations"
payload = {
"agentId": "<string>",
"name": "<string>",
"enabled": True,
"features": [{ "enabled": True }],
"widgetAppearance": {
"theme": "<string>",
"position": "<string>",
"colors": {},
"customStyles": {}
},
"description": "<string>",
"origins": ["<string>"],
"tools": ["<string>"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text){
"agentId": "<string>",
"name": "<string>",
"enabled": true,
"features": [
{
"name": "AllowWebCall",
"enabled": true
}
],
"widgetAppearance": {
"theme": "<string>",
"position": "<string>",
"colors": {},
"customStyles": {}
},
"integrationId": "<string>",
"orgId": "<string>",
"createdTime": "2023-11-07T05:31:56Z",
"lastUpdateTime": "2023-11-07T05:31:56Z",
"tokens": [
{
"tokenId": "<string>",
"name": "<string>",
"token": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"expiresAt": "2023-11-07T05:31:56Z",
"lastUsedAt": "2023-11-07T05:31:56Z"
}
],
"description": "<string>",
"origins": [
"<string>"
],
"tools": [
"<string>"
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "error",
"message": "<string>"
}Body
Updated configuration
Web integration configuration for embedding agents in websites and applications
Allowed origins for CORS security. Controls which websites can access this integration. If empty or null, all origins are allowed. Supported formats: "" (all origins), full HTTP/HTTPS URLs ("https://example.com", "http://localhost:3000"), wildcard subdomains (".example.com"), or domain names ("example.com"). Ports can only be specified in full URLs, not with domain names or wildcards.
Tool names that should be executed via websocket by the client. When the agent needs to use these tools during a conversation, it sends a websocketToolRequest message to the client, and the client must execute the tool and return the result via websocketToolResponse. If not specified, all tools are executed server-side.
Response
Web integration updated successfully
Web integration response including all configuration and metadata
Allowed origins for CORS security. Controls which websites can access this integration. If empty or null, all origins are allowed. Supported formats: "" (all origins), full HTTP/HTTPS URLs ("https://example.com", "http://localhost:3000"), wildcard subdomains (".example.com"), or domain names ("example.com"). Ports can only be specified in full URLs, not with domain names or wildcards.
Tool names that should be executed via websocket by the client. When the agent needs to use these tools during a conversation, it sends a websocketToolRequest message to the client, and the client must execute the tool and return the result via websocketToolResponse. If not specified, all tools are executed server-side.
Was this page helpful?