Validate Email
curl --request POST \
--url https://api.example.com/api/validate_email/ \
--header 'Content-Type: application/json' \
--data '
{
"text_snippet": "<string>"
}
'import requests
url = "https://api.example.com/api/validate_email/"
payload = { "text_snippet": "<string>" }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({text_snippet: '<string>'})
};
fetch('https://api.example.com/api/validate_email/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/validate_email/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'text_snippet' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/validate_email/"
payload := strings.NewReader("{\n \"text_snippet\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/api/validate_email/")
.header("Content-Type", "application/json")
.body("{\n \"text_snippet\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/validate_email/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"text_snippet\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"job_id": "email_abc123",
"status": "accepted"
}
Validation
Validate Email
Submit email content for validation against all rule packs
POST
/
api
/
validate_email
/
Validate Email
curl --request POST \
--url https://api.example.com/api/validate_email/ \
--header 'Content-Type: application/json' \
--data '
{
"text_snippet": "<string>"
}
'import requests
url = "https://api.example.com/api/validate_email/"
payload = { "text_snippet": "<string>" }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({text_snippet: '<string>'})
};
fetch('https://api.example.com/api/validate_email/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/validate_email/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'text_snippet' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/validate_email/"
payload := strings.NewReader("{\n \"text_snippet\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/api/validate_email/")
.header("Content-Type", "application/json")
.body("{\n \"text_snippet\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/validate_email/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"text_snippet\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"job_id": "email_abc123",
"status": "accepted"
}
Submit email content for asynchronous compliance validation. This endpoint validates against all rule packs.
Request Body
Email content to validate
Response
Unique identifier for the validation job
Job status:
accepted{
"job_id": "email_abc123",
"status": "accepted"
}
Example
curl -X POST "https://{api-url}/api/validate_email/" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"text_snippet": "Dear Investor,\n\nI am excited to share that our fund has achieved exceptional returns..."
}'
import requests
API_KEY = "YOUR_API_KEY"
API_BASE = "https://{api-url}"
response = requests.post(
f"{API_BASE}/api/validate_email/",
headers={
"x-api-key": API_KEY,
"Content-Type": "application/json"
},
json={
"text_snippet": "Dear Investor,\n\nI am excited to share that our fund has achieved exceptional returns..."
}
)
print(response.json())
const axios = require('axios');
const API_KEY = 'YOUR_API_KEY';
const API_BASE = 'https://{api-url}';
const response = await axios.post(
`${API_BASE}/api/validate_email/`,
{
text_snippet: 'Dear Investor,\n\nI am excited to share that our fund has achieved exceptional returns...'
},
{
headers: {
'x-api-key': API_KEY,
'Content-Type': 'application/json'
}
}
);
console.log(response.data);
⌘I

