Contact List

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

Base Urlhttps://mail.allstechnology.com/api/


HTTP Method: GET

API URL: https://mail.allstechnology.com/api/contacts/list

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/contacts/list',
  '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/contacts/list"

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/contacts/list',
  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/contacts/list' \
--header 'PublicKey: YOUR_PUBLIC_KEY' \
--header 'SecretKey: YOUR_SECRET_KEY'
123456789101112131415 1617181920212223242526

require "uri"
require "net/http"

url = URI("BASE_URL/contacts/list")

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": {
        "contacts": [
            {
                "id": 24,
                "user_id": 6790,
                "contact_type_id": 3,
                "first_name": "Alex",
                "last_name": "Hels",
                "email": "alex@gmail.com",
                "alt_email": "",
                "country": "France",
                "state": "Corsica",
                "city": "Colmar",
                "address_line1": "agen",
                "address_line2": "",
                "state_province_region": "agen",
                "postal_code": "6301",
                "custom_field": null,
                "deleted_at": null,
                "created_at": "2023-11-26T05:25:00.000000Z",
                "updated_at": "2023-11-26T05:25:00.000000Z",
                "fullname": "Alex Hels",
                "contact_type": {
                    "id": 3,
                    "user_id": 6790,
                    "name": "Friend Lists",
                    "deleted_at": null,
                    "created_at": "2023-11-02T09:02:47.000000Z",
                    "updated_at": "2023-11-02T09:02:47.000000Z"
                }
            },
            {
                "id": 23,
                "user_id": 6790,
                "contact_type_id": 3,
                "first_name": "Test",
                "last_name": "Demo",
                "email": "testdemo@gmail.com",
                "alt_email": "testdemoalt@gmail.com",
                "country": "Antarctica",
                "state": "",
                "city": "",
                "address_line1": "",
                "address_line2": "",
                "state_province_region": "",
                "postal_code": "",
                "custom_field": {
                    "full_name": {
                        "field_name": "Full name",
                        "field_value": ""
                    },
                    "join_date": {
                        "field_name": "Join date",
                        "field_value": ""
                    },
                    "father_name": {
                        "field_name": "Father name",
                        "field_value": ""
                    },
                    "designation": {
                        "field_name": "Designation",
                        "field_value": ""
                    },
                    "age": {
                        "field_name": "Age",
                        "field_value": ""
                    }
                },
                "deleted_at": null,
                "created_at": "2023-11-26T05:14:10.000000Z",
                "updated_at": "2023-11-26T05:14:10.000000Z",
                "fullname": "Test Demo",
                "contact_type": {
                    "id": 3,
                    "user_id": 6790,
                    "name": "Friend Lists",
                    "deleted_at": null,
                    "created_at": "2023-11-02T09:02:47.000000Z",
                    "updated_at": "2023-11-02T09:02:47.000000Z"
                }
            },
        ]
    }
}
                                                        
123456789101112131415 1617181920212223242526
                                                                
{
    "status": "failed",
    "errors": {
        "PublicKey": [
            "The public key field is required."
        ],
        "SecretKey": [
            "The secret key field is required."
        ]
    }
}
                                                            
                                                            
1234567891011121314

Single Add

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

Base Urlhttps://mail.allstechnology.com/api/


HTTP Method: POST

API URL: https://mail.allstechnology.com/api/contacts/add

API Key: Get YOUR_PUBLIC_KEY and YOUR_SECRET_KEY from the account page

Response format: JSON


Body Params

contact_type_id* integer

The contact type id you will get from contact type collection.

first_name string

Your contact first name

last_name string

Your contact last name

email* string

Your contact email address

country* integer

The country id of your contact. you will find country it from get country,state,city endpoint

state string

The state name of contact

city string

The city name of contact

address_line1 string

Details address of your contact

address_line2 string

Details address of your contact

state_province_region string

State province region of your contact

postal_code string

Postal code of your contact

                                                                
var request = require('request');
var options = {
  'method': 'POST',
  'url': 'BASE_URL/contacts/add',
  'headers': {
    'PublicKey': 'YOUR_PUBLIC_KEY',
    'SecretKey': 'YOUR_SECRET_KEY'
  },
  formData: {
    'contact_type_id': '3',
    'first_name': 'Seikh ',
    'last_name': 'Hasina',
    'email': 'hasina@gmail.com',
    'country': '10',
    'state': 'Belgium',
    'city': 'Beli',
    'address_line1': 'New jursey',
    'address_line2': '',
    'state_province_region': '',
    'postal_code': '2365'
  }
};
request(options, function (error, response) {
  if (error) throw new Error(error);

});


                                                                
123456789101112131415 16 17181920212223242526

import requests

url = "BASE_URL/contacts/add"

payload={'contact_type_id': '3',
'first_name': 'Seikh ',
'last_name': 'Hasina',
'email': 'hasina@gmail.com',
'country': '10',
'state': 'Belgium',
'city': 'Beli',
'address_line1': 'New jursey',
'address_line2': '',
'state_province_region': '',
'postal_code': '2365'}
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/contacts/add',
  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('contact_type_id' => '3','first_name' => 'Seikh ','last_name' => 'Hasina','email' => 'hasina@gmail.com',
                               'country' => '10','state' => 'Belgium','city' => 'Beli','address_line1' => 'New jursey','address_line2' => '','state_province_region' => '','postal_code' => '2365'),
  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/contacts/add' \
--header 'PublicKey: YOUR_PUBLIC_KEY' \
--header 'SecretKey: YOUR_SECRET_KEY' \
--form 'contact_type_id="3"' \
--form 'first_name="Seikh "' \
--form 'last_name="Hasina"' \
--form 'email="hasina@gmail.com"' \
--form 'country="10"' \
--form 'state="Belgium"' \
--form 'city="Beli"' \
--form 'address_line1="New jursey"' \
--form 'address_line2=""' \
--form 'state_province_region=""' \
--form 'postal_code="2365"'
123456789101112131415 1617181920212223242526

require "uri"
require "net/http"

url = URI("BASE_URL/contacts/add")

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 = [['contact_type_id', '3'],['first_name', 'Seikh '],['last_name', 'Hasina'],['email', 'hasina@gmail.com'],
            ['country', '10'],['state', 'Belgium'],['city', 'Beli'],['address_line1', 'New jursey'],['address_line2', ''],['state_province_region', ''],['postal_code', '2365']]
request.set_form form_data, 'multipart/form-data'
response = http.request(request)
puts response.read_body
123456789101112131415 1617181920212223242526

{
    "status": "success",
    "message": "Contact Added Successfully"
}
                                                        
123456789101112131415 1617181920212223242526
                                                                
{
    "status": "failed",
    "errors": {
        "email": [
            "The email field is required."
        ]
    }
}
                                                            
                                                            
1234567891011121314

Sample Download

To download sample of the contact list csv follow the example code and be careful with the parameters.

Base Urlhttps://mail.allstechnology.com/api/


HTTP Method: GET

API URL: https://mail.allstechnology.com/api/contacts/csv-sample/download

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/contacts/csv-sample/download',
  '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/contacts/csv-sample/download"

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/contacts/csv-sample/download',
  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/contacts/csv-sample/download' \
--header 'PublicKey: YOUR_PUBLIC_KEY' \
--header 'SecretKey: YOUR_SECRET_KEY'
123456789101112131415 1617181920212223242526

require "uri"
require "net/http"

url = URI("BASE_URL/contacts/csv-sample/download")

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

{

}
                                                        
123456789101112131415 1617181920212223242526
                                                                
{
    "status": "failed",
    "errors": "Record Not Found"
}
                                                            
                                                            
1234567891011121314

Upload CSV

To upload contact csv follow the example code and be careful with the parameters.

Base Urlhttps://mail.allstechnology.com/api/


HTTP Method: POST

API URL: https://mail.allstechnology.com/api/contacts/upload-csv

API Key: Get YOUR_PUBLIC_KEY and YOUR_SECRET_KEY from the account page

Response format: JSON


Body Params

contact_type_id* integer

You wull get contact type id from contact type endpoint

file* file

File should be type file and only csv extension allow.

                                                                
var request = require('request');
var fs = require('fs');
var options = {
  'method': 'POST',
  'url': 'BASE_URL/contacts/upload-csv',
  'headers': {
    'PublicKey': 'YOUR_PUBLIC_KEY',
    'SecretKey': 'YOUR_SECRET_KEY'
  },
  formData: {
    'contact_type_id': '3',
    'file': {
      'value': fs.createReadStream('/C:/Users/Ronnie/Downloads/contacts-upload-sample.csv'),
      'options': {
        'filename': '/C:/Users/Ronnie/Downloads/contacts-upload-sample.csv',
        'contentType': null
      }
    }
  }
};
request(options, function (error, response) {
  if (error) throw new Error(error);

});



                                                                
123456789101112131415 16 17181920212223242526

import requests

url = "BASE_URL/contacts/upload-csv"

payload={'contact_type_id': '3'}
files=[
  ('file',('contacts-upload-sample.csv',open('/C:/Users/Ronnie/Downloads/contacts-upload-sample.csv','rb'),'text/csv'))
]
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/contacts/upload-csv',
  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('contact_type_id' => '3','file'=> new CURLFILE('/C:/Users/Ronnie/Downloads/contacts-upload-sample.csv')),
  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/contacts/upload-csv' \
--header 'PublicKey: YOUR_PUBLIC_KEY' \
--header 'SecretKey: YOUR_SECRET_KEY' \
--form 'contact_type_id="3"' \
--form 'file=@"/C:/Users/Ronnie/Downloads/contacts-upload-sample.csv"'
123456789101112131415 1617181920212223242526

require "uri"
require "net/http"

url = URI("BASE_URL/contacts/upload-csv")

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 = [['contact_type_id', '3'],['file', File.open('/C:/Users/Ronnie/Downloads/contacts-upload-sample.csv')]]
request.set_form form_data, 'multipart/form-data'
response = http.request(request)
puts response.read_body
123456789101112131415 1617181920212223242526

{
    "status": "success",
    "message": "Imported Successfully"
}
                                                        
123456789101112131415 1617181920212223242526
                                                                
{
    "status": "failed",
    "errors": {
        "contact_type_id": [
            "The contact type id field is required."
        ],
        "file": [
            "The file field is required."
        ]
    }
}
                                                            
                                                            
1234567891011121314

Contact Details

To get contact details follow the example code and be careful with the parameters.

Base Urlhttps://mail.allstechnology.com/api/


HTTP Method: GET

API URL: https://mail.allstechnology.com/api/contacts/details?contact_id={contact_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': 'GET',
  'url': 'BASE_URL/contacts/details?contact_id=25',
  '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/contacts/details?contact_id=25"

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/contacts/details?contact_id=25',
  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/contacts/details?contact_id=25' \
--header 'PublicKey: YOUR_PUBLIC_KEY' \
--header 'SecretKey: YOUR_SECRET_KEY'
123456789101112131415 1617181920212223242526

require "uri"
require "net/http"

url = URI("BASE_URL/contacts/details?contact_id=25")

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": {
        "contact": {
            "id": 25,
            "user_id": 6790,
            "contact_type_id": 3,
            "first_name": "Seikh",
            "last_name": "Hasina",
            "email": "hasina@gmail.com",
            "alt_email": null,
            "country": "10",
            "state": "Belgium",
            "city": "Beli",
            "address_line1": "New jursey",
            "address_line2": "",
            "state_province_region": "",
            "postal_code": "2365",
            "custom_field": {
                "full_name": {
                    "field_name": "Full name",
                    "field_value": null
                },
                "father_name": {
                    "field_name": "Father name",
                    "field_value": null
                },
                "designation": {
                    "field_name": "Designation",
                    "field_value": null
                },
                "age": {
                    "field_name": "Age",
                    "field_value": null
                },
                "company_name": {
                    "field_name": "Company name",
                    "field_value": null
                },
                "birth_date": {
                    "field_name": "Birth date",
                    "field_value": null
                },
                "join_date": {
                    "field_name": "Join date",
                    "field_value": null
                }
            },
            "deleted_at": null,
            "created_at": "2023-12-05T09:37:00.000000Z",
            "updated_at": "2023-12-05T09:37:00.000000Z",
            "fullname": "Seikh Hasina"
        }
    }
}
                                                        
123456789101112131415 1617181920212223242526
                                                                
{
    "status": "failed",
    "errors": "Record Not Found"
}
                                                            
                                                            
1234567891011121314

Contact Update

To update contact follow the example code and be careful with the parameters.

Base Urlhttps://mail.allstechnology.com/api/


HTTP Method: POST

API URL: https://mail.allstechnology.com/api/contacts/update

API Key: Get YOUR_PUBLIC_KEY and YOUR_SECRET_KEY from the account page

Response format: JSON


Body Params

contact_id* integer

The contact id which contact you want to update.

contact_type_id* integer

The contact type id you will get from contact type collection.

first_name string

Your contact first name

last_name string

Your contact last name

email* string

Your contact email address

country* integer

The country id of your contact. you will find country it from get country,state,city endpoint

state string

The state name of contact

city string

The city name of contact

address_line1 string

Details address of your contact

address_line2 string

Details address of your contact

state_province_region string

State province region of your contact

postal_code string

Postal code of your contact

                                                                
var request = require('request');
var options = {
  'method': 'POST',
  'url': 'BASE_URL/contacts/update',
  'headers': {
    'PublicKey': 'YOUR_PUBLIC_KEY',
    'SecretKey': 'YOUR_SECRET_KEY'
  },
  formData: {
    'contact_id': '25',
    'contact_type_id': '3',
    'first_name': 'Seikh ',
    'last_name': 'Hasina',
    'email': 'hasina@gmail.com',
    'country': '10',
    'state': 'Belgium',
    'city': 'Beli',
    'address_line1': 'New jursey',
    'address_line2': '',
    'state_province_region': '',
    'postal_code': '2365'
  }
};
request(options, function (error, response) {
  if (error) throw new Error(error);

});



                                                                
123456789101112131415 16 17181920212223242526

import requests

url = "BASE_URL/contacts/update"

payload={'contact_id': '25',
'contact_type_id': '3',
'first_name': 'Seikh ',
'last_name': 'Hasina',
'email': 'hasina@gmail.com',
'country': '10',
'state': 'Belgium',
'city': 'Beli',
'address_line1': 'New jursey',
'address_line2': '',
'state_province_region': '',
'postal_code': '2365'}
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/contacts/update',
  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('contact_id' => '25','contact_type_id' => '3','first_name' => 'Seikh ','last_name' => 'Hasina','email' => 'hasina@gmail.com',
                               'country' => '10','state' => 'Belgium','city' => 'Beli','address_line1' => 'New jursey','address_line2' => '','state_province_region' => '','postal_code' => '2365'),
  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/contacts/update' \
--header 'PublicKey: YOUR_PUBLIC_KEY' \
--header 'SecretKey: YOUR_SECRET_KEY' \
--form 'contact_id="25"' \
--form 'contact_type_id="3"' \
--form 'first_name="Seikh "' \
--form 'last_name="Hasina"' \
--form 'email="hasina@gmail.com"' \
--form 'country="10"' \
--form 'state="Belgium"' \
--form 'city="Beli"' \
--form 'address_line1="New jursey"' \
--form 'address_line2=""' \
--form 'state_province_region=""' \
--form 'postal_code="2365"'
123456789101112131415 1617181920212223242526

require "uri"
require "net/http"

url = URI("BASE_URL/contacts/update")

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 = [['contact_id', '25'],['contact_type_id', '3'],['first_name', 'Seikh '],['last_name', 'Hasina'],['email', 'hasina@gmail.com'],
             ['country', '10'],['state', 'Belgium'],['city', 'Beli'],['address_line1', 'New jursey'],['address_line2', ''],['state_province_region', ''],['postal_code', '2365']]
request.set_form form_data, 'multipart/form-data'
response = http.request(request)
puts response.read_body
123456789101112131415 1617181920212223242526

{
    "status": "success",
    "message": "Contact Updated Successfully"
}
                                                        
123456789101112131415 1617181920212223242526
                                                                
{
    "status": "failed",
    "errors": {
        "email": [
            "The email field is required."
        ]
    }
}
                                                            
                                                            
1234567891011121314

Contact Delete

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

Base Urlhttps://mail.allstechnology.com/api/


HTTP Method: DELETE

API URL: https://mail.allstechnology.com/api/contacts/delete?contact_id={contact_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/contacts/delete?contact_id=10',
  '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/contacts/delete?contact_id=10"

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/contacts/delete?contact_id=10',
  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/contacts/delete?contact_id=10' \
--header 'PublicKey: YOUR_PUBLIC_KEY' \
--header 'SecretKey: YOUR_SECRET_KEY'
123456789101112131415 1617181920212223242526

require "uri"
require "net/http"

url = URI("BASE_URL/contacts/delete?contact_id=10")

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

Contact Bulk Delete

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

Base Urlhttps://mail.allstechnology.com/api/


HTTP Method: POST

API URL: https://mail.allstechnology.com/api/contacts/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/contacts/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/contacts/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/contacts/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/contacts/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/contacts/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