Skip to main content
PUT
/
webhooks
/
{sid}
Update a webhook
curl --request PUT \
  --url https://api.voice-mate.com/v1/webhooks/{sid} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "url": "<string>",
  "call_started_event": true,
  "call_ended_event": true,
  "phone_number_id": "<string>",
  "api_key_id": "<string>"
}'
{
  "status": "success",
  "webhook": {
    "sid": "<string>",
    "url": "<string>",
    "call_started_event": true,
    "call_ended_event": true,
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z",
    "phone_number": {
      "sid": "<string>",
      "number": "<string>",
      "name": "<string>"
    },
    "api_key": {
      "sid": "<string>",
      "name": "<string>"
    }
  }
}

Authorizations

Authorization
string
header
required

Bearer auth header. Pass with value 'Bearer {api_key}'. Api key can be found in account Settings -> API Keys page

Path Parameters

sid
string
required

Webhook identifier

Body

application/json
url
string<uri>

HTTPS URL to receive webhook events

call_started_event
boolean

Whether to trigger webhook on call started event

call_ended_event
boolean

Whether to trigger webhook on call ended event

phone_number_id
string | null

SID of the phone number to attach the webhook to. Leave blank for a global webhook.

api_key_id
string

SID of the API key to use for webhook authentication

Response

Webhook updated

status
enum<string>
required
Available options:
success,
error
webhook
object
required