Skip to Content

Get a published journey version

Returns the immutable definition of one published version. Request: GET /v1/journeys/{id}/versions/{version}. Scope: messages:read.

GET
/v1/journeys/{id}/versions/{version}

Returns the immutable definition of one published version.

Authorization

apiKey
headerx-api-key<token>

Path Parameters

id*string
Match^jrny_[0-9a-hjkmnp-tv-z]{16,24}$
version*string

Response Body

JourneyVersion

application/json
  1. response
journeyId*JourneyId
Match^jrny_[0-9a-hjkmnp-tv-z]{16,24}$
version*integer
Range-9007199254740991 <= value <= 9007199254740991
definition*
publishedAt*string
Example Request
import { 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"
}

Related documentation