API

WhatsApp API step by step: from account to your first message

Using a WhatsApp API sounds like something for big engineering teams, but the path to the first message has only a few steps. In this guide you create the account, connect a number, get the keys and fire a test. At the end, you see how to grow without putting the number at risk.

This article is also available in: Português · Español

Step 1: create the account and understand the cost

Sign-up happens in the ZapZap dashboard. The model is prepaid: you add balance and pay per active number per month, with no per-message charge and no lock-in. The pricing page shows the current price and the information about test credit, so check it before deciding.

If you are a developer, start your tests with a number of your own as the destination before talking to real customers.

Step 2: create the instance and connect the number

Instance is what we call each connected WhatsApp number. In the dashboard, create an instance and scan the QR code with the WhatsApp app of the number you will use, the same way you connect WhatsApp Web. Connecting takes a few minutes.

Use a number you control that already has a history of real conversations. A brand-new, unused number is the most vulnerable to blocking. If you start with a new SIM, go through number warm-up first.

Step 3: get the key, the secret and the instance ID

In the dashboard, under Settings and API, you will find the key (x-api-key) and the secret (x-api-secret). The instance ID is in the instances list. These three values identify and authenticate every call. The authentication docs explain each one.

Step 4: test authentication

Before sending, confirm the key and secret work by fetching your account data.

GET /account

curl https://api.zapzapapi.com/api/v1/account \
  -H "x-api-key: SUA_API_KEY" \
  -H "x-api-secret: SEU_API_SECRET"

Step 5: send the first message

With authentication working, sending is one call. Use your own number as the destination in the first test. For the same send in Node.js, Python and PHP, see the guide on sending a WhatsApp message by API.

POST /send/text

curl -X POST https://api.zapzapapi.com/api/v1/SEU_INSTANCE_ID/send/text \
  -H "Content-Type: application/json" \
  -H "x-api-key: SUA_API_KEY" \
  -H "x-api-secret: SEU_API_SECRET" \
  -d '{"number":"5511999999999","text":"Minha primeira mensagem pela API."}'

Step 6: receive replies with a webhook

A conversation has two sides. For your system to be notified when the customer replies, set up a webhook that points to an address of yours. The webhook docs list the events. Tools like n8n and Make receive that webhook without code, see the integrations.

Before scaling: what protects your number

When the test works, resist the urge to message your whole list. Send only to people who agreed to receive, start slowly and increase gradually, vary the text and watch the replies. No platform removes the risk of blocking, and anyone who promises that is promising something they do not control. What exists is practice that reduces the chance, described in the anti-block guide.

Quick summary

  • Six steps: account, instance, keys, authentication test, first message and webhook.
  • The instance is the number connected by QR code, and setup takes a few minutes.
  • Cost is per active number per month, prepaid, with no per-message charge.
  • Start with a number of your own, and only then talk to customers.
  • Scale slowly and only to people who agreed to receive: there is no guarantee against blocking.

Frequently asked questions

How do I start using a WhatsApp API?

Create the account, connect a number by QR code (the instance), get the API key and secret in the dashboard and make a send call. The guide shows each step with the command ready.

Do I need to know how to code to use the API?

To call the API directly, yes, basic HTTP. If you do not code, tools like n8n and Make make the same call visually. See the [integrations](/integracoes) page.

How long does it take to send the first message?

After sign-up, connecting the number by QR code and testing the send usually takes a few minutes.

Can I use my personal number?

Technically yes, but a number dedicated to the business is recommended. Use a number you control that already has real conversations, and never mass-send to people who did not ask.

Start now

Create your account, connect a number in minutes and test the API with warm-up and anti-ban. R$15 per active number/month, prepaid, no lock-in.