# Objects

An **Object** is a CRM entity in Frontline — a typed collection of records with relationships, multiple visual views, and (optionally) several record types. Built-in Objects like Contacts, Companies, Conversations, and Leads ship out of the box. You can also create **custom Objects** to model entities that are specific to your business.

Compare to [Tables](/docs/concepts/tables): Tables are flat spreadsheets. Objects are relational entities with record types, links between objects, activities, notes, tasks, and files.

> All `objects` and `tables` endpoints require a **USER** API key. See [Authentication](/docs/authentication).


## Identity

| Field | Type | Notes |
|  --- | --- | --- |
| `id` | number |  |
| `name` | string | Internal identifier. Use as `:name` in route params. |
| `display_name` | string | User-facing name. |
| `type` | enum | Always `"object"` for Objects (vs `"table"` for Tables). |
| `custom` | boolean | `true` for objects you created. `false` for standard Objects. |
| `description` | string? |  |
| `emoji` | string? | **Icon-key string** from a fixed allowlist (e.g. `"ticket"`, `"briefcase"`, `"life-buoy"`). Not a Unicode emoji — that format only works for [Tables](/docs/concepts/tables). The full key list lives in the CLI `resource-creation` skill (~190 keys: `home`, `user`, `building`, `chart`, `mail`, …). |
| `icon_color` | string? | Color name or hex. |
| `field_count` | number? | Number of fields the object has. |
| `created_at` | string | ISO timestamp. |
| `updated_at` | string | ISO timestamp. |


The **detail** response also includes:

- `fields` — array of fields (columns).
- `views` — saved views.
- `record_types` — array of [Record Types](/docs/concepts/record-types).


## Fields (columns)

Each Object has typed fields (columns). The public API supports these types:

| Type | Use for |
|  --- | --- |
| `string` | Text. Subformats: `text` (normal/long), `email`, `url`, `phone_number`. |
| `number` | Numbers. Subformats: `integer`, `decimal`, `percent`, `currency`. |
| `boolean` | Yes/no toggles. |
| `date` | Date + time. |
| `dateOnly` | Date without time. |
| `tags` / `select` | Single- or multi-select from a controlled list. (`select` is an alias for `tags`.) |
| `relation` | Link to another Object's records. |
| `prismaRelation` | Link to a platform entity (e.g. account **Users** — the built-in assignee field). |
| `file` | Uploaded file attachment. |
| `avatar` | Image displayed as the record's avatar. |


For each type's `metadata` keys, constraints (`required`, `unique`), defaults, and the normal-vs-long text distinction, see **[Field Types](/docs/concepts/field-types)**.

> Internal-only types `autoIncrement` and `kanbanViewOrder`, and the `composedField` string format, are reserved for the platform and rejected by the API.


## Sub-resources

Every Object has the same CRUD surface for its sub-resources, exposed under `/public/v1/objects/{name}/...`:

| Sub-resource | What it does |
|  --- | --- |
| `fields` | Add/edit/remove columns. |
| `record-types` | Categorize records (e.g. "Customer" vs "Vendor"). See [Record Types](/docs/concepts/record-types). |
| `views` | Saved filters/grids/kanban configurations. |
| `rows` / `records` | The actual records. CRUD + bulk operations. |
| `relation` | Link or unlink records to other Objects' records. |
| `note` / `task` | Attach notes and tasks to a record. |
| `file` | Upload, list, and download files on a record. |
| `aggregation` | Per-view aggregations (sum/avg/percent/etc.). |
| `export` | Export rows as XLSX or CSV. |


Standard Objects (Contacts, Companies, etc.) can be customized (fields, views, record types) but **cannot be deleted**. Custom Objects can be fully deleted.

## Operations (top-level)

| Verb | Path | Purpose |
|  --- | --- | --- |
| `GET` | `/public/v1/objects` | List |
| `POST` | `/public/v1/objects` | Create a custom Object |
| `GET` | `/public/v1/objects/{name}` | Detail |
| `GET` | `/public/v1/objects/{name}/schema` | Schema-only (fields, types, formats) |
| `PATCH` | `/public/v1/objects/{name}` | Update display name, emoji, color, description |
| `DELETE` | `/public/v1/objects/{name}` | Delete (custom only) |


See the **[API Reference](/reference/openapi)** for every sub-resource endpoint.

## CLI


```bash
frontline object list
frontline object get people
frontline object schema deals
frontline object create --data '{"name":"custom_obj","displayName":"Custom","fields":[{"name":"title","type":"string","metadata":{"format":"text"}}]}'
frontline object record list deals
frontline object relation link deals 123 --target companies --target-id 45
```