Skip to content

Journeys API Documentation

NOTICE

The API calls detailed in this document are compatible with Octeth's latest authorization method. You have the option to include either the SessionID or APIKey parameter within the JSON request body.

Create a Journey

POST /api/v1/journey

This API command allows you to create a new journey. By default, the newly created journey will be set to 'Disabled' and the trigger mode will be set to 'Manual'.

Request Body:

NOTICE

This API endpoint accepts raw body in JSON format.

ParameterDescriptionRequired
SessionIDThe user's session ID.Yes
APIKeyThe user's API key. Either SessionID or APIKey must be provided.Yes
NameThe name of the journey.Yes
TriggerThe trigger type. Options include: ListSubscription, ListUnsubscription, EmailOpen, EmailConversion, EmailLinkClick, Manual, WebsiteEvent_pageView, WebsiteEvent_identify, WebsiteEvent_customEvent, WebsiteEvent_conversion, Tag, UnTag, CustomFieldValueChanged, RevenueHit, WebsiteEvent_pageViewYes
Trigger_ListIDIf the trigger is ListSubscription or ListUnsubscription, this parameter should be 0 (any list) or a specific subscriber list ID.No
Trigger_EmailIDIf the trigger is EmailOpen, EmailConversion or EmailLinkClick, this parameter should be 0 (any email) or a specific email ID.No
Trigger_CriteriaIf the trigger is WebsiteEvent_pageView, WebsiteEvent_identify, WebsiteEvent_customEvent, or WebsiteEvent_conversion, this parameter should be an array.No
Trigger_ValueSpecifying the actions of the trigger. This number can be the ID of the tag or CustomField that will trigger or the RevenueHit value (ex: 200.50)No
json
// Trigger when a subscription occurs
{
  "SessionID": "<user_session_id>",
  "APIKey": "",
  "Name": "Contact Form Journey",
  "Notes": "This is an administrative note for the journey",
  "Trigger": "ListSubscription",
  "Trigger_ListID": 10
}

// Trigger when a subscriber is tagged
{
  "SessionID": "<user_session_id>",
  "APIKey": "",
  "Name": "Contact Form Journey",
  "Notes": "This is an administrative note for the journey",
  "Trigger": "Tag",
  "Trigger_Value": 1
}

// Trigger when a subscriber is un-tagged
{
  "SessionID": "<user_session_id>",
  "APIKey": "",
  "Name": "Contact Form Journey",
  "Notes": "This is an administrative note for the journey",
  "Trigger": "UnTag",
  "Trigger_Value": 1
}

// Trigger when any custom field value is changed
{
  "SessionID": "<user_session_id>",
  "APIKey": "",
  "Name": "Contact Form Journey",
  "Notes": "This is an administrative note for the journey",
  "Trigger": "CustomFieldValueChanged"
}

// Trigger when a specific custom field is changed to any value
{
  "SessionID": "<user_session_id>",
  "APIKey": "",
  "Name": "Contact Form Journey",
  "Notes": "This is an administrative note for the journey",
  "Trigger": "CustomFieldValueChanged",
  "Trigger_ListID": "1",
  "Trigger_Value": "2" // Target custom field ID
}

// Trigger when a specific custom field value partially matches a value
{
  "SessionID": "<user_session_id>",
  "APIKey": "",
  "Name": "Contact Form Journey",
  "Notes": "This is an administrative note for the journey",
  "Trigger": "CustomFieldValueChanged",
  "Trigger_ListID": "1",
  "Trigger_Value": "2", // Target custom field ID
  "Trigger_Criteria": [
    {
      "property": "",
      "operator": "contains",
      "value": "Hard"
    }
  ]
}

// Trigger when a revenue hit is made
{
  "SessionID": "<user_session_id>",
  "APIKey": "",
  "Name": "Contact Form Journey",
  "Notes": "This is an administrative note for the journey",
  "Trigger": "RevenueHit",
  "Trigger_Value": "20.01" // in cents
}

// Trigger on a page view website event
{
  "SessionID": "<user_session_id>",
  "APIKey": "",
  "Name": "Contact Form Journey",
  "Notes": "This is an administrative note for the journey",
  "Trigger": "WebsiteEvent_pageView",
  "Trigger_ListID": "3",
  "Trigger_Criteria": [
    {
      "property": "pageView.url",
      "operator": "contains",
      "value": "/tracker/example/index"
    }
  ]
}
json
{
  "JourneyID": 5,
  "Journey": {
    "JourneyID": "5",
    "RelUserID": "1",
    "JourneyName": "Test",
    "Trigger": "Manual",
    "TriggerParameters": [],
    "Status": "Disabled",
    "Notes": "This is an administrative note for the journey",
    "CreatedAt": "2023-08-11 17:19:34",
    "UpdatedAt": "2023-08-11 17:19:34"
  }
}
json
{
  "Errors": [
    {
      "Code": 1,
      "Message": "Missing Name parameter"
    }
  ]
}

HTTP Response and Error Codes:

HTTP Response CodeError CodeDescription
4221Missing Name parameter
n/a2[reserved]
4003Invalid trigger
4224Missing Trigger_ListID parameter
4225Invalid Trigger_ListID parameter
4046Trigger_ListID matching record not found
4227Missing Trigger_EmailID parameter
4228Invalid Trigger_EmailID parameter
4049Trigger_EmailID matching record not found

Journey List

GET /api/v1/journeys

This API endpoint returns a list of journeys associated with a specific user account.

NOTICE

This API endpoint accepts a raw JSON body.

Request Body Parameters:

ParameterDescriptionRequired
SessionIDThe ID of the user's current session.Yes
APIKeyThe user's API key. Either SessionID or APIKey must be provided.Yes
json
{
  "SessionID": "<user_session_id>",
  "APIKey": ""
}
json
{
  "Journeys": [
    {
      "JourneyID": "5",
      "RelUserID": "1",
      "JourneyName": "Test",
      "Trigger": "Manual",
      "TriggerParameters": "[]",
      "Status": "Disabled",
      "Notes": "This is an administrative note for the journey",
      "CreatedAt": "2023-08-11 17:19:34",
      "UpdatedAt": "2023-08-11 17:19:34",
      "JourneyStats": {
        "ActiveSubscribers": "0",
        "TotalSubscribers": "0",
        "AggregatedEmailActions": [],
        "AggregatedLast30DaysEmailActions": []
      }
    }
  ]
}
txt
This API endpoint doesn't return any errors.

In the JourneyStats object, ActiveSubscribers represents the number of active subscribers, and TotalSubscribers represents the total number of subscribers for the journey.

Delete a Journey

POST /api/v1/journey.delete

This API call is designed to delete a specific journey. The journey to be deleted is identified by the JourneyID parameter.

NOTICE

Please note that this API endpoint requires a raw body in JSON format.

Request Body Parameters:

ParameterDescriptionRequired
SessionIDThis is the user's session ID.Yes
APIKeyThis is the user's API key. Either SessionID or APIKey must be provided.Yes
JourneyIDThis is the ID of the journey to be deleted.Yes
json
{
  "SessionID": "<user_session_id>",
  "APIKey": "",
  "JourneyID": 5
}
json
{
  "JourneyID": "5"
}
json
{
  "Errors": [
    {
      "Code": 3,
      "Message": "Journey not found"
    }
  ]
}

Please ensure that the JourneyID parameter is provided and is valid to avoid errors.

HTTP Response and Error Codes:

HTTP Response CodeError CodeDescription
4221Missing JourneyID parameter
4222Invalid JourneyID parameter
4043Journey not found

Retrieve a Journey

GET /api/v1/journey

This API call retrieves the details of a specific journey corresponding to the provided JourneyID parameter.

NOTICE

This API endpoint expects a request body in JSON format.

Request Body:

ParameterDescriptionRequired
SessionIDThe ID of the user's current session.Yes
APIKeyThe user's API key. Either SessionID or APIKey must be provided.Yes
JourneyIDThe ID of the journey to be retrieved.Yes
json
{
  "SessionID": "<user_session_id>",
  "APIKey": "",
  "JourneyID": 6
}
json
{
  "Journey": {
    "JourneyID": "6",
    "RelUserID": "1",
    "JourneyName": "Test",
    "Trigger": "Manual",
    "TriggerParameters": [],
    "Status": "Disabled",
    "Notes": "This is an administrative note for the journey",
    "CreatedAt": "2023-08-11 18:13:17",
    "UpdatedAt": "2023-08-11 18:13:17",
    "JourneyStats": {
      "ActiveSubscribers": 100,
      "TotalSubscribers": 200,
      "AggregatedEmailActionStats": {
        "SendCount": 0,
        "OpenCount": 0,
        "ClickCount": 0,
        "ConversionCount": 0,
        "BrowserViewCount": 0,
        "ForwardCount": 0,
        "UnsubscribeCount": 0,
        "BounceCount": 0,
        "SpamComplaintCount": 0
      },
      "AggregatedLast30DaysEmailActions": [
        {
          "2024-03-26": {
            "SendCount": 0,
            "OpenCount": 0,
            "ClickCount": 0,
            "ConversionCount": 0,
            "BrowserViewCount": 0,
            "ForwardCount": 0,
            "UnsubscribeCount": 0,
            "BounceCount": 0,
            "SpamComplaintCount": 0
          },
          "2024-03-25": {
            "SendCount": 0,
            "OpenCount": 0,
            "ClickCount": 0,
            "ConversionCount": 0,
            "BrowserViewCount": 0,
            "ForwardCount": 0,
            "UnsubscribeCount": 0,
            "BounceCount": 0,
            "SpamComplaintCount": 0
          }
        }
      ]
    }
  },
  "Actions": [
    {
      "ActionID": 1,
      "OrderNo": 1,
      "Action": "Wait",
      "ActionParameters": {
        "WaitUnit": "seconds",
        "WaitAmount": 20
      },
      "CompletedRuns": 0,
      "Published": true,
      "Stats": {
        "ActiveSubscribers": "0",
        "TotalSubscribers": "0"
      }
    },
    {
      "ActionID": 11,
      "OrderNo": 2,
      "Action": "Wait",
      "ActionParameters": {
        "WaitUnit": "minutes",
        "WaitAmount": 10
      },
      "CompletedRuns": 0,
      "Published": true,
      "Stats": {
        "ActiveSubscribers": "0",
        "TotalSubscribers": "0"
      }
    }
  ]
}
json
{
  "Errors": [
    {
      "Code": 3,
      "Message": "Journey not found"
    }
  ]
}

HTTP Response and Error Codes:

HTTP Response CodeError CodeDescription
4221Missing JourneyID parameter
4222Invalid JourneyID parameter
4043Journey not found

Enable a Journey

GET /api/v1/journey.enable

This API call allows you to change a journey's status from Disabled to Enabled.

NOTICE

Please note that this API endpoint requires a raw JSON body.

Request Body Parameters:

ParameterDescriptionRequired
SessionIDThis is the user's session ID.Yes
APIKeyThis is the user's API key. Either SessionID or APIKey must be provided.Yes
JourneyIDThis is the ID of the journey you wish to enable.Yes
json
{
  "SessionID": "<user_session_id>",
  "APIKey": "",
  "JourneyID": 6
}
json
{
  "Journey": {
    "JourneyID": "6",
    "RelUserID": "1",
    "JourneyName": "Test",
    "Trigger": "Manual",
    "TriggerParameters": [],
    "Status": "Enabled",
    "CreatedAt": "2023-08-11 18:13:17",
    "UpdatedAt": "2023-08-11 18:13:17"
  }
}
json
{
  "Errors": [
    {
      "Code": 3,
      "Message": "Journey not found"
    }
  ]
}

HTTP Response and Error Codes:

HTTP Response CodeError CodeDescription
4221Missing JourneyID parameter
4222Invalid JourneyID parameter
4043Journey not found
4094Journey is already enabled

Disabling a Journey

GET /api/v1/journey.disable

This API call allows you to change the status of a journey from 'Enabled' to 'Disabled'.

NOTICE

Please note that this API endpoint requires a raw JSON body.

Required Parameters:

ParameterDescriptionRequirement
SessionIDThis is the user's session ID.Mandatory
APIKeyThis is the user's API key. Either the SessionID or APIKey is needed.Mandatory
JourneyIDThis is the ID of the journey you wish to disable.Mandatory
json
{
  "SessionID": "<user_session_id>",
  "APIKey": "",
  "JourneyID": 6
}
json
{
  "Journey": {
    "JourneyID": "6",
    "RelUserID": "1",
    "JourneyName": "Test",
    "Trigger": "Manual",
    "TriggerParameters": [],
    "Status": "Disabled",
    "CreatedAt": "2023-08-11 18:13:17",
    "UpdatedAt": "2023-08-11 18:13:17"
  }
}
json
{
  "Errors": [
    {
      "Code": 3,
      "Message": "Journey not found"
    }
  ]
}

HTTP Response and Error Codes:

HTTP Response CodeError CodeDescription
4221Missing JourneyID parameter
4222Invalid JourneyID parameter
4043Journey not found
4094Journey is already disabled

Modify a Journey

PATCH /api/v1/journey

This API call allows you to update the details of a specific journey.

NOTICE

This endpoint expects a raw JSON body.

Request Body Parameters:

ParameterDescriptionRequired
SessionIDThe ID of the user's current session.Yes
APIKeyThe user's API key. You must provide either the SessionID or APIKey.Yes
JourneyIDThe ID of the journey you want to update.Yes
NameThe new name for the journey.No
NotesThe administrative note for the journey.No
TriggerThe type of trigger. Options include: ListSubscription, ListUnsubscription, EmailOpen, EmailConversion, EmailLinkClick, Manual, , WebsiteEvent_pageView, WebsiteEvent_identify, WebsiteEvent_customEvent, WebsiteEvent_conversion.No
Trigger_ListIDIf the trigger is ListSubscription or ListUnsubscription, this parameter should be 0 (any list) or a specific subscriber list ID.No
Trigger_EmailIDIf the trigger is EmailOpen, EmailConversion or EmailLinkClick, this parameter should be 0 (any email) or a specific email ID.No
Trigger_CriteriaIf the trigger is WebsiteEvent_pageView, WebsiteEvent_identify, WebsiteEvent_customEvent, or WebsiteEvent_conversion, this parameter should be an array.No
Trigger_ValueSpecifying the actions of the trigger. This number can be the ID of the tag or CustomField that will trigger or the RevenueHit value (ex: 200.50)No
json
// Trigger when a subscription occurs
{
  "SessionID": "<user_session_id>",
  "APIKey": "",
  "Name": "Contact Form Journey",
  "Notes": "This is an administrative note for the journey",
  "Trigger": "ListSubscription",
  "Trigger_ListID": 10
}

// Trigger when a subscriber is tagged
{
  "SessionID": "<user_session_id>",
  "APIKey": "",
  "Name": "Contact Form Journey",
  "Notes": "This is an administrative note for the journey",
  "Trigger": "Tag",
  "Trigger_Value": 1
}

// Trigger when a subscriber is un-tagged
{
  "SessionID": "<user_session_id>",
  "APIKey": "",
  "Name": "Contact Form Journey",
  "Notes": "This is an administrative note for the journey",
  "Trigger": "UnTag",
  "Trigger_Value": 1
}

// Trigger when any custom field value is changed
{
  "SessionID": "<user_session_id>",
  "APIKey": "",
  "Name": "Contact Form Journey",
  "Notes": "This is an administrative note for the journey",
  "Trigger": "CustomFieldValueChanged"
}

// Trigger when a specific custom field is changed to any value
{
  "SessionID": "<user_session_id>",
  "APIKey": "",
  "Name": "Contact Form Journey",
  "Notes": "This is an administrative note for the journey",
  "Trigger": "CustomFieldValueChanged",
  "Trigger_ListID": "1",
  "Trigger_Value": "2" // Target custom field ID
}

// Trigger when a specific custom field value partially matches a value
{
  "SessionID": "<user_session_id>",
  "APIKey": "",
  "Name": "Contact Form Journey",
  "Notes": "This is an administrative note for the journey",
  "Trigger": "CustomFieldValueChanged",
  "Trigger_ListID": "1",
  "Trigger_Value": "2", // Target custom field ID
  "Trigger_Criteria": [
    {
      "property": "",
      "operator": "contains",
      "value": "Hard"
    }
  ]
}

// Trigger when a revenue hit is made
{
  "SessionID": "<user_session_id>",
  "APIKey": "",
  "Name": "Contact Form Journey",
  "Notes": "This is an administrative note for the journey",
  "Trigger": "RevenueHit",
  "Trigger_Value": "20.01" // in cents
}

// Trigger on a page view website event
{
  "SessionID": "<user_session_id>",
  "APIKey": "",
  "Name": "Contact Form Journey",
  "Notes": "This is an administrative note for the journey",
  "Trigger": "WebsiteEvent_pageView",
  "Trigger_ListID": "3",
  "Trigger_Criteria": [
    {
      "property": "pageView.url",
      "operator": "contains",
      "value": "/tracker/example/index"
    }
  ]
}
json
{
  "Journey": {
    "JourneyID": "6",
    "RelUserID": "1",
    "JourneyName": "Test",
    "Trigger": "Manual",
    "TriggerParameters": [],
    "Status": "Disabled",
    "Notes": "This is an administrative note for the journey",
    "CreatedAt": "2023-08-11 18:13:17",
    "UpdatedAt": "2023-08-11 18:13:17"
  }
}
json
{
  "Errors": [
    {
      "Code": 3,
      "Message": "Invalid trigger"
    }
  ]
}

HTTP Response and Error Codes:

HTTP Response CodeError CodeDescription
4221Missing JourneyID parameter
4222Invalid JourneyID parameter
4003Invalid trigger
4224Missing Trigger_ListID parameter
4225Invalid Trigger_ListID parameter
4046Trigger_ListID matching record not found
4227Missing Trigger_EmailID parameter
4228Invalid Trigger_EmailID parameter
4049Trigger_EmailID matching record not found
40410Journey not found

Modifying Journey Actions

PATCH /api/v1/journey.actions

This API endpoint allows you to modify journey actions. To do so, you must provide the complete list of actions.

NOTICE

Please note that any actions not included in the provided list will be removed from the journey.

Request Body:

ParameterDescriptionRequired
SessionIDThe user's session ID.Yes
APIKeyThe user's API key. Either SessionID or APIKey must be provided.Yes
JourneyIDThe ID of the journey to be updated.Yes
ActionsThe list of action objects. See below for the structure of action objects.Yes

For the detailed usage instructions of journey actions, refer to the Journey Actions .

json
{
  "SessionID": "<user_session_id>",
  "APIKey": "",
  "JourneyID": 6,
  "Actions": [
    {
      "ActionID": 1,
      "Action": "Wait",
      "Published": "true",
      "WaitUnit": "seconds",
      "WaitAmount": 20,
      "Notes": "Administative note"
    },
    {
      "ActionID": null,
      "Action": "Subscribe",
      "Published": "true",
      "TargetListID": 30,
      "Notes": "Test note"
    }
  ]
}
json
{
  "JourneyID": 22,
  "Actions": [
    {
      "ActionID": 401,
      "OrderNo": 1,
      "Action": "Wait",
      "ActionParameters": {
        "WaitUnit": "seconds",
        "WaitAmount": 3
      },
      "Notes": "note-1",
      "CompletedRuns": "0",
      "Stats": {
        "ActiveSubscribers": "0",
        "TotalSubscribers": "0"
      }
    },
    {
      "ActionID": 402,
      "OrderNo": 2,
      "Action": "SendEmail",
      "ActionParameters": {
        "EmailID": 129,
        "SenderDomainID": 101,
        "From": {
          "Name": "From Name",
          "Email": "from@email.com"
        },
        "ReplyTo": {
          "Name": "Reply-To Name",
          "Email": "replyto@email.com"
        },
        "CC": [
          {
            "Name": "CC Name 1",
            "Email": "cc1@email.com"
          },
          {
            "Name": "CC Name 2",
            "Email": "cc2@email.com"
          }
        ],
        "BCC": [
          {
            "Name": "BCC Name 1",
            "Email": "bcc1@email.com"
          },
          {
            "Name": "BCC Name 2",
            "Email": "bcc2@email.com"
          }
        ],
        "Email": {
          "EmailName": "Email name for administrative purposes",
          "ContentType": "Both",
          "Mode": "Editor",
          "FetchURL": "",
          "FetchPlainURL": "",
          "Subject": "{{{Hey|Hi|Hello}}}! Subject of the email",
          "PlainContent": "Plain contetn",
          "HTMLContent": "<p><strong>HTML content</strong></p>",
          "ExtraContent1": "",
          "ExtraContent2": "",
          "ImageEmbedding": "Disabled",
          "PreHeaderText": "",
          "Options": []
        }
      },
      "Notes": "note-2",
      "CompletedRuns": "0",
      "Stats": {
        "ActiveSubscribers": "0",
        "TotalSubscribers": "0",
        "EmailSent": 0,
        "EmailOpened": 0,
        "EmailClicked": 0,
        "EmailConverted": 0,
        "EmailUnsubscribed": 0,
        "EmailBounced": 0,
        "EmailSpamComplaint": 0
      }
    },
    {
      "ActionID": 403,
      "OrderNo": 3,
      "Action": "Wait",
      "ActionParameters": {
        "WaitUnit": "seconds",
        "WaitAmount": 3
      },
      "Notes": "",
      "CompletedRuns": "0",
      "Stats": {
        "ActiveSubscribers": "0",
        "TotalSubscribers": "0"
      }
    },
    {
      "ActionID": 404,
      "OrderNo": 4,
      "Action": "SendEmail",
      "ActionParameters": {
        "EmailID": 129,
        "SenderDomainID": 101,
        "From": {
          "Name": "From Name",
          "Email": "from@email.com"
        },
        "ReplyTo": {
          "Name": "Reply-To Name",
          "Email": "replyto@email.com"
        },
        "CC": [
          {
            "Name": "CC Name 1",
            "Email": "cc1@email.com"
          },
          {
            "Name": "CC Name 2",
            "Email": "cc2@email.com"
          }
        ],
        "BCC": [
          {
            "Name": "BCC Name 1",
            "Email": "bcc1@email.com"
          },
          {
            "Name": "BCC Name 2",
            "Email": "bcc2@email.com"
          }
        ],
        "Email": {
          "EmailName": "Email name for administrative purposes",
          "ContentType": "Both",
          "Mode": "Editor",
          "FetchURL": "",
          "FetchPlainURL": "",
          "Subject": "{{{Hey|Hi|Hello}}}! Subject of the email",
          "PlainContent": "Plain contetn",
          "HTMLContent": "<p><strong>HTML content</strong></p>",
          "ExtraContent1": "",
          "ExtraContent2": "",
          "ImageEmbedding": "Disabled",
          "PreHeaderText": "",
          "Options": []
        }
      },
      "Notes": "note-3",
      "CompletedRuns": "0",
      "Stats": {
        "ActiveSubscribers": "0",
        "TotalSubscribers": "0",
        "EmailSent": 0,
        "EmailOpened": 0,
        "EmailClicked": 0,
        "EmailConverted": 0,
        "EmailUnsubscribed": 0,
        "EmailBounced": 0,
        "EmailSpamComplaint": 0
      }
    }
  ]
}
json
{
  "Errors": [
    {
      "Code": 10,
      "Message": "Journey not found"
    }
  ]
}

HTTP Response and Error Codes:

HTTP Response CodeError CodeDescription
4221Missing JourneyID parameter
4222Missing Actions parameter
4223Invalid JourneyID parameter
4224Invalid Actions parameter
4045Journey not found

Update Journey Actions Publication Status

PATCH api/v1/journey.actions.published

This endpoint is used to update the publication status of actions within a specified journey. It requires a journey ID and a list of actions with their desired publication statuses.

Request Body Parameters:

ParameterDescriptionRequired?
SessionIDThe ID of the user's current sessionYes
APIKeyThe user's API key. Either SessionID or APIKey must be provided.Yes
journeyidThe unique identifier of the journeyYes
actionsAn array of actions with their IDs and publication statusesYes
bash
curl -X PATCH 'https://example.com/api/v1/journey.actions.published' \
-H 'Content-Type: application/json' \
-d '{
    "SessionID": "your_session_id",
    "APIKey": "your_api_key",
    "JourneyID": 123,
    "Actions": [
        {"ActionID": 1, "Published": "true"},
        {"ActionID": 2, "Published": "false"}
    ]
}'
json
{
  "JourneyID": 123,
  "Actions": [
    {
      "ActionID": 1,
      "Published": true
    },
    {
      "ActionID": 2,
      "Published": false
    }
  ]
}
json
{
  "Errors": [
    {
      "Code": 1,
      "Message": "Missing JourneyID parameter"
    },
    {
      "Code": 2,
      "Message": "Missing Actions parameter"
    },
    {
      "Code": 3,
      "Message": "Invalid JourneyID parameter"
    }
  ]
}

HTTP Response and Error Codes:

HTTP Response CodeError CodeDescription
n/a1Missing JourneyID parameter
4222Missing Actions parameter
4223Invalid JourneyID parameter
4224Invalid Actions parameter
4045Journey not found
4046Action not found

Trigger a Journey For A Subscriber

GET /api/v1/subscriber.journey.trigger

This API call will triger a journey for a subscriber.

NOTICE

Please note that this API endpoint requires a raw JSON body.

Request Body Parameters:

ParameterDescriptionRequired
SessionIDThis is the user's session ID.Yes
APIKeyThis is the user's API key. Either SessionID or APIKey must be provided.Yes
JourneyIDThis is the ID of the journey you would like to trigger for a subscriber.Yes
ListIDList ID of the subscriber.Yes
SubscriberIDID of the target subscriber.Yes
json
{
  "SessionID": "<user_session_id>",
  "APIKey": "",
  "JourneyID": 6,
  "ListID": 30,
  "SubscriberID": 11
}
json
{
  "JourneyID": "18",
  "ListID": "26",
  "SubscriberID": "1"
}
json
{
  "Errors": [
    {
      "Code": 7,
      "Message": "Journey not found"
    }
  ]
}

HTTP Response and Error Codes:

HTTP Response CodeError CodeDescription
4221Missing JourneyID parameter
4222Missing ListID parameter
4223Missing SubscriberID parameter
4224Invalid JourneyID parameter
4225Invalid ListID parameter
4226Invalid SubscriberID parameter
4047Journey not found
4048List not found
4049Subscriber not found
40310Journey is disabled. Operation not permitted.

Remove Subscriber From A Journey

POST /api/v1/subscriber.journey.remove

This API call will remove a subscriber from an enrolled journey.

NOTICE

Please note that this API endpoint requires a raw JSON body.

Request Body Parameters:

ParameterDescriptionRequired
SessionIDThis is the user's session ID.Yes
APIKeyThis is the user's API key. Either SessionID or APIKey must be provided.Yes
JourneyIDThis is the ID of the journey you would like remove from a subscriber.Yes
ListIDList ID of the subscriber.Yes
SubscriberIDID of the target subscriber.Yes
json
{
  "SessionID": "<user_session_id>",
  "APIKey": "",
  "JourneyID": 6,
  "ListID": 30,
  "SubscriberID": 11
}
json
{
  "JourneyID": "18",
  "ListID": "26",
  "SubscriberID": "1"
}
json
{
  "Errors": [
    {
      "Code": 7,
      "Message": "Journey not found"
    }
  ]
}

HTTP Response and Error Codes:

HTTP Response CodeError CodeDescription
4221Missing JourneyID parameter
4222Missing ListID parameter
4223Missing SubscriberID parameter
4224Invalid JourneyID parameter
4225Invalid ListID parameter
4226Invalid SubscriberID parameter
4047Journey not found
4048List not found
4049Subscriber not found

Journey Action Subscribers

POST /api/v1/journey.action.subscribers

This API call will return the list of subscribers for a specific journey action.

NOTICE

Please note that this API endpoint requires a raw JSON body.

Request Body Parameters:

ParameterDescriptionRequired
SessionIDThis is the user's session ID.Yes
APIKeyThis is the user's API key. Either SessionID or APIKey must be provided.Yes
JourneyIDTarget journey ID.Yes
ActionIDID of the target journey action.Yes
FilterJsonThe filter to apply in JSON syntax.Yes
OperatorHow to apply filters. Either and or orYes
RecordsPerRequestPagination. Number of records to return. Default: 25No
RecordsFromPagination. The result retrieve start index. Default: 0No
OrderFieldOrder results by this field. Default: EmailAddressNo
OrderTypeSort results ascending or descending. Default: ASC. Values: ASC, DESCNo
json
{
  "SessionID": "<user_session_id>",
  "APIKey": "",
  "JourneyID": 6,
  "ActionID": 30,
  "FilterJson": [
    "opened",
    "clicked"
  ],
  "Operator": "or"
}
json
{
  "Success": true,
  "ErrorCode": 0,
  "ErrorText": "",
  "TotalSubscribers": 5,
  "Subscribers": [
    {
      "SubscriberID": "42",
      "EmailAddress": "email15@example.com",
      "BounceType": "Hard",
      "SubscriptionStatus": "Subscribed",
      "SubscriptionDate": "2023-01-01",
      "SubscriptionIP": "192.168.1.1",
      "UnsubscriptionDate": "0000-00-00",
      "UnsubscriptionIP": "0.0.0.0",
      "OptInDate": "2023-01-01"
    },
    {
      "SubscriberID": "8",
      "EmailAddress": "email3@test1.com",
      "BounceType": "Not Bounced",
      "SubscriptionStatus": "Subscribed",
      "SubscriptionDate": "2023-11-09",
      "SubscriptionIP": " - Manual Import",
      "UnsubscriptionDate": "0000-00-00",
      "UnsubscriptionIP": "0.0.0.0",
      "OptInDate": "0000-00-00"
    },
    {
      "SubscriberID": "5",
      "EmailAddress": "email5@test.com",
      "BounceType": "Not Bounced",
      "SubscriptionStatus": "Subscribed",
      "SubscriptionDate": "2023-11-07",
      "SubscriptionIP": " - Manual Import",
      "UnsubscriptionDate": "2023-11-13",
      "UnsubscriptionIP": "192.168.65.1",
      "OptInDate": "0000-00-00"
    },
    {
      "SubscriberID": "21",
      "EmailAddress": "email51@test1.com",
      "BounceType": "Not Bounced",
      "SubscriptionStatus": "Subscribed",
      "SubscriptionDate": "2023-12-18",
      "SubscriptionIP": " - Manual Import",
      "UnsubscriptionDate": "0000-00-00",
      "UnsubscriptionIP": "0.0.0.0",
      "OptInDate": "0000-00-00"
    },
    {
      "SubscriberID": "34",
      "EmailAddress": "email7@example.com",
      "BounceType": "Hard",
      "SubscriptionStatus": "Unsubscribed",
      "SubscriptionDate": "0000-00-00",
      "SubscriptionIP": "",
      "UnsubscriptionDate": "2023-01-02",
      "UnsubscriptionIP": "192.168.1.2",
      "OptInDate": "0000-00-00"
    }
  ]
}
json
{
  "Errors": [
    {
      "Code": 1,
      "Message": "Missing journey ID"
    }
  ]
}

HTTP Response and Error Codes:

HTTP Response CodeError CodeDescription
4221Missing JourneyID parameter
4222Missing ActionID parameter
4223Invalid JourneyID parameter
4224Invalid ActionID parameter
4225Invalid FilterJson parameter
4226Invalid FilterJson value
4227Invalid Operator value
4045Journey not found
4046Action not found
4047No subscribers found

Enrolled Journeys

GET /api/v1/subscriber.journey.list

This API call will return the list of journeys for a given subscriber

NOTICE

Please note that this API endpoint requires a raw JSON body.

Request Body Parameters:

ParameterDescriptionRequired
SessionIDThis is the user's session ID.Yes
APIKeyThis is the user's API key. Either SessionID or APIKey must be provided.Yes
ListIDList ID of the subscriber.Yes
SubscriberIDID of the target subscriber.Yes
json
{
  "SessionID": "<user_session_id>",
  "APIKey": "",
  "JourneyID": 6,
  "ListID": 30,
  "SubscriberID": 11
}
json
{
  "ListID": "26",
  "SubscriberID": "1",
  "Journeys": [
    {
      "JourneyID": "18",
      "RelUserID": "1",
      "JourneyName": "Test",
      "Trigger": "ListSubscription:0",
      "TriggerParameters": "{\"ListID\":0}",
      "Status": "Enabled",
      "CreatedAt": "2023-08-23 13:26:23",
      "UpdatedAt": "2023-08-25 10:40:02"
    }
  ]
}
json
{
  "Errors": [
    {
      "Code": 9,
      "Message": "Subscriber not found"
    }
  ]
}

HTTP Response and Error Codes:

HTTP Response CodeError CodeDescription
n/a1[reserved]
4222Missing ListID parameter
4223Missing SubscriberID parameter
4225Invalid ListID parameter
4226Invalid SubscriberID parameter
4048List not found
4049Subscriber not found

Clone Journey

POST /api/v1/journey.clone

Clone an existing journey and create a new one.

NOTICE

Please note that this API endpoint requires a raw JSON body.

Request Body Parameters:

ParameterDescriptionRequired
SessionIDThis is the user's session ID.Yes
APIKeyThis is the user's API key. Either SessionID or APIKey must be provided.Yes
JourneyIDThe ID of the journey to clone.Yes
NewJourneyNameThe name of the new journey.Yes
json
{
  "SessionID": "<user_session_id>",
  // "APIKey":""
  "JourneyID": 2,
  "NewJourneyName": "Test Journey"
}
json
{
  "Journey": {
    "JourneyID": "3",
    "RelUserID": "1",
    "JourneyName": "Test Journey",
    "Trigger": "Manual",
    "TriggerParameters": [],
    "Status": "Disabled",
    "Notes": "Copy of journey Test Journey",
    "CreatedAt": "2024-04-27 19:52:06",
    "UpdatedAt": "2024-04-27 19:52:06",
    "JourneyStats": {
      "ActiveSubscribers": "0",
      "TotalSubscribers": "0",
      "AggregatedEmailActions": {
        "SendCount": 0,
        "OpenCount": 0,
        "ClickCount": 0,
        "ConversionCount": 0,
        "BrowserViewCount": 0,
        "ForwardCount": 0,
        "UnsubscribeCount": 0,
        "BounceCount": 0,
        "SpamComplaintCount": 0
      },
      "AggregatedLast30DaysEmailActions": []
    }
  },
  "Actions": [
    {
      "ActionID": 6,
      "OrderNo": 1,
      "Action": "",
      "ActionParameters": {
        "EmailID": 4,
        "SenderDomainID": 1,
        "From": {
          "Name": "Sender",
          "Email": "from@test.com"
        },
        "ReplyTo": {
          "Name": "Sender",
          "Email": "from@test.com"
        },
        "CC": [],
        "BCC": [],
        "Email": {
          "EmailName": "",
          "ContentType": "Both",
          "Mode": "Editor",
          "FetchURL": "",
          "FetchPlainURL": "",
          "Subject": "Test email subject",
          "PlainContent": "Test email plain body",
          "HTMLContent": "<html><body>Test email HTML body</body></html>",
          "ExtraContent1": "",
          "ExtraContent2": "",
          "ImageEmbedding": "Disabled",
          "PreHeaderText": "This is pre-header text for HTML emails",
          "Options": {
            "SenderDomain": "test.com"
          }
        }
      },
      "Notes": "",
      "CompletedRuns": "0",
      "Published": true,
      "Stats": {
        "ActiveSubscribers": "0",
        "TotalSubscribers": "0"
      }
    },
    {
      "ActionID": 7,
      "OrderNo": 2,
      "Action": "",
      "ActionParameters": {
        "WaitUnit": "seconds",
        "WaitAmount": 20
      },
      "Notes": "",
      "CompletedRuns": "0",
      "Published": true,
      "Stats": {
        "ActiveSubscribers": "0",
        "TotalSubscribers": "0"
      }
    }
  ]
}
json
{
  "Errors": [
    {
      "Code": 3,
      "Message": "Journey not found"
    }
  ]
}

HTTP Response and Error Codes:

HTTP Response CodeError CodeDescription
4221Missing NewJourneyName parameter
4222Missing JourneyID parameter
4043Journey not found
4044Journey not cloned successfully

Journey Trigger Criteria

When creating or updating a journey, if you set the trigger to WebsiteEvent_pageView, WebsiteEvent_identify, WebsiteEvent_customEvent, or WebsiteEvent_conversion, you need to provide Trigger_Criteria API parameter.

The Trigger_Criteria parameter must be an array with at least one criteria inside. Here's an example Trigger_Criteria structure:

json
{
  "Trigger_Criteria": [
    {
      "Property": "conversionName",
      "Operator": "equals",
      "Value": "Purchase"
    },
    {
      "Property": "conversionValue",
      "Operator": "greater than",
      "Value": "300"
    }
  ]
}

The filtering works as "match all". Multiple criteria rules as shown above will be filtered together.

Operators:

  • equals
  • doesn't equal
  • contains
  • doesn't contain
  • matches regex
  • doesn't match regex
  • greater than
  • less than
  • is set
  • is not set

The Property can be any of properties for a specific website event. You can get the list of website event properties using List.Get API end-point.

Any questions? Contact us.