POST
Send one CNP, CSV/TXT content, or an array in the
input field. The API automatically selects single or bulk mode. The limit is 60 requests/minute per IP address.
Individual validation
For one CNP, send the value as a string or number. An invalid CNP still returns HTTP 200, with valid: false.
Integration examples
Request
POST
curl -X POST 'https://verificarecnp.ro/api/v1/cnp/validate' \
-H 'Content-Type: application/json' \
-d '{"input":"1960527400195","lang":"en"}'
<?php
$payload = array (
'input' => '1960527400195',
'lang' => 'en',
);
$ch = curl_init('https://verificarecnp.ro/api/v1/cnp/validate');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => ['Content-Type: application/json'],
CURLOPT_POSTFIELDS => json_encode($payload),
CURLOPT_RETURNTRANSFER => true,
]);
$result = json_decode(curl_exec($ch), true);
const response = await fetch('https://verificarecnp.ro/api/v1/cnp/validate', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
"input": "1960527400195",
"lang": "en"
})
});
const result = await response.json();
import json
import urllib.request
payload = json.dumps({
"input": "1960527400195",
"lang": "en"
}).encode()
request = urllib.request.Request(
'https://verificarecnp.ro/api/v1/cnp/validate', data=payload,
headers={'Content-Type': 'application/json'}, method='POST'
)
result = json.load(urllib.request.urlopen(request))
Live response
Ready
Press “Run test” to see the response.
JSON response example
{
"success": true,
"lang": "en",
"mode": "single",
"result": {
"valid": true,
"errors": [],
"data": {
"cnp": "1960527400195",
"s": "1",
"person_type": "Male, born 1900-1999",
"gender": "Male",
"gender_key": "male",
"birth_date": "1996-05-27",
"week_day": "Monday",
"week_day_key": 1,
"age": 30,
"zodiac": "Gemini",
"zodiac_key": "gemini",
"county_code": "40",
"county": "București",
"serial": "019",
"control_digit": "5",
"expected_digit": "5"
}
}
}
Bulk / CSV validation
Send CSV/TXT as a string or a JSON array. Newlines, commas, semicolons, and whitespace are accepted as separators.
Integration examples
Request
POST
curl -X POST 'https://verificarecnp.ro/api/v1/cnp/validate' \
-H 'Content-Type: application/json' \
-d '{"input":"1960527400195\n9999999999999","lang":"en"}'
<?php
$payload = array (
'input' => '1960527400195
9999999999999',
'lang' => 'en',
);
$ch = curl_init('https://verificarecnp.ro/api/v1/cnp/validate');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => ['Content-Type: application/json'],
CURLOPT_POSTFIELDS => json_encode($payload),
CURLOPT_RETURNTRANSFER => true,
]);
$result = json_decode(curl_exec($ch), true);
const response = await fetch('https://verificarecnp.ro/api/v1/cnp/validate', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
"input": "1960527400195\n9999999999999",
"lang": "en"
})
});
const result = await response.json();
import json
import urllib.request
payload = json.dumps({
"input": "1960527400195\n9999999999999",
"lang": "en"
}).encode()
request = urllib.request.Request(
'https://verificarecnp.ro/api/v1/cnp/validate', data=payload,
headers={'Content-Type': 'application/json'}, method='POST'
)
result = json.load(urllib.request.urlopen(request))
Live response
Ready
Press “Run test” to see the response.
JSON response example
{
"success": true,
"lang": "en",
"mode": "bulk",
"summary": {
"total": 2,
"valid": 1,
"invalid": 1
},
"results": [
{
"valid": true,
"errors": [],
"data": {
"cnp": "1960527400195",
"s": "1",
"person_type": "Male, born 1900-1999",
"gender": "Male",
"gender_key": "male",
"birth_date": "1996-05-27",
"week_day": "Monday",
"week_day_key": 1,
"age": 30,
"zodiac": "Gemini",
"zodiac_key": "gemini",
"county_code": "40",
"county": "București",
"serial": "019",
"control_digit": "5",
"expected_digit": "5"
}
},
{
"valid": false,
"errors": [
"The date of birth is invalid.",
"The county or region code is invalid.",
"The control digit is invalid. Expected control digit: 6."
],
"data": {
"cnp": "9999999999999",
"s": "9",
"person_type": "Foreign resident",
"gender": "Foreign resident",
"gender_key": "resident",
"birth_date": "",
"week_day": "",
"week_day_key": null,
"age": "",
"zodiac": "",
"zodiac_key": null,
"county_code": "99",
"county": "",
"serial": "999",
"control_digit": "9",
"expected_digit": "6"
}
}
]
}
Error responses
Every error is returned as JSON with the corresponding HTTP status.
| Status | Meaning |
|---|---|
400 Bad Request | Malformed or invalid JSON body. |
415 Unsupported Media Type | Content-Type is not application/json. |
422 Unprocessable Content | One or more request fields failed validation. |
429 Too Many Requests | Rate limit exceeded (60 requests/minute). |