Update a webhook
Update a webhook. Only the fields supplied are changed.
For postpaid SIM service only
403 will be returned if your partner account does not have postpaid SIM service.
Required Capabilities
Webhook Manager
Request
POST/webhooks/{id}
Path parameters
idstringrequired
ID of the webhook.
Body parameters
namestringoptional
Name of the webhook.
urlstringoptional
URL to push events to. It must be an https URL on a public internet address; an address on a private network is refused.
tokenstringoptional
A secret of your choice, at least 16 characters, sent as Authorization: Bearer <token> with every push.
eventTypesenum arrayoptional
Event types to subscribe to. At least 1 is required.
POSTPAID_SIM_USAGE_UPDATED— The live usage of one or more postpaid SIMs in your partner account changes
Response
200 The webhook is updated successfully
No response body is returned. Retrieve the webhook to get its updated details.
400 Request is invalid
The webhook is not updated as the request is invalid.
Check the response body for the error details.
Examples
Request
curl -X POST 'https://portal.peplink.com/api/e/v1/cp/webhooks/{id}' \ -H 'Authorization: Bearer {token}' \ -H 'Content-Type: application/json' \ --data-raw '{"url": "https://partner.example.com/peplink/events-v2"}'