Create a bridge
/api/instances
Provision a new bridge on your subscription. If customer_ref already exists, the existing record comes back. The subscription itself (and the 3-day free trial, card on file) starts when you connect your first number in the dashboard; the API adds bridges to it.
-
customer_refstring required - Your own identifier for this bridge (a user ID, an order number). Letters, digits, dashes and underscores.
-
webhook_urlstring -
URL that receives every inbound WhatsApp event as a
POST. Omit it to use the hosted inbox (events show on the dashboard); change it later with PATCH.
Errors. 400 invalid_customer_ref or invalid_webhook_url. 402 no_subscription: the account has no subscription yet, connect a number in the dashboard first (the body carries dashboard_url and billing_url); or payment_required when payment is past due. 403 the account's bridge limit is reached (default 10, contact support to raise it).
curl -X POST "https://wabridges.com/api/instances" \
-H "Authorization: Bearer $WA_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"customer_ref": "user-123",
"webhook_url": "https://yourbackend.com/hook"
}'
{
"id": "7d09aa9c-2f4e-4b6a-9c1d-3e5f7a9b1c2d",
"customer_ref": "user-123",
"state": "running",
"created_at": 1777180605,
"webhook_secret": "whsec_...",
"webhook_url": "https://yourbackend.com/hook"
}