Appearance
Event History
Query past notification events and resend failed notifications.
Query Events
Retrieve a paginated list of notification events with optional filtering.
Request
GET /v1/event_historycurl Example
bash
curl -X GET "https://api.notifications.paynetworx.cloud/v1/event_history?subscription_id=9603F4B2-1874-42FE-A2BC-F7B45C45A9D6&event_type=FAILED&limit=50" \
-H "Authorization: YOUR_API_TOKEN"Query Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
subscription_id | UUID | - | Filter by subscription ID |
destination_id | UUID | - | Filter by destination ID |
date_from | datetime | - | Filter events from this date (ISO 8601 format) |
date_to | datetime | - | Filter events until this date (ISO 8601 format) |
event_type | string | - | Filter by event type (see Event Types below) |
limit | integer | 10 | Maximum number of results (0-1000) |
offset | integer | 0 | Number of results to skip |
Event Types
| Type | Description |
|---|---|
CREATE | Notification event created and ready for processing |
QUEUED | Notification queued for delivery |
SUCCESS | Notification successfully delivered (2xx response) |
FAILED | Notification delivery failed |
CONFIRM | Webhook confirmation request sent |
CONFIRMED | Webhook destination confirmed |
Example Request
bash
GET /v1/event_history?subscription_id=9603F4B2-1874-42FE-A2BC-F7B45C45A9D6&event_type=FAILED&limit=50Response
json
{
"events": [
{
"run_id": "B2C3D4E5-6789-01AB-CDEF-234567890ABC",
"subscription_id": "9603F4B2-1874-42FE-A2BC-F7B45C45A9D6",
"subscription_name": "Transaction Alerts",
"destination_id": "A1B2C3D4-5678-90AB-CDEF-1234567890AB",
"destination_name": "Production Webhook",
"date": "2024-01-15T10:30:00Z",
"events": ["SUCCESS", "QUEUED", "CREATE"],
"data": [
{
"event_id": "dfe1308f-eedc-48b7-84a8-d4f573334a14",
"event_type": "SUCCESS",
"date": "2024-01-15 10:30:45.123 -0800",
"data": {
"Error": "",
"Header": {
"Content-Type": ["application/json"],
"Date": ["Mon, 15 Jan 2024 18:30:45 GMT"]
},
"Id": "7b42d843-fb3a-4d26-bf5d-0e9982719b2a",
"Meta": {
"DestinationId": "A1B2C3D4-5678-90AB-CDEF-1234567890AB",
"EventType": "CREATE",
"ResponseType": "SUCCESS",
"RunId": "B2C3D4E5-6789-01AB-CDEF-234567890ABC",
"SubscriptionId": "9603F4B2-1874-42FE-A2BC-F7B45C45A9D6"
},
"StatusCode": 200,
"Type": "webhook"
}
},
{
"event_id": "3ddbff00-fde9-4f5a-97e6-f1aeebc5a80b",
"event_type": "QUEUED",
"date": "2024-01-15 10:30:09.865 -0800",
"data": {
"input": "{...}",
"response": {
"Id": "0",
"MessageId": "7b42d843-fb3a-4d26-bf5d-0e9982719b2a"
}
}
},
{
"event_id": "54f1d11f-97d1-415e-8400-ffc992a622ba",
"event_type": "CREATE",
"date": "2024-01-15 10:30:00.466 -0800",
"data": {
"Type": "webhook",
"Webhook": {
"content_type": "application/json",
"http_endpoint_url": "https://example.com/webhook",
"message_body": "{\"id\":\"54f1d11f-97d1-415e-8400-ffc992a622ba\",\"type\":\"transactions\",\"timestamp\":\"2024-01-15 10:30:00.466 -0800\",\"attempts\":[],\"data\":[...]}"
}
}
}
]
},
{
"run_id": "C3D4E5F6-7890-12BC-DEFA-345678901BCD",
"subscription_id": "9603F4B2-1874-42FE-A2BC-F7B45C45A9D6",
"subscription_name": "Transaction Alerts",
"destination_id": "A1B2C3D4-5678-90AB-CDEF-1234567890AB",
"destination_name": "Production Webhook",
"date": "2024-01-15T09:15:00Z",
"events": ["FAILED", "QUEUED", "CREATE"],
"data": [
{
"event_id": "abc12345-6789-0123-4567-890abcdef012",
"event_type": "FAILED",
"date": "2024-01-15 09:15:45.123 -0800",
"data": {
"Error": "Connection timeout",
"StatusCode": 500,
"Type": "webhook"
}
}
]
}
]
}Event Object Fields
| Field | Type | Description |
|---|---|---|
run_id | UUID | Unique identifier for this notification run |
subscription_id | UUID | ID of the subscription that triggered the event |
subscription_name | string | Name of the subscription (may be null) |
destination_id | UUID | ID of the destination the event was sent to |
destination_name | string | Name of the destination |
date | datetime | When the run was created (ISO 8601 format) |
events | array | List of event types that occurred during this run |
data | array | Array of detailed event records (see below) |
Event Record Fields
Each item in the data array represents an individual event in the notification lifecycle:
| Field | Type | Description |
|---|---|---|
event_id | UUID | Unique identifier for this specific event |
event_type | string | Type of event (CREATE, QUEUED, SUCCESS, FAILED, etc.) |
date | datetime | When this event occurred |
data | object | Event-specific payload data (varies by event type) |
Event Data by Type
CREATE Event
Contains the original webhook request details:
| Field | Type | Description |
|---|---|---|
Type | string | Destination type (e.g., "webhook") |
Webhook.content_type | string | Content type of the request |
Webhook.http_endpoint_url | string | Target URL for the webhook |
Webhook.message_body | string | JSON payload sent to the destination |
Webhook.Headers | object | Custom headers included in the request |
QUEUED Event
Contains queue processing details:
| Field | Type | Description |
|---|---|---|
input | string | Serialized input data sent to the queue |
response.MessageId | string | Queue message identifier |
SUCCESS Event
Contains the successful delivery response:
| Field | Type | Description |
|---|---|---|
StatusCode | integer | HTTP status code returned by destination |
Header | object | Response headers from destination |
Error | string | Empty string on success |
Id | string | Message identifier |
Meta | object | Metadata about the delivery |
Type | string | Destination type |
FAILED Event
Contains failure details:
| Field | Type | Description |
|---|---|---|
StatusCode | integer | HTTP status code (if available) |
Error | string | Error message describing the failure |
Type | string | Destination type |
CONFIRMED Event
Contains webhook confirmation response:
| Field | Type | Description |
|---|---|---|
StatusCode | integer | HTTP status code from confirmation request |
Header | object | Response headers |
Meta.ResponseType | string | "CONFIRMED" on success |
Error Responses
| Status | Description |
|---|---|
| 403 | Forbidden - Insufficient permissions |
Resend Notification
Resend a notification that previously failed or needs to be redelivered.
Request
POST /v1/event_history/{id}
Content-Type: application/jsoncurl Example
bash
curl -X POST "https://api.notifications.paynetworx.cloud/v1/event_history/B2C3D4E5-6789-01AB-CDEF-234567890ABC" \
-H "Authorization: YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"destination_id": "A1B2C3D4-5678-90AB-CDEF-1234567890AB"
}'Path Parameters
| Parameter | Type | Description |
|---|---|---|
id | UUID | The event/run ID to resend |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
destination_id | UUID | No | Override destination (optional) |
Example Request
json
{
"destination_id": "A1B2C3D4-5678-90AB-CDEF-1234567890AB"
}Response
json
{
"status": "success",
"run_id": "D4E5F6A7-8901-23CD-EFAB-456789012CDE",
"message": "Notification queued for redelivery"
}Error Responses
| Status | Description |
|---|---|
| 400 | Bad Request - Invalid event ID |
| 403 | Forbidden - Insufficient permissions |
Understanding Event Flow
A typical notification goes through these event stages:
CREATE → QUEUED → SUCCESS (successful delivery)
└→ FAILED (if delivery fails)For webhook confirmation:
CONFIRM → QUEUED → CONFIRMED (confirmation successful)Successful Delivery
- CREATE: Notification event is created with the webhook payload
- QUEUED: Notification is placed in the delivery queue
- SUCCESS: Destination returned 2xx status code
Failed Delivery
- CREATE: Notification event is created with the webhook payload
- QUEUED: Notification is placed in the delivery queue
- FAILED: Destination returned non-2xx status or connection failed
Webhook Confirmation Flow
- CONFIRM: Confirmation request is initiated
- QUEUED: Confirmation is placed in the delivery queue
- CONFIRMED: Webhook endpoint confirmed successfully
The system may retry failed deliveries automatically. Each retry creates a new run with the same subscription and destination but a different run_id.
Filtering Best Practices
Find Failed Notifications
bash
GET /v1/event_history?event_type=FAILED&date_from=2024-01-01T00:00:00ZMonitor Specific Subscription
bash
GET /v1/event_history?subscription_id={id}&limit=100Check Destination Health
bash
GET /v1/event_history?destination_id={id}&date_from=2024-01-15T00:00:00Z&date_to=2024-01-16T00:00:00Z