create_entity
Define a new data entity under a project. CRUD endpoints at {base}/{customer_slug}/{project_slug}/{entity_name} activate immediately. The key must be a unique 3-character UPPERCASE string (e.g. 'ORD' for orders). Pass fields to create its fields in the same call (one bulk request) instead of a create_field per field.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes | Unique 3-character UPPERCASE ID prefix. Example: 'ORD' produces ORD1, ORD2. | |
| name | Yes | Slug-style entity name used in URL paths. Lowercase alphanumeric with hyphens/underscores, 3-50 chars. Example: 'orders', 'line-items' | |
| label | No | Singular display name, e.g. 'Order' | |
| fields | No | Optional: the entity's fields, created in one bulk call right after the entity itself — the normal way to define an entity. Each item is shaped like create_field's arguments (minus entity_id). When given, the result is {"entity": <entity record>, "fields": <create_fields result>}; the entity is kept even if some fields failed — fix those with create_fields. | |
| methods | No | Allowed HTTP methods. Defaults to all. Does not restrict any custom endpoints (create_endpoint) attached to this entity — a route's own method is independent of this list. | |
| project_id | No | Project record ID (e.g. 'PRJ3'). Optional if whoami returned a default_project_id — falls back to that; pass explicitly to target a different project. Otherwise get it from whoami or list_projects. | |
| description | No | Free-text description shown in OpenAPI spec | |
| plural_label | No | Plural display name, e.g. 'Orders' |