Get a published journey version
Returns the immutable definition of one published version. Request: GET /v1/journeys/{id}/versions/{version}. Scope: messages:read.
GET
Returns the immutable definition of one published version.
apiKeyheader
x-api-key<token>id*stringMatch
^jrny_[0-9a-hjkmnp-tv-z]{16,24}$version*stringJourneyVersion
application/json- response
journeyId*JourneyIdMatch
^jrny_[0-9a-hjkmnp-tv-z]{16,24}$version*integerRange
-9007199254740991 <= value <= 9007199254740991definition*publishedAt*stringimport { createClient } from "samva";
const samva = createClient({ apiKey: process.env.SAMVA_API_KEY! });
const result = await samva.journeys.getVersion({
"id": "example",
"version": "example"
});Example Response
{
"journeyId": "string",
"version": -9007199254740991,
"definition": {
"trigger": {
"type": "event",
"eventName": "string"
},
"rootNodeId": "string",
"nodes": {
"property1": {
"type": "send_email",
"config": {
"template": "string",
"publicationId": "string",
"senderId": "string",
"tracking": {
"opens": true,
"clicks": true
},
"topicName": "string",
"templateData": {
"property1": "string",
"property2": "string"
},
"eventBindings": {
"property1": "string",
"property2": "string"
}
},
"next": [
{
"nodeId": "string"
}
]
},
"property2": {
"type": "send_email",
"config": {
"template": "string",
"publicationId": "string",
"senderId": "string",
"tracking": {
"opens": true,
"clicks": true
},
"topicName": "string",
"templateData": {
"property1": "string",
"property2": "string"
},
"eventBindings": {
"property1": "string",
"property2": "string"
}
},
"next": [
{
"nodeId": "string"
}
]
}
},
"goal": {
"eventName": "string"
},
"reentry": true,
"enrollment": {
"type": "shopify_order",
"shop": "string"
}
},
"publishedAt": "string"
}