Archive a journey
Stops new enrollment for good and exits every live run with exit reason archived. An archived journey cannot be edited, published, or resumed.
POST
Stops new enrollment for good and exits every live run with exit reason archived. An archived journey cannot be edited, published, or resumed.
apiKeyheader
x-api-key<token>id*stringMatch
^jrny_[0-9a-hjkmnp-tv-z]{16,24}$Journey
application/json- response
id*JourneyIdMatch
^jrny_[0-9a-hjkmnp-tv-z]{16,24}$namespaceId?|null|nullname*stringstatus*JourneyStatusValue in
"draft""active""paused""archived"revision*stringdraft*publishedVersion*|nullpublishedAt*string|nullcreatedAt*stringupdatedAt*stringimport { createClient } from "samva";
const samva = createClient({ apiKey: process.env.SAMVA_API_KEY! });
const result = await samva.journeys.archive({
"id": "example"
});Example Response
{
"id": "string",
"namespaceId": "string",
"name": "string",
"status": "draft",
"revision": "string",
"draft": {
"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"
}
},
"publishedVersion": -9007199254740991,
"publishedAt": "string",
"createdAt": "string",
"updatedAt": "string"
}