APITube Help Center

What Are Webhooks and How Do They Work?

Receive new matching articles at your server URL

Erick Horn

Written by Erick Horn

June 27, 2026

Updated October 16, 2026

What are webhooks and how do they work?

A webhook sends new articles to your server when they match a saved search. Set a destination URL and filters in the dashboard. APITube then sends matching articles by HTTP POST, so your app does not need to keep checking for updates.

How does APITube deliver a webhook?

New matches are checked about every 10 seconds. Each delivery contains up to 100 articles as JSON.

Your endpoint must return an HTTP 2xx status within 30 seconds. APITube treats redirects, other status codes and timeouts as failures. Private and loopback addresses cannot receive deliveries.

Store the payload and return 2xx promptly, then do any slow processing afterwards. Availability depends on your plan’s data delay.

What does a webhook request look like?

A delivery includes a JSON body and these headers:

POST https://your-app.example.com/webhook
Content-Type: application/json
X-Webhook-Signature: sha256=...
X-Webhook-Id: 7
X-Webhook-Delivery-Id: 42
X-Webhook-Timestamp: 1709000000
{
  "event": "articles.new",
  "webhook_id": 7,
  "delivered_at": "2026-06-27T12:00:00.000Z",
  "articles": [
    { "id": 123, "title": "...", "source": { "domain": "reuters.com" } }
  ]
}

articles contains the same article objects as a news search. X-Webhook-Id identifies the webhook and matches webhook_id in the body. X-Webhook-Delivery-Id identifies the delivery and stays the same on retries; use it to skip deliveries you have already processed.

Check X-Webhook-Signature before accepting the payload. See how to verify webhook signatures.

What happens when a delivery fails?

APITube retries a delivery if your endpoint cannot be reached, times out or returns a status outside 2xx. Three consecutive failed deliveries disable the webhook until you reactivate it. See webhook retries and delivery history for the schedule and logs.

Each successfully delivered article uses one webhook credit. Failed attempts are free. A delivery that succeeds on a retry is charged once, when it succeeds.

How do I create and manage a webhook?

Create webhooks in the dashboard. Choose the URL and filters, then copy the signing secret that starts with whsec_. It is shown once.

The Webhooks page of the dashboard listing a configured webhook with its endpoint URL and status

You can manage existing webhooks through the API:

# List your webhooks
curl "https://api.apitube.io/v1/webhooks" -H "X-API-Key: YOUR_API_KEY"

# Inspect one
curl "https://api.apitube.io/v1/webhooks/7" -H "X-API-Key: YOUR_API_KEY"

# Delete one
curl -X DELETE "https://api.apitube.io/v1/webhooks/7" -H "X-API-Key: YOUR_API_KEY"

Use GET /v1/webhooks to list them, GET /v1/webhooks/:id to read one, PATCH /v1/webhooks/:id to change its URL, filters or status, and DELETE /v1/webhooks/:id to remove it. There is no public create endpoint.

Common Questions

How is a webhook different from polling the API?

Polling calls search on a schedule, and your app tracks articles it has already seen. A webhook sends new matches to your endpoint. Use webhooks for ongoing alerts, or regular search for one-off requests and historical articles. Empty search results are free.

Will I receive the same article twice?

Normal deliveries send new matches. A retry can repeat a batch, so check X-Webhook-Delivery-Id. If you have already processed it, skip processing and still return 2xx.

How many articles arrive in one delivery?

Up to 100. More matches are split across deliveries, each with its own delivery ID. Read every item in the articles array.

Do test keys deliver webhooks?

Yes. Webhooks using a key that starts with api_test_ deliver preview content without using your quota. Check that your endpoint receives, verifies and acknowledges requests before switching to a live key.


Related Articles