Insert excerpt |
---|
| _ExcerptBetaAPI |
---|
| _ExcerptBetaAPI |
---|
nopanel | true |
---|
|
The PATCH /subscriptions/{subscriptionId}
endpoint can be used to update an existing subscription. Panel |
---|
borderColor | #eeeeee |
---|
bgColor | white |
---|
titleColor | white |
---|
borderWidth | 1 |
---|
titleBGColor | #D34204 |
---|
borderStyle | solid |
---|
title | In this page |
---|
|
|
Insert excerpt |
---|
| _ExcerptAPICloudNextGen |
---|
| _ExcerptAPICloudNextGen |
---|
nopanel | true |
---|
|
Header parameters in Requests (Webhooks API) apply to this endpoint.
Authorization scopes required:
Parameters
The endpoint accepts the following path parameter:
subscriptionId
Type | Required | Example |
---|
String | True | 2V1d4FfmK5ho8aiomIwP9QdpQjv |
The unique identifier for the subscription.
Body
Code Block |
---|
|
{
"name": "My app",
"url": "https://your-application.com/abc/123",
"events": [
"agent.presencechanged.v0",
"channel.connected.v0"
],
"enabled": false,
"secret": "OFe4WHqXISxMAgoYneiFhgdGrOgYeToYPN3HjIO4xAxDvWd/oIKTW1P4A6GLXN0McDGlLtnTn1KCGCa+W5Gu="
} |
An object containing the subscription properties to change should be included in the body. It may contain any of the following properties:
name
— The name of the subscription. The name must be unique.url
— The URL that the webhook events are sent to. It must be a fully qualified http or https URL.events
— A list of the event types you wish to receive webhook notifications for. Each item in the list must be the name of an event type. You can get a list of event types to discover their names.enabled
— Notifications will only be sent to the URL if the subscription is enabled.secret
— The secret used to sign notifications.
Any properties not specified will remain unchanged.
Requests
Update the specified subscription
Code Block |
---|
language | powershell |
---|
theme | Midnight |
---|
|
curl -L -X PATCH "https://***.api.newvoicemedia.com/webhooks/subscriptions" \
-H "Authorization: bearer <ACCESS_TOKEN>" \
-H "Accept: application/vnd.newvoicemedia.v1+json" |
Responses
The response returns the new value of the subscription.
Successful response
Success response code and parameters in Requests (Webhooks API) apply to a successful response.
Example response
Code Block |
---|
|
{
"subscriptionId": "2V1EhIxvsBPpnqf6Hqv9mtPZx1a",
"name": "My app",
"url": "https://your-application.com/webhooks/events",
"events": [
"agent.presencechanged.v0",
"channel.alerting.v0"
],
"enabled": false
} |
The response contains the following properties:
Insert excerpt |
---|
| _ExcerptAPISubscriptionWebhooks |
---|
| _ExcerptAPISubscriptionWebhooks |
---|
nopanel | true |
---|
|