IndigiArmorIndigiArmorDocs

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-entities

List 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-entities

Create a new custom entity type.

Request Body

ParameterTypeRequiredDescription
namestringYesDisplay name for the entity type (must be unique within the organization)
domainstringNoDetection domain this entity belongs to. Defaults to "custom".
patternsstring[]NoRegex patterns to match against input text. Defaults to [].
keywordsstring[]NoKeywords that trigger this entity detection. Defaults to [].
weightnumberNoRisk weight for matched signals (0-10). Defaults to 5.0.
enabledbooleanNoWhether 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/:id

Update an existing custom entity type.

Path Parameters

ParameterTypeRequiredDescription
idstringYesThe custom entity ID

Update Body

ParameterTypeRequiredDescription
namestringNoUpdated entity name
domainstringNoUpdated detection domain
patternsstring[]NoUpdated regex patterns
keywordsstring[]NoUpdated keywords
weightnumberNoUpdated risk weight (0-10)
enabledbooleanNoEnable 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/:id

Delete a custom entity type permanently.

Path Parameters

ParameterTypeRequiredDescription
idstringYesThe 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
  }'