Quickstart
Make your first authenticated request, connect a WhatsApp number, and send a message. These steps apply to any application using Jawib.
Prerequisites
- A Jawib account or customer key with active API access.
- A backend that can store credentials securely and make HTTPS requests.
- Authorization from the owner of the WhatsApp number you connect.
1. Obtain an API key
Create a key in your account's integration settings. For initial connection and messaging, include connections:pair, connections:read, messages:write, and messages:read. Store the token in your backend environment as JAWIB_API_KEY.
If you access Jawib through a partner-managed customer, use that customer's key. A partner company management key does not impersonate a customer.
2. Make an authenticated request
curl 'https://playjawib.com/api/v2/connections' \
--header "Authorization: Bearer $JAWIB_API_KEY" \
--header 'Accept: application/json'The response lists connections owned by the key's account or customer. An empty list is valid before a number has been connected.
3. Connect a WhatsApp number
Create a connection with POST /api/v2/connections, an Idempotency-Key, and privacy_accepted: true. Retrieve GET /api/v2/connections/{connection}/pairing for its temporary QR or phone-code credentials.
Render qr_data_url in your application, or open hosted_url for the number owner. Wait for the connection status to become connected. See the WhatsApp connections reference for the full request and response.
4. Send a message
curl --request POST 'https://playjawib.com/api/v2/messages' \
--header "Authorization: Bearer $JAWIB_API_KEY" \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: quickstart-message-123' \
--data '{
"connection_id": "CONNECTION_UUID",
"to": "+249900000000",
"type": "text",
"text": "Hello from Jawib"
}'Use a real connection ID and an authorized recipient. Save the returned message ID to track its state. A successful API response does not guarantee delivery or reading.
5. Receive events
Register an HTTPS webhook with the same data boundary, enable the inbox capture you require, and verify every webhook signature. You can also retrieve retained conversations and messages through the API.
Optional: manage multiple customers
Partner accounts can create isolated customers and issue customer-specific keys. Your application maps its own customer identifiers to the IDs returned by Jawib. See the Customers reference when you need this capability.
API playground
The dashboard provides a separate request playground. It uses your real API permissions, connection, and subscription allowance. Requests may change data or send actual WhatsApp messages.