palbaseDocs

Palbase Journeys · API

POST/journeys/{key}/test

Try a journey on a test user

Runs a journey — a draft too — for one of the project's test users (Auth › Test accounts), from its start, now: its messages are sent and its coupons given as a person's would be (passed over where the journey's real runs pass them over: one people enter on an event the app reports, on what became of a message, or on an audience that is not trusted), but each wait lasts a minute, and the run is counted in no report and no month's people (its events carry test: true). A test run of the user's open in the journey ends first. Refused for a user who is no test user (422 not_a_test_user) and for a stopped journey (409 journey_stopped).

Called by your server, with the project's secret key.

Path

keystring · requiredThe journey's key

Request body

user_idstring · requiredOne of the project's test users (Auth › Test accounts)
curl
curl -X POST "https://<your-ref>.palbase.studio/journeys/<key>/test" \
  -H "apikey: $PALBASE_SECRET_KEY" \
  -H "content-type: application/json" \
  -d '{"user_id":"string"}'

Responses

201The test run, as far as it went at once

400The request is malformed: a key, a limit, a cursor or a simulated person is wrong (the error says which)

401No valid credentials

403Not the project's secret key (secret_key_required)

404The project has no journey of this key (journey_not_found)

409A journey of this key exists (journey_exists), a published journey does not change (journey_published), only a live journey stops (journey_not_live), a stopped journey is tried no more (journey_stopped), a project runs 50 journeys at once (too_many_live_journeys) and keeps 500 (too_many_journeys)

422The user is none of the project's test users (not_a_test_user): a journey is tried on a test user alone

429Too many requests

503The service is unavailable for a moment; retry

defaultAn error

Operation TestJourney of journeys's contract.