palbaseDocs

Palbase Journeys · API

POST/journeys/{key}/copy

Copy a journey

Copies a journey's definition into a new draft: how a live journey is changed (copy, change the copy, publish it, stop the old one).

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

Path

keystring · requiredThe journey's key

Request body

keystring · requiredThe copy's key
namestring · optionalThe copy's name; the journey's unless it says
curl
curl -X POST "https://<your-ref>.palbase.studio/journeys/<key>/copy" \
  -H "apikey: $PALBASE_SECRET_KEY" \
  -H "content-type: application/json" \
  -d '{"key":"string"}'

Responses

201The copy, a 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)

429Too many requests

503The service is unavailable for a moment; retry

defaultAn error

Operation CopyJourney of journeys's contract.