True Inbox API Docs
  • Introduction
    • Authentication
    • Rate Limit
    • Credit Usage
  • REFERENCE
    • Single Email Verification
    • Bulk Email Verification
Powered by GitBook
On this page
  • Response
  • Bulk verification result
  • Response
  • Bulk verification result csv
  • Response
  1. REFERENCE

Bulk Email Verification

curl --location 'https://api.trueinbox.io/v1/api/bulk-email-verify' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "keys":[
        "username1@domain",
        "username2@domain",
        ...
    ],
    "name": "demo"
}'
const axios = require('axios');
let data = JSON.stringify({
  "keys":[
        "username1@domain",
        "username2@domain",
        ...
    ],
  "name": "demo"
});

let config = {
  method: 'post',
  url: 'https://api.trueinbox.io/v1/api/bulk-email-verify',
  headers: { 
    'Authorization': 'Bearer <token>', 
    'Content-Type': 'application/json'
  },
  data : data
};

axios.request(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});
import requests
import json

url = "https://api.trueinbox.io/v1/api/bulk-email-verify"

payload = json.dumps({
  "keys":[
        "username1@domain",
        "username2@domain",
        ...
    ],
  "name": "demo"
})
headers = {
  'Authorization': 'Bearer <token>',
  'Content-Type': 'application/json'
}

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

print(response.text)
OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n    \"keys\":[\n  \"username1@domain\",\n  \"username2@domain\"\n    ],\n    \"name\": \"demo\"\n}");
Request request = new Request.Builder()
  .url("https://api.trueinbox.io/v1/api/bulk-email-verify")
  .method("POST", body)
  .addHeader("Authorization", "Bearer <token>")
  .addHeader("Content-Type", "application/json")
  .build();
Response response = client.newCall(request).execute();
require "uri"
require "json"
require "net/http"

url = URI("https://api.trueinbox.io/v1/api/bulk-email-verify")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = "Bearer <token>"
request["Content-Type"] = "application/json"
request.body = JSON.dump({
   "keys":[
        "username1@domain",
        "username2@domain",
        ...
    ],
  "name": "demo"
})

response = https.request(request)
puts response.read_body
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://api.trueinbox.io/v1/api/bulk-email-verify',
  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 =>'{
   "keys":[
        "username1@domain",
        "username2@domain",
        ...
    ],
    "name": "demo"
}',
  CURLOPT_HTTPHEADER => array(
    'Authorization: Bearer <token>',
    'Content-Type: application/json'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

Response

{
    "message": "Bulk email verification started. We've locked 200 credits for processing. We will release credits for failed verification on completion",
    "uid": "018a2e10-97ae-4072-8d4d-49554687c85d",
    "total_credits": 25000,
    "credits_used": 517,
    "credits_remaining": 24483
}

Bulk verification result

curl --location 'https://api.trueinbox.io/v1/api/bulk-result?uid=018a2e10-97ae-4072-8d4d-49554687c85d&currentPage=1&limit=500'
--header 'Authorization: Bearer <token>'
const axios = require('axios');
axios.get('https://api.trueinbox.io/v1/api/bulk-result?uid=018a2e10-97ae-4072-8d4d-49554687c85d&currentPage=1&limit=500', {
    headers: {accept: 'application/json', Authorization: 'Bearer <token>'}
})
  .then(response => {
    console.log(response.data);
  })
  .catch(error => {
    console.log(error);
  });
import requests

url = 'https://api.trueinbox.io/v1/api/bulk-result'
payload = {
    'uid': '018a2e10-97ae-4072-8d4d-49554687c85d',
    'currentPage': 1,
    'limit': 500
}

headers = {
    'Authorization': 'Bearer <token>'
}

resp = requests.get(url, params=params, headers=headers)

if response.status_code == 200:
    data = response.json()
    # Process the data as needed
else:
    print(f"Error: {response.status_code} - {response.text}")
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://api.trueinbox.io/v1/api/bulk-result?uid=018a2e10-97ae-4072-8d4d-49554687c85d&currentPage=1&limit=500")
  .get()
  .addHeader("accept", "application/json")
  .addHeader("authorization", "Bearer <token>")
  .build();

Response response = client.newCall(request).execute();
require 'uri'
require 'net/http'

url = URI("https://api.trueinbox.io/v1/api/bulk-result?uid=018a2e10-97ae-4072-8d4d-49554687c85d&currentPage=1&limit=500")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["accept"] = 'application/json'
request["authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://api.trueinbox.io/v1/api/bulk-result?uid=018a2e10-97ae-4072-8d4d-49554687c85d&currentPage=1&limit=500",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "accept: application/json",
    "authorization: Bearer <token>"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}

Response

{
    "result": [
        {
            "uid": "08c0fe4e-e550-4d61-929e-b970e559f211",
            "key": "username1@domain",
            "meta": null,
            "result": {
                "status": "completed",
                "result": "valid",
                "confidenceScore": 99,
                "smtpProvider": "Google",
                "mailDisposable": false,
                "mailAcceptAll": false,
                "free": true
            },
            "success": true,
            "status": "completed",
            "reason": ""
        },
        {
            "uid": "6e2e6460-cf6a-411f-88a0-414f14eb2ddb",
            "key": "username2@domain",
            "meta": null,
            "result": {
                "status": "completed",
                "result": "valid",
                "confidenceScore": 99,
                "smtpProvider": "Google",
                "mailDisposable": false,
                "mailAcceptAll": false,
                "free": false
            },
            "success": true,
            "status": "completed",
            "reason": ""
        },
        ...
    ],
    "totalCount": 200,
    "totalValid": 190,
    "totalRisky": 5,
    "totalInvalid": 5,
    "successCount": 200,
    "currentPage": "1",
    "limit": 500,
    "numPages": 1
}

Bulk verification result csv

curl --location 'https://api.trueinbox.io/v1/api/bulk-result-csv?uid=018a2e10-97ae-4072-8d4d-49554687c85d&currentPage=1&limit=500' \
--header 'Authorization: Bearer <token>'
const axios = require('axios');
axios.get('https://api.trueinbox.io/v1/api/bulk-result-csv?uid=018a2e10-97ae-4072-8d4d-49554687c85d&currentPage=1&limit=500', {
    headers: {accept: 'application/json', Authorization: 'Bearer <token>'}
})
  .then(response => {
    console.log(response.data);
  })
  .catch(error => {
    console.log(error);
  });
import requests

url = 'https://api.trueinbox.io/v1/api/bulk-result-csv'
payload = {
    'uid': '018a2e10-97ae-4072-8d4d-49554687c85d',
    'currentPage': 1,
    'limit': 500
}

headers = {
    'Authorization': 'Bearer <token>'
}

resp = requests.get(url, params=params, headers=headers)

if response.status_code == 200:
    data = response.json()
    # Process the data as needed
else:
    print(f"Error: {response.status_code} - {response.text}")
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://api.trueinbox.io/v1/api/bulk-result-csv?uid=018a2e10-97ae-4072-8d4d-49554687c85d&currentPage=1&limit=500")
  .get()
  .addHeader("accept", "application/json")
  .addHeader("authorization", "Bearer <token>")
  .build();

Response response = client.newCall(request).execute();
require 'uri'
require 'net/http'

url = URI("https://api.trueinbox.io/v1/api/bulk-result-csv?uid=018a2e10-97ae-4072-8d4d-49554687c85d&currentPage=1&limit=500")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["accept"] = 'application/json'
request["authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://api.trueinbox.io/v1/api/bulk-result-csv?uid=018a2e10-97ae-4072-8d4d-49554687c85d&currentPage=1&limit=500",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "accept: application/json",
    "authorization: Bearer <token>"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}

Response

Last updated 1 year ago