Peplink Portal Docs

Send a test push

Push sample data of an event type to a webhook's URL once, to check your endpoint.

For postpaid SIM service only

403 will be returned if your partner account does not have postpaid SIM service.

The push is like a real one, with test set to true and a sim ICCID of zeros. It is not retried and not recorded as an event of the webhook.

The call waits for your endpoint to respond, up to 10 seconds. It returns 200 even when your endpoint fails; check attempt for the result.

Required Capabilities

Webhook Manager

Request

POST/webhooks/{id}/test

Path parameters

idstringrequired

ID of the webhook.

Body parameters

eventTypeenumrequired

Event type to send sample data of. It must be one of the event types the webhook subscribes to.

  • POSTPAID_SIM_USAGE_UPDATED — The live usage of one or more postpaid SIMs in your partner account changes

Response

A json is returned in the response body with the following fields:

requestobject

The request pushed to your endpoint.

Show child attributes
request.urlstring

URL the request is sent to.

request.methodstring

HTTP method of the request. Always POST.

request.headersobject array

Headers of the request, with the token masked.

Show child attributes
request.headers.keystring

Name of the header.

request.headers.valuestring

Value of the header.

request.bodystring

Body of the request, as the JSON-encoded string that is sent.

attemptobject

Result of the push.

Show child attributes
attempt.attemptedAtdatetime string

Time of when the attempt is made.

attempt.responseStatusnullable integer

HTTP status your endpoint responded with. null if there was no response.

attempt.responseHeadersobject array

Headers your endpoint responded with, one item per value.

Show child attributes
attempt.responseHeaders.keystring

Name of the header.

attempt.responseHeaders.valuestring

Value of the header.

attempt.responseBodynullable string

Body your endpoint responded with, cut to its first 4,096 characters. null if there was no response.

attempt.errornullable string

Why there was no response, e.g. a timeout. null if your endpoint responded.

attempt.durationMsinteger

Duration of the attempt, in milliseconds.

Examples

Request

curl -X POST 'https://portal.peplink.com/api/e/v1/cp/webhooks/{id}/test' \  -H 'Authorization: Bearer {token}' \  -H 'Content-Type: application/json' \  --data-raw  '{"eventType": "POSTPAID_SIM_USAGE_UPDATED"}'

Response

{
  "request": {
    "url": "https://partner.example.com/peplink/events",
    "method": "POST",
    "headers": [
      { "key": "Authorization", "value": "Bearer s3cr...6789" },
      { "key": "Content-Type", "value": "application/json" },
      { "key": "User-Agent", "value": "Peplink-Webhook/1.0" }
    ],
    "body": "{\"eventId\":\"6704f2b0c3d4e5f6a7b8c9e1\",\"eventType\":\"POSTPAID_SIM_USAGE_UPDATED\",\"createdAt\":\"2026-10-08T03:15:00.123Z\",\"data\":{\"items\":[{\"iccid\":\"00000000000000000000\",\"year\":2026,\"month\":10,\"usageMb\":123.45,\"lastEventAt\":\"2026-10-08T03:15:00.123Z\"}]},\"test\":true}"
  },
  "attempt": {
    "attemptedAt": "2026-10-08T03:15:00.130Z",
    "responseStatus": 200,
    "responseHeaders": [{ "key": "content-type", "value": "application/json" }],
    "responseBody": "{\"ok\":true}",
    "error": null,
    "durationMs": 184
  }
}

On this page