---
title: "Create a Custom Field"
method: POST
path: "/v2/custom-fields"
tags: ["custom-fields"]
---

# Create a Custom Field

`POST /v2/custom-fields`

## Request

- Base URL: `https://api.stuut.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.stuut.ai/v2/custom-fields`
- Auth: HTTP bearer

Defines a new, user-editable custom field for the given object type. The
storage key is derived from the name and, like the type, is immutable
once created.

## Request body

- CreateCustomFieldInput
  - `object_type` 'consolidated_invoice' | 'contact' | 'credit_memo' | 'dispute' | 'invoice' | 'partner' | 'payment' | 'remittance', required
  - `title` string, required
  - `type` 'array' | 'boolean' | 'date' | 'datetime' | 'decimal' | 'integer' | 'number' | 'object' | 'string' | 'time', required
  - `options` string[], nullable

## Response `200`

Successful Response

- CustomFieldSchema
  - `created_at` string, date-time, required
  - `modified_at` string, date-time, nullable, required
  - `id` string, required
  - `key` string, required: The unique key for this field.
  - `title` string, nullable, required: The human readable name for this field.
  - `object_type` 'consolidated_invoice' | 'contact' | 'credit_memo' | 'dispute' | 'invoice' | 'partner' | 'payment' | 'remittance', required
  - `type` 'array' | 'boolean' | 'date' | 'datetime' | 'decimal' | 'integer' | 'number' | 'object' | 'string' | 'time', nullable, required: The data type for this field.
  - `description` string, nullable, required: A description of this field.
  - `is_editable` boolean, required
  - `options` string[], nullable, required: The closed set of values this field accepts, or NULL when any value of `type` is allowed. Enforced when a value is set through the API; integration syncs write mapped values directly and are not constrained by it.
  - `object` string, required: String representing the object's type. Objects of the same type share the same value.

## Other responses

- `422`: Validation Error

---

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