Integraciones

6 min · Jul 31

How to Automate WhatsApp With an API (Event → Template)

Learn how to automate WhatsApp with an API: one event (a POST) creates the contact and fires an approved template. Real use cases plus a step-by-step guide.

Once WhatsApp is connected to your business, the real win is making it fire on its own. Learning how to automate WhatsApp with an API means that the moment an outside system records an event —a lead fills out a form, a purchase happens, a ticket moves stages in your CRM— Blind Agents automatically sends a WhatsApp message using an approved template, creates the contact, and hands it to an AI agent ready to keep the conversation going. This guide walks the full flow: what you need, how to make the POST, and how to set it up step by step.

What does it mean to automate WhatsApp with an API?

Instead of someone copying and pasting numbers or typing messages by hand, your system tells Blind Agents through an API call whenever something important happens. Blind Agents receives that event, creates or updates the contact and its company, and fires the channel you configured. When the channel is WhatsApp, the trigger sends an approved template to the contact's number and opens the conversation.

What you need to get started

  • A number connected to WhatsApp Business over the API (not the phone app).
  • At least one approved WhatsApp template for the first message: business-initiated messages require a template.
  • Your organization's API key, which travels in the BLIND-AGENTS-API-KEY header.
  • An external system that can make an HTTP POST request: a web form, your CRM, or a connector like Zapier or Make.

How it works: from the event to the WhatsApp

The journey has three clear moments:

  1. Your system detects the event (for example, a new lead) and makes a POST to the Blind Agents API with the contact's details and company.
  2. Blind Agents authenticates the request with your API key, creates or updates the contact and company, and finds the automation that matches that event.
  3. The automation sends the WhatsApp template to the contact's number, opens a conversation, and leaves the agent and mode you chose ready to continue when the person replies.

The first business-initiated WhatsApp message always uses a Meta-approved template. Have the template ready and approved before you build the automation — it's what prevents the most common mistake when you start.

The POST: how your system fires the event

Your system only needs to send one HTTP request. The endpoint and authentication are these: you make a POST to https://api.blindagents.com/v1/events with the BLIND-AGENTS-API-KEY header (your API key) and a JSON body containing the event and the contact's details.

{"event":"new_lead","contact":{"name":"Ada","email":"ada@acme.com","phone":"+57..."},"company":{"name":"ACME"}}

Example POST body for /v1/events

The fields you send

  • event: the event name (for example, new_lead). It's what the automation uses to know what to trigger.
  • contact: the contact's name, email, and phone. The phone in international format (with +) is the number that receives the WhatsApp.
  • company: the contact's company name; Blind Agents creates or links it automatically.

Set it up step by step in Automations

All the configuration lives in the platform, with no code on the Blind Agents side:

  1. Open the Automations section and click new.
  2. In Details, name the automation and choose the API event trigger type.
  3. Define the event name (the same one your system will send, for example new_lead) so it matches the POST.
  4. In Trigger & message, choose WhatsApp as the channel and select the approved template to send as the first message.
  5. In Agent & delivery, choose the AI agent and the mode —automatic, copilot, or manual— that will continue the conversation once the contact replies.
  6. Save the automation and copy your organization's API key.
  7. Connect your external system: set up the form, CRM, Zapier, or Make to POST to the endpoint with the BLIND-AGENTS-API-KEY header when the event happens.
  8. Run a test by sending a real event and confirm in the Monitor that it triggered and was delivered.

Use cases

Any event that today depends on someone reacting in time is a candidate to automate:

  • New lead from your web form: within seconds they get a welcome WhatsApp and the agent starts qualifying.
  • Purchase or cart in your ecommerce: confirm the order or recover an abandoned cart.
  • Ticket or stage change in your CRM: fire a follow-up without anyone having to remember.
  • Registration for an event or demo: send the reminder and access details right away.

WhatsApp respects the 24-hour window: once the contact replies, your team and the agent can message freely during that period. Outside the window, starting the conversation again requires an approved template once more.

How to measure the results

Every automation reports its metrics in the Monitor, so you know whether the trigger is working:

  • Triggered: how many events matched and activated the automation.
  • Sent and delivered: how many WhatsApps went out and reached the phone.
  • Read (Seen): how many contacts opened the message.
  • Response rate: how many replied — the signal that the conversation actually started.

The same event can fire a different channel if it suits you better: an email (with a template or subject and body) or even a call with an AI agent and a script. WhatsApp is the most direct route when you want a fast reply and a conversation that keeps going in the same thread.

The payoff is clear: with API event automation, the time between 'something happened' and 'the contact already has a WhatsApp' drops from hours to seconds — and nobody has to be watching the screen.

How to Automate WhatsApp With an API (Event → Template) · Blind Agents