Skip to main content

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:

FieldTypeRequiredDescription
expires_in_hoursintegerNoHours until the share expires
passwordstringNoPassword to protect the share
include_forwardsbooleanNoInclude 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.