Zum Inhalt springen

Start by API

Dieser Inhalt ist noch nicht in Ihrer Sprache verfügbar.

POST https://journey.pushwoosh.com/api/journey/{id}/start/external

Enters a set of users into a journey’s API entry point. Use it to drive journeys from your own backend. For example, start an onboarding flow when a user completes signup on your server.

Prerequisites

Anchor link to
  • The journey is in the Running state.
  • The journey contains exactly one API entry point (the “Start by API” element), and that element is not deactivated.
  • The attribute names you send match the attributes configured on that API entry point.

Path parameters

Anchor link to
NameTypeDescription
idstringJourney ID of the running journey.

Request headers

Anchor link to
NameRequiredValue
Content-TypeYesapplication/json
AuthorizationYesApi <server_api_token>. See Server API token.

Request body

Anchor link to

The body has a single payload object. You must provide exactly one of users, hwids, or filter to select who enters the journey.

FieldTypeDescription
payload.usersstring[]User IDs to enter. Mutually exclusive with hwids and filter.
payload.hwidsstring[]HWIDs to enter. Mutually exclusive with users and filter.
payload.filterstringA seglang expression selecting the audience. Mutually exclusive with users and hwids.
payload.attribute_valuesmap<string, string>Optional. Values for the custom attributes defined on the API entry point. Each key must match a configured attribute name.

Request examples

Anchor link to
Enter specific users
Anchor link to
Terminal window
curl -X POST 'https://journey.pushwoosh.com/api/journey/<journey_id>/start/external' \
-H 'Authorization: Api YOUR_API_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"payload": {
"users": ["user-123", "user-456"]
}
}'
Enter specific users with attributes
Anchor link to
{
"payload": {
"users": ["user-123", "user-456"],
"attribute_values": {
"promo_code": "SUMMER25",
"tier": "gold"
}
}
}
Enter an audience by filter
Anchor link to
{
"payload": {
"filter": "A(\"XXXXX-XXXXX\").tags(\"City\").eq(\"London\")"
}
}
{
"request_uuid": "9f8b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d"
}
FieldTypeDescription
request_uuidstringIdentifier of the accepted entry request. The request is processed asynchronously.