Get All Automation

To get all the automation list follow the example code and be careful with the parameters.

Base Urlhttps://velozmail.contatofacil.com.br/api/


HTTP Method: GET

API URL: https://velozmail.contatofacil.com.br/api/automations

API Key: Get YOUR_PUBLIC_KEY and YOUR_SECRET_KEY from the account page

Response format: JSON


Response Body

id: automation id

user_id: owner id of the specific automation

automation_for: it should be contact type id or segment id which you targeting

automation_for_table: table name of you targeting

automation_name: name of the automation

exit_criteria: when the automation exit

unsubscribe_group_id: which unsubscribe group perform for the automation

automation_type: the type of the automation

utr: the unique uuid of the automation

status: status of the automation. Two types of status allow. 0 stand for draft, and 1 stand for live

live_at: the live at time of the automation

total_triggered,total_delivered,total_unique_opens,total_opens,total_bounces,total_unsubscribe: the total number of statics

automation_schedule_count: number of email automation has

                                                                
var request = require('request');
var options = {
  'method': 'GET',
  'url': 'BASE_URL/automations',
  'headers': {
    'PublicKey': 'YOUR_PUBLIC_KEY',
    'SecretKey': 'YOUR_SECRET_KEY'
  }
};
request(options, function (error, response) {
  if (error) throw new Error(error);

});



                                                                
123456789101112131415 16 17181920212223242526

import requests

url = "BASE_URL/automations"

payload={}
headers = {
  'PublicKey': 'YOUR_PUBLIC_KEY',
  'SecretKey': 'YOUR_SECRET_KEY'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)

123456789101112131415 1617181920212223242526

?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'BASE_URL/automations',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
    'PublicKey: YOUR_PUBLIC_KEY',
    'SecretKey: YOUR_SECRET_KEY'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;


                                                                
123456789101112131415 1617181920212223242526

curl --location --request GET 'BASE_URL/automations' \
--header 'PublicKey: YOUR_PUBLIC_KEY' \
--header 'SecretKey: YOUR_SECRET_KEY'
123456789101112131415 1617181920212223242526

require "uri"
require "net/http"

url = URI("BASE_URL/automations")

http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Get.new(url)
request["PublicKey"] = "YOUR_PUBLIC_KEY"
request["SecretKey"] = "YOUR_SECRET_KEY"

response = http.request(request)
puts response.read_body
123456789101112131415 1617181920212223242526

{
    "status": "success",
    "message": {
        "automations": [
            {
                "id": 5,
                "user_id": 6790,
                "automation_for": 3,
                "automation_for_table": "contacts_",
                "automation_name": "Test Automation",
                "exit_criteria": 1,
                "unsubscribe_group_id": "3",
                "automation_type": 0,
                "utr": "e9c7ff00-8d1c-11ee-91c4-b42e9970e591",
                "status": 0,
                "live_at": null,
                "total_triggered": 0,
                "total_delivered": 0,
                "total_unique_opens": 0,
                "total_opens": 0,
                "total_bounces": 0,
                "total_unsubscribe": 0,
                "deleted_at": null,
                "created_at": "2023-11-27T12:03:01.000000Z",
                "updated_at": "2023-11-27T12:03:01.000000Z",
                "automation_schedule_count": 3
            },
            {
                "id": 3,
                "user_id": 6790,
                "automation_for": 3,
                "automation_for_table": "contacts_",
                "automation_name": "Test Automation",
                "exit_criteria": 1,
                "unsubscribe_group_id": "3",
                "automation_type": 0,
                "utr": "4dce63f6-8825-11ee-a739-b42e9970e591",
                "status": 1,
                "live_at": "2023-11-28 12:16:59",
                "total_triggered": 3,
                "total_delivered": 3,
                "total_unique_opens": 2,
                "total_opens": 16,
                "total_bounces": 0,
                "total_unsubscribe": 1,
                "deleted_at": null,
                "created_at": "2023-11-21T04:20:29.000000Z",
                "updated_at": "2023-11-28T06:16:59.000000Z",
                "automation_schedule_count": 3
            },
            ...
        ]
    }
}
                                                        
123456789101112131415 1617181920212223242526
                                                                
{
    "status": "failed",
    "errors": "Record Not Found"
}
                                                            
                                                            
1234567891011121314

Create Automation

To create a new automation follow the example code and be careful with the parameters.

Base Urlhttps://velozmail.contatofacil.com.br/api/


HTTP Method: POST

API URL: https://velozmail.contatofacil.com.br/api/automations/create

API Key: Get YOUR_PUBLIC_KEY and YOUR_SECRET_KEY from the account page

Response format: JSON


Body Params

type* enum

Two type are available now. For building automation type should be welcome and custom automation type should be custom

automation_for string

Which recipient do you want to targeting. you can target contact and segment recipients. for contact recipients contacts_{contact_type_id} e.g. contacts_10 and for segment recipient segments_{segment_id} e.g. segments_25

automation_name string

Name of the automation

unsubscribe_group_id* integer

The Unsubscribe group what you want to assign for this automation

                                                                
var request = require('request');
var options = {
  'method': 'POST',
  'url': 'BASE_URL/automations/create',
  'headers': {
    'PublicKey': 'YOUR_PUBLIC_KEY',
    'SecretKey': 'YOUR_SECRET_KEY'
  },
  formData: {
    'type': 'custom',
    'automation_for': 'contacts_3',
    'automation_name': 'Api Automation',
    'unsubscribe_group_id': '3'
  }
};
request(options, function (error, response) {
  if (error) throw new Error(error);

});





                                                                
123456789101112131415 16 17181920212223242526

import requests

url = "BASE_URL/automations/create"

payload={'type': 'custom',
'automation_for': 'contacts_3',
'automation_name': 'Api Automation',
'unsubscribe_group_id': '3'}
files=[

]
headers = {
  'PublicKey': 'YOUR_PUBLIC_KEY',
  'SecretKey': 'YOUR_SECRET_KEY'
}

response = requests.request("POST", url, headers=headers, data=payload, files=files)

print(response.text)

123456789101112131415 1617181920212223242526

?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'BASE_URL/automations/create',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS => array('type' => 'custom','automation_for' => 'contacts_3','automation_name' => 'Api Automation','unsubscribe_group_id' => '3'),
  CURLOPT_HTTPHEADER => array(
    'PublicKey: YOUR_PUBLIC_KEY',
    'SecretKey: YOUR_SECRET_KEY'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;


                                                                
123456789101112131415 1617181920212223242526

curl --location --request POST 'BASE_URL/automations/create' \
--header 'PublicKey: YOUR_PUBLIC_KEY' \
--header 'SecretKey: YOUR_SECRET_KEY' \
--form 'type="custom"' \
--form 'automation_for="contacts_3"' \
--form 'automation_name="Api Automation"' \
--form 'unsubscribe_group_id="3"'
123456789101112131415 1617181920212223242526

require "uri"
require "net/http"

url = URI("BASE_URL/automations/create")

http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Post.new(url)
request["PublicKey"] = "YOUR_PUBLIC_KEY"
request["SecretKey"] = "YOUR_SECRET_KEY"
form_data = [['type', 'custom'],['automation_for', 'contacts_3'],['automation_name', 'Api Automation'],['unsubscribe_group_id', '3']]
request.set_form form_data, 'multipart/form-data'
response = http.request(request)
puts response.read_body
123456789101112131415 1617181920212223242526

{
    "status": "success",
    "message": {
        "utr": "affe4624-9674-11ee-8139-b42e9970e591"
    }
}
                                                        
123456789101112131415 1617181920212223242526
                                                                
{
    "status": "failed",
    "errors": {
        "automation_name": [
            "The automation name field is required."
        ]
    }
}
                                                            
                                                            
1234567891011121314

Duplicate Automation

To duplicate a automation follow the example code and be careful with the parameters.

Base Urlhttps://velozmail.contatofacil.com.br/api/


HTTP Method: GET

API URL: https://velozmail.contatofacil.com.br/api/automations/duplicate?utr={utr}

API Key: Get YOUR_PUBLIC_KEY and YOUR_SECRET_KEY from the account page

Response format: JSON


Request Body
                                                                
var request = require('request');
var options = {
  'method': 'GET',
  'url': 'BASE_URL/automations/duplicate?utr=e9c7ff00-8d1c-11ee-91c4-b42e9970e592',
  'headers': {
    'PublicKey': 'YOUR_PUBLIC_KEY',
    'SecretKey': 'YOUR_SECRET_KEY'
  }
};
request(options, function (error, response) {
  if (error) throw new Error(error);

});


                                                                
123456789101112131415 16 17181920212223242526

import requests

url = "BASE_URL/automations/duplicate?utr=e9c7ff00-8d1c-11ee-91c4-b42e9970e592"

payload={}
headers = {
  'PublicKey': 'YOUR_PUBLIC_KEY',
  'SecretKey': 'YOUR_SECRET_KEY'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)
123456789101112131415 1617181920212223242526

?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'BASE_URL/automations/duplicate?utr=e9c7ff00-8d1c-11ee-91c4-b42e9970e592',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
    'PublicKey: YOUR_PUBLIC_KEY',
    'SecretKey: YOUR_SECRET_KEY'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
                                                                
123456789101112131415 1617181920212223242526

curl --location --request GET 'BASE_URL/automations/duplicate?utr=e9c7ff00-8d1c-11ee-91c4-b42e9970e592' \
--header 'PublicKey: YOUR_PUBLIC_KEY' \
--header 'SecretKey: YOUR_SECRET_KEY'
123456789101112131415 1617181920212223242526

require "uri"
require "net/http"

url = URI("BASE_URL/automations/duplicate?utr=e9c7ff00-8d1c-11ee-91c4-b42e9970e592")

http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Get.new(url)
request["PublicKey"] = "YOUR_PUBLIC_KEY"
request["SecretKey"] = "YOUR_SECRET_KEY"

response = http.request(request)
puts response.read_body
123456789101112131415 1617181920212223242526

{
    "status": "success",
    "message": {
        "utr": "ee482778-9657-11ee-bb6c-b42e9970e591"
    }
}
                                                        
123456789101112131415 1617181920212223242526
                                                                
{
    "status": "failed",
    "errors": {
        "PublicKey": [
            "The public key field is required."
        ],
        "SecretKey": [
            "The secret key field is required."
        ]
    }
}
                                                            
                                                            
1234567891011121314

Get Automation Details

To get Automation Details follow the example code and be careful with the parameters.

Base Urlhttps://velozmail.contatofacil.com.br/api/


HTTP Method: GET

API URL: https://velozmail.contatofacil.com.br/api/automations/details?utr={utr}

API Key: Get YOUR_PUBLIC_KEY and YOUR_SECRET_KEY from the account page

Response format: JSON


Response Body

id: automation id

user_id: owner id of the specific automation

automation_for: it should be contact type id or segment id which you targeting

automation_for_table: table name of you targeting

automation_name: name of the automation

exit_criteria: when the automation exit

unsubscribe_group_id: which unsubscribe group perform for the automation

automation_type: the type of the automation

utr: the unique uuid of the automation

status: status of the automation. Two types of status allow. 0 stand for draft, and 1 stand for live

live_at: the live at time of the automation

total_triggered,total_delivered,total_unique_opens,total_opens,total_bounces,total_unsubscribe: the total number of statics

                                                                
var request = require('request');
var options = {
  'method': 'GET',
  'url': 'BASE_URL/automations/details?utr=e9c7ff00-8d1c-11ee-91c4-b42e9970e591',
  'headers': {
    'PublicKey': 'YOUR_PUBLIC_KEY',
    'SecretKey': 'YOUR_SECRET_KEY'
  }
};
request(options, function (error, response) {
  if (error) throw new Error(error);

});


                                                                
123456789101112131415 16 17181920212223242526

import requests

url = "BASE_URL/automations/details?utr=e9c7ff00-8d1c-11ee-91c4-b42e9970e591"

payload={}
headers = {
  'PublicKey': 'YOUR_PUBLIC_KEY',
  'SecretKey': 'YOUR_SECRET_KEY'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)
123456789101112131415 1617181920212223242526

?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'BASE_URL/automations/details?utr=e9c7ff00-8d1c-11ee-91c4-b42e9970e591',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
    'PublicKey: YOUR_PUBLIC_KEY',
    'SecretKey: YOUR_SECRET_KEY'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
                                                                
123456789101112131415 1617181920212223242526

curl --location --request GET 'BASE_URL/automations/details?utr=e9c7ff00-8d1c-11ee-91c4-b42e9970e591' \
--header 'PublicKey: YOUR_PUBLIC_KEY' \
--header 'SecretKey: YOUR_SECRET_KEY'
123456789101112131415 1617181920212223242526

require "uri"
require "net/http"

url = URI("BASE_URL/automations/details?utr=e9c7ff00-8d1c-11ee-91c4-b42e9970e591")

http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Get.new(url)
request["PublicKey"] = "YOUR_PUBLIC_KEY"
request["SecretKey"] = "YOUR_SECRET_KEY"

response = http.request(request)
puts response.read_body
123456789101112131415 1617181920212223242526

{
    "status": "success",
    "message": {
        "automation": {
            "id": 5,
            "user_id": 6790,
            "automation_for": 3,
            "automation_for_table": "contacts_",
            "automation_name": "Test Automation",
            "exit_criteria": 1,
            "unsubscribe_group_id": "3",
            "automation_type": 0,
            "utr": "e9c7ff00-8d1c-11ee-91c4-b42e9970e591",
            "status": 0,
            "live_at": null,
            "total_triggered": 0,
            "total_delivered": 0,
            "total_unique_opens": 0,
            "total_opens": 0,
            "total_bounces": 0,
            "total_unsubscribe": 0,
            "deleted_at": null,
            "created_at": "2023-11-27T12:03:01.000000Z",
            "updated_at": "2023-11-27T12:03:01.000000Z"
        }
    }
}
                                                        
123456789101112131415 1617181920212223242526
                                                                
{
    "status": "failed",
    "errors": "Record Not Found"
}
                                                            
                                                            
1234567891011121314

Pause Automation

To pause automation follow the example code and be careful with the parameters.

Base Urlhttps://velozmail.contatofacil.com.br/api/


HTTP Method: GET

API URL: https://velozmail.contatofacil.com.br/api/automations/pause?utr={utr}

API Key: Get YOUR_PUBLIC_KEY and YOUR_SECRET_KEY from the account page

Response format: JSON


Note: We allow pause only live automation
                                                                
var request = require('request');
var options = {
  'method': 'GET',
  'url': 'BASE_URL/automations/pause?utr=4dce63f6-8825-11ee-a739-b42e9970e591',
  'headers': {
    'PublicKey': 'YOUR_PUBLIC_KEY',
    'SecretKey': 'YOUR_SECRET_KEY'
  }
};
request(options, function (error, response) {
  if (error) throw new Error(error);

});



                                                                
123456789101112131415 16 17181920212223242526

import requests

url = "BASE_URL/automations/pause?utr=4dce63f6-8825-11ee-a739-b42e9970e591"

payload={}
headers = {
  'PublicKey': 'YOUR_PUBLIC_KEY',
  'SecretKey': 'YOUR_SECRET_KEY'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)
123456789101112131415 1617181920212223242526

?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'BASE_URL/automations/pause?utr=4dce63f6-8825-11ee-a739-b42e9970e591',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
    'PublicKey: YOUR_PUBLIC_KEY',
    'SecretKey: YOUR_SECRET_KEY'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;


                                                                
123456789101112131415 1617181920212223242526

curl --location --request GET 'BASE_URL/automations/pause?utr=4dce63f6-8825-11ee-a739-b42e9970e591' \
--header 'PublicKey: YOUR_PUBLIC_KEY' \
--header 'SecretKey: YOUR_SECRET_KEY'
123456789101112131415 1617181920212223242526

require "uri"
require "net/http"

url = URI("BASE_URL/automations/pause?utr=4dce63f6-8825-11ee-a739-b42e9970e591")

http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Get.new(url)
request["PublicKey"] = "YOUR_PUBLIC_KEY"
request["SecretKey"] = "YOUR_SECRET_KEY"

response = http.request(request)
puts response.read_body
123456789101112131415 1617181920212223242526

{
    "status": "success",
    "message": "Automation Paused Successfully"
}
                                                        
123456789101112131415 1617181920212223242526
                                                                
{
    "status": "failed",
    "errors": "Record not found"
}
                                                            
                                                            
1234567891011121314

Set Live Automation

To set live automation follow the example code and be careful with the parameters.

Base Urlhttps://velozmail.contatofacil.com.br/api/


HTTP Method: GET

API URL: https://velozmail.contatofacil.com.br/api/automations/set-live?utr={utr}

API Key: Get YOUR_PUBLIC_KEY and YOUR_SECRET_KEY from the account page

Response format: JSON


Body Params
                                                                
var request = require('request');
var options = {
  'method': 'GET',
  'url': 'BASE_URL/automations/set-live?utr=4dce63f6-8825-11ee-a739-b42e9970e591',
  'headers': {
    'PublicKey': 'YOUR_PUBLIC_KEY',
    'SecretKey': 'YOUR_SECRET_KEY'
  }
};
request(options, function (error, response) {
  if (error) throw new Error(error);

});




                                                                
123456789101112131415 16 17181920212223242526

import requests

url = "BASE_URL/automations/set-live?utr=4dce63f6-8825-11ee-a739-b42e9970e591"

payload={}
headers = {
  'PublicKey': 'YOUR_PUBLIC_KEY',
  'SecretKey': 'YOUR_SECRET_KEY'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)
123456789101112131415 1617181920212223242526

?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'BASE_URL/automations/set-live?utr=4dce63f6-8825-11ee-a739-b42e9970e591',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
    'PublicKey: YOUR_PUBLIC_KEY',
    'SecretKey: YOUR_SECRET_KEY'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

                                                                
123456789101112131415 1617181920212223242526

curl --location --request GET 'BASE_URL/automations/set-live?utr=4dce63f6-8825-11ee-a739-b42e9970e591' \
--header 'PublicKey: YOUR_PUBLIC_KEY' \
--header 'SecretKey: YOUR_SECRET_KEY'
123456789101112131415 1617181920212223242526

require "uri"
require "net/http"

url = URI("BASE_URL/automations/set-live?utr=4dce63f6-8825-11ee-a739-b42e9970e591")

http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Get.new(url)
request["PublicKey"] = "YOUR_PUBLIC_KEY"
request["SecretKey"] = "YOUR_SECRET_KEY"

response = http.request(request)
puts response.read_body

123456789101112131415 1617181920212223242526

{
    "status": "success",
    "message": "Automation has been set live"
}
                                                        
123456789101112131415 1617181920212223242526
                                                                
{
    "status": "failed",
    "errors": "Unsubscribe group require to live automation"
}
                                                            
                                                            
1234567891011121314

Delete Automation

To delete automation follow the example code and be careful with the parameters.

Base Urlhttps://velozmail.contatofacil.com.br/api/


HTTP Method: DELETE

API URL: https://velozmail.contatofacil.com.br/api/automations/delete?utr={utr}

API Key: Get YOUR_PUBLIC_KEY and YOUR_SECRET_KEY from the account page

Response format: JSON


Body Params
                                                                
var request = require('request');
var options = {
  'method': 'DELETE',
  'url': 'BASE_URL/automations/delete?utr=4dce63f6-8825-11ee-a739-b42e9970e591',
  'headers': {
    'PublicKey': 'YOUR_PUBLIC_KEY',
    'SecretKey': 'YOUR_SECRET_KEY'
  }
};
request(options, function (error, response) {
  if (error) throw new Error(error);

});



                                                                
123456789101112131415 16 17181920212223242526

import requests

url = "BASE_URL/automations/delete?utr=4dce63f6-8825-11ee-a739-b42e9970e591"

payload={}
headers = {
  'PublicKey': 'YOUR_PUBLIC_KEY',
  'SecretKey': 'YOUR_SECRET_KEY'
}

response = requests.request("DELETE", url, headers=headers, data=payload)

print(response.text)
123456789101112131415 1617181920212223242526

?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'BASE_URL/automations/delete?utr=4dce63f6-8825-11ee-a739-b42e9970e591',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'DELETE',
  CURLOPT_HTTPHEADER => array(
    'PublicKey: YOUR_PUBLIC_KEY',
    'SecretKey: YOUR_SECRET_KEY'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

                                                                
123456789101112131415 1617181920212223242526

curl --location --request DELETE 'BASE_URL/automations/delete?utr=4dce63f6-8825-11ee-a739-b42e9970e591' \
--header 'PublicKey: YOUR_PUBLIC_KEY' \
--header 'SecretKey: YOUR_SECRET_KEY'
123456789101112131415 1617181920212223242526

require "uri"
require "net/http"

url = URI("BASE_URL/automations/delete?utr=4dce63f6-8825-11ee-a739-b42e9970e591")

http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Delete.new(url)
request["PublicKey"] = "YOUR_PUBLIC_KEY"
request["SecretKey"] = "YOUR_SECRET_KEY"

response = http.request(request)
puts response.read_body
123456789101112131415 1617181920212223242526

{
    "status": "success",
    "message": "Deleted Successfully"
}
                                                        
123456789101112131415 1617181920212223242526
                                                                
{
    "status": "failed",
    "errors": "Record not found"
}
                                                            
                                                            
1234567891011121314

Bulk Delete Automation

To multiple delete of automation follow the example code and be careful with the parameters.

Base Urlhttps://velozmail.contatofacil.com.br/api/


HTTP Method: POST

API URL: https://velozmail.contatofacil.com.br/api/automations/bulk-delete

API Key: Get YOUR_PUBLIC_KEY and YOUR_SECRET_KEY from the account page

Response format: JSON


Body Params

strIds* array

strIds must be type array.

                                                                
var request = require('request');
var options = {
  'method': 'POST',
  'url': 'BASE_URL/automations/bulk-delete',
  'headers': {
    'PublicKey': 'YOUR_PUBLIC_KEY',
    'SecretKey': 'YOUR_SECRET_KEY',
    'Content-Type': 'application/x-www-form-urlencoded'
  },
  form: {
    'strIds[0]': '8',
    'strIds[1]': '44'
  }
};
request(options, function (error, response) {
  if (error) throw new Error(error);

});



                                                                
123456789101112131415 16 17181920212223242526

import requests

url = "BASE_URL/automations/bulk-delete"

payload='strIds%5B0%5D=8&strIds%5B1%5D=44'
headers = {
  'PublicKey': 'YOUR_PUBLIC_KEY',
  'SecretKey': 'YOUR_SECRET_KEY',
  'Content-Type': 'application/x-www-form-urlencoded'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)
123456789101112131415 1617181920212223242526

?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'BASE_URL/automations/bulk-delete',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS => 'strIds%5B0%5D=8&strIds%5B1%5D=44',
  CURLOPT_HTTPHEADER => array(
    'PublicKey: YOUR_PUBLIC_KEY',
    'SecretKey: YOUR_SECRET_KEY',
    'Content-Type: application/x-www-form-urlencoded'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

                                                                
123456789101112131415 1617181920212223242526

curl --location --request POST 'BASE_URL/automations/bulk-delete' \
--header 'PublicKey: YOUR_PUBLIC_KEY' \
--header 'SecretKey: YOUR_SECRET_KEY' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'strIds[0]=8' \
--data-urlencode 'strIds[1]=44'
123456789101112131415 1617181920212223242526

require "uri"
require "net/http"

url = URI("BASE_URL/automations/bulk-delete")

http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Post.new(url)
request["PublicKey"] = "YOUR_PUBLIC_KEY"
request["SecretKey"] = "YOUR_SECRET_KEY"
request["Content-Type"] = "application/x-www-form-urlencoded"
request.body = "strIds%5B0%5D=8&strIds%5B1%5D=44"

response = http.request(request)
puts response.read_body
123456789101112131415 1617181920212223242526

{
    "status": "success",
    "message": "Deleted Successfully"
}
                                                        
123456789101112131415 1617181920212223242526
                                                                
{
    "status": "failed",
    "errors": "Record not found"
}
                                                            
                                                            
1234567891011121314

Get Automation Schedules

To get automation schedules list follow the example code and be careful with the parameters.

Base Urlhttps://velozmail.contatofacil.com.br/api/


HTTP Method: GET

API URL: https://velozmail.contatofacil.com.br/api/automations/schedule?utr={utr}

API Key: Get YOUR_PUBLIC_KEY and YOUR_SECRET_KEY from the account page

Response format: JSON


Note: utr should be automation utr
                                                                
var request = require('request');
var options = {
  'method': 'GET',
  'url': 'BASE_URL/automations/schedule?utr=e9c7ff00-8d1c-11ee-91c4-b42e9970e591',
  'headers': {
    'PublicKey': 'YOUR_PUBLIC_KEY',
    'SecretKey': 'YOUR_SECRET_KEY'
  }
};
request(options, function (error, response) {
  if (error) throw new Error(error);

});



                                                                
123456789101112131415 16 17181920212223242526

import requests

url = "BASE_URL/automations/schedule?utr=e9c7ff00-8d1c-11ee-91c4-b42e9970e591"

payload={}
headers = {
  'PublicKey': 'YOUR_PUBLIC_KEY',
  'SecretKey': 'YOUR_SECRET_KEY'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)
123456789101112131415 1617181920212223242526

?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'BASE_URL/automations/schedule?utr=e9c7ff00-8d1c-11ee-91c4-b42e9970e591',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
    'PublicKey: YOUR_PUBLIC_KEY',
    'SecretKey: YOUR_SECRET_KEY'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
                                                                
123456789101112131415 1617181920212223242526

curl --location --request GET 'BASE_URL/automations/schedule?utr=e9c7ff00-8d1c-11ee-91c4-b42e9970e591' \
--header 'PublicKey: YOUR_PUBLIC_KEY' \
--header 'SecretKey: YOUR_SECRET_KEY'
123456789101112131415 1617181920212223242526

require "uri"
require "net/http"

url = URI("BASE_URL/automations/schedule?utr=e9c7ff00-8d1c-11ee-91c4-b42e9970e591")

http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Get.new(url)
request["PublicKey"] = "YOUR_PUBLIC_KEY"
request["SecretKey"] = "YOUR_SECRET_KEY"

response = http.request(request)
puts response.read_body
123456789101112131415 1617181920212223242526

{
    "status": "success",
    "message": {
        "automation_schedules": [
            {
                "id": 10,
                "user_id": 6790,
                "automation_id": 5,
                "sender_id": 2,
                "subject": "How is your days goes to",
                "waiting_period": 1,
                "waiting_type": "instantly",
                "utr": "5a24b56e-89de-11ee-ae43-b42e9970e591",
                "template_id": 2,
                "preview_img": "verify_email.png",
                "template_json": ...,
                "template_html": ...,
                "created_at": "2023-11-27T12:03:01.000000Z",
                "updated_at": "2023-11-27T12:03:01.000000Z",
                "design_url": "BASE_URL/user/automations/schedule/email/design/5a24b56e-89de-11ee-ae43-b42e9970e591",
                "image": "BASE_URL/assets/sample_template/verify_email.png"
            },
            ...
        ]
    }
}
                                                        
123456789101112131415 1617181920212223242526
                                                                
{
    "status": "failed",
    "errors": "Record not found"
}
                                                            
                                                            
1234567891011121314

Create Automation Schedule

To create automation schedule follow the example code and be careful with the parameters.

Base Urlhttps://velozmail.contatofacil.com.br/api/


HTTP Method: POST

API URL: https://velozmail.contatofacil.com.br/api/automations/schedule/create

API Key: Get YOUR_PUBLIC_KEY and YOUR_SECRET_KEY from the account page

Response format: JSON


Body Params

utr* string

Which automation you want to add schedule

sender_id* integer

Which sender you want to use for email. you get sender_id from sender list endpoint

subject* text

Subject of your mail

waiting_period* integer

How many days or hours you want to wait for email. For instant email send keep waiting_period 1.

waiting_type* enum

3 type of waiting_type. instantly,days,hours

template_id* integer

The design template id. you will get template id from Get All Template endpoint

preview_img* text

The design preview img. you will get preview img from Get All Template endpoint

template_json longText

The design template json code. if you provide json code then make template_html empty

template_html longText

The design template html code. if you provide html code then make template_json empty

                                                                
var request = require('request');
var options = {
  'method': 'POST',
  'url': 'BASE_URL/automations/schedule/create',
  'headers': {
    'PublicKey': 'YOUR_PUBLIC_KEY',
    'SecretKey': 'YOUR_SECRET_KEY'
  },
  formData: {
    'utr': '381da846-8780-11ee-835d-b42e9970e591',
    'sender_id': '2',
    'subject': 'Test Api Subject',
    'waiting_period': '1',
    'waiting_type': 'instantly',
    'template_id': '2',
    'preview_img': 'verify_email.png',
    'template_json': 'abc',
    'template_html': 'xyz'
  }
};
request(options, function (error, response) {
  if (error) throw new Error(error);

});





                                                                
123456789101112131415 16 17181920212223242526

import requests

url = "BASE_URL/automations/schedule/create"

payload={'utr': '381da846-8780-11ee-835d-b42e9970e591',
'sender_id': '2',
'subject': 'Test Api Subject',
'waiting_period': '1',
'waiting_type': 'instantly',
'template_id': '2',
'preview_img': 'verify_email.png',
'template_json': 'abc',
'template_html': 'xyz'}
files=[

]
headers = {
  'PublicKey': 'YOUR_PUBLIC_KEY',
  'SecretKey': 'YOUR_SECRET_KEY'
}

response = requests.request("POST", url, headers=headers, data=payload, files=files)

print(response.text)

123456789101112131415 1617181920212223242526

?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'BASE_URL/automations/schedule/create',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS => array('utr' => '381da846-8780-11ee-835d-b42e9970e591','sender_id' => '2','subject' => 'Test Api Subject','waiting_period' => '1',
                              'waiting_type' => 'instantly','template_id' => '2','preview_img' => 'verify_email.png','template_json' => 'abc','template_html' => 'xyz'),
  CURLOPT_HTTPHEADER => array(
    'PublicKey: YOUR_PUBLIC_KEY',
    'SecretKey: YOUR_SECRET_KEY'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;


                                                                
123456789101112131415 1617181920212223242526

curl --location --request POST 'BASE_URL/automations/schedule/create' \
--header 'PublicKey: YOUR_PUBLIC_KEY' \
--header 'SecretKey: YOUR_SECRET_KEY' \
--form 'utr="381da846-8780-11ee-835d-b42e9970e591"' \
--form 'sender_id="2"' \
--form 'subject="Test Api Subject"' \
--form 'waiting_period="1"' \
--form 'waiting_type="instantly"' \
--form 'template_id="2"' \
--form 'preview_img="verify_email.png"' \
--form 'template_json="abc"' \
--form 'template_html="xyz"'
123456789101112131415 1617181920212223242526

require "uri"
require "net/http"

url = URI("BASE_URL/automations/schedule/create")

http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Post.new(url)
request["PublicKey"] = "YOUR_PUBLIC_KEY"
request["SecretKey"] = "YOUR_SECRET_KEY"
form_data = [['utr', '381da846-8780-11ee-835d-b42e9970e591'],['sender_id', '2'],['subject', 'Test Api Subject'],['waiting_period', '1'],['waiting_type', 'instantly'],
              ['template_id', '2'],['preview_img', 'verify_email.png'],['template_json', 'abc'],['template_html', 'xyz']]
request.set_form form_data, 'multipart/form-data'
response = http.request(request)
puts response.read_body
123456789101112131415 1617181920212223242526

{
    "status": "success",
    "message": "Schedule Added"
}
                                                        
123456789101112131415 1617181920212223242526
                                                                
{
    "status": "failed",
    "errors": {
        "sender_id": [
            "The sender id field is required."
        ],
        "subject": [
            "The subject field is required."
        ],
        "waiting_type": [
            "The waiting type field is required."
        ]
    }
}
                                                            
                                                            
1234567891011121314

Delete Automation Schedule

To delete automation schedule follow the example code and be careful with the parameters.

Base Urlhttps://velozmail.contatofacil.com.br/api/


HTTP Method: DELETE

API URL: https://velozmail.contatofacil.com.br/api/automations/schedule/delete?utr={utr}

API Key: Get YOUR_PUBLIC_KEY and YOUR_SECRET_KEY from the account page

Response format: JSON


Note: you get utr from Get Automation Schedule endpoint
                                                                
var request = require('request');
var options = {
  'method': 'DELETE',
  'url': 'BASE_URL/automations/schedule/delete?utr=4dce63f6-8825-11ee-a739-b42e9970e591',
  'headers': {
    'PublicKey': 'YOUR_PUBLIC_KEY',
    'SecretKey': 'YOUR_SECRET_KEY'
  }
};
request(options, function (error, response) {
  if (error) throw new Error(error);

});



                                                                
123456789101112131415 16 17181920212223242526

import requests

url = "BASE_URL/automations/schedule/delete?utr=4dce63f6-8825-11ee-a739-b42e9970e591"

payload={}
headers = {
  'PublicKey': 'YOUR_PUBLIC_KEY',
  'SecretKey': 'YOUR_SECRET_KEY'
}

response = requests.request("DELETE", url, headers=headers, data=payload)

print(response.text)
123456789101112131415 1617181920212223242526

?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'BASE_URL/automations/schedule/delete?utr=4dce63f6-8825-11ee-a739-b42e9970e591',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'DELETE',
  CURLOPT_HTTPHEADER => array(
    'PublicKey: YOUR_PUBLIC_KEY',
    'SecretKey: YOUR_SECRET_KEY'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

                                                                
123456789101112131415 1617181920212223242526

curl --location --request DELETE 'BASE_URL/automations/schedule/delete?utr=4dce63f6-8825-11ee-a739-b42e9970e591' \
--header 'PublicKey: YOUR_PUBLIC_KEY' \
--header 'SecretKey: YOUR_SECRET_KEY'
123456789101112131415 1617181920212223242526

require "uri"
require "net/http"

url = URI("BASE_URL/automations/schedule/delete?utr=4dce63f6-8825-11ee-a739-b42e9970e591")

http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Delete.new(url)
request["PublicKey"] = "YOUR_PUBLIC_KEY"
request["SecretKey"] = "YOUR_SECRET_KEY"

response = http.request(request)
puts response.read_body
123456789101112131415 1617181920212223242526

{
    "status": "success",
    "message": "Deleted Successfully"
}
                                                        
123456789101112131415 1617181920212223242526
                                                                
{
    "status": "failed",
    "errors": "Record not found"
}
                                                            
                                                            
1234567891011121314