Unsubscriber List
To get the Unsubscriber 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/global-unsubscribes
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/global-unsubscribes',
'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/global-unsubscribes"
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/global-unsubscribes',
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/global-unsubscribes' \
--header 'PublicKey: YOUR_PUBLIC_KEY' \
--header 'SecretKey: YOUR_SECRET_KEY'
123456789101112131415
1617181920212223242526
require "uri"
require "net/http"
url = URI("BASE_URL/global-unsubscribes")
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": {
"unSubscribers": [
{
"id": 38,
"user_id": 6790,
"unsubscribe_groups_id": 3,
"email_address": "john@gmail.com",
"created_at": "2023-11-16T05:20:10.000000Z",
"updated_at": "2023-11-29T06:12:51.000000Z"
},
{
"id": 35,
"user_id": 6790,
"unsubscribe_groups_id": 3,
"email_address": "joe@gmail.com",
"created_at": "2023-11-13T09:57:53.000000Z",
"updated_at": "2023-11-13T09:57:53.000000Z"
},
{
"id": 17,
"user_id": 6790,
"unsubscribe_groups_id": 5,
"email_address": "alex@gmail.com",
"created_at": "2023-11-05T05:34:36.000000Z",
"updated_at": "2023-11-05T05:34:36.000000Z"
},
{
"id": 16,
"user_id": 6790,
"unsubscribe_groups_id": 5,
"email_address": "hasan@gmail.com",
"created_at": "2023-11-05T05:34:36.000000Z",
"updated_at": "2023-11-05T05:34:36.000000Z"
},
{
"id": 15,
"user_id": 6790,
"unsubscribe_groups_id": 3,
"email_address": "example@example.com",
"created_at": "2023-11-05T05:34:36.000000Z",
"updated_at": "2023-11-05T05:34:36.000000Z"
},
{
"id": 14,
"user_id": 6790,
"unsubscribe_groups_id": 3,
"email_address": "babar@gmail.com",
"created_at": "2023-11-05T05:31:59.000000Z",
"updated_at": "2023-11-05T05:31:59.000000Z"
},
{
"id": 13,
"user_id": 6790,
"unsubscribe_groups_id": 5,
"email_address": "sunu@gmail.com",
"created_at": "2023-11-05T05:31:59.000000Z",
"updated_at": "2023-11-05T05:31:59.000000Z"
},
{
"id": 7,
"user_id": 6790,
"unsubscribe_groups_id": null,
"email_address": "bayzid@gmail.com",
"created_at": "2023-11-02T11:02:15.000000Z",
"updated_at": "2023-11-02T11:02:15.000000Z"
},
{
"id": 6,
"user_id": 6790,
"unsubscribe_groups_id": null,
"email_address": "junu@gmail.com",
"created_at": "2023-11-02T11:02:15.000000Z",
"updated_at": "2023-11-02T11:02:15.000000Z"
},
{
"id": 5,
"user_id": 6790,
"unsubscribe_groups_id": null,
"email_address": "example@gmail.com",
"created_at": "2023-11-02T11:02:15.000000Z",
"updated_at": "2023-11-02T11:02:15.000000Z"
}
]
}
}
123456789101112131415
1617181920212223242526
{
"status": "failed",
"errors": {
"PublicKey": [
"The public key field is required."
],
"SecretKey": [
"The secret key field is required."
]
}
}
1234567891011121314
Unsubscriber Create
To create the Unsubscriber 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/global-unsubscribes/save
API Key:
Get YOUR_PUBLIC_KEY
and YOUR_SECRET_KEY
from the account page
Response format: JSON
Body Params
email_address* string
The email addresses what you want to add, Must be coma separated e.g. abc@gmail.com,xyz@gmail.com
var request = require('request');
var options = {
'method': 'POST',
'url': 'BASE_URL/global-unsubscribes/save',
'headers': {
'PublicKey': 'YOUR_PUBLIC_KEY',
'SecretKey': 'YOUR_SECRET_KEY'
},
formData: {
'email_address': 'jisan@gmail.com,cardy@gmail.com'
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
});
123456789101112131415
16
17181920212223242526
import requests
url = "BASE_URL/global-unsubscribes/save"
payload={'email_address': 'jisan@gmail.com,cardy@gmail.com'}
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/global-unsubscribes/save',
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('email_address' => 'jisan@gmail.com,cardy@gmail.com'),
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/global-unsubscribes/save' \
--header 'PublicKey: YOUR_PUBLIC_KEY' \
--header 'SecretKey: YOUR_SECRET_KEY' \
--form 'email_address="jisan@gmail.com,cardy@gmail.com"'
123456789101112131415
1617181920212223242526
require "uri"
require "net/http"
url = URI("BASE_URL/global-unsubscribes/save")
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 = [['email_address', 'jisan@gmail.com,cardy@gmail.com']]
request.set_form form_data, 'multipart/form-data'
response = http.request(request)
puts response.read_body
123456789101112131415
1617181920212223242526
{
"status": "success",
"message": "Added Successfully"
}
123456789101112131415
1617181920212223242526
{
"status": "failed",
"errors": {
"email_address": [
"The email address field is required."
]
}
}
1234567891011121314
Unsubscriber Delete
To delete the Unsubscriber 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/global-unsubscribes/delete?id={id}
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/global-unsubscribes/delete?id=45',
'headers': {
'PublicKey': 'YOUR_PUBLIC_KEY',
'SecretKey': 'YOUR_SECRET_KEY'
},
formData: {
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
});
123456789101112131415
16
17181920212223242526
import requests
url = "BASE_URL/global-unsubscribes/delete?id=45"
payload={}
files={}
headers = {
'PublicKey': 'YOUR_PUBLIC_KEY',
'SecretKey': 'YOUR_SECRET_KEY'
}
response = requests.request("DELETE", 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/global-unsubscribes/delete?id=45',
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/global-unsubscribes/delete?id=45' \
--header 'PublicKey: YOUR_PUBLIC_KEY' \
--header 'SecretKey: YOUR_SECRET_KEY'
123456789101112131415
1617181920212223242526
require "uri"
require "net/http"
url = URI("BASE_URL/global-unsubscribes/delete?id=45")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Delete.new(url)
request["PublicKey"] = "YOUR_PUBLIC_KEY"
request["SecretKey"] = "YOUR_SECRET_KEY"
form_data = []
request.set_form form_data, 'multipart/form-data'
response = http.request(request)
puts response.read_body
123456789101112131415
1617181920212223242526
{
"status": "success",
"message": "Deleted Successfully"
}
123456789101112131415
1617181920212223242526
{
"status": "failed",
"errors": "Record Not Found"
}
1234567891011121314
Unsubscriber Bulk Delete
To delete the multiple Unsubscriber you need to send id which represent variable strIds 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/global-unsubscribes/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/global-unsubscribes/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/global-unsubscribes/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/global-unsubscribes/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/global-unsubscribes/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/global-unsubscribes/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