contacts — who receives the message. contacts.default[] holds fixed (static) contacts; contacts.fields[] holds dynamic contacts, resolved at runtime from a card or start-form field.
fields (root level) — global template variables, injected into the message body ({{1}}, {{2}}...) and shared across all channels of the rules.
rules — the actual firing rules, each combining channels (channels[]) with conditions (conditions[]).
1.
Register the flow's phone (POST .../phone-config), if it does not already exist for the company.
2.
Create the phase's messaging configuration (POST .../messaging-config), with the contacts and, if needed, the template variables.
3.
Add at least one firing rule (POST .../messaging-config/rules).
4.
Enable the messaging module as an action of the corresponding phase.
A messaging configuration with no rule in rules[] remains inert — at least one rule is required for a message to actually be sent.
Within each channel, the channel name goes under the key name, not type — for example, {name: 'whatsapp', templateId: '...', setup: {phoneId: '...'}}.
The phone registration (phone-config) is tied to the company (tenant), not to an individual flow, and the call is idempotent: if the phone already exists, the API responds successfully indicating that the record already existed.
contacts.default is required even when there is no fixed contact — in that case, send an empty array.
Each item in contacts.fields[] needs a non-empty description — omitting it or sending it blank returns a validation error.
The fields field, at the configuration's root level, is also required even when empty — send an empty array when the message does not use dynamic variables in its body, such as in fixed approval or rejection notifications.
On update (PUT of the configuration), the type field of contacts.fields[] accepts a more restricted set of values than on creation — always use 'default' for the standard contacts (name, phone, email).
On update, each item in contacts.default[] must have a non-empty phone, even for contacts that should receive the message by email only; in that case, use a fictitious phone number in a valid format.
On update, each item in the root fields[] needs the required field explicitly set (true or false).
When updating a specific rule (PUT .../rules/{ruleId}), the rule identifier goes only in the URL — including it in the request body as well returns a validation error.
The WhatsApp channel requires setup.phoneId pointing to a previously registered phone; its absence returns a 404 error.