Twitter Webhook Alerts
Send new X posts to your endpoint as signed JSON. Covers the payload, HMAC verification, retries, and duplicate handling.
By AyeWatch Team3 min read
Short answer: A Twitter webhook alert is a JSON POST to your endpoint when a new X post matches a saved search or profile. AyeWatch runs the X check on a schedule, signs each delivery with HMAC-SHA256, and retries failed deliveries, so you do not need read access to the X API.
AyeWatch is an AI internet monitor with signed webhooks. For Twitter webhook alerts, it watches a public X search or profile and posts new matches to your HTTPS endpoint as JSON.
What arrives at your endpoint
Each delivery is a JSON object for one new post. It includes an update_id for deduplication, a topic_id that names the source, the post text, the author, the public URL, and a timestamp.
The payload is intentionally small. Fetch the post only if you need media or reply context. Storing the raw body plus a few normalized fields is enough for most pipelines.
Create the X source
Choose Search for a keyword query or Profile for one account. Search accepts the same operators as x.com: quotes, OR, minus, from:, lang:, and filter:links. Profile takes a full x.com link, not a bare handle.
Add the optional filter to drop posts that match the words but not the intent. An X search check uses 2 credits, or 3 with the filter.
Point it at your endpoint
Open Settings, then Webhooks, paste an HTTPS URL, and save. Copy the secret the screen shows. Verify the X-AyeWatch-Signature header as an HMAC-SHA256 of the raw request body before you parse the JSON.
Return a 2xx quickly. Do the slow work, such as a database write or a third-party call, after you acknowledge. A slow handler looks like a failed delivery.
Handle retries and duplicates
Failed deliveries are retried with backoff, up to 10 attempts. That means your handler must be idempotent. Store update_id and skip a delivery you have already processed.
If your service is down for a long window, some attempts will be exhausted. Keep a reconciliation job that reads the topic history or checks the source after an outage.
When a webhook is the wrong tool
Use the built-in Slack or Discord integration when a chat message is the whole job. Use email for a weekly digest. Use a webhook when code must run: open a ticket, update a CRM, write to a warehouse, or trigger a repricing job.
AyeWatch does not backfill history. The first check sends up to five recent posts, then only new ones. The webhook monitoring pipelines guide covers delivery design.
Create a Twitter webhook alert
- Create an X search or profile topic with the query or profile link.
- Add the plain-English filter if the query is broad.
- Open Settings, then Webhooks, and save an HTTPS endpoint.
- Verify the HMAC signature against the raw body and return a 2xx.
- Deduplicate on update_id and queue slow work after the response.
Start a monitor in under a minute
Describe a topic or paste a URL. Cancel before the trial ends and you pay nothing.
Try it free for 7 daysThe bottom line
Create the X search first, then wire the endpoint. Send one test event, verify the signature, and confirm a duplicate does not create two records. That five-minute check prevents most webhook incidents later.
FAQ
Does X offer webhooks for keyword search?
X's Account Activity API covers accounts you control and requires paid developer access. It does not deliver public keyword search results. AyeWatch does that without an X developer account.
What signature header does AyeWatch send?
The X-AyeWatch-Signature header contains an HMAC-SHA256 of the raw request body, using the secret shown when you create the webhook. Compare it before parsing the JSON.
What happens if my endpoint is down?
Deliveries are retried with backoff, up to 10 attempts. After that, the event is not replayed automatically. Run a reconciliation check after a long outage.
Can one webhook serve several X topics?
Yes. One webhook URL per account receives updates from all topics. Use topic_id to route each event to the right handler.