POST
/person
Generate people (JSON body)
Authentication
Every request must include a valid API key in the X-APIKEY header. Missing or invalid keys receive 403 Forbidden.
Request body fields
| Field | Required | Notes |
|---|---|---|
countryCode | Yes | Two-letter country code, case-insensitive. |
gender | Yes | male or female. |
count | No | Whole number 1–100. Defaults to 1. |
Example request
POST /person
Content-Type: application/json
X-APIKEY: your-api-key
{
"countryCode": "ES",
"gender": "male",
"count": 1
}
Example response (200 OK)
{
"success": true,
"countryCode": "ES",
"gender": "male",
"count": 1,
"people": [
{
"countryCode": "ES",
"gender": "male",
"firstName": {
"original": "Álvaro",
"normalized": "Alvaro"
},
"surname": {
"original": "García López",
"normalized": "Garcia Lopez"
},
"fullName": {
"original": "Álvaro García López",
"normalized": "Alvaro Garcia Lopez"
}
}
]
}
Error responses
| Status | Code | Reason |
|---|---|---|
403 | FORBIDDEN | Missing or invalid API key. |
400 | INVALID_COUNTRY | Missing or invalid country code. |
400 | INVALID_GENDER | Gender is not male or female. |
400 | INVALID_COUNT | Count is not a whole number between 1 and 100. |
404 | NO_NAME_DATA | No name data available for the country and gender. |
500 | INTERNAL_ERROR | Unexpected server error. |