> For the complete documentation index, see [llms.txt](https://docs.acpt.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.acpt.io/custom-content-types/records.md).

# Records

Create, edit, and delete records in your custom content tables.

A **record** is a single row of data in a custom table. Records can be managed through:

* The WordPress admin UI (via Table Groups and the record form)
* The REST API (`/wp-json/acpt/v1/{tableName}`)

## Creating a record — via admin

Records can be created in two ways from the admin:

### 1. Contextual form (inline)

When a [Table Group](/custom-content-types/table-groups.md) has location rules matching the current screen (e.g. while editing a `movie` post), a panel with a record form appears directly on that screen. Fill in the column values and click **Save**.

### 2. Standalone record form

Navigate to **ACPT → Custom Content Types → \[table name]** and click **Create record**. This opens the standalone record form.

<figure><img src="https://3235524095-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fiyf0tSKPgXiyoQ3zV3I6%2Fuploads%2Fgit-blob-35b0034798cedefc12e37b3f41225a8f5cf16ba4%2Fcct-record-form.png?alt=media" alt="CCT record form"><figcaption><p>The auto-generated record form. Each column defined in the table schema produces a corresponding input field.</p></figcaption></figure>

## Editing a record

From the records list, click **Edit** in the row's actions menu. The same record form opens pre-populated with the existing values.

## Deleting a record

Click **Delete** in the row actions. You are asked to confirm before the record is removed.

{% hint style="info" %}
If the table has **Soft delete** enabled, the record is not physically removed from the database — it is marked with a `deleted_at` timestamp and hidden from the admin list. Records can be permanently purged from the database via the REST API or directly in MySQL.
{% endhint %}

## Record list

The records list for a table shows all rows with the columns that have **Show in list** enabled. The list supports:

* **Sorting** by any listed column
* **Pagination**
* **Search** (when the table has a fulltext index)
* **Bulk delete**

## File and image uploads

Columns of type **Image**, **File**, **Video**, and **Audio** use the WordPress media library. When you upload a file through the record form, it is added to the media library and the attachment ID is stored in the table column.

## Creating records via REST API

If the table has **Expose via REST API** enabled, you can create records with a `POST` request:

```http
POST /wp-json/acpt/v1/{tableName}
acpt-api-key: your-key-your-secret
Content-Type: application/json

{
  "title": "Blade Runner 2049",
  "year": 2017,
  "director_id": 3
}
```

See [REST API](/developers/rest-api.md) for full endpoint documentation.

## Record IDs

Every record has a primary key determined by the table's **ID strategy**:

* **AUTO\_INCREMENT** — a sequential integer (e.g. `1`, `2`, `3`)
* **UUID** — a UUID v4 string (e.g. `550e8400-e29b-41d4-a716-446655440000`)
* **ULID** — a ULID string (e.g. `01ARZ3NDEKTSV4RRFFQ69G5FAV`)

The ID is always read-only and shown in the record view.
