PATCH
/
v1
/
webhook
/
{id}
curl --request PATCH \
  --url https://api.sendo.dev/v1/webhook/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "<string>",
  "url": "<string>",
  "eventTypes": [
    "<string>"
  ],
  "numbers": [
    "<string>"
  ]
}'
{
  "success": true,
  "webhook": {
    "id": "d3392dbf-ae4b-43b9-9b50-dcafa5c7h4mn",
    "createdAt": "2023-12-31T03:07:35.826Z",
    "name": "Event Service",
    "url": "https://website.com/webhook",
    "campaignId": "g1tkV7Eq",
    "signature": "aVWS7HTLR9xxMkdE",
    "eventTypes": [
      "message.incoming",
      "message.status"
    ],
    "numbers": [
      "+14159436397"
    ]
  }
}

Parameters

id
string
required

The ID of the webhook to update.

Body

name
string

Updated name for the webhook.

url
string

Updated URL for the webhook.

eventTypes
string[]

The webhook events that you want to receive. Options aremessage.incoming, message.status, or recipient.optout (read more).

numbers
string[]

Array of phone numbers to receive events for in . If none are provided, webhook will default to all numbers assigned to the campaign.

Response

success
boolean

Whether the update succeeded.

webhook
object

The details of the webhook.

{
  "success": true,
  "webhook": {
    "id": "d3392dbf-ae4b-43b9-9b50-dcafa5c7h4mn",
    "createdAt": "2023-12-31T03:07:35.826Z",
    "name": "Event Service",
    "url": "https://website.com/webhook",
    "campaignId": "g1tkV7Eq",
    "signature": "aVWS7HTLR9xxMkdE",
    "eventTypes": [
      "message.incoming",
      "message.status"
    ],
    "numbers": [
      "+14159436397"
    ]
  }
}