1 - Introduction
The Journeys trigger API enables developers to integrate the powerful charles journeys with other systems, such as Customer Data Platforms (CDPs) or Marketing Automation Suites
Journeys
Journeys allows marketers to design an interactive customer experience consisting of conditions and actions, such as personalized WhatsApp marketing templates.
2 - Specification
2a - Authentication
All endpoints are authenticated using a custom HTTP header that contains a token.
To create a token visit
Settings
>API Keys
The header to use is
X-API-Key
2b - Endpoints
Journey trigger (Start a flow)
URL: https://journeys.hello-charles.com/webhooks/v0/rest-trigger/organization/{ORGANIZATION ID}/flow/{FLOW ID}/trigger/
Method: POST
Headers:
Content-Type: application/json
X-API-KEY: <API KEY>
See 2a - Authentication for detail
Body:
The body must contain the key
phone_number
in the format 491573758431, i.e. the number must start with the country code.Optionally, the body can contain any key-value pair (incl. nested structures). These values can then be used to personalize WhatsApp messages.
Example CURL request:
curl -X POST \ https://journeys.hello-charles.com/webhooks/v0/rest-trigger/organization/47828204-2a8f-4564-91b9-ee0f9e458410/flow/90578cdb-874c-4ae0-bd33-9553dada8e1a/trigger/0dedebaf-0f17-41b4-80c9-f356bc53d3e0 \ -H 'X-Api-Key: <REPLACE WITH API KEY>' \ -H 'Content-Type: application/json' \ -d '{"phone_number":"<ENTER_PHONE_NUMBER>","first_name":"Max","last_name":"Mustermann","discount_code":"happybday24"}'
The URL with dynamic values can be copied from the journey definition (see screenshot on the right):
Response codes
Code | Message |
200 | Triggered flow successfully. |
401 | Unauthorized |
500 | Internal server error. Please try again later. |