---
title: "Create Entity Type"
method: POST
path: "/api/v1/entity-types"
tags: ["entity-types"]
---

# Create Entity Type

`POST /api/v1/entity-types`

## Request

- Base URL: `https://api.gnosari.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.gnosari.com/api/v1/entity-types`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-AUTH-TOKEN`

Create a new entity type.

## Request body

- EntityTypeCreate: Schema for creating an EntityType.
  - `name` string, required: Entity type name (e.g., 'Job Candidate', 'Sales Lead')
  - `description` string, nullable: Description of what this entity type represents
  - `icon` string, nullable: Heroicon name for UI display
  - `attributes` EntityAttribute[]: List of attribute definitions
    - `name` string, required: Attribute name (e.g., 'email', 'phone_number')
    - `type` 'text' | 'email' | 'phone' | 'number' | 'boolean' | 'list' | 'date', required: Supported attribute types for entity extraction.
    - `required` boolean: Whether this field must be extracted
    - `ai_hint` string, nullable: Hint for AI about what to look for
  - `primary_display_fields` string[], nullable: Fields to show in list views
  - `identity_field` string, nullable: Name of the attribute to use as the person's identity/display field. Must name one of this type's attributes. Any attribute type may be designated. Unset → server heuristic.

## Response `201`

Successful Response

- EntityType: Schema for EntityType response.
  - `name` string, required: Entity type name (e.g., 'Job Candidate', 'Sales Lead')
  - `description` string, nullable: Description of what this entity type represents
  - `icon` string, nullable: Heroicon name for UI display
  - `attributes` EntityAttribute[]: List of attribute definitions
    - `name` string, required: Attribute name (e.g., 'email', 'phone_number')
    - `type` 'text' | 'email' | 'phone' | 'number' | 'boolean' | 'list' | 'date', required: Supported attribute types for entity extraction.
    - `required` boolean: Whether this field must be extracted
    - `ai_hint` string, nullable: Hint for AI about what to look for
  - `primary_display_fields` string[], nullable: Fields to show in list views
  - `identity_field` string, nullable: Name of the attribute to use as the person's identity/display field. Must name one of this type's attributes. Any attribute type may be designated. Unset → server heuristic.
  - `id` integer, required
  - `account_id` integer, nullable
  - `is_template` boolean
  - `template_category` string, nullable
  - `created_at` string, date-time, required
  - `updated_at` string, date-time, nullable
  - `agent_count` integer
  - `entity_count` integer

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/gnosari/apis/gnosari-api.md) · [All operations](https://skmtc.dev/gnosari/apis/gnosari-api/llms.txt) · [OpenAPI document](https://skmtc.dev/gnosari/apis/gnosari-api/revisions/f299cf53ae5f?raw)
