생성 및 업데이트
이 엔드포인트들은 Journey 정의, 즉 제목, 설정, 캔버스 위의 포인트를 생성하고 편집합니다. Journey를 시작하지는 않습니다. Journey를 시작하려면 Lifecycle을 사용하세요.
두 엔드포인트 모두 Journey 객체를 수락하고 반환합니다.
POST https://journey.pushwoosh.com/api/v3/journeygateway
새로운 Journey를 STATUS_DRAFT 상태로 생성합니다.
| 필드 | 필수 | 타입 | 설명 |
|---|---|---|---|
title | 예 | string | Journey 이름. |
params | 예 | JourneyParams | Journey 전체 구성. params.application_code는 필수입니다. |
points | 아니요 | Point의 배열 | 캔버스 위의 Journey 요소와 그 연결. |
comments | 아니요 | JourneyComment의 배열 | 캔버스 주석. |
요청 예시
Anchor link tocurl -X POST https://journey.pushwoosh.com/api/v3/journeygateway \ -H "Authorization: Api YOUR_API_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "title": "Welcome series", "params": { "application_code": "XXXXX-XXXXX" }, "points": [], "comments": [] }'새로운 Journey 객체를 반환합니다. info.uuid에서 Journey의 UUID를 읽어와서 후속 업데이트 및 라이프사이클 호출에 사용하세요.
응답 예시
Anchor link to{ "info": { "uuid": "11111111-2222-3333-4444-555555555555", "title": "Welcome series", "status": "STATUS_DRAFT", "params": { "application_code": "XXXXX-XXXXX" } }, "points": [], "comments": []}전체 Journey 예시
Anchor link to작은 환영 플로우를 위한 완전한 Create 본문입니다. 그래프는 다음과 같습니다:
Start by segment ──default──▶ Send push ──default──▶ Wait 1 day ──default──▶ Boolean splitter ──output1──▶ Send email ──default──▶ Exit └──default───────────────────────────▶ Exit포인트들은 각 출력의 info.next_point_uuid를 통해 함께 연결됩니다. 출력 키에 유의하세요: 모든 포인트는 default를 사용하지만, 불리언 분배기는 조건 일치 분기를 위해 output1을 추가합니다 (default는 대체 경로입니다). 종료 포인트에는 출력이 없습니다.
{ "title": "Welcome series", "params": { "application_code": "XXXXX-XXXXX", "user_id_track_change_policy": "TRACK" }, "points": [ { "uuid": "11111111-1111-1111-1111-111111111111", "title": "New signups", "point_type": "POINT_TYPE_START_BY_SEGMENT", "position": { "x": 80, "y": 200 }, "outputs": [ { "identity": { "key": "default", "order": 0 }, "info": { "title": "", "next_point_uuid": "22222222-2222-2222-2222-222222222222" } } ], "point_data": { "start_by_segment": { "application_code": "XXXXX-XXXXX", "filter_code": "AAAAA-BBBBB" } } }, { "uuid": "22222222-2222-2222-2222-222222222222", "title": "Welcome push", "point_type": "POINT_TYPE_SEND_PUSH", "position": { "x": 340, "y": 200 }, "outputs": [ { "identity": { "key": "default", "order": 0 }, "info": { "title": "", "next_point_uuid": "33333333-3333-3333-3333-333333333333" } } ], "point_data": { "send_push": { "application_code": "XXXXX-XXXXX", "title": "Welcome!", "content": "Thanks for joining — here's how to get started." } } }, { "uuid": "33333333-3333-3333-3333-333333333333", "title": "Wait 1 day", "point_type": "POINT_TYPE_WAIT", "position": { "x": 600, "y": 200 }, "outputs": [ { "identity": { "key": "default", "order": 0 }, "info": { "title": "", "next_point_uuid": "44444444-4444-4444-4444-444444444444" } } ], "point_data": { "delay": { "sec": 86400 } } }, { "uuid": "44444444-4444-4444-4444-444444444444", "title": "Opened the push?", "point_type": "POINT_TYPE_BOOLEAN_SPLITTER", "position": { "x": 860, "y": 200 }, "outputs": [ { "identity": { "key": "output1", "order": 1 }, "info": { "title": "Matched", "next_point_uuid": "55555555-5555-5555-5555-555555555555" } }, { "identity": { "key": "default", "order": 0 }, "info": { "title": "Everyone else", "next_point_uuid": "66666666-6666-6666-6666-666666666666" } } ], "point_data": { "boolean_splitter": { "application_code": "XXXXX-XXXXX", "split_strategy": "SPLIT_FILTER", "load_policy": "ALL", "filter_code": "CCCCC-DDDDD" } } }, { "uuid": "55555555-5555-5555-5555-555555555555", "title": "Follow-up email", "point_type": "POINT_TYPE_SEND_EMAIL", "position": { "x": 1120, "y": 120 }, "outputs": [ { "identity": { "key": "default", "order": 0 }, "info": { "title": "", "next_point_uuid": "66666666-6666-6666-6666-666666666666" } } ], "point_data": { "send_email": { "application_code": "XXXXX-XXXXX", "preset_code": "12345-67890" } } }, { "uuid": "66666666-6666-6666-6666-666666666666", "title": "Exit", "point_type": "POINT_TYPE_EXIT", "position": { "x": 1380, "y": 200 }, "outputs": [], "point_data": { "terminator": {} } } ], "comments": []}업데이트
Anchor link toPUT https://journey.pushwoosh.com/api/v3/journeygateway/{uuid}
기존 Journey의 정의를 교체합니다. 완전한 정의를 보내야 합니다. 제출하는 포인트와 주석이 현재의 것을 대체합니다.
경로 파라미터
Anchor link to| 이름 | 타입 | 설명 |
|---|---|---|
uuid | string | 업데이트할 Journey ID. |
| 필드 | 타입 | 설명 |
|---|---|---|
title | string | 새 Journey 이름. |
params | JourneyParams | 새 Journey 전체 구성. |
points | Point의 배열 | 새로운 전체 포인트 세트. |
comments | JourneyComment의 배열 | 새로운 전체 주석 세트. |
autosave | bool | true일 경우, 변경 사항이 에디터 자동 저장으로 처리됩니다. 기본값은 false입니다. |
요청 예시
Anchor link tocurl -X PUT https://journey.pushwoosh.com/api/v3/journeygateway/11111111-2222-3333-4444-555555555555 \ -H "Authorization: Api YOUR_API_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "title": "Welcome series v2", "params": { "application_code": "XXXXX-XXXXX" }, "points": [], "comments": [] }'업데이트된 Journey 객체를 반환합니다.
업데이트 및 재개
Anchor link toPOST https://journey.pushwoosh.com/api/v3/journeygateway/{uuid}/resume
한 번의 호출로 Journey에 편집 내용을 적용하고 재개합니다. 이는 업데이트 후 라이프사이클 시작을 호출하는 것과 같습니다. 요청 본문은 업데이트와 동일합니다. 일시 중지된 Journey를 다시 STATUS_RUNNING 상태로 되돌리고 싶을 때 사용하세요.
이름 변경
Anchor link toPOST https://journey.pushwoosh.com/api/v3/journeygateway/{uuid}/rename
포인트나 설정을 건드리지 않고 Journey 제목만 변경합니다.
| 필드 | 필수 | 타입 | 설명 |
|---|---|---|---|
title | 예 | string | 새 Journey 이름. |
요청 예시
Anchor link tocurl -X POST https://journey.pushwoosh.com/api/v3/journeygateway/11111111-2222-3333-4444-555555555555/rename \ -H "Authorization: Api YOUR_API_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "title": "Welcome series (Q3)" }'