QRdx
HelpGuidesDevelopersReact librarySelf-hosting

Subscribe to events

Subscribes a URL to events, the REST Hooks way Zapier, Make and n8n call it (Business).

QRdx posts each event to the URL, signed with the secret in the response, which is shown only once (verifying signatures). Send the URL as target_url (or targetUrl, hookUrl, hook_url or url) and one event or several events.

POST
/hooks

Authorization

oauth2 codes:write
headerAuthorizationBearer <token>

An OAuth 2.0 access token, sent as Authorization: Bearer <token>. Register an app in Settings → Developers, send the user through authorization (PKCE S256), then exchange the code for a token. Access tokens last 1 hour; refresh tokens 30 days. Step by step.

Scope: codes:write

Request Body

application/json
  1. body
target_url?string
targetUrl?string
hookUrl?string
hook_url?string
url?string
event?string
Value in"scan.created""scan.milestone""code.created""code.updated""form.submitted"
events?array<>
Items1 <= items <= 5

Response Body

Subscribed; secret is shown only here

application/json
  1. response
id*string
target_url*string

Where events are posted; only the origin unless the caller manages hooks (codes:write)

events*array<>
event*|

The event, when the subscription has exactly one

active*boolean
created_at*string

Created (ISO 8601, UTC)

Formatdate-time
secret*string

Signing secret for the X-QRdx-Signature header, shown only in this response

Example Request
curl -X POST 'https://api.qrdx.dev/v1/hooks' \  -H 'Content-Type: application/json' \  -d '{  "target_url": "https://hooks.zapier.com/hooks/catch/123456/abcdef/",  "event": "scan.created"}'
Example Response
{  "id": "cm5hook0zapier0scans00001",  "target_url": "https://hooks.zapier.com/hooks/catch/123456/abcdef/",  "events": [    "scan.created"  ],  "event": "scan.created",  "active": true,  "created_at": "2026-01-05T09:30:00.000Z",  "secret": "whsec_9f2d7c1b8e4a6f3d0c5b2a7e1f8d4c6b"}

Last updated on