Skip to main content
POST

Overview

Any flow built with a Webhook (Generic) trigger (see Triggers) can be started by sending it a POST request. When TextYess receives a valid request, it resolves or creates the contact, maps your JSON body into the flow’s starting memory, and starts the flow.
Publishing the flow generates its webhook URL. Open the trigger node on the canvas afterwards to copy the URL, the credential to authenticate with, and a ready-to-run cURL command for that flow.

Path Parameters

string
required
The id of the flow you want to trigger. Copy it from the flow’s Webhook trigger node after publishing.

Authentication

Most flows require a credential — either header works on every flow in your organization:
string
Your organization’s flow-trigger token. One token authenticates every webhook-triggered flow, so it’s the easiest option when you’re wiring up several flows to the same external system (e.g. one HubSpot workflow calling multiple flows). Find it, and rotate it, in the Developers section.
string
A secret generated for this specific flow only. Copy it from the flow’s Webhook trigger node after publishing.
Flows created before webhook secrets were introduced keep working without a credential, for backwards compatibility. All other flows require either header — a request with neither (or an invalid value) is rejected.

Body Parameters

A webhook must identify a person: include email or phone_number (at least one).
string
The recipient’s email address. Required when phone_number is not provided. When present, the contact is resolved or created by email.
string
The recipient’s phone number (E.164, e.g. “+393475156348”). Required when email is not provided. Used for WhatsApp flows.
string
The two-letter country code. Required when phone_number is set (it must match the WhatsApp template language). Not needed for email-only payloads.
string
The recipient’s first name. Optional.
string
The recipient’s last name. Optional.
boolean
Optional. Declares marketing-email consent for the resolved contact. When omitted, consent is not touched (we never assume it). Set to true for newsletter/subscribe webhooks.
string
Optional URL for custom redirects. For abandoned-cart automations, this should be the cart recovery URL.
string
Optional discount code you want to send to the user, so you can inject a unique code per user directly into the WhatsApp template.
Any other field you send is captured too and available to the flow as payload.<field> — for example a CRM tag, an order id, or a custom score. See Webhook (Generic) for how the payload maps into flow memory.

Response

boolean
Whether the webhook was accepted and the flow was started.
string
The id of the started flow run. Only present when the webhook triggered a flow.

Important Notes

  1. Template dedup: The same phone number cannot receive the identical template message within a 72-hour window — this applies to any trigger, not just webhooks.
  2. Abandoned Cart Automation: When building abandoned-cart flows, custom_url in the payload should be the cart recovery URL, and in a “Send template message” step of type “Abandoned checkout” only the call-to-action text can be customized (not the link).
  3. Language Requirements: The template language must match the country code in the payload — e.g. an Italian (IT) template requires country_code: "IT"; mismatched languages prevent delivery.