Create a data-object definition

View as Markdown
Creates a new organization-level definition. Authorization: organization administrators only — other callers get 403. Body describes the schema: `nameSingular`/`namePlural`, labels, `fields[]` (13 field types, plus composites), `fieldGroups[]`, `labelFieldKey`, `icon`/`color`. Invalid schema returns 422 `validation_failed` (with `issues`). Returns 201 with `{ definition }`.

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Request

This endpoint expects an object.
nameSingularstringRequired1-64 characters
labelSingularstringRequired1-200 characters
labelPluralstringRequired1-200 characters
namePluralstringRequired1-64 characters
iconstringRequired1-64 characters
labelFieldKeystringRequired>=1 character
fieldslist of maps from strings to anyRequired

Field descriptors. Each names a key, a type and its type-specific options.

descriptionstringOptional<=2000 characters
Defaults to ''.
colorstring or nullOptional
fieldGroupslist of maps from strings to anyOptional

Response

The created definition.
definitionobject

Errors

403
Forbidden Error
422
Unprocessable Entity Error