API ReferenceSubscriptions
Get subscription statistics
GET
/v1/subscriptions/{subscriptionId}/statsAuthorization
ApiKeyAuth AuthorizationBearer <token>
API key authentication. Keys are prefixed with environment:
npk_live_for productionnpk_test_for testing/staging
In: header
Path Parameters
subscriptionId*string
Subscription ID
Query Parameters
period?string
Default
"24h"Value in
"1h" | "24h" | "7d" | "30d"Response Body
application/json
application/json
application/json
curl -X GET "https://api.npayload.com/v1/subscriptions/string/stats"{
"subscriptionId": "string",
"period": "string",
"delivered": 0,
"failed": 0,
"pending": 0,
"avgLatencyMs": 0,
"successRate": 0
}{
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid or missing API key"
}
}{
"error": {
"code": "NOT_FOUND",
"message": "Resource not found"
}
}Was this page helpful?