NP6 API Reference (8.1.0)

This documentation provides comprehensive access to the full range of functionalities offered by the NP6 platform through a standardized RESTful interface.

If you have any questions or need assistance, please contact our support team at https://support.chapsvision.com.

Languages
Servers
Production server
https://api-cm.np6.com/

Good to know

Email & SMS

Operations

Notification

Operations

Archives

Operations

Email & SMS

Operations

Notification

Operations

Display

Operations

Email & SMS

Operations

Notification

Operations

Workflow

Operations

duplicate the specified workflow

Request

Path
idinteger(int32)required

Defines the workflow's id to duplicate

Headers
X-Keystringrequired

A unique API key used to authenticate requests to the NP6 platform. This key must be included in every API call to validate the identity and permissions of the client. Keep your API key secure and do not expose it in public code or logs.

curl -i -X POST \
  'https://api-cm.np6.com/scripting/workflows/{id}/duplication' \
  -H 'X-Key: string'

Responses

the duplicated workflow

Bodyapplication/json
idinteger(int32)

The workflow's id

namestring

The workflow's name

descriptionstring

The workflow's description

stateinteger(int32)

The workflow's State

Enum01
creationDatestring(date-time)

The workflow's creation date

updateDatestring(date-time)

The workflow's creation date

scriptingobject

The workflow's script settings

versionstring
Discriminator
environmentobject

Environment definition

importsArray of objects

Imports definition

initializersArray of objects

Initializers definition

filtersArray of objects

Filters definition

settingsobject

The workflow's settings

listenersArray of objects

The workflow's listeners

idstring

The listener's id

namestring

The listener's name

descriptionstring

The listener's description

eventobject

The listener's event

handlerstring

The listener's node handler

cappingArray of objects

The workflow's capping definition

keyobject

The key used to store incremental value

incrementinteger(int32)

The value used to increment key value

thresholdinteger(int32)

The threshold used to handle capping decision

periodobject

The period used to handle capping decision

nodesArray of strings

the id of the workflow nodes to cap

nodesArray of objects

The workflow's nodes

typestring
Discriminator
idstring

The node's id

namestring

The node's name

descriptionstring

The node's description

defaultboolean

The "entry point" node's capabilites

settingsobject

The node settings

nextstring

The next identifier of the node to execute

eventobject

Name of the event to emit

dataobject

Evaluated data used to emit event

flowobjectDeprecated

The node's control flow

tasksArray of objects

The workflows's scheduler tasks

idstring

Id of the task

namestring

Name of the task

descriptionstring

Description of the task

schedulersArray of objects

The schedulers of the task

providerobject

The data provider of the task

handlerstring

The task's node handler

Response
application/json
{ "id": 0, "name": "string", "description": "string", "state": 0, "creationDate": "2019-08-24T14:15:22Z", "updateDate": "2019-08-24T14:15:22Z", "scripting": { "version": "string" }, "settings": {}, "listeners": [ { "id": "string", "name": "string", "description": "string", "event": { "type": "string" }, "handler": "string" } ], "capping": [ { "key": { "type": "string" }, "increment": 0, "threshold": 0, "period": { "type": "string" }, "nodes": [ "string" ] } ], "nodes": [ { "type": "string" } ], "tasks": [ { "id": "string", "name": "string", "description": "string", "schedulers": [ { "type": "string" } ], "provider": { "type": "string" }, "handler": "string" } ] }

Execute the specified workflow

Request

Path
idinteger(int32)required

The workflow's id to execute

Headers
X-Keystringrequired

A unique API key used to authenticate requests to the NP6 platform. This key must be included in every API call to validate the identity and permissions of the client. Keep your API key secure and do not expose it in public code or logs.

Bodyapplication/vnd.np6.cm.workflow-v4

Data used to execute Workflow

idstring

Underlying execution id

receiverobject

The receiver identification

typestring
Discriminator
valuestring

Id of the target

nodestring

The startup node

eventobject

Underlying workflow event

stateobject

Internal state

dataobject

Underlying data

variablesArray of objects

Additionnal variables

resolutionsArray of objects

Underlying resolution

keystring

Key

valueobject

Value

debugobject

Debugging informations

versionstring
Discriminator
idstring

Underlying id of the debug

ttlinteger(int32)

Represents the maximum number of nodes to execute

nodesArray of objects

A list of debugged nodes

stampobject

Stamp informations

timeinteger(int64)

Creation time of the stamp
This is the number of milliseconds elapsed since January 1, 1970 00:00:00 UTC.

idstring(uuid)

The stamp id

threadstring(uuid)

The thread id

setstring(uuid)

The set id

curl -i -X POST \
  'https://api-cm.np6.com/scripting/workflows/{id}/execution' \
  -H 'Content-Type: application/vnd.np6.cm.workflow-v4' \
  -H 'X-Key: string' \
  -d '[object Object]'

Responses

An execution result

Bodyapplication/vnd.np6.cm.workflow-v4
typestring
Discriminator
flowobject

A representation of the executed flow

Execute the specified workflow

Request

Path
idinteger(int32)required

The workflow's id to execute

Headers
X-Keystringrequired

A unique API key used to authenticate requests to the NP6 platform. This key must be included in every API call to validate the identity and permissions of the client. Keep your API key secure and do not expose it in public code or logs.

Bodyapplication/vnd.np6.cm.workflow-v4

A list of data used to execute Workflow

Array [
idstring

Underlying execution id

receiverobject

The receiver identification

typestring
Discriminator
valuestring

Id of the target

nodestring

The startup node

eventobject

Underlying workflow event

stateobject

Internal state

dataobject

Underlying data

variablesArray of objects

Additionnal variables

resolutionsArray of objects

Underlying resolution

keystring

Key

valueobject

Value

debugobject

Debugging informations

versionstring
Discriminator
idstring

Underlying id of the debug

ttlinteger(int32)

Represents the maximum number of nodes to execute

nodesArray of objects

A list of debugged nodes

stampobject

Stamp informations

timeinteger(int64)

Creation time of the stamp
This is the number of milliseconds elapsed since January 1, 1970 00:00:00 UTC.

idstring(uuid)

The stamp id

threadstring(uuid)

The thread id

setstring(uuid)

The set id

]
curl -i -X POST \
  'https://api-cm.np6.com/scripting/workflows/{id}/executions' \
  -H 'Content-Type: application/vnd.np6.cm.workflow-v4' \
  -H 'X-Key: string' \
  -d '[object Object]'

Responses

A list of execution result

Bodyapplication/vnd.np6.cm.workflow-v4Array [
typestring
Discriminator
flowobject

A representation of the executed flow

]

Campaign

Operations

Campaign

Operations

Contact

Operations

Field

Operations

Enumeration

Operations

Segment

Operations

Import

Operations

Subscription

Operations

Contact

Operations

Webtask

Operations

Compilable

Operations

Mobile Application

Operations

Category

Operations

Marketing Pressure

Operations