API reference › General settings › Ethnicities
Create one or more ethnicities
POST /v1/ethnicities
- Scope
settings_general:write- Roles
- admin, scheduler
Add custom ethnicities to the organization's list. Entries added here are custom (isCustom true) and can be renamed or deleted.
Parameters
None of its own.
Every call also sends Authorization and X-Tenant-ID; see Getting started.
Request body required
| Field | Type | Description |
|---|---|---|
name required | array of object | One or more entries to add. Multipart requests may send it as a JSON string. |
name[].label required | string | max length 255. Example |
Example
{
"name": [
{
"label": "Caribbean"
}
]
}Example request
curl -X POST "https://api.fetchfido.ai/v1/ethnicities" \
-H "Authorization: Bearer $FIDO_API_KEY" \
-H "X-Tenant-ID: $FIDO_TENANT_ID" \
-H "Content-Type: application/json" \
-d '{"name":[{"label":"Caribbean"}]}'Try it
Responses
201 Ethnicity created successfully
Ethnicity created successfully.
{
"success": true,
"message": "Custom ethnicity Caribbean (10) has been saved successfully.",
"data": null
}Response fields (3)
| Field | Type | Description |
|---|---|---|
success | boolean | Example |
message | string | Example |
data | object or null |
401 Not signed in
Missing, invalid or expired API key.
{
"success": false,
"message": "Invalid API key. Org and user tier keys must send an X-Tenant-ID header naming the organization the key was issued for.",
"errors": null,
"code": "API_KEY_MISSING"
}Response fields (4)
| Field | Type | Description |
|---|---|---|
success | boolean | Example |
message | string | Example |
errors | any or null | Null on this status. |
code | string | Machine-readable reason, for branching on in client code. One of: |
403 Not allowed
Scope, tenant, IP allow-list or RBAC check failed.
{
"success": false,
"message": "You don't have permission to access this endpoint. This API key is missing the 'settings_general:write' scope.",
"errors": null,
"code": ""
}Response fields (4)
| Field | Type | Description |
|---|---|---|
success | boolean | Example |
message | string | Example |
errors | any or null | Null on this status. |
code | string | Always empty on this status. Example |
422 Validation failed
Validation failed (missing name, a name already on the list in any case, or the same name given twice in one request).
{
"status": "error",
"message": "We couldn't save this ethnicity. Correct the highlighted fields and try again.",
"errors": {
"name": [
"This ethnicity already exists."
]
}
}Response fields (3)
| Field | Type | Description |
|---|---|---|
status | string | Example |
message | string | Example |
errors | object | Messages keyed by the field they belong to; every entry's message lands on |
429 Too many requests
Rate limit exceeded. See Retry-After.
{
"success": false,
"message": "You've exceeded this API key's rate limit of 120 requests per minute. Try again in 37 seconds.",
"errors": null,
"code": "RATE_LIMITED"
}Response fields (4)
| Field | Type | Description |
|---|---|---|
success | boolean | Example |
message | string | Example |
errors | any or null | Null on this status. |
code | string | Machine-readable reason, for branching on in client code. One of: |
500 Server error
Internal server error.
{
"success": false,
"message": "Something went wrong!",
"errors": null,
"code": ""
}Response fields (4)
| Field | Type | Description |
|---|---|---|
success | boolean | Example |
message | string | Example |
errors | string or null | The underlying error, in debug mode only. |
code | string | Example |