Skip to navigation

Chat Bridge API

Voices omnichannel messaging platform
Chat Bridge

Chat Bridge is the omnichannel messaging platform by Voices. Its public API lets you integrate the platform’s communication services into your own applications through an HTTP REST interface. All requests are authenticated with an App-Key or an OAuth 2.0 access token and use JSON as the data exchange format.

Available channels

Tools

Getting started

To use the API you need an App-Key, which you can request from the Chat Bridge team. The App-Key comes preconfigured with the account and channel it is enabled for, so you don’t need to specify them on each request.

A single App-Key enables one channel. If you need to operate both Blaster and WhatsApp, request one App-Key per channel. The Tools endpoints (Short Links) accept any App-Key.

Authentication

Every request must carry one of two credentials. Both identify the same App-Key, so account, channel, webhooks and rate limit are identical whichever you use.

Both credentials are provided by Voices: request them from the Chat Bridge team.

Option 1 — API Key

Include the API Key issued by Voices in the x-api-key header of every request (see API Key):

curl https://connect.chatbridge.mx/v1/whatsapp/accounts \
-H "x-api-key: YOUR_APP_KEY"

Option 2 — OAuth 2.0 client credentials

Exchange the client_id and client_secret issued by Voices for a short-lived access token, then send it as a Bearer token. Tokens last 1 hour (expires_in); cache and reuse them instead of requesting one per call.

curl -X POST https://connect.chatbridge.mx/api/oauth/token \
-H "Content-Type: application/json" \
-d '{"grant_type":"client_credentials","client_id":"ck_...","client_secret":"..."}'
{ "access_token": "eyJhbGciOi...", "token_type": "Bearer", "expires_in": 3600 }
curl https://connect.chatbridge.mx/v1/whatsapp/accounts \
-H "Authorization: Bearer eyJhbGciOi..."

If a request carries both headers, Authorization: Bearer takes precedence. See OAuth 2.0 in the Authentication section for the full contract of the token endpoint (request formats, errors and per-IP limits).

Authentication errors

The following scenarios produce an authentication or authorization error. The Message column shows the literal string returned by the API:

ScenarioHTTPerrorCodeMessage
No x-api-key nor Authorization header401401Token de autenticación requerido
The x-api-key does not exist or is incorrect401401App-key inválida
The App-Key is disabled401401App-key inactiva
The App-Key only accepts OAuth 2.0 and x-api-key was sent401450Esta app-key ya no acepta x-api-key, usa OAuth 2.0
The access token is invalid, expired or its App-Key was disabled401455Token de acceso inválido, expirado o app-key desactivada
The App-Key has no access to the requested channel403403Esta app-key no tiene acceso a este canal

Rate limiting

If your App-Key has a configured limit, a 60-second window applies. When exceeded, the API responds with status 429:

{
"statusCode": 429,
"error": "Too Many Requests",
"message": "Has superado el límite de requests permitidos por minuto",
"errorCode": 300
}

Error format

Every error follows the same structure:

{
"statusCode": 400,
"error": "Bad Request",
"message": "Descripción del problema",
"errorCode": 301
}
FieldTypeDescription
statusCodenumberHTTP status code.
errorstringHTTP error type.
messagestringHuman-readable description of the problem.
errorCodenumberInternal code, useful when reporting to support.
metadataobjectAdditional information (optional).

Support

For questions or to report an issue, contact the Chat Bridge team and include the errorCode shown in the error response.