Skip to main content
PUT
/
api
/
v1
/
web-integrations
Update configuration of an existing web integration
const options = {
  method: 'PUT',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: JSON.stringify({
    agentId: '<string>',
    name: '<string>',
    enabled: true,
    features: [{name: 'AllowWebCall', 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));
{
  "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>"
  ]
}

Query Parameters

integrationId
string

UUID of the integration to update

Body

Partial integration data with fields to update

agentId
string
required
Minimum string length: 1
name
string
required
Required string length: 1 - 100
enabled
boolean
required
features
object[]
required
widgetAppearance
object
required
description
string | null
Maximum string length: 500
origins
string[] | null
tools
string[] | null

Response

Returns the updated integration

agentId
string
required
Minimum string length: 1
name
string
required
Required string length: 1 - 100
enabled
boolean
required
features
object[]
required
widgetAppearance
object
required
integrationId
string
required
Minimum string length: 1
orgId
string
required
Minimum string length: 1
createdTime
string<date-time>
required
lastUpdateTime
string<date-time>
required
tokens
object[]
required
description
string | null
Maximum string length: 500
origins
string[] | null
tools
string[] | null