Palbase Journeys · API
/journeys/{key}Change a draft
Replaces a draft's definition. A published journey does not change (409 journey_published): copy it into a new draft, publish that and stop this one.
Called by your server, with the project's secret key.
Path
keystring · requiredThe journey's keyRequest 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.curl -X PUT "https://<your-ref>.palbase.studio/journeys/<key>" \
-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":{}}}'Responses
200The 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)
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)
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 UpdateJourney of journeys's contract.