Back to blog
Guides·

How to Send WhatsApp Messages From Code Without the Official API

You can send WhatsApp messages from your own code without Meta's official WhatsApp Business Platform by using an API that sends through a WhatsApp number you have linked as a device. With Dailzero you link your existing number by QR code, create an API key, and send text, images, video or documents with one HTTPS request. There is no business verification, no template approval and no Meta message fee. It suits messages to your own customers at normal volume, not bulk alerts to strangers.

How it works

The official platform gives your software a direct line to WhatsApp, after Meta verifies your business. The linked-device approach is different: your number stays in your phone's WhatsApp app, and Dailzero connects to it the same way WhatsApp Web does. Your code calls Dailzero, and Dailzero sends the message from your number.

What you need

  1. A WhatsApp or WhatsApp Business number that is already in normal use.
  2. A Dailzero account. The free trial includes 1,000 credits.
  3. An agent with that number linked by QR code or pairing code.
  4. An API key from the dashboard. Keys start with dz_live_.

Send your first message

Make a POST request to https://www.dailzero.com/api/v1/messages with your key in the Authorization header as Bearer dz_live_... and a JSON body:

  • agentId: the ID of your agent, shown in the dashboard
  • to: the phone number in international format with no plus sign, for example 2348012345678
  • text: the message

For a photo, video or PDF, add a mediaUrl that points to the file and set the type to image, video or document. Copy-and-paste examples in cURL, JavaScript and Python are on the developers page.

What the API can do

EndpointWhat it doesCost
Send a messageText, image, video or document to a WhatsApp numberText 5 credits, image 8, video 12, document 8
Check a numberTells you whether a phone number is on WhatsAppFree
Chat with the agentSends a message to your AI agent and returns its replyBilled as an AI reply
Manage agentsList your agents and read their detailsFree
Webhook toolsLet the agent call your backend during a chat, up to 50 toolsFree to configure

Keys carry scopes, so a key can be limited to chat, to sending messages, or to managing agents. A chat-only key is safe to use in a browser or mobile app. Keys that can send messages or manage agents must stay on your server.

Limits you should design for

  • Sends are queued and paced. Messages go out at a human pace to protect your number, so delivery is not instant. Do not use it for login codes that must arrive within seconds.
  • 60 requests a minute per key, and you can set a daily cap on a key.
  • Use an Idempotency-Key header when you retry, so a network error does not send the same message twice.
  • Your number must be connected. If the phone has been offline too long and the link drops, sends fail until you reconnect.
  • New numbers start slow. There is a warm-up period with lower limits.
  • Credits. When they run out, sends stop until you top up. There are no overage charges.

What it does not do

  • No webhook for incoming messages. You cannot yet receive customer replies in your own system through the API. Replies arrive in your WhatsApp and in the Dailzero dashboard, where the AI agent or a person answers them.
  • No SDK. It is plain HTTPS, so any language works.
  • No creating agents through the API. You set those up in the dashboard.
  • No streaming on the chat endpoint.
  • No approved templates, verified badge or WhatsApp Flows. Those belong to the official platform.

When to use the official platform instead

Choose Meta's official WhatsApp Business Platform, through a provider, when:

  • You send one-time passwords or bank alerts that must arrive at once.
  • You message large numbers of people who have never contacted you.
  • Your compliance team requires an official Meta integration.
  • You cannot accept any risk to the number. Automating a linked device is not something WhatsApp officially supports, so it carries more risk than the official route. Read how to stop WhatsApp banning your business number.

For order confirmations, appointment reminders, delivery updates and follow-ups to your own customers, the linked-device route is simpler and cheaper.

What it costs

There is no separate API plan. Calls are billed against the same credits as everything else, on any plan including pay as you go. A text message is 5 credits. On pay as you go, ₦10,000 buys 6,500 credits, about 1,300 text messages. Monthly plans start at ₦20,000 for 25,000 credits. See pricing.

Frequently asked questions

Is this the official WhatsApp API?

No. It is Dailzero's own API, which sends through your linked WhatsApp number. Meta's official product is the WhatsApp Business Platform.

Do I need Meta business verification?

No. You link a number you already use, and there is nothing to apply for.

Can I receive incoming messages in my app?

Not through the API today. Incoming messages are handled by the AI agent or by you in the dashboard. The agent can call your backend through webhook tools when it needs data from your system.

Can I use it to send OTPs?

You can send a code as a WhatsApp message, but sends are paced and not guaranteed to be instant. Keep SMS as your main route for login codes.

Which languages are supported?

Any language that can make an HTTPS request. The documentation has examples in cURL, JavaScript and Python.

Ready to automate your WhatsApp?

Join Nigerian businesses using Dailzero to answer customers on WhatsApp day and night.