WhatsApp connections
Create a connection with the customer's API key. The API returns 202 and the connection UUID in data.id. This starts a pairing attempt; it does not mean that WhatsApp is connected.
QR pairing
- Create a connection with
method: qrandprivacy_accepted: true. - Retrieve
GET connections/{connection}/pairingusing the same customer key. - Open
data.hosted_urlfor the customer, or renderdata.qr_data_urlas an image in your application. - Poll the pairing endpoint every few seconds until the status is
connected. Pairing credentials expire; create a new attempt after expiration.
Obtain the number owner's authorization before pairing and enabling content capture. Hosted pairing links are temporary credentials and must not be published or logged.
Phone-code pairing
Use method: code with phone in international format without the leading plus sign. When ready, the pairing response includes code. The requested phone number is not a verified identity until pairing completes.
Inbox settings
inbox_enabled controls private-conversation capture. group_inbox_enabled controls group-content capture independently. Enable only the capture that your integration needs and the number owner has authorized.
Infrastructure connections use inbox_reply_mode: external. Jawib's internal bots do not run on these connections, and internal reply mode is not permitted.
Disconnection and ownership
Disconnecting stops use of the connection. It does not immediately erase retained history. A customer cannot use another customer's connection, and pairing does not silently transfer an existing number between customer data boundaries.
List connections
curl --request GET "https://playjawib.com/api/v2/connections" \
--header "Authorization: Bearer $JAWIB_API_KEY" \
--header 'Accept: application/json'use Illuminate\Support\Facades\Http;
$response = Http::acceptJson()
->withToken(env('JAWIB_API_KEY'))
->send('GET', 'https://playjawib.com/api/v2/connections');
$data = $response->throw()->json();// Run in your server, e.g. Node.js. Never expose the token in browser code.
const response = await fetch('https://playjawib.com/api/v2/connections', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.JAWIB_API_KEY}`,
Accept: 'application/json'
}
});
const data = await response.json();
if (!response.ok) throw new Error(data.message ?? 'Request failed');{
"data": [],
"next_after_id": null
}Illustrative values. Use the actual identifiers and credentials returned by your request.
Create a connection
curl --request POST "https://playjawib.com/api/v2/connections" \
--header "Authorization: Bearer $JAWIB_API_KEY" \
--header 'Accept: application/json' \
--header 'Idempotency-Key: unique-operation-123' \
--header 'Content-Type: application/json' \
--data '{
"method": "qr",
"name": "Customer WhatsApp",
"privacy_accepted": true,
"inbox_enabled": true,
"group_inbox_enabled": false
}'use Illuminate\Support\Facades\Http;
$response = Http::acceptJson()
->withToken(env('JAWIB_API_KEY'))
->withHeader('Idempotency-Key', 'unique-operation-123')
->send('POST', 'https://playjawib.com/api/v2/connections', [
'json' => json_decode(<<<'JSON'
{
"method": "qr",
"name": "Customer WhatsApp",
"privacy_accepted": true,
"inbox_enabled": true,
"group_inbox_enabled": false
}
JSON, true),
]);
$data = $response->throw()->json();// Run in your server, e.g. Node.js. Never expose the token in browser code.
const response = await fetch('https://playjawib.com/api/v2/connections', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.JAWIB_API_KEY}`,
Accept: 'application/json',
'Idempotency-Key': 'unique-operation-123',
'Content-Type': 'application/json'
},
body: JSON.stringify({
"method": "qr",
"name": "Customer WhatsApp",
"privacy_accepted": true,
"inbox_enabled": true,
"group_inbox_enabled": false
})
});
const data = await response.json();
if (!response.ok) throw new Error(data.message ?? 'Request failed');Request body fields
| Field | Type | Description |
|---|---|---|
name | string | — |
method | string | qr / code |
phone | string | Required for code pairing, international phone number. |
privacy_acceptedrequired | boolean | — |
inbox_enabled | boolean | — |
group_inbox_enabled | boolean | — |
return_url | string | — |
{
"data": {
"id": "019c0000-0000-7000-8000-000000000002",
"name": "Customer WhatsApp",
"status": "pairing",
"service_mode": true,
"is_healthy": false,
"group_inbox_enabled": false,
"inbox_enabled": true,
"inbox_reply_mode": "external",
"requires_relink": false,
"pairing_expires_at": "2026-10-29T09:03:00+00:00",
"pairing_path": "/api/v2/connections/019c0000-0000-7000-8000-000000000002/pairing",
"last_seen_at": null
}
}Illustrative values. Use the actual identifiers and credentials returned by your request.
Retrieve a connection
Replace {connection} with the actual IDs returned by the API.
curl --request GET "https://playjawib.com/api/v2/connections/{connection}" \
--header "Authorization: Bearer $JAWIB_API_KEY" \
--header 'Accept: application/json'use Illuminate\Support\Facades\Http;
$response = Http::acceptJson()
->withToken(env('JAWIB_API_KEY'))
->send('GET', 'https://playjawib.com/api/v2/connections/{connection}');
$data = $response->throw()->json();// Run in your server, e.g. Node.js. Never expose the token in browser code.
const response = await fetch('https://playjawib.com/api/v2/connections/{connection}', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.JAWIB_API_KEY}`,
Accept: 'application/json'
}
});
const data = await response.json();
if (!response.ok) throw new Error(data.message ?? 'Request failed');{
"data": {
"id": "019c0000-0000-7000-8000-000000000002",
"name": "Customer WhatsApp",
"status": "pairing",
"service_mode": true,
"is_healthy": false,
"group_inbox_enabled": false,
"inbox_enabled": true,
"inbox_reply_mode": "external",
"requires_relink": false,
"pairing_expires_at": "2026-10-29T09:03:00+00:00",
"pairing_path": "/api/v2/connections/019c0000-0000-7000-8000-000000000002/pairing",
"last_seen_at": null
}
}Illustrative values. Use the actual identifiers and credentials returned by your request.
Retrieve pairing credentials
Replace {connection} with the actual IDs returned by the API.
curl --request GET "https://playjawib.com/api/v2/connections/{connection}/pairing" \
--header "Authorization: Bearer $JAWIB_API_KEY" \
--header 'Accept: application/json'use Illuminate\Support\Facades\Http;
$response = Http::acceptJson()
->withToken(env('JAWIB_API_KEY'))
->send('GET', 'https://playjawib.com/api/v2/connections/{connection}/pairing');
$data = $response->throw()->json();// Run in your server, e.g. Node.js. Never expose the token in browser code.
const response = await fetch('https://playjawib.com/api/v2/connections/{connection}/pairing', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.JAWIB_API_KEY}`,
Accept: 'application/json'
}
});
const data = await response.json();
if (!response.ok) throw new Error(data.message ?? 'Request failed');{
"data": {
"id": "019c0000-0000-7000-8000-000000000002",
"name": "Customer WhatsApp",
"status": "qr_ready",
"service_mode": true,
"is_healthy": false,
"group_inbox_enabled": false,
"inbox_enabled": true,
"inbox_reply_mode": "external",
"requires_relink": false,
"pairing_expires_at": "2026-10-29T09:03:00+00:00",
"pairing_path": "/api/v2/connections/019c0000-0000-7000-8000-000000000002/pairing",
"last_seen_at": null,
"hosted_url": "https://playjawib.com/integrations/connect/019c0000-0000-7000-8000-000000000002?expires=TIMESTAMP&signature=SIGNATURE",
"qr_data_url": "data:image/png;base64,BASE64_ENCODED_PNG"
}
}Illustrative values. Use the actual identifiers and credentials returned by your request.
Update inbox settings
Replace {connection} with the actual IDs returned by the API.
curl --request PATCH "https://playjawib.com/api/v2/connections/{connection}" \
--header "Authorization: Bearer $JAWIB_API_KEY" \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"inbox_enabled": true,
"group_inbox_enabled": true
}'use Illuminate\Support\Facades\Http;
$response = Http::acceptJson()
->withToken(env('JAWIB_API_KEY'))
->send('PATCH', 'https://playjawib.com/api/v2/connections/{connection}', [
'json' => json_decode(<<<'JSON'
{
"inbox_enabled": true,
"group_inbox_enabled": true
}
JSON, true),
]);
$data = $response->throw()->json();// Run in your server, e.g. Node.js. Never expose the token in browser code.
const response = await fetch('https://playjawib.com/api/v2/connections/{connection}', {
method: 'PATCH',
headers: {
Authorization: `Bearer ${process.env.JAWIB_API_KEY}`,
Accept: 'application/json',
'Content-Type': 'application/json'
},
body: JSON.stringify({
"inbox_enabled": true,
"group_inbox_enabled": true
})
});
const data = await response.json();
if (!response.ok) throw new Error(data.message ?? 'Request failed');Request body fields
| Field | Type | Description |
|---|---|---|
inbox_enabled | boolean | — |
group_inbox_enabled | boolean | — |
inbox_reply_mode | string | internal / external / human |
{
"data": {
"id": "019c0000-0000-7000-8000-000000000002",
"name": "Customer WhatsApp",
"status": "pairing",
"service_mode": true,
"is_healthy": false,
"group_inbox_enabled": true,
"inbox_enabled": true,
"inbox_reply_mode": "external",
"requires_relink": false,
"pairing_expires_at": "2026-10-29T09:03:00+00:00",
"pairing_path": "/api/v2/connections/019c0000-0000-7000-8000-000000000002/pairing",
"last_seen_at": null
}
}Illustrative values. Use the actual identifiers and credentials returned by your request.
Disconnect WhatsApp
Replace {connection} with the actual IDs returned by the API.
curl --request DELETE "https://playjawib.com/api/v2/connections/{connection}" \
--header "Authorization: Bearer $JAWIB_API_KEY" \
--header 'Accept: application/json'use Illuminate\Support\Facades\Http;
$response = Http::acceptJson()
->withToken(env('JAWIB_API_KEY'))
->send('DELETE', 'https://playjawib.com/api/v2/connections/{connection}');
$data = $response->throw()->json();// Run in your server, e.g. Node.js. Never expose the token in browser code.
const response = await fetch('https://playjawib.com/api/v2/connections/{connection}', {
method: 'DELETE',
headers: {
Authorization: `Bearer ${process.env.JAWIB_API_KEY}`,
Accept: 'application/json'
}
});
const data = await response.json();
if (!response.ok) throw new Error(data.message ?? 'Request failed');{
"data": {
"id": "019c0000-0000-7000-8000-000000000002",
"name": "Customer WhatsApp",
"status": "revoked",
"service_mode": true,
"is_healthy": false,
"group_inbox_enabled": false,
"inbox_enabled": false,
"inbox_reply_mode": "external",
"requires_relink": false,
"pairing_expires_at": "2026-10-29T09:03:00+00:00",
"pairing_path": "/api/v2/connections/019c0000-0000-7000-8000-000000000002/pairing",
"last_seen_at": null
},
"cleanup": {
"remote_logout_confirmed": true
}
}Illustrative values. Use the actual identifiers and credentials returned by your request.