Creates a Journey in the given Engage space. Accepts an XState journey definition and creates the journey in draft state.
• This endpoint is in Alpha testing. Please submit any feedback by sending an email to friends@segment.com.
OK
Resource not found
Validation failure
Too many requests
{- "name": "Checkout Abandonment SMS",
- "description": "Sends SMS to users who abandon checkout within 3 minutes",
- "definition": {
- "initial": "entry_ab1c2",
- "states": {
- "entry_ab1c2": {
- "meta": {
- "type": "entry",
- "event": {
- "type": "ast",
- "options": {
- "AND": [
- {
- "event": "checkout_started"
}
]
}
}
}, - "on": {
- "next": "split_de3f4"
}
}, - "split_de3f4": {
- "meta": {
- "type": "split",
- "name": "Wait for checkout_completed",
- "splitType": "event",
- "delay": {
- "duration": 3,
- "durationUnits": "minutes"
}
}, - "on": {
- "branch_1": "splitBranch_gh5i6",
- "else": "splitElseBranch_jk7l8"
}
}, - "splitBranch_gh5i6": {
- "meta": {
- "type": "splitBranch",
- "name": "Completed",
- "condition": {
- "type": "ast",
- "options": {
- "AND": [
- {
- "event": "checkout_completed"
}
]
}
}
}, - "on": {
- "next": "exit_mn9o0"
}
}, - "splitElseBranch_jk7l8": {
- "meta": {
- "type": "splitElseBranch",
- "name": "Abandoned"
}, - "on": {
- "next": "exit_mn9o0"
}
}, - "exit_mn9o0": {
- "meta": {
- "type": "exit"
}
}
}, - "entryRules": {
- "type": "multiple",
- "concurrency": {
- "enabled": true,
- "propertyFilter": {
- "property": "checkout_id"
}
}
}
}
}{- "data": {
- "journey": {
- "containerId": "con_0ujsszwN8NRY24YaXiTIE2VWDTS",
- "versionNumber": 1
}
}
}