On this page
The Verification API provides proof of a person's identity data via the source of that data itself. Because the check is performed against the authoritative register at the moment of the call, the result is as accurate as it can be and is always up to date.
In addition to matching the submitted data, this endpoint reports whether the ID card itself is still active — a card that has expired or been revoked by DOPA is reported as such even when every submitted field matches. It requires the laser_id printed on the back of the physical card, so it suits situations where the person has the card in hand.
https://verifined.co/api/public/v1/thai-id/verifyRequest
Header
AuthorizationstringRequiredThe API key for calling the Verification API. Your usage will be logged along with this API key.
Example
FINEMA xxx...Content-TypestringOptionalMedia type of the request body.
Example
application/json
Body
id_card_nostringRequiredThe Thai national ID card number: 13 digits, numbers only, no hyphen (-).
Example
"1103700382xxx"first_namestringRequiredThe first name on the Thai national ID card, in Thai only, without any title (e.g. Mr., Ms.).
Example
"สมชาย"last_namestringRequiredThe last name on the Thai national ID card, in Thai only.
Example
"ใจดี"birth_datestringRequiredThe birth date on the Thai national ID card, in
YYYY-MM-DDwhere the year is in AD.Example
"1991-12-31"laser_idstringRequiredThe laser ID on the back of the Thai national ID card: 2 English letters followed by 10 digits. A hyphen (-) may be included; whitespace must not.
Example
"ME18200200xx"
curl -X POST 'https://verifined.co/api/public/v1/thai-id/verify' \
--header 'Authorization: FINEMA <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"id_card_no": "1103700382xxx",
"first_name": "สมชาย",
"last_name": "ใจดี",
"birth_date": "1991-03-02",
"laser_id": "ME18200200xx"
}'Successful verification
Returned with HTTP 200 when every field in the request is valid and the card is active.
{
"status": true,
"message": "สถานะปกติ",
"message_en": "The ID card is valid.",
"tr_id": "7991e199-a4cf-4a75-a00e-221078d25804"
}Verification failures
If the service processed the request normally but one of the submitted fields is invalid, or the card is no longer usable, an error message is returned with HTTP 200. Four outcomes are possible.
| No | error_message | Description |
|---|---|---|
| 1 | สถานะไม่ปกติ => ไม่พบเลขรหัสกำกับบัตร จากเลขประจำตัวประชาชนนี้ | ID card number or laser ID is not found. |
| 2 | ข้อมูลที่ใช้ในการตรวจสอบไม่ถูกต้อง | ID card number or laser ID is empty or has an invalid format, or first name or last name is empty. |
| 3 | สถานะไม่ปกติ => ข้อมูลไม่ตรง | First name, last name or birth date does not match, or birth date is empty or in the wrong format. |
| 4 | บัตรสิ้นสภาพการใช้งาน | The input data is valid, but the ID card has been deactivated. |
No 1 — identifier not found
Returned where either the ID card number (id_card_no) or laser ID (laser_id) is not found. The ID card number is not checked for a valid check digit: a well-formed number that matches no record is treated as not found.
{
"status": false,
"error_message": "สถานะไม่ปกติ => ไม่พบเลขรหัสกำกับบัตร จากเลขประจำตัวประชาชนนี้",
"error_message_en": "Either id_card_no or laser_id is not found.",
"tr_id": "7991e199-a4cf-4a75-a00e-221078d25804"
}No 2 — invalid verification data
Returned where the ID card number (id_card_no) has an invalid format, i.e. it is not exactly 13 digits or contains hyphens (-) or letters, e.g. "3-5704-00097-3x-x", or the laser ID (laser_id) has an invalid format with missing or extra digits, e.g. "ME18200200xxx" or "ME18200200x".
It is also returned if id_card_no, laser_id, first_name or last_name is an empty string. A missing key returns HTTP 400 instead (see Invalid request body). Order of checks gives the order in which the checks are applied.
{
"status": false,
"error_message": "ข้อมูลที่ใช้ในการตรวจสอบไม่ถูกต้อง",
"error_message_en": "Either id_card_no, laser_id, first_name, or last_name is empty or has an invalid format.",
"tr_id": "7991e199-a4cf-4a75-a00e-221078d25804"
}No 3 — submitted data does not match
Returned where the first name (first_name), last name (last_name) or birth date (birth_date) does not match the record, or where birth_date is empty or has an invalid format. The No 2 and No 1 checks are applied first.
{
"status": false,
"error_message": "สถานะไม่ปกติ => ข้อมูลไม่ตรง",
"error_message_en": "Either first_name, last_name, or birth_date is incorrect or has an invalid format.",
"tr_id": "7991e199-a4cf-4a75-a00e-221078d25804"
}No 4 — card deactivated
Returned where the ID card has been deactivated, e.g. expired or revoked by DOPA.
{
"status": false,
"error_message": "บัตรสิ้นสภาพการใช้งาน",
"error_message_en": "The ID card has been deactivated.",
"tr_id": "7991e199-a4cf-4a75-a00e-221078d25804"
}Invalid request body
Returned before any other check when a required key (id_card_no, laser_id, first_name, last_name, birth_date) is missing. The response identifies each offending key in the fields object. Not charged.
{
"code": "INVALID_PARAMS",
"fields": {
"id_card_no": {
"code": "REQUIRED",
"message": "The id_card_no field is required"
}
},
"message": "Invalid parameters",
"tr_id": "7991e199-a4cf-4a75-a00e-221078d25804"
}Order of checks
The checks above are evaluated in a fixed order. A successful response (status: true) is returned only when every check passes, in this order.
- 1
Request shape
All required keys must be present; otherwise HTTP 400 is returned.
- 2
Presence and format
id_card_no,laser_id,first_nameandlast_namemust all be non-empty, andid_card_noandlaser_idmust be correctly formatted; otherwise the No 2 response is returned regardless of any other field. - 3
Existence
The
id_card_no/laser_idpair must match an existing record; otherwise the No 1 response is returned. - 4
Data match
Only once all of the above pass does the API compare
first_name,last_nameandbirth_dateagainst that record, returning No 3 on a mismatch or on an empty or invalid birth date. - 5
Card status
Finally, the API confirms the ID card is still active, returning No 4 if it has been deactivated.
Status codes and charging
| HTTP | Description | Charged |
|---|---|---|
| 200 | Verification succeeded — status is true. | Yes |
| 200 | Verification failed — status is false with an error message, No 1 to No 4. | Yes |
| 400 | INVALID_PARAMSA required key is missing from the body. | No |
| 400 | INVALID_TOKENThe Authorization header is missing. | No |
| 401 | INVALID_TOKENThe API key is invalid or expired. | No |
| 404 | URL_NOT_FOUNDThe request path does not exist. | No |
| 500 | INTERNAL_SERVER_ERRORAn unexpected server-side error occurred. | No |
| 502 | BAD_GATEWAYThe platform could not reach, or could not parse a reply from, DOPA. | No |
| 503 | Service unavailable — the upstream data source is temporarily unavailable. Retry later. | No |
