The Replay API re-sends the stored captured representation to a target URL you specify.
Replay a request
POST /v1/endpoints/:id/requests/:requestId/replay
curl -s -X POST \
"https://api.hookdeploy.dev/v1/endpoints/ENDPOINT_ID/requests/REQUEST_ID/replay" \
-H "Authorization: Bearer hd_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"target_url": "https://example.com/webhooks/replay"}'
Body fields:
| Field | Required | Rules |
|---|---|---|
target_url | yes | must start with https:// |
Response
Success (target returned 2xx):
{
"data": {
"replay_id": "uuid",
"status_code": 200,
"response_time_ms": 142,
"success": true,
"error": null
}
}
Connection failure:
{
"data": {
"replay_id": "uuid",
"status_code": null,
"response_time_ms": 312,
"success": false,
"error": "Connection refused"
}
}
Target returned non-2xx:
{
"data": {
"replay_id": "uuid",
"status_code": 500,
"response_time_ms": 89,
"success": false,
"error": null
}
}
| Field | Description |
|---|---|
replay_id | UUID of the replay record for audit trail |
status_code | HTTP status from target, or null on connection failure |
response_time_ms | Round-trip time in milliseconds |
success | true if target returned 2xx |
error | Connection-level error message, or null |
What gets sent
Stored payloads are decrypted for authorized replay. HookDeploy sends:
- Captured HTTP method
- Stored headers (minus proxy headers)
- Captured query string
- Stored body
Sanitization may mean the stored representation differs from the byte-for-byte unsanitized request originally received.
Plus diagnostic headers:
x-hookdeploy-replay: 1
x-hookdeploy-original-request-id: {request-id}
Your target can skip duplicate processing when x-hookdeploy-replay: 1 is present.
Permissions
Replay requires the requests.replay permission on the API key’s organization. Granted to: super admin, admin, developer, and viewer.
Recording
Every replay is recorded with target URL, status, timing, and timestamp. Replays do not count toward monthly webhook ingestion usage.
Error responses
| HTTP | Code | Cause |
|---|---|---|
| 400 | bad_request | Missing target_url, invalid URL, or non-HTTPS target |
| 401 | unauthorized | Invalid API key |
| 404 | not_found | Endpoint or request ID not found |
Example: replay to ngrok
# 1. List recent requests to find an ID
curl -s "https://api.hookdeploy.dev/v1/endpoints/ENDPOINT_ID/requests?limit=1" \
-H "Authorization: Bearer hd_live_YOUR_KEY"
# 2. Replay the most recent request to your local tunnel
curl -s -X POST \
"https://api.hookdeploy.dev/v1/endpoints/ENDPOINT_ID/requests/REQUEST_ID/replay" \
-H "Authorization: Bearer hd_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"target_url": "https://dev-tunnel.ngrok.io/webhooks/stripe"}'
Replay vs forwarding
This API triggers a manual replay — one request, one target, on demand. It is not the same as auto-forwarding, which proxies every incoming webhook to a fixed URL automatically.
Next steps
- Replay concept — When and why to replay
- Requests API — Find request IDs to replay
- API keys — Keys used for authentication