The purpose of this document is to provide a guide for the correct use of the Masivian Automation API service, below you can see examples of the body of the request to start flows.
There are two steps to send campaigns via API:
You must enter the Automation creation module and in the start node, when selecting the data upload methid, choose the “API” option. When finishing the flow and clicking on the “Activate” button, an identifier (ID) of the flow will be shown which must be saved to be used in the next step.
HTTP Method | Endpoint |
---|---|
POST | https://automation.masivapp.com/api/automation-model/campaign/init-from-api |
Request structure for new flows created from the graphical interface of Masiv Web
Header | Type | Description |
---|---|---|
Authorization | string | Basic 64 authentication token which matches Basic username:password encoded in base 64 |
Body | Type | Description |
---|---|---|
dataToReplace | array | Collection of people in an array, which will enter the flow |
flowId | string | Id representing the flow created from the web interface |
Responses | Description |
---|---|
🟢 200 | Request successfully received |
Example
{
"status": "ok",
"pTracking": "5fe25b29c33b9800109bb854"
}
Responses | Description |
---|---|
🔴 500 | The model ID does not match one created for the authenticated account |
Example
{
"status": "error",
"response": "FLOW-SERVICE originalError:(model not found)"
}
{
"flowId": "5fe21261c33b980030933335",
"dataToReplace": [
{
"name": "Carlos",
"cellphone": "57301234567",
"email": "[email protected]",
"age": 28,
"message": "Hello this is a example"
}
]
}
NOTE: Cellphone numbers must have country codes to avoid possible errors in the sending and operation of the campaigns.
To perform external event notifications to the Masiv Automation service the following end-point of type application/json must be consumed.