---
title: "SSN Validation"
url: "https://developer.incode.com/api-reference/api-validate-ssn/"
section: "api-reference"
group: "API validations"
version: "v1.1"
status: "live"
endpoint: "POST /api/validate/ssn"
---
# SSN Validation

`POST /api/validate/ssn`

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

Validate a social security number and the person associated with it.

## Path & query parameters

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

## Request body

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `ssn` | string |  | Person's social security number |
| `dateOfBirth` | string (YYYY-MM-DD) |  | Person's birthdate |
| `firstName` | string |  | Person's first name |
| `lastName` | string |  | Person's last name |
| `middleName` | string |  | Person's middle name |
| `email` | string |  | Person's email |

## Responses

### 200

- requestId: Int. Response's status, check catalog. - ssnValid: Boolean. Indicates if ssn information sent is valid. - deceasedPerson: Boolean. Indicates if information sent corresponds to a deceased person. - errorCode: String. Error code in case something goes wrong. - errorCodeDescription: String. Error description in case something goes wrong or if ssn is not valid.

### 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/ssn \
  -H "x-api-key: <YOUR_API_KEY>" \
  -H "api-version: 1.0" \
  -H "Content-Type: application/json" \
  -d '{
    "ssn": "",
    "dateOfBirth": "",
    "firstName": "",
    "lastName": "",
    "middleName": "",
    "email": ""
  }'
```

### Node

```js
const res = await fetch("https://demo-api.incodesmile.com/api/validate/ssn", {
  method: "POST",
  headers: {
      "x-api-key": "<YOUR_API_KEY>",
      "api-version": "1.0",
      "Content-Type": "application/json",
  },
    body: JSON.stringify({
      "ssn": "",
      "dateOfBirth": "",
      "firstName": "",
      "lastName": "",
      "middleName": "",
      "email": ""
    }),
});
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/ssn", headers=headers, json={
  "ssn": "",
  "dateOfBirth": "",
  "firstName": "",
  "lastName": "",
  "middleName": "",
  "email": ""
})
data = res.json()
```

### Java

```java
HttpRequest req = HttpRequest.newBuilder()
    .uri(URI.create("https://demo-api.incodesmile.com/api/validate/ssn"))
    .header("x-api-key", "<YOUR_API_KEY>")
    .header("api-version", "1.0")
    .header("Content-Type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"ssn\": \"\",\n  \"dateOfBirth\": \"\",\n  \"firstName\": \"\",\n  \"lastName\": \"\",\n  \"middleName\": \"\",\n  \"email\": \"\"\n}"))
    .build();
HttpResponse<String> res = HttpClient.newHttpClient()
    .send(req, HttpResponse.BodyHandlers.ofString());
```

### Example response

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