PUT
/
webhooks
/
subscriptions
/
{subscriptionId}
/
events
Update Subscription Events
curl --request PUT \
  --url https://api.chat-dash.com/v1/public/webhooks/subscriptions/{subscriptionId}/events \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --data '{
  "add": [
    "call.started"
  ],
  "remove": [
    "call.started"
  ]
}'
{
  "_id": "<string>",
  "clientId": "<string>",
  "agentId": "<string>",
  "webhookUrl": "<string>",
  "events": [
    "call.started"
  ],
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z"
}

Headers

Authorization
string
required

Client-specific API key for authentication

Path Parameters

subscriptionId
string
required

Webhook subscription ID

Body

application/json
add
enum<string>[]
remove
enum<string>[]

Response

200 - application/json

Events updated successfully

_id
string

Unique identifier for the subscription

clientId
string

The client associated with the subscription

agentId
string

The agent associated with the subscription

webhookUrl
string

The URL where event notifications will be sent

events
enum<string>[]

List of events that trigger notifications

createdAt
string<date-time>

When the subscription was created

updatedAt
string<date-time>

When the subscription was last updated