Getting started overview
Hookdeck provides a managed service for ingesting, processing, and delivering webhooks reliably. This guide outlines the initial steps to integrate Hookdeck into your application workflow. The process involves creating an account, obtaining necessary API credentials, setting up a source and a destination, and sending an initial test webhook to verify the setup.
Integrating Hookdeck typically follows these stages:
- Account Creation: Register for a Hookdeck account.
- API Key Retrieval: Locate and securely store your API keys.
- Source Configuration: Define where your webhooks originate.
- Destination Setup: Specify the endpoint where Hookdeck delivers webhooks.
- First Request: Send a test webhook to confirm the end-to-end flow.
By abstracting the complexities of webhook infrastructure, Hookdeck aims to improve reliability and observability, particularly for high-volume or critical webhook traffic Hookdeck API reference.
Quick reference table
| Step | What to do | Where |
|---|---|---|
| 1. Sign Up | Create a new Hookdeck account. | Hookdeck homepage |
| 2. Get API Keys | Generate and copy your API Keys for authentication. | Hookdeck Dashboard > Settings > API Keys |
| 3. Create Source | Define an ingestion point for your webhooks. | Hookdeck Dashboard > Sources |
| 4. Create Destination | Specify your application's endpoint to receive webhooks. | Hookdeck Dashboard > Destinations |
| 5. Send Test Webhook | Use a tool like cURL or Postman to send a test event to your Hookdeck source URL. | Your terminal or API client |
| 6. Monitor Events | Verify the webhook was received, processed, and delivered. | Hookdeck Dashboard > Events |
Create an account and get keys
To begin using Hookdeck, you must first create an account. Hookdeck offers a Developer Plan with a free tier, supporting up to 500,000 requests per month, which is suitable for initial testing and small-scale applications. Paid plans, like the Starter Plan, commence at $49 per month for 1 million requests.
Account registration
- Navigate to the Hookdeck website.
- Click on the "Get Started" or "Sign Up" button.
- Enter your email address and create a password, or sign up using a supported third-party identity provider.
- Follow any on-screen prompts to confirm your email address.
API key retrieval
After successfully creating and logging into your Hookdeck account, you will need to retrieve your API keys. These keys are essential for authenticating your requests to the Hookdeck API and for configuring SDKs.
- From the Hookdeck Dashboard, locate the "Settings" section, typically found in the sidebar.
- Click on "API Keys".
- You will see existing API keys or an option to generate new ones. For security best practices, it is recommended to generate a new key for each environment (e.g., development, staging, production) and to rotate them periodically learn more about API key security.
- Copy your Secret Key. This key grants access to your Hookdeck resources and should be kept confidential. Do not embed it directly in client-side code or public repositories.
- Store the API key securely in your application's environment variables or a secrets management system.
Your first request
After setting up your account and obtaining API keys, the next step is to configure a source and a destination in Hookdeck, then send a test webhook. This demonstrates the core functionality of ingesting an event and delivering it to your endpoint.
1. Create a Source
A Source in Hookdeck represents the origin of your webhooks. When you create a Source, Hookdeck provides a unique URL to which external services will send their webhooks.
- In the Hookdeck Dashboard, navigate to the "Sources" section.
- Click "Add Source".
- Give your source a descriptive name (e.g., "My Application Webhooks").
- Optionally, configure any desired security or transformation settings for this source. For a first request, default settings are usually sufficient.
- Click "Create". Hookdeck will generate a unique webhook URL for this source. Copy this URL, as you will use it to send your test request.
2. Create a Destination
A Destination is your application's endpoint where Hookdeck will deliver the processed webhooks. This is typically an HTTP endpoint on your server.
- In the Hookdeck Dashboard, go to the "Destinations" section.
- Click "Add Destination".
- Provide a name for your destination (e.g., "My Local Webhook Handler").
- Enter the Destination URL. This should be the URL of your application's endpoint designed to receive webhooks. For local development, you might use a tunneling service like ngrok or Cloudflare Tunnel to expose your local server to the internet Cloudflare Tunnel setup guide.
- Select the source you created in the previous step to link it.
- Click "Create".
3. Send a Test Webhook
Now, send a test webhook to the Hookdeck Source URL you obtained earlier. You can use command-line tools like cURL or graphical API clients like Postman or Insomnia.
Example cURL command:
curl -X POST \
-H "Content-Type: application/json" \
-d '{"event": "test.event", "data": {"message": "Hello from Hookdeck!"}}' \
"YOUR_HOOKDECK_SOURCE_URL"
Replace YOUR_HOOKDECK_SOURCE_URL with the actual URL provided by Hookdeck for your source.
4. Verify Delivery
- In the Hookdeck Dashboard, navigate to the "Events" section.
- You should see your test event listed. Click on it to view its details.
- Under the event details, check the "Deliveries" tab. You should see a successful delivery attempt to your configured destination.
- Verify that your application's endpoint received the webhook payload.
Common next steps
Once you have successfully sent and received your first webhook through Hookdeck, consider these common next steps to further integrate and optimize your webhook management:
- Integrate with production webhooks: Update your third-party services (e.g., Stripe, Twilio) to send webhooks to your Hookdeck Source URLs instead of directly to your application Stripe Webhooks documentation.
- Implement webhook security: Configure signature verification for your sources to ensure that incoming webhooks are legitimate and untampered. Hookdeck supports various signature schemes.
- Set up retry policies: Customize retry attempts and backoff strategies for your destinations to handle temporary failures gracefully.
- Configure dead-letter queues: For events that fail after all retry attempts, set up a dead-letter queue to store them for later inspection and manual reprocessing.
- Utilize transformations: Use Hookdeck's transformation capabilities to modify webhook payloads before they reach your destination, adapting them to your application's expected format.
- Monitor and alert: Explore Hookdeck's dashboard for detailed analytics on webhook traffic, delivery status, and error rates. Set up alerts for critical events or delivery failures.
- Explore SDKs: Use one of Hookdeck's official SDKs (Node.js, Python, Go, Ruby, .NET, PHP, Java) to simplify interacting with the Hookdeck API from your application.
- Scale your infrastructure: As your webhook volume grows, review Hookdeck's advanced features and consider upgrading your plan to accommodate increased throughput and additional capabilities.
Troubleshooting the first call
Encountering issues during your first Hookdeck webhook call is common. Here are some troubleshooting steps:
- Check Source URL: Ensure the Hookdeck Source URL you are sending the webhook to is correct and matches the one provided in your dashboard. A common mistake is using an incorrect or expired URL.
- Verify Destination URL: Confirm that your Destination URL is publicly accessible and correctly configured in Hookdeck. If you're using a local development server, double-check your tunneling service (e.g., ngrok, Cloudflare Tunnel) is running and exposing the correct port. The endpoint should respond with a
2xxHTTP status code for successful delivery. - Inspect Hookdeck Events Dashboard: The Hookdeck Dashboard's "Events" section provides detailed logs for every webhook received and every delivery attempt. Look for the status of your test event.
- Review Delivery Attempts: Within the event details, check the "Deliveries" tab for specific delivery outcomes. Error messages here can indicate issues such as network problems, incorrect destination URL, or application errors at your endpoint.
- Check Request Headers and Body: Ensure your test webhook request includes the correct
Content-Typeheader (e.g.,application/json) and a well-formed payload, especially if your destination expects a specific format. - Source and Destination Linkage: Verify that your Source is correctly linked to your Destination in the Hookdeck dashboard. An event from an unlinked source will not be delivered to your destination.
- API Key Permissions: If you are making API calls to Hookdeck directly (e.g., to create sources programmatically), ensure your API key has the necessary permissions.
- Consult Hookdeck Documentation: Refer to the official Hookdeck documentation for in-depth troubleshooting guides and common error explanations specific to various configurations.