Guide

Quickstart: from account to first message

Seven steps with the real API endpoints: check the cost, create the instance, connect the number with a QR code, send your first message and receive events by webhook.

Replace the sample keys with yours, under Settings and API in the dashboard, and {instanceId} with the instance ID.

  1. Step 1

    Get your API keys

    In the dashboard, under Settings and API, copy the key and the secret. Every request carries the x-api-key and x-api-secret headers.

    Authentication
  2. Step 2

    Check the cost of creating an instance

    Before creating, look up the activation fee, the prorated amount and the balance you need.

    curl

    curl https://api.zapzapapi.com/api/v1/instances/cost \
      -H "x-api-key: YOUR_API_KEY" \
      -H "x-api-secret: YOUR_API_SECRET"
    Creation cost
  3. Step 3

    Create the instance

    The name accepts only letters, numbers, _ and -. Creating it debits the activation fee and the prorated amount for the month from your balance. The instance starts with the PENDING status.

    curl

    curl -X POST https://api.zapzapapi.com/api/v1/instances \
      -H "x-api-key: YOUR_API_KEY" \
      -H "x-api-secret: YOUR_API_SECRET" \
      -H "Content-Type: application/json" \
      -d '{"name":"my-instance"}'
    Create instance
  4. Step 4

    Connect the number by scanning the QR code

    Request the instance QR code and scan it with your phone, in WhatsApp, Linked devices. You can also connect from the dashboard.

    curl

    curl https://api.zapzapapi.com/api/v1/instances/{id}/qrcode \
      -H "x-api-key: YOUR_API_KEY" \
      -H "x-api-secret: YOUR_API_SECRET"
    Instance QR code
  5. Step 5

    Confirm the instance is connected

    Fetch the instance details and wait for the CONNECTED status.

    curl

    curl https://api.zapzapapi.com/api/v1/instances/{id} \
      -H "x-api-key: YOUR_API_KEY" \
      -H "x-api-secret: YOUR_API_SECRET"
    Instance details
  6. Step 6

    Send your first message

    The number includes the country code, for example 5511999999999. The send shows the automatic typing indicator before delivering.

    curl

    curl -X POST https://api.zapzapapi.com/api/v1/{instanceId}/send/text \
      -H "x-api-key: YOUR_API_KEY" \
      -H "x-api-secret: YOUR_API_SECRET" \
      -H "Content-Type: application/json" \
      -d '{"number":"5511999999999","text":"Hello! How are you?"}'
    Send text
  7. Step 7

    Receive events by webhook

    Provide a public HTTPS URL to receive messages, delivery status and connection changes. Then send a test event and check the recent deliveries.

    curl

    curl -X PUT https://api.zapzapapi.com/api/v1/instances/{id}/webhook \
      -H "x-api-key: YOUR_API_KEY" \
      -H "x-api-secret: YOUR_API_SECRET" \
      -H "Content-Type: application/json" \
      -d '{"webhook_url":"https://example.com/webhook"}'
    
    curl -X POST https://api.zapzapapi.com/api/v1/instances/{id}/webhook/test \
      -H "x-api-key: YOUR_API_KEY" \
      -H "x-api-secret: YOUR_API_SECRET"
    
    curl https://api.zapzapapi.com/api/v1/instances/{id}/webhook/deliveries \
      -H "x-api-key: YOUR_API_KEY" \
      -H "x-api-secret: YOUR_API_SECRET"
    Set webhook

Frequently asked questions

Do I need Meta's Official API?

No. ZapZap works with WhatsApp instances: you connect the number with a QR code, with no business verification and no pre-approved templates.

How much does it cost to start?

R$15 per active number per month, prepaid. Creating an instance has an activation fee and the prorated amount for the month, which you can look up first with GET /instances/cost. Creating an account comes with a welcome credit, subject to the current campaign.

Why is my instance PENDING?

Because the number has not been connected yet. After you scan the QR code with your phone, the status changes to CONNECTED.

Can I test the webhook without real traffic?

Yes. The test endpoint sends a sample event to your URL and returns the HTTP status and response time. Recent deliveries show the event, the status and the latency.

Create your account and get the keys

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.