Skip to main content

Overview

When you create a conversation, onboardingTemplates lets you choose the WhatsApp templates it opens with, in order. A template can contain variables — an order number, a delivery date, the Contact’s first name. Some of them Bridge fills on its own for each Contact; others only you can provide, and you send them in the entry’s parameters. The flow has three steps:
  1. Look up the template’s variables.
  2. Decide which values to send.
  3. Send them with POST .../conversations.
Every check described on this page runs before anything is created. If the request is rejected, no conversation is created and no message is sent, so you can correct it and send it again.

1. Find the template’s variables

templateId accepts either the template’s id or its name. The response lists its variables:
A template that is not in your workspace returns 404 with BRIDGE_TEMPLATE_0001.

2. Decide which values to send

A value you send for a callerMustSupply: false variable replaces Bridge’s value and is used for every Contact in the conversation.
To keep Bridge’s value, omit the key. A blank value is not treated as “use the default”: it is sent as you wrote it. A required variable with a blank or whitespace-only value is rejected as missing.

3. Send the parameters

Each entry in onboardingTemplates takes the template’s id (as returned in step 1) and its parameters, keyed by variable key. Position in the list sets the sending order.
In this example first_name is omitted, so each Contact receives their own first name. Limits per template: at most 50 parameters, keys up to 128 characters, values up to 1,024 characters. Requests beyond these limits are rejected as malformed (see Errors). Depending on how the workspace is set up, your templates replace its whole onboarding sequence or only its first template. In the second case, the rest of the configured sequence is still sent after yours.

WhatsApp value rules

WhatsApp rejects some values when the message is sent. Bridge checks them up front so the request fails while you can still fix it:
The body limit includes the values Bridge fills in for each Contact, such as their first name. Bridge can only check the values it can see when you make the request, so leave room for them.
Bridge never trims or rewrites your values: what you send is what the Contact receives.

Errors

All errors use the application/problem+json format described in Error codes. Branch on code, never on title.

Missing values — 0604

Invalid values — 0607

reason is the first rule the value breaks:

0608 is not fixed by changing the request

BRIDGE_CONVERSATION_0608 only occurs in workspaces where your templates replace just the first template of the onboarding sequence. It means a template the workspace sends after yours needs values that only the caller can provide, and the API cannot supply them. Ask a workspace admin to change the onboarding sequence.

Malformed requests

A request that does not match the schema — more than 50 parameters, a key over 128 characters, a value over 1,024, or an unknown field — is rejected with 422 without a code. It carries an errors list pointing at each problem instead:

Evaluation order

Checks run in this order, and the first error wins:
  1. Rate limit — 429
  2. Request shape — 422 without code
  3. Participants, brand and line — 400 / 409, for example BRIDGE_BRAND_0101 or BRIDGE_PROVIDER_CHANNEL_0001
  4. Each template, in list order: 0601 / 0602 → 0603 → 0606 → 0605 → 0604 → 0607
  5. 0608, only in workspaces where your templates replace just the first template
So fixing one error can reveal the next. Values for a later template are not checked until every earlier template passes.