Before you start
- Get a server-side API Key from Authentication.
- Obtain your workspace ID, an active WhatsApp line’s
providerChannelId, and an internal Bridge User’s email. See Identifiers and concepts. - Use a new test phone number in international format. If the Contact already exists, use contact lookup instead of creating it again.
- Check any required custom attributes and the workspace’s onboarding sequence. This minimal example does not supply custom attributes or override templates.
- Choose
enableExternalBroadcastexplicitly:truerequests external delivery when conversation and recipient rules permit it;falsestill creates the Message but skips external broadcast. Neither value confirms provider delivery. This flag does not override visibility or permissions.
The sequence
The Contact’s
id becomes the external participant’s identifier with identifierType: "ID". The Conversation’s id becomes the Message’s conversationId.
Run the example
Use Node.js with built-infetch. Save this as first-conversation.mjs. Supply these environment variables through your server’s secret and configuration settings:
The names and message below are examples. Replace them with your intended test content before running.
Understand the result
- A
201Contact response gives you the Contact’s identity and workspace. Readtypeto see its actualNORMALorPARTIALclassification. - A
201Conversation response gives you the ID to use next. When no line is free, Bridge can recover a released Conversation with exactly the requested participants. That keeps its ID and history; the requestednameandstatusare not applied in that recovery case. - A
201Message response suppliesmessageId. It does not by itself prove that WhatsApp delivered the message to the Contact.
teamId option instead of participants.internals; they are mutually exclusive.
If a step fails
The example stops at the failed request and never retries a write automatically. A network failure can leave the outcome uncertain. Check the relevant resource before repeating a create or send operation.
See Responses and errors for response shapes and recovery decisions.
Next steps
- Upload and send an attachment.
- Choose and fill a WhatsApp template.
- Create a Contact, create a Conversation, and create a Message for the complete request and response contracts.

