# Record Types

A **Record Type** is a sub-category inside an [Object](/docs/concepts/objects). It lets you classify records of the same Object into distinct buckets, each with its own subset of fields, views, and behaviors.

Examples:

- The `Contacts` Object might have record types `Customer`, `Vendor`, `Prospect`.
- The `Deals` Object might have record types `New Business`, `Renewal`, `Expansion`.


Every Object has **at least one** record type. One of them is the **default** and is used when a record is created without specifying a record type.

> Record Types belong to Objects, not [Tables](/docs/concepts/tables). Tables do not have categorical subdivisions.


## Identity

| Field | Type | Notes |
|  --- | --- | --- |
| `id` | number | Use as `recordTypeId`. |
| `name` | string | Internal identifier within the Object. |
| `display_name` | string | User-facing label. |
| `is_default` | boolean | Exactly one record type per Object has this set to `true`. |
| `single_noun` | string? | Singular noun used in UI copy (e.g. "Customer" for the `customers` type). |
| `emoji` | string? | **Icon-key string** from the same allowlist [Objects](/docs/concepts/objects) uses (e.g. `"repeat"`, `"star"`, `"flag"`). Not a Unicode emoji. |
| `icon_color` | string? | Color name or hex. |
| `field_ids` | number[]? | Subset of the Object's fields to show for records of this type. |
| `views` | array? | Saved views scoped to this record type. |


## How they interact with fields and views

- Field membership is record-type-scoped via `field_ids`. A field on the Object can appear in some record types and not others.
- Views can be scoped to a record type. Switching record type in the UI swaps the visible columns and the active view.
- Creating or updating a record can pin it to a specific record type. If you don't, it goes to the default.


## Operations

| Verb | Path |
|  --- | --- |
| `GET` | `/public/v1/objects/{name}/record-types` |
| `POST` | `/public/v1/objects/{name}/record-types` |
| `PATCH` | `/public/v1/objects/{name}/record-types/{recordTypeId}` |
| `DELETE` | `/public/v1/objects/{name}/record-types/{recordTypeId}` |
| `POST` | `/public/v1/objects/record-types/{recordTypeId}/views` |
| `PATCH` | `/public/v1/objects/record-types/{recordTypeId}/views/{viewId}` |
| `DELETE` | `/public/v1/objects/record-types/{recordTypeId}/views/{viewId}` |


The **default** record type is protected: you cannot change its `name` or `display_name`, and you cannot delete it (both return `400`). You can still update its other attributes (assigned `columnIds`, emoji, color) while it is default.

## CLI


```bash
frontline object record-type list contacts
frontline object record-type create contacts --data '{"name":"vendor","displayName":"Vendor","emoji":"tag"}'
frontline object record-type update contacts <id> --data '{"displayName":"Vendor","emoji":"tag"}'
frontline object record-type delete contacts <id>
```