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:

ScopeAccess
events:readList and view webhook events
events:writeReplay, cancel, and send test events
webhooks:readList and view webhooks
webhooks:writeCreate, update, and delete webhooks
deliveries:readView delivery attempts and logs
canvas:readList and view canvas nodes (routers, filters, transforms, etc.)
canvas:writeCreate, update, and delete canvas nodes
alerts:readList and view alerts
alerts:writeCreate, update, and delete alerts
telemetry:readQuery 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/events

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