Journeys
Get a published journey version (Preview)
Preview · Available to selected organizations. Returns the immutable definition of one published version. Use this endpoint to get a published journey version through the Samva email API.
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", "senderId": "string", "templateData": { "property1": "string", "property2": "string" } }, "next": [ { "nodeId": "string" } ] }, "property2": { "type": "send_email", "config": { "template": "string", "senderId": "string", "templateData": { "property1": "string", "property2": "string" } }, "next": [ { "nodeId": "string" } ] } }, "goal": { "eventName": "string" }, "reentry": true }, "publishedAt": "string"}Related documentation
Get a journey run (Preview)
Preview · Available to selected organizations. Returns one run with every node it entered, in order: when it entered and left, how it left, and the message a send node created.
List journeys (Preview)
Preview · Available to selected organizations. Returns the organization's journeys, newest first, optionally filtered by status. Pass nextCursor back as cursor for the next page.