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 |
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 |
⚠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.