Skip to main content

Get scenarios list

Description

Retrieves all created scenarios list.

Request URL

Method: POST

https://example.com/api/v1.1/workflows/list

Request parameters

ParameterTypeExampleRequiredDescription
tokenstring"abcdefghijklmnqrstuvwxyz"YesAPI token
formatstring"json"NoResponse data format
By default – json
from_idint1NoThe first ID in the response
By default – 1
limitint1NoResources list limit
By default – 1000
groups[]string[ "group1", "group2" ]NoList of access groups
By default – []
groups_id[]int[ 0, 1 ]NoList of access groups IDs
By default – []
ui_tags[]string["tag1", "tag2"]NoList of tags
By default – []

Request example

{
"token": "2fefb577533d4cae919350c450755239",
"from_id": 10,
"limit": 1,
"ui_tags": [
"B2C"
]
}

Response example

{
"data": [
{
"id": 10,
"name": "Government tip",
"list_id": 1,
"is_active": true,
"ui_tags": [
"B2C"
],
"mode": "skip",
"groups": [
{
"ID": 2,
"title": "Sales and promotion"
}
],
"nodes": [
{
"name": "DEFAULT_START_NODE_TITLE",
"type": "start",
"node_id": 0
},
{
"name": "ANY_IMPORT_START_NODE_TITLE",
"type": "start",
"node_id": 2
},
{
"templates": [
1
],
"name": "Welcome letter",
"type": "campaign",
"node_id": 3,
"campaign_id": 17
},
{
"name": "1 d.0 h.0 m.",
"type": "delay",
"node_id": 4
},
{
"name": "Is the subscription confirmed?",
"type": "condition",
"node_id": 5
},
{
"name": "Got the SMS reminder?",
"type": "condition",
"node_id": 6
},
{
"templates": [
5
],
"name": "SMS message",
"type": "campaign",
"node_id": 7,
"campaign_id": 30
},
{
"name": "1 d.0 h.0 m.",
"type": "delay",
"node_id": 8
},
{
"name": "Application to a call center or other product",
"type": "feedback",
"node_id": 9
},
{
"title": "Guidelines",
"type": "feedback",
"node_id": 10
},
{
"name": "Specify code",
"type": "promo_attach",
"node_id": 11
},
{
"templates": [
22
],
"name": "Offer",
"type": "campaign",
"node_id": 12
"campaign_id": 39
}
{
"name": "Go to scenario #29",
"type": "workflow_jump",
"node_id": 13,
"next_workflow_id": 29,
"next_node_id": 0
}
]
}
],
"error": 0,
"error_text": "Successful operation",
"next_from_id": 11,
"total_count": 20
}

Response parameters

ParameterTypedescription
errorintError code
error_textstringError text
idintResource ID
namestringResource name
list_idintDatabase ID
is_activeboolActive or inactive scenario
modestringMode if the profile is recaptured by the scenario
ui_tagsarrayList of tags
groupsarray of objectsList of groups
nodesarray of objectsList of nodes
total_countintTotal resources count
next_from_idintIdentifier of the following scenario
node_idintNode Identifier
campaign_idintCampaign Identifier (for node "Channels")
templatesintTemplate Identifier (for node "Channels")
next_workflow_idintIdentifier of the next scenario (for the scenario transition node)
next_node_idintIdentifier of the next node (for the scenario transition element)