# CustomField

A field the organisation added to one of its record types, such as a licence plate on customers. Its value sits in that record's `custom_fields` object under the field's `code`. Only active fields are listed, and only on record types you may read. Read-only: fields are managed in plnnrly, under Settings > Modules > Custom fields.

## Used by
- GET /api/v2/custom-fields: List custom fields (CustomFieldList)
- GET /api/v2/custom-fields/{custom_field}: Read a custom field (CustomField)

## CustomField fields
- id (integer, required): Unique identifier.
- code (string ≤ 255, required): The field's key in a record's `custom_fields`, such as `licence_plate`. It never changes once the field exists, so clients and automations can rely on it.
- name (string ≤ 255, required): The label plnnrly shows, in the organisation's own words.
- description (string or null, required): The help text shown with the field, or `null`.
- type (string ≤ 255, required): What the field holds, and so the shape of its value: `text`, `textarea`, `color-picker` and `markdown-editor` a string; `rich-editor` HTML; `email`, `phone`, `link` and `tags-input` a list of strings; `number` an integer; `currency` a decimal string; `date` `YYYY-MM-DD`; `date-time` a UTC date-time with a `Z`; `checkbox` and `toggle` a boolean; `select`, `radio` and `toggle-buttons` one option id; `multi-select` and `checkbox-list` a list of option ids.
- entity_type (string, required): The record type the field is on, such as `customer`.
- section (object or null, required): The section of the form the field is in.
  - id (integer, required): The section's id.
  - name (string, required): The section's heading, as shown in the form.
- required (boolean, required): Whether the field must hold a value. A write may leave it out, but may not clear it with `null`.
- api_writable (boolean, required): Whether a write through the API may set the field.
- sort_order (integer or null, required): Where the field sits within its section, lowest first.
- options (array of object, required): The choices of a `select`, `radio`, `toggle-buttons`, `multi-select` or `checkbox-list` field, in their order. Empty for other types.
  - id (integer, required): The id a value of the field takes.
  - name (string, required): The option as shown in plnnrly.
- created_at (timestamp (YYYY-MM-DDThh:mm:ssZ), required): Creation timestamp.
- updated_at (timestamp (YYYY-MM-DDThh:mm:ssZ), required): Last-write timestamp.
- links (CustomFieldLinks, required)
  - self (url, required): The canonical URI of this record.

## Variants

### CustomFieldList

What a collection returns, and what `?view=summary` returns on a single record.

14 fields.
Identical to the detail object above.

### CustomFieldLinks

The `links` object on this resource.

Keys: self

## Columns deliberately not published
- active: Only active fields are listed.
- custom_field_section_id: Published as `section.id`.
- lookup_type: Only fields that pick a record use it, and plnnrly offers none.
- settings: How the field is shown in plnnrly; its description is published as `description`.
- system_defined: Every field is one the organisation added.
- validation_rules: Published as `required`; the other rules are applied when a value is written.
- width: How wide the field is drawn in a form: layout only.

## Example
```json
{
  "id": 1,
  "code": "…",
  "name": "…",
  "description": "…",
  "type": "…",
  "entity_type": "project",
  "section": {
    "id": 1,
    "name": "…"
  },
  "required": false,
  "api_writable": false,
  "sort_order": 1,
  "options": [
    {
      "id": 1,
      "name": "…"
    }
  ],
  "created_at": "2026-03-04T09:15:00Z",
  "updated_at": "2026-03-04T09:15:00Z",
  "links": {
    "self": "https://<your-url>/api/v2/work-items/1"
  }
}
```
