---
title: "Create Field"
method: POST
path: "/workspaces/{workspace_id}/case-fields"
tags: ["cases"]
---

# Create Field

`POST /workspaces/{workspace_id}/case-fields`

## Request

- Base URL: `https://platform.tracecat.com/api`
- URL: `https://platform.tracecat.com/api/workspaces/{workspace_id}/case-fields`
- Auth: one of:
  - API key in cookie `fastapiusersauth`
  - HTTP bearer

Create a new case field.

## Path parameters

- `workspace_id` string, uuid, required

## Request body

- CaseFieldCreate: Create a new case field.
  - `name` string, required: The name of the column
  - `type` 'TEXT' | 'INTEGER' | 'NUMERIC' | 'DATE' | 'BOOLEAN' | 'TIMESTAMPTZ' | 'JSONB' | 'SELECT' | 'MULTI_SELECT', required: Supported SQL types.
  - `nullable` boolean
  - `default` unknown
  - `is_index` boolean: Whether to create a unique index on the column
  - `options` string[], nullable
  - `display_name` string, nullable
  - `kind` 'LONG_TEXT' | 'URL': Semantic kind for case custom fields. Controls how the field is rendered in the UI without changing the underlying SQL storage type.
  - `required_on_closure` boolean

## Response `201`

Successful Response

- CaseFieldReadMinimal: Minimal read model for a case field.
  - `id` string, required
  - `display_name` string, required
  - `type` 'TEXT' | 'INTEGER' | 'NUMERIC' | 'DATE' | 'BOOLEAN' | 'TIMESTAMPTZ' | 'JSONB' | 'SELECT' | 'MULTI_SELECT' | 'UUID', required: Read-only type for case field metadata.
  - `description` string, required
  - `nullable` boolean, required
  - `default` string, nullable, required
  - `reserved` boolean, required
  - `options` string[], nullable
  - `kind` 'LONG_TEXT' | 'URL': Semantic kind for case custom fields. Controls how the field is rendered in the UI without changing the underlying SQL storage type.
  - `required_on_closure` boolean

## Other responses

- `422`: Validation Error

---

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