---
title: "Add curp v2"
url: "https://developer.incode.com/api-reference/add-curp-v2/"
section: "api-reference"
group: "Curp validation"
version: "v1.1"
status: "live"
endpoint: "POST /omni/add/curp/v2"
---
# Add curp v2

`POST /omni/add/curp/v2`

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

Add CURP and validation result based on a person data.

## Path & query parameters

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

## Request body

Valid values for state are the ones listed by renapo in this link: [https://es.wikipedia.org/wiki/Plantilla:Abreviaciones_de_los_estados_de_México](https://es.wikipedia.org/wiki/Plantilla:Abreviaciones_de_los_estados_de_México)

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

Respuesta con validación de CURP

```json
{
  "success": true,
  "curp": "XXXX820814HDFABC01",
  "sex": "MUJER",
  "nationality": "MEX",
  "result": "success",
  "requestData": {
    "name": "JUANA",
    "firstLastName": "PEREZ",
    "secondLastName": "LOPEZ",
    "gender": "M",
    "birthDate": "14/08/1982",
    "state": "DF"
  },
  "transactionId": "transaction1234567890",
  "renapo_valid": true,
  "names": "JUANA",
  "paternal_surname": "PEREZ",
  "mothers_maiden_name": "LOPEZ",
  "birthdate": "14/08/1982",
  "entity_birth": "DF",
  "probation_document": "1",
  "probation_document_data": {
    "foja": "",
    "numEntidadReg": "09",
    "libro": "",
    "NumRegExtranjeros": "",
    "cveEntidadNac": "DF",
    "numActa": "00001",
    "CRIP": "",
    "tomo": "",
    "cveEntidadEmisora": "",
    "anioReg": "1982",
    "cveMunicipioReg": "001",
    "FolioCarta": ""
  },
  "status_curp": "RCN",
  "deceasedStatus": "ALIVE"
}
```

### 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 |

### 500

Internal error during CURP validation.

### 504

The request to validate the CURP exceeded the allowed time limit

## 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/omni/add/curp/v2 \
  -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/omni/add/curp/v2", {
  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/omni/add/curp/v2", 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/omni/add/curp/v2"))
    .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"
}
```
