Skip to Content
Developers

Quickstart

Get a token, find your number and send your first WhatsApp message.

You need a client ID and secret from WhaPiù and a connected WhatsApp number.

Set your environment

The examples in these docs read these variables.

export WAPIU_API=https://api.wapiu.ai
export WAPIU_CLIENT_ID=your-client-id
export WAPIU_CLIENT_SECRET=your-client-secret
export WAPIU_NUMBER=393401234567   # your WhatsApp number, digits only

Get an access token

curl -X POST "$WAPIU_API/v1/get-token" \
  -u "$WAPIU_CLIENT_ID:$WAPIU_CLIENT_SECRET" \
  -d grant_type=client_credentials
{ "access_token": "eyJ...", "token_type": "Bearer", "expires_in": 3600 }
export WAPIU_TOKEN=eyJ...

Valid for expires_in seconds. See Authentication.

Check your numbers

curl -X GET "$WAPIU_API/v1/me" \  -H "Authorization: Bearer $WAPIU_TOKEN"

owned_numbers lists the numbers this token can send from. Use one of them as WAPIU_NUMBER.

{
  "sub": "312345678901234567",
  "email": null,
  "tenants": [{ "id": "0f8e…", "domain": "acme.example", "roles": ["admin"] }],
  "owned_numbers": ["393401234567"]
}

Send a message

curl -X POST "$WAPIU_API/v1/numbers/$WAPIU_NUMBER/messages/send" \  -H "Authorization: Bearer $WAPIU_TOKEN" \  -H "Content-Type: application/json" \  -d '{    "recipient": "+393331112222",    "message": {      "message_type": "text",      "text": "Hello from WhaPiù!"    }  }'
{
  "message_uuid": "aaaaaaaa-bbbb-cccc-dddd-000000000000",
  "provider": "meta",
  "channel": "whatsapp",
  "accepted_at": "2026-11-22T10:00:00Z"
}

A 200 means the message is queued, not delivered.

Nothing arrived?

Free-form messages are delivered only within 24 hours of the user's last message to your number. Outside that window, send a template.

Follow it

curl -X GET "$WAPIU_API/v1/numbers/$WAPIU_NUMBER/messages/aaaaaaaa-bbbb-cccc-dddd-000000000000/status" \  -H "Authorization: Bearer $WAPIU_TOKEN"

status moves from submitted to delivered to read. In production, receive these changes on a status webhook instead of polling.

Next steps

On this page