Data Soap
> VALIDATION API

Validation API

A synchronous & asynchronous bulk API focused on ease of use - validate mobiles, landlines, emails and addresses in a single call, with a free syntax fallback on every check.

Back to API list
BASE · https://api.datasoap.co.ukv2

Introduction

Our V2 API is a synchronous & asynchronous bulk API focused on ease of use, providing simple validation for various types of information - using extended checks for the best result, and falling back to our own syntax checking so a temporary failure upstream (e.g. HLR, Landline) never produces an incorrect result.

You don't need a registered account to use this API, but you'll be limited to 10 free syntax checks a day. Register an account and set up a token and that rises to 100 free syntax checks a day. All paid checks (HLR, Landline & Email) include the syntax result free of charge and are never rate-limited.

Considerations

Before integrating with this API, the following should be considered:

  • Treat your account details and credentials as secret - you are responsible for every request submitted.
  • Every submission to the system is audited for management and security purposes.
  • Submitting duplicate lookups bills your account for each individual submission.

Authentication

Set up an API token under Profile → API Authentication. Make sure to use the right token for the use case, and never expose a private token to an end user. All requests go to https://api.datasoap.co.uk over SSL (port 443).

Header
Authorization: Bearer f07772e880ae4789b5a964c91a151a...

Authorization check

A simple check to see if your token is working:

GET /v2/authorised
{ "authorised": true }
No account? You get 10 free syntax checks a day. Add a token and it's 100 a day. Paid checks are never rate-limited.

Balance enquiry

Check your remaining credits per product type before running a job.

GET /v2/balance
{
"credits": {
"hlr": 639, "mnp": 902, "tps": 742,
"landline": 21, "email": 166,
"mps": 338, "paf": 818, "syntax": 17,
"unsubscribe": 500
}
}

Validation checks

Pass any combination in the checks array. Auto detects the lookup type and runs the right checks. Every paid check also returns a free Syntax result as a fallback.

Request body
{
"lookup": "441502569004",
"checks": ["Auto", "Hlr", "Mnp", "Tps", "Landline", "Email", "Syntax"]
}
Keyword
Check
Returns
Auto
Auto
Detects the lookup type & runs the right checks
Hlr
HLR / mobile
mcc, mnc, networkName, on
Mnp
MNP
original & ported { networkName, mcc, mnc }
Tps
TPS / CTPS
tps, ctps
Landline
Landline
active: Alive | LikelyAlive | LikelyDead | Dead | Unknown
Email
Email
valid, reason, disposable, role, free, acceptsAll, highQuality
Syntax
Syntax
normalised, type, format, country (free)

Response headers

Running anything beyond a syntax check also reports credits used per check, in the response headers:

  • X-TPS-Credits-Used
  • X-Landline-Credits-Used
  • X-HLR-Credits-Used
  • X-MNP-Credits-Used
  • X-Email-Credits-Used

Results

Every lookup returns a syntax result even when it wasn't requested - so if a live check is inconclusive, you still have something to make a decision on. Running syntax on its own also returns suggestedChecks: the further checks we'd recommend for that record.

Syntax result
{
"valid": true,
"syntax": {
"normalised": "+441502470922",
"type": "Landline",
"format": "E164",
"additional": {
"blockStatus": "Allocated",
"originalProvider": "BT",
"country": { "name": "United Kingdom of Great Britain and Northern Ireland", "numericCode": "826", "alpha2Code": "GB", "alpha3Code": "GBR" }
}
},
"suggestedChecks": ["Landline", "Tps"]
}
Field
Type
Detail
valid
boolean
Whether the number/email is valid - based on live results if a live check ran, otherwise just a valid range/format.
normalised
string
The number in a normalised format.
format
string
The format the number is normalised to, e.g. E164.
blockStatus
string
Information on the prefix allocation for that number range.
originalProvider
string
The telephony provider the number was originally allocated to (they may have since ported away).
country
object
Name, numeric code, alpha-2 and alpha-3 codes for the country the number range belongs to.

HLR (mobile validation)

A live lookup against the mobile network's Home Location Register - a real-time result for the number's status.

hlr
"hlr": {
"mcc": 234,
"mnc": 20,
"networkName": "UK - 3",
"on": true
}
Field
Type
Detail
mcc
integer
The mobile country code.
mnc
integer
The mobile network code.
networkName
string
The network the number is currently allocated to.
on
boolean
Whether the handset is currently switched on.

MNP (mobile number portability)

A live lookup returning the original network a number was allocated to, and the current (ported) network if it has moved.

mnp
"mnp": {
"original": { "networkName": "UK - Everything Everywhere Limited (Orange)", "mnc": 33, "mcc": 234 },
"ported": { "networkName": "UK - VODAFONE", "mnc": 15, "mcc": 234 }
}

TPS / CTPS

Checks a number against the UK's Telephone Preference Service (TPS) and Corporate TPS (CTPS) registers.

tps
"tps": {
"tps": false,
"ctps": false
}

Landline

landline
"landline": {
"active": "LikelyAlive"
}
Value
Meaning
Alive
High confidence the number is live.
LikelyAlive
Couldn't definitively confirm it, but evidence suggests it's live.
LikelyDead
Indicators suggest the number might not be working.
Dead
Confirmed the number is not working.
Unknown
Couldn't determine the status conclusively.

Email

email
"email": {
"user": "bryn.thompson",
"domain": "gmail.com",
"acceptsAll": false,
"free": true,
"disposable": false,
"role": false,
"highQuality": true,
"reason": "Safe to Send",
"valid": false
}
Field
Type
Detail
user / domain
string
The local part and domain of the email address.
acceptsAll
boolean
Whether the mail server accepts all mail regardless of recipient.
free
boolean
Whether it's a free provider (Gmail, Yahoo Mail, etc).
disposable
boolean
Whether it's a disposable/temporary email service.
role
boolean
Whether it's a role address (info@, sales@) rather than a person.
highQuality
boolean
Whether the address was determined high quality - low quality means disposable, role-based or accepts-all.
reason
string
Safe to Send · Low Deliverability · Accepted Email · Low Quality.
valid
boolean
Whether the address is valid after live checks.

Error codes

Errors are returned as negative codes, split into temporary (worth retrying) and permanent.

Common to all services

Code
Type
Description
-99
N/A
Token not recognised - use your API credentials, not your account login.
-98
N/A
Not enough credit on your account for this operation. Top up from the website or contact your account manager.
-97
Temporary
Unexpected error. Rare - we keep track of these on our side.
-96
Permanent
The value provided wasn't recognised as valid for the selected lookup type.
-92
Permanent
Account has exceeded the maximum lookups allowed for a non-verified account - contact support on 0207 856 0422.
-90
Temporary
You hit your own defined rate limit against this token.

HLR / MNP lookups

Code
Type
Description
-13
Permanent
Network data unavailable - the number hasn't been allocated to an active range.
-12
Temporary
The destination network isn't responding. Often temporary - retry.
-10 / -11
Temporary
No response within an acceptable timeframe. Retry; if it persists the number is likely dead.
-8
Permanent
Looked like a valid mobile number but was rejected as invalid by the network.
-7
Temporary
The network doesn't support SMS for this recipient.
-6
Permanent
Number is part of a closed user group (e.g. emergency services).
-5
Temporary
The destination network has blocked SMS for this recipient.
-4
Permanent
The recipient device doesn't support SMS.
-3
Permanent
A valid number that's not currently in use by the destination network.
-2
Temporary
Unexpected error, e.g. a signalling fault at the destination network. Rare.

Email lookups

Code
Type
Description
-29
Temporary
The SMTP server was unavailable to process the request.
-28
Temporary
The SMTP server returned an unexpected or invalid response.
-27
Temporary
The SMTP session timed out.
-26
Temporary
Could not connect to the SMTP server.
-22
Permanent
The email address was rejected by the SMTP server - it does not exist.
-21
Permanent
The domain either doesn't exist or isn't configured to receive email.

* Temporary error codes may return a different result if retried in quick succession, due to network fluctuations.

Trusted at scale

The same infrastructure behind every endpoint on this page, in production today.

0B+
Numbers validated
0K+
Batch cleans
0ms
p50 latency
0%
Uptime