Create an email check
curl --request POST \
--url https://api.dataspike.io/api/v4/email/checks \
--header 'Content-Type: application/json' \
--header 'ds-api-token: <api-key>' \
--data '
{
"email": "<string>",
"applicant_id": "<string>",
"require_ownership": true,
"locale": "<string>"
}
'import requests
url = "https://api.dataspike.io/api/v4/email/checks"
payload = {
"email": "<string>",
"applicant_id": "<string>",
"require_ownership": True,
"locale": "<string>"
}
headers = {
"ds-api-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'ds-api-token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
email: '<string>',
applicant_id: '<string>',
require_ownership: true,
locale: '<string>'
})
};
fetch('https://api.dataspike.io/api/v4/email/checks', 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.dataspike.io/api/v4/email/checks",
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([
'email' => '<string>',
'applicant_id' => '<string>',
'require_ownership' => true,
'locale' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"ds-api-token: <api-key>"
],
]);
$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.dataspike.io/api/v4/email/checks"
payload := strings.NewReader("{\n \"email\": \"<string>\",\n \"applicant_id\": \"<string>\",\n \"require_ownership\": true,\n \"locale\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("ds-api-token", "<api-key>")
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.dataspike.io/api/v4/email/checks")
.header("ds-api-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"<string>\",\n \"applicant_id\": \"<string>\",\n \"require_ownership\": true,\n \"locale\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dataspike.io/api/v4/email/checks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["ds-api-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"email\": \"<string>\",\n \"applicant_id\": \"<string>\",\n \"require_ownership\": true,\n \"locale\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "019d4e88-f847-7aa0-892f-bd2d85537ffe",
"email": "user@example.com",
"verdict": "pass",
"code": "email_invalid_syntax",
"risk_score": 0,
"checks": {
"syntax_valid": true,
"mx_found": true,
"disposable": true,
"role_based": true
},
"otp_sent": true,
"otp_expires_at": "2024-01-01T00:10:00Z",
"ownership_verified": true,
"ownership_verified_at": "2024-01-01T00:00:00Z",
"created_at": "2024-01-01T00:00:00Z"
}Email Verification
Create an email check
Runs email validation checks (syntax, MX, disposable, role-based) and optionally initiates OTP ownership verification.
POST
/
api
/
v4
/
email
/
checks
Create an email check
curl --request POST \
--url https://api.dataspike.io/api/v4/email/checks \
--header 'Content-Type: application/json' \
--header 'ds-api-token: <api-key>' \
--data '
{
"email": "<string>",
"applicant_id": "<string>",
"require_ownership": true,
"locale": "<string>"
}
'import requests
url = "https://api.dataspike.io/api/v4/email/checks"
payload = {
"email": "<string>",
"applicant_id": "<string>",
"require_ownership": True,
"locale": "<string>"
}
headers = {
"ds-api-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'ds-api-token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
email: '<string>',
applicant_id: '<string>',
require_ownership: true,
locale: '<string>'
})
};
fetch('https://api.dataspike.io/api/v4/email/checks', 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.dataspike.io/api/v4/email/checks",
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([
'email' => '<string>',
'applicant_id' => '<string>',
'require_ownership' => true,
'locale' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"ds-api-token: <api-key>"
],
]);
$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.dataspike.io/api/v4/email/checks"
payload := strings.NewReader("{\n \"email\": \"<string>\",\n \"applicant_id\": \"<string>\",\n \"require_ownership\": true,\n \"locale\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("ds-api-token", "<api-key>")
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.dataspike.io/api/v4/email/checks")
.header("ds-api-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"<string>\",\n \"applicant_id\": \"<string>\",\n \"require_ownership\": true,\n \"locale\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dataspike.io/api/v4/email/checks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["ds-api-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"email\": \"<string>\",\n \"applicant_id\": \"<string>\",\n \"require_ownership\": true,\n \"locale\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "019d4e88-f847-7aa0-892f-bd2d85537ffe",
"email": "user@example.com",
"verdict": "pass",
"code": "email_invalid_syntax",
"risk_score": 0,
"checks": {
"syntax_valid": true,
"mx_found": true,
"disposable": true,
"role_based": true
},
"otp_sent": true,
"otp_expires_at": "2024-01-01T00:10:00Z",
"ownership_verified": true,
"ownership_verified_at": "2024-01-01T00:00:00Z",
"created_at": "2024-01-01T00:00:00Z"
}Authorizations
Body
application/json
Response
Email check created.
Example:
"019d4e88-f847-7aa0-892f-bd2d85537ffe"
Example:
"user@example.com"
Example:
"pass"
Example:
"email_invalid_syntax"
Example:
0
Show child attributes
Show child attributes
Example:
"2024-01-01T00:10:00Z"
Example:
"2024-01-01T00:00:00Z"
Example:
"2024-01-01T00:00:00Z"
⌘I