REST API: persons
Create a person list
Create a list for persons.
Purpose
A person list groups person records, for example a blocklist or a list of known customers. Create the list, then add persons with create person.
Request
POST <API_BASE_URL>/person/list/create. All calls are POST under your API address. Replace <API_BASE_URL> with the API address provided with your access.
Send a permanent API token in the token field of the body, or a user token in the token header. See authentication.
Content type: application/json.
| Field | Type | Required | Description |
|---|---|---|---|
token | string (uuid) | if no header | Your permanent API token. Required unless you send a user token in the token header. |
name | string | yes | The name of the new list. |
list_id | string (uuid) | no | An identifier for the list, when you want to choose it yourself. |
Response
HTTP 201. The list was created.
| Field | Type | Description |
|---|---|---|
status | string | Always ok on this body. |
list_id | string (uuid) | The identifier of the list just created. |
Errors
400: The body failed validation. The answer hasstatusoferrorand adetailslist with one entry per offending field (path,expected,actual).401: The token is missing, expired or unknown.
A refusal can also come before the operation runs: an address outside your IP allowlist, a token bound to another address, or a body that is not valid JSON. See response format and errors.
Example
Request:
curl -X POST "<API_BASE_URL>/person/list/create" \
-H "Content-Type: application/json" \
-d '{
"token": "<your permanent API token>",
"name": "Blocklist"
}'
Response:
{
"status": "ok",
"list_id": "<person list id>"
}