Quickstartt

Prerequisites

  • A Muchaw DEV account — sign up here
  • A WhatsApp number connected to your account (see Step 2)

Step 1 — Get your API key

After signing up, open the DashboardAPI KeysCreate Key.

Copy the key immediately — it is shown only once. Store it securely (e.g., in your .env file).

$MUCHAW_API_KEY=mk_live_...

Never expose your API key in client-side code or public repositories.


Step 2 — Connect a WhatsApp number

The easiest way is to create a Signup Link in the Dashboard → Signup LinksCreate Link.

Share the link with the number owner. They complete a quick Facebook Embedded Signup flow — your number is registered automatically.

Once the number is activated, you’ll receive a number.activated webhook event (if you have a webhook configured) and the number’s status changes to ACTIVE.

You can also retrieve the number ID via the API:

$curl https://dev.muchau.com.br/api/numbers \
> -H "Authorization: Bearer $MUCHAW_API_KEY"

Step 3 — Send a message

Use the number ID from Step 2 and the recipient’s phone number in international format (e.g., 5511999990000).

$curl -X POST https://dev.muchau.com.br/api/messages/send \
> -H "Authorization: Bearer $MUCHAW_API_KEY" \
> -H "Content-Type: application/json" \
> -d '{
> "number_id": "<YOUR_NUMBER_ID>",
> "to": "5511999990000",
> "type": "text",
> "text": { "body": "Hello from Muchaw DEV!" }
> }'

Response:

1{
2 "id": "msg_01j...",
3 "wa_message_id": "wamid.HBgL...",
4 "status": "sent"
5}

Step 4 — Receive messages (optional)

Create a webhook to receive real-time events when messages arrive:

cURL
$curl -X POST https://dev.muchau.com.br/api/webhooks \
> -H "Authorization: Bearer $MUCHAW_API_KEY" \
> -H "Content-Type: application/json" \
> -d '{
> "url": "https://your-server.com/webhooks/whatsapp",
> "events": ["message.received", "message.delivered", "message.read"]
> }'

Save the secret from the response — you’ll use it to verify webhook signatures.

See Receive Messages via Webhook for a complete integration guide.