Entity Types API
"Create and manage entity type schemas — the blueprints for your data."
4 min read
Entity Types API
Entity types define the schema for your data. Each entity type specifies the fields, their types, and display configuration. Think of them as blueprints — you define an entity type once, then create as many entities of that type as you need.
List Entity Types
GET /api/v1/entity-types
Returns all entity types in the current project.
Response
dataEntityType[]
Array of entity type objects.
Create Entity Type
POST /api/v1/entity-types
Create a new entity type with its field schema.
Request Body
namestringrequired
Display name for the entity type (e.g., "Blog Post").
pluralNamestringrequired
Plural display name used in navigation and list views (e.g., "Blog Posts").
slugstring
URL-friendly identifier. Auto-generated from `name` if not provided.
descriptionstring
Optional description explaining what this entity type is used for.
iconstring
Icon identifier from the Lucide icon set (e.g., "file-text", "tag", "users").
fieldsarrayrequired
Array of field definitions. Each field must have a `name` and `type`. Supported types: `text`, `richText`, `number`, `date`, `select`, `multiSelect`, `boolean`, `url`, `image`, `relation`.
Update Entity Type
PATCH /api/v1/entity-types/{entityTypeId}
Update an existing entity type. All fields are optional — only the provided fields are changed.
Path Parameters
entityTypeIdstringrequired
The ID of the entity type to update.
Request Body
namestring
Updated display name.
pluralNamestring
Updated plural display name.
descriptionstring
Updated description.
iconstring
Updated icon identifier.
fieldsarray
Updated field definitions. This replaces the entire fields array.
Warning
Changing fields may affect existing entities of this type. Removed fields will no longer be visible on existing entities (the data is retained but hidden). Renamed fields will appear as new empty fields — use a migration to preserve data.
Delete Entity Type
DELETE /api/v1/entity-types/{entityTypeId}
Permanently delete an entity type and archive all of its entities.
Path Parameters
entityTypeIdstringrequired
The ID of the entity type to delete.
Warning
Destructive — all entities of this type will be archived. Archived entities can be restored within 30 days, but the entity type itself cannot be recovered. Make sure you no longer need this entity type before deleting.
Was this helpful?
