Initialize transactional flow

📘

NOTE:

Select regional availability. This feature is currently available for customers with end users in select countries. To find out if this feature is available in your region, contact a Telesign expert. This product is available for full-service accounts only.

This endpoint starts a transactional flow inside the Flow Builder. The request must contain a valid flowId and a dataToReplace object whose keys match the parameters defined when the flow was created.

General Requirements

  • Authentication: This authentication method is mandatory, to obtain a valid token from the authentication system, post that include it in all API requests.
  • Encoding: The API only accepts characters in UTF-8 Unicode format.
  • Accepts: application/json is the expected data format for the API.
  • Responds with: application/json is the data format for API responses.
  • Required headers:
    • Content-Type: application/json
    • Authorization: Bearer [your-Access-token]

How dataToReplace works

dataToReplace is the payload that feeds the flow with the dynamic values your business logic needs. Each entry is a simple key → value pair. Key must be identical (case, spelling, numbers, underscores) to the parameter name configured under Request parameters. Value is a primitive JSON value (string, number, or boolean).

Required versus optional parameters

In two situations, a parameter becomes required and will trigger a 400 – Missing Required Parameters error if absent:

Field(s)Situation
Mail field / Phone fieldSelect one existing parameter that holds the user’s e-mail or phone number. The Hub flags it as required for nodes such as PhoneID.
Advanced → Select required fieldsMulti-select listing all parameters in the flow. Any parameter you select here is required at runtime; un-selected parameters remain optional.

If a required parameter is missing or the key name doesn’t match, the response is:

{
  "data": null,
  "error": {
    "message": "Required fields missing: <parameterName>"
  }
}

📘

NOTE:

The comparison is case-sensitive (clientId ≠ ClientID). Parameters not flagged in either list above are optional and can be omitted without error.

Naming and value rules

#Content typeRule
1Case-sensitiveclientId, clientID, and CLIENTID are three different parameters.
2Free-form namesLetters, numbers, and underscores allowed (segment, Segment1, customer_email). Avoid spaces.
3Primitive valuesAccepts string, number, boolean.
4One-to-one mappingEvery required parameter must appear in dataToReplace; optional parameters may be skipped.

Example 1 – ID lookup

  1. Create flow: Add a Request parameter called idNumber.
  2. Call /init-flow with:
{
  "flowId": "…",
  "dataToReplace": {
    "idNumber": "90123456"
  }
}
  1. Result: The flow forwards 90123456 to a downstream personal-data service.

Example 2 – Customer segment routing

  1. Create flow: Add a parameter called segment.
  2. Call /init-flow with:
{
  "flowId": "…",
  "dataToReplace": {
    "segment": "GOLD"
  }
}
  1. Result: Branching rules route GOLD customers to the premium path.

📘

NOTE:

If you rename or delete a parameter in the flow designer, update your dataToReplace keys accordingly to avoid the 400 – Missing Required Parameters error.

Language
Credentials
Bearer
JWT
Click Try It! to start a request and see the response here!