Palbase Journeys · API
/journeysCreate a journey
Makes a draft journey from its definition. A definition that breaks a rule is refused with every problem, each at its path and with what to do about it (422 invalid_journey); POST /journeys/validate checks one without saving it. Nothing runs until it is published. A project keeps 500 journeys (409 too_many_journeys).
Called by your server, with the project's secret key.
Request body
definitionobject · requiredA journey: who enters (entry), the steps each person who entered goes through from start, what the journey is for (goal) and what takes a person out (exit). Steps are keyed by id; each does one thing and names the step after it (next; none, or end, ends the person's run). A person is in a journey once at a time.keystring · requiredThe journey's own name: 1 to 64 of a-z, 0-9 and _, starting with a letter (winback)curl -X POST "https://<your-ref>.palbase.studio/journeys" \
-H "apikey: $PALBASE_SECRET_KEY" \
-H "content-type: application/json" \
-d '{"definition":{"entry":{"audience":"string","event":{"name":"string"},"inactive":{"event":"string","for":"string"},"members_of":"string"},"name":"string","start":"string","steps":{}},"key":"string"}'Responses
201The draft
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)
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)
413The request body is too large (request_too_large)
422The definition breaks a rule (invalid_journey): every problem, each at its path with what to do about it
429Too many requests
503The service is unavailable for a moment; retry
defaultAn error
Operation CreateJourney of journeys's contract.