Duplicate journey

Changed on

Copy an existing journey. The copy is always in the draft state, whatever state the source is in, and the source does not change. To shape the copy in the same request, send overrides. It is a journey document that is applied over the copy as a JSON Merge Patch (RFC 7396). Use it to create the copy in its final state, instead of creating the copy and then patching it.

post/apps/{app_id}/journeys/{id}/duplicate

Request

  • Base URL
    https://api.onesignal.com
  • URL
    https://api.onesignal.com/apps/{app_id}/journeys/{id}/duplicate
  • Auth
    none required

Path parameters

app_idstring required

Your OneSignal App ID in UUID v4 format. See Keys & IDs.

idstring required

UUID of the journey to copy.

Headers

Authorizationstring required

Your App API key with prefix Key . See Keys & IDs.

Content-Typestring required

Request body

Response

201

idstring

Journey UUID. Read-only.

app_idstring

UUID of the app the journey belongs to. Read-only.

namestring

Journey name, up to 300 characters.

descriptionstring nullable

Journey description, up to 1024 characters. Defaults to an empty string.

state'draft' | 'scheduled' | 'processing' | 'active' | 'archived'

Journey state. Read-only. New journeys are created as draft. processing is a transient state while an activation is in progress, and archived is a journey that has been stopped. Change it through the state field on Update journey.

created_atstring

ISO 8601 creation time. Read-only.

updated_atstring

ISO 8601 last-update time. Read-only.

started_atstring nullable

ISO 8601 time the journey was activated, or null. Read-only. May stay null briefly after you set state to active: activation is enqueued for processing, and started_at populates once the journey finishes processing and becomes active.

archived_atstring nullable

ISO 8601 time the journey was archived, or null. Read-only.

created_sourcestring nullable

Origin of the journey, for example public_api or dashboard. Read-only.

concurrency_keystring

Opaque optimistic-concurrency token. Read-only. Pass it back on update to guard against overwriting a concurrent change (409 journey-stale). Send it back exactly as read from this response; do not construct or parse it.

Changes