Custom Entities
Define custom entity types to extend the detection engine with organization-specific patterns. Each entity includes regex patterns, keywords, a detection domain, and a risk weight. When scanning, matched custom entities produce signals just like built-in detectors.
Plan requirement: Custom entity types require the customEntityTypes feature, available on Enterprise plans only.
GET
/v1/custom-entitiesList all custom entity types for your organization.
Response
200 OK
{
"entities": [
{
"id": "uuid",
"organization_id": "uuid",
"name": "Tribal Enrollment Number",
"domain": "cultural",
"patterns": ["\\bTE-\\d{6,8}\\b"],
"keywords": ["enrollment number", "tribal enrollment"],
"weight": 8.0,
"enabled": true,
"created_at": "2026-01-15T10:00:00Z"
}
]
}POST
/v1/custom-entitiesCreate a new custom entity type.
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Display name for the entity type (must be unique within the organization) |
domain | string | No | Detection domain this entity belongs to. Defaults to "custom". |
patterns | string[] | No | Regex patterns to match against input text. Defaults to []. |
keywords | string[] | No | Keywords that trigger this entity detection. Defaults to []. |
weight | number | No | Risk weight for matched signals (0-10). Defaults to 5.0. |
enabled | boolean | No | Whether this entity is active. Defaults to true. |
Create Response
201 Created
{
"entity": {
"id": "uuid",
"organization_id": "uuid",
"name": "Tribal Enrollment Number",
"domain": "cultural",
"patterns": ["\\bTE-\\d{6,8}\\b"],
"keywords": ["enrollment number", "tribal enrollment"],
"weight": 8.0,
"enabled": true,
"created_at": "2026-01-15T10:00:00Z"
}
}Duplicate entity names within the same organization return a 400 error.
PUT
/v1/custom-entities/:idUpdate an existing custom entity type.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | The custom entity ID |
Update Body
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | No | Updated entity name |
domain | string | No | Updated detection domain |
patterns | string[] | No | Updated regex patterns |
keywords | string[] | No | Updated keywords |
weight | number | No | Updated risk weight (0-10) |
enabled | boolean | No | Enable or disable the entity |
Update Response
200 OK
{
"entity": {
"id": "uuid",
"organization_id": "uuid",
"name": "Tribal Enrollment Number",
"domain": "cultural",
"patterns": ["\\bTE-\\d{6,8}\\b", "\\bTEN\\d{8}\\b"],
"keywords": ["enrollment number", "tribal enrollment", "TEN"],
"weight": 9.0,
"enabled": true,
"created_at": "2026-01-15T10:00:00Z"
}
}DELETE
/v1/custom-entities/:idDelete a custom entity type permanently.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | The custom entity ID |
Delete Response
200 OK
{ "deleted": true }Examples
SDK
// Create a custom entity
const entity = await armor.createCustomEntity({
name: 'Tribal Enrollment Number',
domain: 'cultural',
patterns: ['\\bTE-\\d{6,8}\\b'],
keywords: ['enrollment number', 'tribal enrollment'],
weight: 8.0,
});
// List all custom entities
const entities = await armor.listCustomEntities();
// Update an entity
await armor.updateCustomEntity(entity.id, {
weight: 9.0,
keywords: ['enrollment number', 'tribal enrollment', 'TEN'],
});
// Delete an entity
await armor.deleteCustomEntity(entity.id);cURL — Create
curl -X POST https://indigiarmor.com/v1/custom-entities \
-H "Authorization: Bearer ia_sk_..." \
-H "Content-Type: application/json" \
-d '{
"name": "Tribal Enrollment Number",
"domain": "cultural",
"patterns": ["\\bTE-\\d{6,8}\\b"],
"keywords": ["enrollment number", "tribal enrollment"],
"weight": 8.0
}'