curl --request POST \
--url https://api.onesignal.com/apps/{app_id}/journeys/{id}/duplicate \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--data '
{
"overrides": {
"name": "Welcome series v2"
}
}
'const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': '<content-type>'},
body: JSON.stringify({overrides: {name: 'Welcome series v2'}})
};
fetch('https://api.onesignal.com/apps/{app_id}/journeys/{id}/duplicate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.onesignal.com/apps/{app_id}/journeys/{id}/duplicate"
payload = { "overrides": { "name": "Welcome series v2" } }
headers = {
"Authorization": "<authorization>",
"Content-Type": "<content-type>"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.onesignal.com/apps/{app_id}/journeys/{id}/duplicate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'overrides' => [
'name' => 'Welcome series v2'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: <content-type>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.onesignal.com/apps/{app_id}/journeys/{id}/duplicate"
payload := strings.NewReader("{\n \"overrides\": {\n \"name\": \"Welcome series v2\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("Content-Type", "<content-type>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}require 'uri'
require 'net/http'
url = URI("https://api.onesignal.com/apps/{app_id}/journeys/{id}/duplicate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = '<content-type>'
request.body = "{\n \"overrides\": {\n \"name\": \"Welcome series v2\"\n }\n}"
response = http.request(request)
puts response.read_bodyHttpResponse<String> response = Unirest.post("https://api.onesignal.com/apps/{app_id}/journeys/{id}/duplicate")
.header("Authorization", "<authorization>")
.header("Content-Type", "<content-type>")
.body("{\n \"overrides\": {\n \"name\": \"Welcome series v2\"\n }\n}")
.asString();using RestSharp;
var options = new RestClientOptions("https://api.onesignal.com/apps/{app_id}/journeys/{id}/duplicate");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "<authorization>");
request.AddJsonBody("{\n \"overrides\": {\n \"name\": \"Welcome series v2\"\n }\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
false{
"id": "7b6a5948-3726-1504-f3e2-d1c0b9a8f7e6",
"app_id": "1a2b3c4d-5e6f-7081-92a3-b4c5d6e7f809",
"name": "Welcome series v2",
"description": "Onboard new users over their first week.",
"state": "draft",
"created_at": "2026-06-02T09:30:00Z",
"updated_at": "2026-06-02T09:30:00Z",
"started_at": null,
"archived_at": null,
"created_source": "public_api",
"audience": {
"kind": "segment",
"included_segment_ids": [
"3f7c1e90-0000-0000-0000-000000000001"
],
"excluded_segment_ids": [],
"future_additions_only": false
},
"early_exit": null,
"reentry_rules": null,
"schedule": null,
"nodes": [
{
"id": "22222222-0000-0000-0000-000000000001",
"kind": "send_push",
"template_id": "9a8b7c6d-0000-0000-0000-000000000001"
},
{
"id": "22222222-0000-0000-0000-000000000002",
"kind": "wait",
"duration_seconds": 86400
},
{
"id": "22222222-0000-0000-0000-000000000003",
"kind": "send_email",
"template_id": "9a8b7c6d-0000-0000-0000-000000000002"
}
],
"concurrency_key": "5b1f0c1d9a3e47a2b8c6d0e4f7a913b5c2d8e6f40a7b9c1d3e5f70829a4b6c8d"
}{
"errors": [
{
"code": "invalid-payload",
"title": "The property '#/nodes/1' contains additional properties [\"id\"] outside of the schema when none are allowed",
"meta": {
"attribute": "base",
"path": "nodes/1"
}
}
]
}{
"errors": [
{
"code": "journey-not-entitled",
"title": "Journeys are not enabled for this app",
"meta": {}
}
]
}{
"errors": [
{
"code": "journey-not-found",
"title": "Journey not found",
"meta": {}
}
]
}Duplicate journey
Copy an existing journey into a new draft. You can apply overrides to the copy in the same request.
curl --request POST \
--url https://api.onesignal.com/apps/{app_id}/journeys/{id}/duplicate \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--data '
{
"overrides": {
"name": "Welcome series v2"
}
}
'const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': '<content-type>'},
body: JSON.stringify({overrides: {name: 'Welcome series v2'}})
};
fetch('https://api.onesignal.com/apps/{app_id}/journeys/{id}/duplicate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.onesignal.com/apps/{app_id}/journeys/{id}/duplicate"
payload = { "overrides": { "name": "Welcome series v2" } }
headers = {
"Authorization": "<authorization>",
"Content-Type": "<content-type>"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.onesignal.com/apps/{app_id}/journeys/{id}/duplicate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'overrides' => [
'name' => 'Welcome series v2'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: <content-type>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.onesignal.com/apps/{app_id}/journeys/{id}/duplicate"
payload := strings.NewReader("{\n \"overrides\": {\n \"name\": \"Welcome series v2\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("Content-Type", "<content-type>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}require 'uri'
require 'net/http'
url = URI("https://api.onesignal.com/apps/{app_id}/journeys/{id}/duplicate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = '<content-type>'
request.body = "{\n \"overrides\": {\n \"name\": \"Welcome series v2\"\n }\n}"
response = http.request(request)
puts response.read_bodyHttpResponse<String> response = Unirest.post("https://api.onesignal.com/apps/{app_id}/journeys/{id}/duplicate")
.header("Authorization", "<authorization>")
.header("Content-Type", "<content-type>")
.body("{\n \"overrides\": {\n \"name\": \"Welcome series v2\"\n }\n}")
.asString();using RestSharp;
var options = new RestClientOptions("https://api.onesignal.com/apps/{app_id}/journeys/{id}/duplicate");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "<authorization>");
request.AddJsonBody("{\n \"overrides\": {\n \"name\": \"Welcome series v2\"\n }\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
false{
"id": "7b6a5948-3726-1504-f3e2-d1c0b9a8f7e6",
"app_id": "1a2b3c4d-5e6f-7081-92a3-b4c5d6e7f809",
"name": "Welcome series v2",
"description": "Onboard new users over their first week.",
"state": "draft",
"created_at": "2026-06-02T09:30:00Z",
"updated_at": "2026-06-02T09:30:00Z",
"started_at": null,
"archived_at": null,
"created_source": "public_api",
"audience": {
"kind": "segment",
"included_segment_ids": [
"3f7c1e90-0000-0000-0000-000000000001"
],
"excluded_segment_ids": [],
"future_additions_only": false
},
"early_exit": null,
"reentry_rules": null,
"schedule": null,
"nodes": [
{
"id": "22222222-0000-0000-0000-000000000001",
"kind": "send_push",
"template_id": "9a8b7c6d-0000-0000-0000-000000000001"
},
{
"id": "22222222-0000-0000-0000-000000000002",
"kind": "wait",
"duration_seconds": 86400
},
{
"id": "22222222-0000-0000-0000-000000000003",
"kind": "send_email",
"template_id": "9a8b7c6d-0000-0000-0000-000000000002"
}
],
"concurrency_key": "5b1f0c1d9a3e47a2b8c6d0e4f7a913b5c2d8e6f40a7b9c1d3e5f70829a4b6c8d"
}{
"errors": [
{
"code": "invalid-payload",
"title": "The property '#/nodes/1' contains additional properties [\"id\"] outside of the schema when none are allowed",
"meta": {
"attribute": "base",
"path": "nodes/1"
}
}
]
}{
"errors": [
{
"code": "journey-not-entitled",
"title": "Journeys are not enabled for this app",
"meta": {}
}
]
}{
"errors": [
{
"code": "journey-not-found",
"title": "Journey not found",
"meta": {}
}
]
}Overview
Copy the Journey named in the path. The copy is a new journey in thedraft state. The source does not change.
started_at and archived_at set to null. To activate the copy, use the Update journey API or the OneSignal dashboard.How to use this API
Authenticate with your App API Key. The key must have permission to create journeys. To find theid of the source journey, use the View journeys API. You can also open the journey in the dashboard and read the id from the URL.
POST /apps/{app_id}/journeys/{id}/duplicate
What the copy inherits
The copy carries thedescription, audience, nodes, early_exit, and reentry_rules of the source.
name: the copy takes the name of the source plus(Copy). If the result is longer than the 300 character limit, the source part is truncated to fit. If you duplicate a copy, the suffix is added again rather than counted.nodes: nodes and branches get newidvalues from the server. Aclient_node_idis a value that you assign, so the copy keeps it unchanged. Anon_notification_actioncondition points at the matching node in the copy.schedule: the copy does not inherit it, because a copiedstart_atis almost always in the past. To schedule the copy, send ascheduleunderoverrides.stateisdraft,started_atandarchived_atarenull, andcreated_sourceispublic_api. The copy gets its ownconcurrency_key.
Apply overrides
overrides holds a journey document that is applied over the copy. It uses JSON Merge Patch (RFC 7396), which merges one document into another. overrides accepts the same writable fields as Create journey, and none of them are required. Use it to create the copy in its final state, instead of creating the copy and then patching it.
{
"overrides": {
"name": "Welcome series v2",
"description": null,
"schedule": { "start_at": "2026-07-01T14:00:00Z" },
"early_exit": { "rules": { "on_session": true } }
}
}
- An object merges into the copied object key by key. The
early_exitabove adds a rule and leaves the other rules of the source in place. nullclears the copied value. The"description": nullabove gives the copy no description.- An array replaces the copied array as a unit. A
nodesarray replaces the whole graph of the source and does not merge into it. Send the complete graph that you want. - If an
audienceoverride changeskind, the copy drops the fields of the previous kind. It does not keep them beside the new fields.
400 validation error, exactly as on Create journey. This covers the journey id and state, the lifecycle timestamps, and the id fields on nodes and branches.nodes override replaces the graph, so an id inside it addresses nothing. To reference a node from elsewhere in the same request, use client_node_id.
Only overrides is read from the body. A journey field sent at the top level is ignored rather than rejected. For example, {"name": "Renamed"} leaves the copy with the derived name.
Response
A successful request returns201 Created and the full copy in the draft state. The response contains the id fields from the server and the concurrency_key. On a later Update journey request, pass that concurrency_key unchanged. It stops your request from overwriting a concurrent change.
Error responses
| Status | Code | Description |
|---|---|---|
| 400 | invalid-payload | overrides failed validation. This covers an overrides value that is not an object, schema failures such as a server-controlled field or an unknown property, and business-logic failures on the copy. |
| 403 | journey-not-entitled | Journeys are not enabled for this app. |
| 404 | journey-not-found | No journey with that id exists for this app. |
| 429 | Rate limit exceeded. Wait the number of seconds in the Retry-After header before retrying. See Rate limits. |
{ "errors": [{ "code", "title", "meta" }] }. Branch on code and meta, not on title, whose wording comes from the schema validator and can change between releases.
A schema failure reports base in meta.attribute and a JSON Pointer (RFC 6901) in meta.path. The pointer names the object that holds the offending property, not the property itself, and the same pointer appears in title. Both are relative to the overrides document rather than to the request body. A rejected state at the top of overrides therefore reports #/, and meta.path is omitted because the pointer is the root. A business-logic failure on the copy names the field in meta.attribute instead.Body
Journey fields to apply to the copy. Accepts the same writable fields as Create journey, and none of them are required. Fields sent outside overrides are ignored.
Show child attributes
Show child attributes
Response
201
Full journey representation returned by the detail and create endpoints.
Journey UUID. Read-only.
UUID of the app the journey belongs to. Read-only.
Journey name, up to 300 characters.
Journey description, up to 1024 characters. Defaults to an empty string.
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.
draft, scheduled, processing, active, archived ISO 8601 creation time. Read-only.
ISO 8601 last-update time. Read-only.
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.
ISO 8601 time the journey was archived, or null. Read-only.
Origin of the journey, for example public_api or dashboard. Read-only.
The journey entry audience. Either a segment-based or event-triggered audience.
- segment
- event_trigger
Show child attributes
Show child attributes
Conditions that remove a user from the journey before it completes. At least one rule must be set under rules; an early_exit that configures no rule is rejected. Send null to remove early exit entirely, or null for an individual rule to drop just that rule.
Show child attributes
Show child attributes
Controls whether and how soon a user can re-enter the journey. null means re-entry is not allowed.
Show child attributes
Show child attributes
Optional future start and/or stop time. null means no scheduled activation.
Show child attributes
Show child attributes
Ordered list of journey nodes.
A journey node. The kind field selects the shape. Branching nodes (split_range, yes_no, wait_until) nest their sub-graphs inline via branches[].nodes.
- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
- Option 6
- Option 7
- Option 8
- Option 9
Show child attributes
Show child attributes
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.
Was this page helpful?