---
title: "CURP by data validation v4"
url: "https://developer.incode.com/api-reference/api-validate-curp-by-data-v4/"
section: "api-reference"
group: "Curp validation"
version: "v1.1"
status: "live"
endpoint: "POST /api/validate/curp-by-data/v4"
---
# CURP by data validation v4

`POST /api/validate/curp-by-data/v4`

Base URL: `https://demo-api.incodesmile.com` — Incode demo environment

Check for valid CURP based on a person data and return corresponding values of that person including the CURP.

## Path & query parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `api-version` | header | string | yes |  |

## Request body

Content-Type: `application/json`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `curp` | string |  | User's curp. Has to be in valid format. If it isn't present, then curp value from interview is used. |
| `name` | string |  |  |
| `firstLastName` | string |  |  |
| `secondLastName` | string |  |  |
| `gender` | string |  | Valid gender values are "H" (Hombre, male), "M" (mujer, female) and "X" (otro, other) Enum: `H`, `M`, `X` |
| `birthDate` | string (dd/mm/yyyy) |  |  |
| `state` | string |  |  |
| `externalId` | string |  |  |

## Responses

### 200

If data doesn't match any CURP then the field renapo_valid will be false.

If there is an error with the request data an error object is returned with the details, example:"
```
{ "error": { "descripcionRespuesta": "DATOS INCORRECTOS: [El campo no cumple con el formato.]", "codigoRespuesta": "02", } }
```

Response body (`application/json`):

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `success` | boolean |  | Flag indicating request passed successfully. |
| `curp` | string |  | Curp |
| `sex` | string |  | Sex Enum: `Mujer`, `Hombre`, `X` |
| `nationality` | string |  | Nationality |
| `result` | string |  |  |
| `transactionId` | string |  |  |
| `renapo_valid` | boolean |  | Flag indicating if CURP validation passed - tipoError present in response |
| `names` | string |  | Names |
| `paternal_surname` | string |  | Paternal surname |
| `mothers_maiden_name` | string |  | Mother maiden name |
| `birthdate` | string |  | Birth Date in format DD/MM/YYYY |
| `entity_birth` | string |  | Birth State |
| `probation_document` | string |  | Probation Document |
| `probation_document_data` | object |  | Key/Value structure. All keys are type of string. Available Key values: - anioReg - foja - tomo - libro - numActa - CRIP - numEntidadReg - cveMunicipioReg - NumRegExtranjeros - FolioCarta - cveEntidadNac - cveEntidadEmisora |
| `status_curp` | string |  | Status Curp |
| `deceasedStatus` | string |  | Deceased Status |

### 400

Bad Request

Response body (`application/json`):

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `timestamp` | integer (int64) |  | UTC timestamp in milliseconds |
| `status` | integer (int32) |  | Custom error code or HTTP status code |
| `error` | string |  | HTTP status error |
| `message` | string |  | Custom error message |
| `path` | string |  | Endpoint path |
| `details` | object |  | Custom error details |

## Code samples

Generated from this endpoint's method, path, and the conventional Incode headers. The base URL is the Incode demo environment; replace `<YOUR_API_KEY>` with a key for your region.

### cURL

```bash
curl -X POST https://demo-api.incodesmile.com/api/validate/curp-by-data/v4 \
  -H "x-api-key: <YOUR_API_KEY>" \
  -H "api-version: 1.0" \
  -H "Content-Type: application/json" \
  -d '{
    "curp": "",
    "name": "",
    "firstLastName": "",
    "secondLastName": "",
    "gender": "",
    "birthDate": "",
    "state": "",
    "externalId": ""
  }'
```

### Node

```js
const res = await fetch("https://demo-api.incodesmile.com/api/validate/curp-by-data/v4", {
  method: "POST",
  headers: {
      "x-api-key": "<YOUR_API_KEY>",
      "api-version": "1.0",
      "Content-Type": "application/json",
  },
    body: JSON.stringify({
      "curp": "",
      "name": "",
      "firstLastName": "",
      "secondLastName": "",
      "gender": "",
      "birthDate": "",
      "state": "",
      "externalId": ""
    }),
});
const data = await res.json();
```

### Python

```python
import requests

headers = {
    "x-api-key": "<YOUR_API_KEY>",
    "api-version": "1.0",
    "Content-Type": "application/json",
}
res = requests.post("https://demo-api.incodesmile.com/api/validate/curp-by-data/v4", headers=headers, json={
  "curp": "",
  "name": "",
  "firstLastName": "",
  "secondLastName": "",
  "gender": "",
  "birthDate": "",
  "state": "",
  "externalId": ""
})
data = res.json()
```

### Java

```java
HttpRequest req = HttpRequest.newBuilder()
    .uri(URI.create("https://demo-api.incodesmile.com/api/validate/curp-by-data/v4"))
    .header("x-api-key", "<YOUR_API_KEY>")
    .header("api-version", "1.0")
    .header("Content-Type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"curp\": \"\",\n  \"name\": \"\",\n  \"firstLastName\": \"\",\n  \"secondLastName\": \"\",\n  \"gender\": \"\",\n  \"birthDate\": \"\",\n  \"state\": \"\",\n  \"externalId\": \"\"\n}"))
    .build();
HttpResponse<String> res = HttpClient.newHttpClient()
    .send(req, HttpResponse.BodyHandlers.ofString());
```

### Example response

```json
{
  "success": true,
  "status": "OK"
}
```
