Create a webhook
Create a webhook to push events to your endpoint.
For postpaid SIM service only
403 will be returned if your partner account does not have postpaid SIM service.
Your partner account can have up to 10 webhooks. See Overview for what your endpoint receives.
Required Capabilities
Webhook Manager
Request
Body parameters
Name of the webhook.
URL to push events to. It must be an https URL on a public internet address; an address on a private network is refused.
A secret of your choice, at least 16 characters, sent as Authorization: Bearer <token> with every push so your endpoint can verify the request.
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 created successfully
A json of the created webhook is returned in the response body with the following fields:
ID of the webhook.
Name of the webhook.
URL events are pushed to.
Token sent with every push, masked to its first and last 4 characters, e.g. s3cr...6789.
Event types the webhook subscribes to.
POSTPAID_SIM_USAGE_UPDATED— The live usage of one or more postpaid SIMs in your partner account changes
Time of when the webhook is created.
Name of whom created the webhook.
Email of whom created the webhook. null if not applicable.
Time of when the webhook is updated. null if not applicable.
Name of whom updated the webhook. null if not applicable.
Email of whom updated the webhook. null if not applicable.
400 Request is invalid
No webhook is created as the request is invalid, or your partner account already has 10 webhooks.
Check the response body for the error details.
Examples
Request
curl -X POST 'https://portal.peplink.com/api/e/v1/cp/webhooks' \ -H 'Authorization: Bearer {token}' \ -H 'Content-Type: application/json' \ --data-raw '{"name": "Usage feed","url": "https://partner.example.com/peplink/events","token": "s3cr3t-token-0123456789","eventTypes": ["POSTPAID_SIM_USAGE_UPDATED"]}'Response
{
"id": "6704f1a2c3d4e5f6a7b8c9d0",
"name": "Usage feed",
"url": "https://partner.example.com/peplink/events",
"token": "s3cr...6789",
"eventTypes": ["POSTPAID_SIM_USAGE_UPDATED"],
"createdAt": "2026-10-08T03:12:45.123Z",
"createdBy": "Jane Doe",
"createdByEmail": "[email protected]",
"updatedAt": null,
"updatedBy": null,
"updatedByEmail": null
}