API Keys
API keys provide scoped, programmatic access to the HostWebhook API. Use them with the React components or for direct API calls from your backend or frontend.
Creating a key
Go to Settings → API Keys in the dashboard and click Create API Key. Choose the scopes your key needs:
| Scope | Access |
|---|---|
events:read | List and view webhook events |
events:write | Replay, cancel and send test events, retry deliveries, purge the dead-letter queue. Also opens a webhook that requires an API key (older keys use it for that) — for a key you hand to a sender, use ingress:write instead |
ingress:write | Send events to webhooks that have Require API key on — and nothing else. The scope for a key you give to the service or client that posts to you: it cannot list, replay or delete anything |
webhooks:read | List and view webhooks |
webhooks:write | Create, update, and delete webhooks |
deliveries:read | View delivery attempts and logs |
canvas:read | List and view canvas nodes (routers, filters, transforms, etc.) |
canvas:write | Create, update, and delete canvas nodes |
alerts:read | List and view alerts |
alerts:write | Create, update, and delete alerts |
telemetry:read | Query telemetry logs and metrics |
ℹCredentials are managed from the dashboard. An API key can't create, connect, replace, rotate or delete a credential — do it in Settings → Credentials. Nodes you create with an API key can still use a credential by its id.
⚠The full API key is only shown once when created. Store it securely — you won't be able to see it again.
Using API keys
bashcurl
# Pass the API key as a Bearer token
curl -H "Authorization: Bearer hwk_a1b2c3d4..." \
https://api.hostwebhook.com/api/eventsWith React components
Pass the API key to the HostWebhookProvider:
tsxprovider.tsx
<HostWebhookProvider apiKey="hwk_a1b2c3d4...">
<WebhookEventLog webhookId="ep_abc123" />
</HostWebhookProvider>CORS & allowed origins
When creating an API key, you can restrict which domains are allowed to use it via the Allowed Origins field. Leave empty to allow all origins. This is useful for frontend API keys used with the React components.