Tell Claude to use EWire.
Building a CRM, a help desk or an AI agent and need WhatsApp in it? Pick what you’re building, copy the prompt and paste it into Claude or your AI coding tool. It explains EWire to the AI so it can build the webhook, the signature check, contact matching and replies for you.
I'm building a CRM and I want WhatsApp conversations to show up on each contact's timeline. Use EWire to connect WhatsApp.
About EWire (https://ewire.dev): it links to a WhatsApp number as a linked device and sends signed webhooks for the messages I choose with rules in the EWire portal. It also has a REST API to send messages from that number.
What EWire sends (JSON, "Clean" format), one event per POST:
- event_id (use as an idempotency key; retries reuse it), type ("message.created", "message.edited", "call.incoming", …), occurred_at (ISO 8601)
- channel { id, name, phone } chat { id, type: "direct" | "group", name } sender { id, phone (E.164, e.g. +12015550188), name }
- message { id, direction ("inbound" | "outbound"), type ("text", "image", "document", …), text (also the caption of media), sent_by_me, is_reply, quoted_id, quoted { id, text, sender_phone, sender_name } (when known), media { mime_type, size, file_name, available } | null }
Verifying a delivery (do this before trusting the body):
- Headers: X-EWire-Signature ("v1=<hex>"), X-EWire-Timestamp (unix seconds), X-EWire-Delivery-Id, X-EWire-Event ("event", or "batch" when a rule batches; then the body has an events array).
- Compute HMAC-SHA256 with my signing secret over `${timestamp}.${rawBody}` (the raw request body, before JSON parsing), hex-encode, prefix "v1=", compare in constant time. Reject if the timestamp is more than 300 seconds off.
- Respond 2xx within 10 seconds; do slow work in a background job. EWire retries non-2xx responses after 10 s, 30 s, 2 min, 10 min, 30 min and 2 h.
Replying on WhatsApp:
- POST https://ewire.dev/v1/messages/text with header Authorization: Bearer <EWIRE_CHANNEL_TOKEN> and JSON { "to": <chat.id or phone digits>, "body": "…", "quoted": <message.id to reply to, optional> }.
- Media: POST /v1/messages/image (or document, video, audio) with { "to", "media": <https URL or base64>, "caption" }.
- Downloading received media: GET https://ewire.dev/v1/media/<channel.id>/<message.id> with the same Bearer token (only when message.media.available is true).
Configuration: read EWIRE_SIGNING_SECRET and EWIRE_CHANNEL_TOKEN from environment variables; never hard-code them or log them.
Build this:
1. A webhook endpoint POST /webhooks/ewire that verifies the signature, then stores each message.created event once (unique on event_id).
2. Match the contact by phone: normalize sender.phone to E.164 and compare with the contact's stored numbers (ignore formatting). If none matches, create a contact with sender.name and sender.phone and flag it "New from WhatsApp".
3. For messages my team sends (message.sent_by_me = true in a direct chat), file them on the contact for chat.id instead of on our own number.
4. Show a WhatsApp tab on the contact page: messages in order, ours on the right, with a reply box that calls POST /v1/messages/text (quote the message being replied to).
5. In group chats, file each message on the sender's contact and keep the group name (chat.name) on the timeline entry.
6. Add tests: signature valid and invalid, a replayed event_id is ignored, phone matching with formatted numbers.
In the EWire portal I will create a webhook destination pointing at /webhooks/ewire and a rule for "New message". Tell me what URL to paste and where to put the signing secret.- 1Paste the prompt
Into Claude, Claude Code, Cursor or any AI coding tool, in your project.
- 2Add a webhook in EWire
Destinations › Add › Webhook. Paste the address your app now has and copy the signing secret into your app.
- 3Turn on a rule
Choose keywords, a reply command or every message. Press Send test and watch it arrive in your app.
Everything the AI needs to get it right the first time.
Sender, chat, group name, quoted messages and media, so your code reads the right fields.
The exact HMAC rule and time window, so nobody can fake a message into your app.
How to answer on WhatsApp, quote the customer’s message and send files.
WhatsApp in whatever you’re building.
Log every WhatsApp conversation on the right contact.
Turn WhatsApp messages into support tickets.
Escalate from a company WhatsApp group.
Appointments and reminders over WhatsApp.
An AI that drafts replies a person approves.
Order updates and "where is my order".
Do I need to know how to code?
No. Paste a prompt into Claude (or Claude Code, Cursor, Copilot) and it writes the webhook, the signature check and the reply calls for you. You paste two values from EWire: the webhook address it built and your signing secret.
Which AI tools does this work with?
Any assistant that writes code: Claude, Claude Code, Cursor, GitHub Copilot, Windsurf, Lovable, Bolt or Replit. The prompts describe EWire completely, so the tool doesn’t need to know it already.
What does my app need?
A public https address for the webhook (most hosts give you one) and a place to keep two secrets: the signing secret and a channel token for replies.
Can I use it without writing code at all?
Yes. EWire has built-in integrations for Teams, Slack, Salesforce, HubSpot, Pipedrive, Zoho Desk, Zendesk, monday.com, Zapier, Make and n8n.
Get your signing secret and channel token.
Start a free trial, link your number and add a webhook. Your AI does the rest.