Webhooks
Create and manage webhook endpoints, send test events, and read and replay deliveries.
These endpoints need the webhooks scope. The Webhooks section covers the events, payloads, signatures and retries.
List webhooks
GET /v1/webhooksEach webhook has id, workspaceId, name, url, events, headerNames (the names of its custom headers; values are never returned), active, lastTriggeredAt, failureCount and createdAt.
Create a webhook
POST /v1/webhookscurl -X POST https://api.rankdebug.com/v1/webhooks \
-H "X-API-Key: $RANKDEBUG_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"workspaceId": "8c1f4b2e-1a3d-4c55-9f0e-2b7d6a9c1e40",
"name": "Site health alerts",
"url": "https://hooks.yourbrand.com/rankdebug",
"events": ["site_check.regression", "site_crawl.regression"]
}'| Field | Required | Notes |
|---|---|---|
workspaceId | Yes | The workspace whose events it receives |
url | Yes | An HTTPS endpoint on a public host, up to 2,048 characters |
events | Yes | One or more event names |
name | No | A label, up to 120 characters |
secret | No | 16 to 255 characters. Omit it to have one generated |
headers | No | Up to 10 custom headers sent with every delivery. Names use letters, digits and hyphens; values up to 1,024 characters |
The response is 201 and includes the signing secret. It is returned only here, so store it to verify deliveries. Custom header values are write-only and never returned. The signing headers, Content-Type, Content-Length and Host cannot be set as custom headers.
Update a webhook
PUT /v1/webhooks/{id}Takes any of name, url, events, active, secret and headers. Setting active to true re-enables a paused webhook and resets its failure count. Sending a new secret rotates it, and the new value is returned once in this response. headers replaces the set: a null value keeps the stored value of an existing header, and headers: null clears them all.
Delete a webhook
DELETE /v1/webhooks/{id}Send a test event
POST /v1/webhooks/{id}/testSends a webhook.test event to this endpoint only, whatever it subscribes to.
Deliveries
GET /v1/webhooks/{id}/deliveriesEvery delivery attempt to this webhook, newest first, kept for 30 days. Filter with status (success or failed) and limit (1 to 200, default 50). Each attempt has the event, the deliveryKey shared by every attempt of one event, the attempt number, status, the responseStatus and up to 500 characters of the response with secrets redacted, durationMs, a hash of the body sent, and nextRetryAt when another attempt is scheduled.
GET /v1/webhooks/{id}/deliveries/{deliveryId}One attempt, including the payload exactly as it was sent.
Redeliver
POST /v1/webhooks/{id}/deliveries/{deliveryId}/redeliverSends the delivery again with the identical body, so the body signature and the delivery id match the original. Only the timestamp and the timestamped signature are new. It is one attempt, logged as the next attempt of that delivery. A paused webhook answers 409.
Related documentation
- Overview
Base URL, authentication, scopes, errors and rate limits for the RankDebug API.
- API Keys and Scopes
Create API keys, limit them with scopes and a workspace binding, and keep them safe.
- Workspaces
List, create, update and delete workspaces, and read a workspace's request logs and activity.
- Search
Search Console performance, top rows, opportunities and sitemaps for a workspace.
- Traffic
Google Analytics landing pages, acquisition and measurement health, and CDN crawler traffic, error paths and firewall rules.
- Deploys
Record deploys from CI, list them, and read one deploy with its site check, crawl and search impact.
- Site Crawls
Read crawls of the workspace website, their findings, and every page of one finding.
- Digests
Read what the latest scheduled digest email for a workspace contained.