Request Sharing API
Create shareable links for captured requests, manage shares, and access shared requests publicly.
Create a share
POST /api/v1/debug-requests/:debug_request_id/share
curl -X POST https://app.hooklistener.com/api/v1/debug-requests/req_def456/share \
-H "Authorization: Bearer hklst_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"share": {
"expires_in_hours": 24,
"password": "optional-password",
"include_forwards": true
}
}'
Request body:
| Field | Type | Required | Description |
|---|---|---|---|
expires_in_hours | integer | No | Hours until the share expires |
password | string | No | Password to protect the share |
include_forwards | boolean | No | Include forward history (default: false) |
Response: 201 Created
{
"id": "share_abc123",
"token": "a1b2c3d4e5f6",
"url": "https://app.hooklistener.com/r/a1b2c3d4e5f6",
"expires_at": "2025-01-16T11:00:00Z",
"password_protected": true,
"include_forwards": true,
"created_at": "2025-01-15T11:00:00Z"
}
List shares for a request
GET /api/v1/debug-requests/:debug_request_id/shares
curl https://app.hooklistener.com/api/v1/debug-requests/req_def456/shares \
-H "Authorization: Bearer hklst_your_api_key"
Revoke a share
DELETE /api/v1/shared/r/:token
curl -X DELETE https://app.hooklistener.com/api/v1/shared/r/a1b2c3d4e5f6 \
-H "Authorization: Bearer hklst_your_api_key"
Public access (no auth required)
View a shared request
GET /api/v1/shared/r/:token
curl https://app.hooklistener.com/api/v1/shared/r/a1b2c3d4e5f6
Returns full request details if the share is not password-protected. For password-protected shares, returns a 401 response indicating authentication is needed.
Authenticate a password-protected share
POST /api/v1/shared/r/:token/authenticate
curl -X POST https://app.hooklistener.com/api/v1/shared/r/a1b2c3d4e5f6/authenticate \
-H "Content-Type: application/json" \
-d '{"password": "the-password"}'
Returns the full request details on successful authentication.