Skip to content

Webhook History GET

Retrieve the history of incoming requests to a specific webhook — what was sent, what was rendered, and whether an alert was delivered.

Endpoint

GET https://api.pocketalert.app/v1/webhooks/{tid}/history

Authentication

Required

Include one of these headers in your request:

  • Token: <your-api-key> — Get it from API Keys
  • Authorization: Bearer <jwt-token> — From Login

Request

Path Parameters

ParameterTypeRequiredDescription
tidstringWebhook unique identifier

Query Parameters

ParameterTypeDefaultDescription
pageinteger1Page number
perinteger50Items per page (max 200)
statusstringFilter by outcome: success or error

Example Request

bash
curl -X GET "https://api.pocketalert.app/v1/webhooks/kblf7mh9j8jjyeh4fx/history?per=25&status=error" \
  -H "Token: your-api-key"
javascript
const tid = 'kblf7mh9j8jjyeh4fx';
const response = await fetch(`https://api.pocketalert.app/v1/webhooks/${tid}/history?per=25`, {
  headers: { 'Token': 'your-api-key' }
});
const history = await response.json();
python
import requests

tid = 'kblf7mh9j8jjyeh4fx'
response = requests.get(
    f'https://api.pocketalert.app/v1/webhooks/{tid}/history',
    headers={'Token': 'your-api-key'},
    params={'per': 25, 'status': 'error'}
)
print(response.json())

Response

Success Response

200 OK

Returns a paginated list of requests, newest first

FieldTypeDescription
requestsarrayRecorded requests
totalintegerTotal requests within the retention window
pageintegerCurrent page
perintegerItems per page
retention_daysintegerHow many days of history your plan keeps (0 = unlimited)
webhookobjecttid, name, url, is_active

Each item in requests:

FieldTypeDescription
idintegerRequest identifier
methodstringHTTP method used by the sender
source_ipstringCaller IP address
content_typestringRequest content type
querystringRaw query string
headersobjectRequest headers (sensitive ones are redacted)
bodystringRequest payload
sizeintegerPayload size in bytes
statusstringsuccess or error
error_codestringFailure reason, empty on success
rendered_messagestringMessage produced from your template
message_tidstringIdentifier of the created message, empty on failure
priorityintegerResolved alert level
duration_msintegerProcessing time
created_atstringWhen the request arrived
json
{
  "requests": [
    {
      "id": 412,
      "method": "POST",
      "source_ip": "140.82.115.16",
      "content_type": "application/json",
      "query": "",
      "headers": { "User-Agent": "GitHub-Hookshot", "Authorization": "[redacted]" },
      "body": "{\"repository\":{\"name\":\"pocketalert\"}}",
      "size": 38,
      "status": "success",
      "error_code": "",
      "rendered_message": "Push to pocketalert",
      "message_tid": "yrst1db64dbbe7euurpmanhdy",
      "priority": 1,
      "duration_ms": 24,
      "created_at": "18.07.2026 16:45:06"
    }
  ],
  "total": 1,
  "page": 1,
  "per": 50,
  "retention_days": 90,
  "webhook": {
    "tid": "kblf7mh9j8jjyeh4fx",
    "name": "GitHub Push",
    "url": "cs994rqfkk8ljngt",
    "is_active": true
  }
}

Error Codes

When status is error, error_code explains what happened:

CodeMeaning
inactiveThe webhook is disabled, so no alert was sent
invalid_jsonThe payload could not be parsed as JSON
empty_messageThe template resolved to an empty string — usually a %path% that does not exist in the payload
encryption_failedThe message could not be encrypted
save_failedThe message could not be stored

Error Responses

StatusDescription
401Unauthorized — Invalid or missing token
404Not Found — Webhook does not exist

Notes

Retention

History is kept for a limited number of days depending on your plan (see retention_days): 7 days on Free, 30 on Starter, 90 on Medium, and 365 on Large. Older requests are removed automatically, as are the oldest entries once a single webhook exceeds 1,000 recorded calls.

Privacy

Payloads are encrypted at rest with your personal key, the same way message content is. Authorization, cookie and API-key headers are replaced with [redacted] before storage.

Pocket Alert Documentation