---
title: "Assign a field definition to an entity kind"
method: POST
path: "/api/rest/v1/kind-field-assignments"
tags: ["Kind Field Assignments"]
---

# Assign a field definition to an entity kind

`POST /api/rest/v1/kind-field-assignments`

## Request

- Base URL: `https://app.componecat.ai`
- URL: `https://app.componecat.ai/api/rest/v1/kind-field-assignments`
- Auth: none required

Entities of the kind can then carry a value for the field. A required field must be supplied
when an entity of the kind is created. Assigning a field the kind already has returns `422`.

## Request body

- CreateKindFieldAssignmentRequest: Create kind–field assignment request body.
  - `kindId` string, uuid, required: ID of the entity kind definition.
  - `fieldId` string, uuid, required: ID of the field definition to assign.
  - `required` boolean: Whether entities of the kind must supply a value for the field when created. Defaults to false.
  - `displayOrder` union: Position in the kind's field list; lower values come first. Defaults to 0.
    - integer
    - string, int32
  - `category` string, nullable: Grouping category for the field on this kind (max 250 characters).

## Response `201`

Created

- RestApiResponseOfKindFieldAssignmentItem: Standard REST API response envelope for a single resource.
  - `data` KindFieldAssignmentItem, required: A field definition assigned to an entity kind.
    - `kindId` string, uuid, required: ID of the entity kind definition.
    - `fieldId` string, uuid, required: ID of the assigned field definition (see `/entity-field-definitions`).
    - `fieldKey` string, required: Key of the assigned field definition — the key its values use in an entity's `fieldValues`.
    - `required` boolean, required: Whether entities of the kind must supply a value for the field when created.
    - `displayOrder` union, required: Position in the kind's field list; lower values come first.
      - integer
      - string, int32
    - `category` string, nullable, required: Grouping category for the field on this kind. Null when not set.

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not Found
- `422`: Unprocessable Entity
- `429`: Too Many Requests

---

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