# Content Management API

Create and change content types, fields, entries and media over HTTP with a write token. Every endpoint, body field and response.

The Content Management API is the write side of Mojimoto. Use it to build a content model from a script, import entries from another system, publish from your own tools and upload media. Every request needs a token with the `write` ability.

To read content for a website, use the [Content Delivery API](/docs/api/delivery). If the caller is an AI agent, the [MCP server](/docs/ai/mcp) offers the same writes as tools.

Creating an entry and publishing it takes two requests. The API calls an entry a document, so that is the word in paths and messages.

```bash
curl -X POST https://mojimoto.com/api/v1/acme/manage/documents \
  -H "Authorization: Bearer mjmt_your_write_token" \
  -H "Content-Type: application/json" \
  -d '{"type": "post", "uid": "hello-world", "data": {"title": "Hello world"}}'
```

```json Response 201
{ "id": 42, "uid": "hello-world", "version_id": 118 }
```

```bash
curl -X POST https://mojimoto.com/api/v1/acme/manage/documents/42/publish \
  -H "Authorization: Bearer mjmt_your_write_token"
```

The second response is the published entry, in the shape the Delivery API serves it.

## Introduction

### Base URL

```text
https://mojimoto.com/api/v1/{project}/manage
```

`{project}` is your project's slug, such as `acme`. The project id from your dashboard URLs (`/projects/{id}/...`) works in its place.

### Authentication

Send a token with the `write` ability in the `Authorization` header. A token without it gets a `403` with `Token lacks the "write" ability.`

A write token can also be limited to some operations (`draft`, `publish`, `delete`, `upload`, `model`) and to some content types. Each endpoint below names the operation it needs. [Authentication](/docs/api/authentication) covers tokens in full.

### Requests and responses

- Send bodies as JSON with `Content-Type: application/json`. The one exception is [uploading an asset](#upload-an-asset), which is `multipart/form-data`.
- Responses are JSON. A create returns `201` and any other success returns `200`. Failures are described in [Errors](/docs/api/errors).
- Whitespace at the start and end of every string is removed, and an empty string is stored as `null`. This includes the `text` of rich text blocks.
- Requests are rate limited. See [HTTP details](/docs/api/http-details).
- Every write is recorded against the name of the token that made it, on the version it creates and in the project's audit log. Give each script or integration its own token.

There are no endpoints for locales, API tokens, webhooks, scheduled publishing or version history, and none to change or delete an asset once it is uploaded.

### Locales and the lang field

Content is stored per locale. Creating, saving, publishing and unpublishing an entry each take an optional `lang`, the code of the locale the write is for, such as `fr-fr`.

- Leave it out and the write goes to the project's default locale.
- It has to be a locale the project already has. Locales are added in the dashboard under Settings, Locales. The API cannot add one.
- Case and surrounding spaces do not matter. `FR-fr` is stored as `fr-fr`.
- Any other value is a `422` that lists the locales the project has, and nothing is written.

```json Response 422
{
  "message": "This project has no locale \"fr-fr\". It has: en-gb. Add it under Settings, Locales, then write to it.",
  "errors": {
    "lang": [
      "This project has no locale \"fr-fr\". It has: en-gb. Add it under Settings, Locales, then write to it."
    ]
  }
}
```

Drafts, publishing and unpublishing are all per locale. See [Locales](/docs/concepts/locales).

### Drafts and published versions

Every save adds a version to the entry's history. A version is either a draft or published.

- [Save a draft](#save-a-draft) adds a draft. The Delivery API keeps serving the last published version.
- [Publish](#publish-an-entry) adds a published version, which is what the Delivery API serves from then on.
- [Unpublish](#unpublish-an-entry) takes a locale off the Delivery API and keeps its content as a draft.

Field rules such as `required` are checked when you publish, not when you save a draft, so a draft can be incomplete. See [Validation](#validation) and [Entries and publishing](/docs/concepts/entries-and-publishing).

## Content types

A content type is the model for one kind of entry. Creating, updating and deleting one need the `model` operation.

### List content types

```http
GET /api/v1/{project}/manage/content-types
```

Returns every content type in the project with its fields, ordered by `api_id`. A token limited to some content types sees only those.

```bash
curl https://mojimoto.com/api/v1/acme/manage/content-types \
  -H "Authorization: Bearer mjmt_your_write_token"
```

```json Response 200
{
  "content_types": [
    {
      "api_id": "post",
      "label": "Blog post",
      "repeatable": true,
      "schema": {
        "Main": {
          "title": { "type": "symbol", "config": { "label": "Title", "required": true, "max": 80 } },
          "slug": { "type": "slug", "config": { "label": "Slug" } }
        },
        "SEO": {
          "meta_title": { "type": "symbol", "config": { "label": "Meta title" } }
        }
      }
    }
  ]
}
```

`schema` maps each editor tab to its fields, and each field id to its definition. A tab with no fields comes back as `[]`. `repeatable` is a legacy flag that does not follow the type's format, so ignore it. The content types endpoint of the [Content Delivery API](/docs/api/delivery) returns each type's `format`.

### Create a content type

```http
POST /api/v1/{project}/manage/content-types
```

Creates a content type with one empty tab called `Main`. Add its fields with [Add a field](#add-a-field).

| Field | Type | Description |
| --- | --- | --- |
| `api_id` | string | Required. The id of the type in snake_case: a lower-case letter, then lower-case letters, digits and underscores. The update endpoint cannot change it. |
| `label` | string | The name editors see. Defaults to the `api_id` with spaces for underscores, so `team_member` becomes `Team member`. |
| `format` | string | `page`, `single` or `component`. Defaults to `page`. |
| `icon` | string | An icon name stored with the type. |

The format decides how many entries the type holds:

| Format | Entries |
| --- | --- |
| `page` | A collection. Many entries, each with its own `uid`. |
| `single` | Exactly one entry, with no `uid`. |
| `component` | Many entries with no `uid`, made to be linked from other entries. |

```bash
curl -X POST https://mojimoto.com/api/v1/acme/manage/content-types \
  -H "Authorization: Bearer mjmt_your_write_token" \
  -H "Content-Type: application/json" \
  -d '{"api_id": "post", "label": "Blog post"}'
```

```json Response 201
{ "api_id": "post", "schema": { "Main": [] } }
```

A key the endpoint does not know is a `422` rather than being ignored, so a misspelt `format` cannot quietly create a collection. So is an `api_id` that is already in use: `A content type "post" already exists.`

### Update a content type

```http
PUT /api/v1/{project}/manage/content-types/{type}
```

Changes a type's `label`, `format` or `icon`. Send only what you want to change. Fields are left alone.

| Field | Type | Description |
| --- | --- | --- |
| `label` | string | The new name. |
| `format` | string | `page`, `single` or `component`. |
| `icon` | string | The new icon name. |

A format change is refused with a `422` when existing entries would not fit it. A type with more than one entry cannot become `single`, and a type with any entry that has no `uid` cannot become `page`.

```bash
curl -X PUT https://mojimoto.com/api/v1/acme/manage/content-types/team_member \
  -H "Authorization: Bearer mjmt_your_write_token" \
  -H "Content-Type: application/json" \
  -d '{"format": "component"}'
```

```json Response 200
{ "api_id": "team_member", "label": "Team member", "format": "component", "schema": { "Main": [] } }
```

### Delete a content type

```http
DELETE /api/v1/{project}/manage/content-types/{type}
```

Deletes a content type that has no entries. Deleting a type never deletes content: while it has entries the request is a `422`, and you have to [delete them](#delete-an-entry) first.

```bash
curl -X DELETE https://mojimoto.com/api/v1/acme/manage/content-types/team_member \
  -H "Authorization: Bearer mjmt_your_write_token"
```

```json Response 200
{ "deleted": "team_member" }
```

## Fields

Fields are changed one at a time, so a script never overwrites a field somebody else added. All three endpoints need the `model` operation and return the whole schema of the type.

### Add a field

```http
POST /api/v1/{project}/manage/content-types/{type}/fields
```

Adds one field to a content type, at the end of a tab.

| Field | Type | Description |
| --- | --- | --- |
| `field` | string | Required. The field id, in snake_case. |
| `definition` | object | Required. `{"type": "...", "config": {...}}`. |
| `tab` | string | The editor tab to put the field in. Defaults to the type's first tab. A name that does not exist yet creates the tab. |

`type` is one of `symbol`, `text`, `rich_text`, `number`, `boolean`, `date`, `select`, `media`, `reference`, `references`, `slug`, `location`, `json` or `blocks`. `config` holds the field's settings, such as `label` and `required`. Settings sent beside `type` instead of inside `config` are moved into `config` for you. [Field types](/docs/concepts/field-types) lists the settings of each type.

```bash
curl -X POST https://mojimoto.com/api/v1/acme/manage/content-types/post/fields \
  -H "Authorization: Bearer mjmt_your_write_token" \
  -H "Content-Type: application/json" \
  -d '{"field": "title", "definition": {"type": "symbol", "config": {"label": "Title", "required": true, "max": 80}}}'
```

```json Response 201
{
  "api_id": "post",
  "schema": {
    "Main": {
      "title": { "type": "symbol", "config": { "label": "Title", "required": true, "max": 80 } }
    }
  }
}
```

The request is a `422` and the schema is left as it was when:

- a field with that id already exists on the type. Use [Update a field](#update-a-field) instead.
- the `type` is missing or is not one of the fourteen.
- the type would have two `slug` fields.
- a `reference` or `references` field has no `config.content_types`, or names a content type the project does not have.
- a `blocks` field has no block types in `config.blocks`, or a block holds a `reference`, `references`, `slug` or `blocks` field.

### Update a field

```http
PUT /api/v1/{project}/manage/content-types/{type}/fields/{field}
```

Replaces the definition of one field. The new definition is not merged with the old one, so send every setting you want to keep. The field stays in its tab and position, and entries already saved are not touched.

| Field | Type | Description |
| --- | --- | --- |
| `definition` | object | Required. The full new definition, `{"type": "...", "config": {...}}`. |

```bash
curl -X PUT https://mojimoto.com/api/v1/acme/manage/content-types/post/fields/title \
  -H "Authorization: Bearer mjmt_your_write_token" \
  -H "Content-Type: application/json" \
  -d '{"definition": {"type": "symbol", "config": {"label": "Headline", "required": true}}}'
```

```json Response 200
{
  "api_id": "post",
  "schema": {
    "Main": {
      "title": { "type": "symbol", "config": { "label": "Headline", "required": true } }
    }
  }
}
```

A field id the type does not have is a `422`: `Field "nope" does not exist on "post".`

### Remove a field

```http
DELETE /api/v1/{project}/manage/content-types/{type}/fields/{field}
```

Removes one field from the type. Values saved under that field stay in the versions that hold them, and are still delivered until the entry is saved again without them.

```bash
curl -X DELETE https://mojimoto.com/api/v1/acme/manage/content-types/post/fields/meta_title \
  -H "Authorization: Bearer mjmt_your_write_token"
```

```json Response 200
{
  "api_id": "post",
  "schema": {
    "Main": {
      "title": { "type": "symbol", "config": { "label": "Headline", "required": true } }
    },
    "SEO": []
  }
}
```

## Entries

### List entries

```http
GET /api/v1/{project}/manage/documents
```

Returns every entry in the project, whatever its state, with its working content. It is not paginated.

| Parameter | Type | Description |
| --- | --- | --- |
| `type` | string | Only entries of this content type. |
| `uid` | string | Only entries with this `uid`. |
| `lang` | string | The locale to read. Defaults to the project's default locale. |

```bash
curl "https://mojimoto.com/api/v1/acme/manage/documents?type=post" \
  -H "Authorization: Bearer mjmt_your_write_token"
```

```json Response 200
{
  "results": [
    {
      "id": 42,
      "uid": "hello-world",
      "type": "post",
      "has_published": true,
      "data": {
        "title": "Hello world",
        "hero": { "asset_id": 15, "fit": "cover" },
        "author": 7
      }
    },
    {
      "id": 43,
      "uid": "second-post",
      "type": "post",
      "has_published": false,
      "data": []
    }
  ]
}
```

`data` is the newest draft in that locale, or the published content when no draft is newer. It is in the shape you write: links are ids and media is an `asset_id`. An entry with nothing saved in the locale has `"data": []`. `has_published` says whether that locale is live.

There is no endpoint for one entry by id. Filter the list by `type` and `uid`, or read the entry from the Delivery API. Reading a draft that way needs a token with the `preview` ability, as [the preview reference](/docs/api/preview) explains.

### Create an entry

```http
POST /api/v1/{project}/manage/documents
```

Creates an entry and, when you send `data`, saves its first draft. It does not publish. Needs the `draft` operation.

| Field | Type | Description |
| --- | --- | --- |
| `type` | string | Required. The `api_id` of the content type. |
| `uid` | string | The entry's slug. Required for a `page` type and unique within it. Ignored for `single` and `component` types, whose entries have a `uid` of `null`. |
| `lang` | string | The locale of the draft. See [Locales and the lang field](#locales-and-the-lang-field). |
| `data` | object | The first draft, keyed by field id. See [Write formats by field type](#write-formats-by-field-type). |

```bash
curl -X POST https://mojimoto.com/api/v1/acme/manage/documents \
  -H "Authorization: Bearer mjmt_your_write_token" \
  -H "Content-Type: application/json" \
  -d '{"type": "post", "uid": "hello-world", "lang": "en-gb", "data": {"title": "Hello world"}}'
```

```json Response 201
{ "id": 42, "uid": "hello-world", "version_id": 118 }
```

`version_id` is only there when you sent `data`. An entry created without `data` has no versions: it is a `404` on the Delivery API, and a link to it resolves to `{"id", "type", "uid"}` and nothing more until it has content.

Three mistakes are a `422` under `errors.uid`: no `uid` for a `page` type, a `uid` another entry of the type already has (`A document with that slug already exists.`), and a second entry for a `single` type (`This single entry already exists.`).

> **Warning:** The entry is created before `data` is saved. If the `422` is about a field inside `data`, the entry now exists with no draft. Find its id with the list endpoint and send the corrected content with [Save a draft](#save-a-draft). Creating it again fails because the `uid` is taken.

### Save a draft

```http
PUT /api/v1/{project}/manage/documents/{id}
```

Saves a new draft of an entry in one locale. Needs the `draft` operation.

| Field | Type | Description |
| --- | --- | --- |
| `data` | object | Required, and not empty. The whole content of the draft, keyed by field id. |
| `lang` | string | The locale to save. |

`data` replaces the draft. It is not merged with the last one, so a field you leave out is gone from the new draft. To change one field, read the content from [List entries](#list-entries) and send all of it back.

```bash
curl -X PUT https://mojimoto.com/api/v1/acme/manage/documents/42 \
  -H "Authorization: Bearer mjmt_your_write_token" \
  -H "Content-Type: application/json" \
  -d '{"data": {"title": "Hello world", "hero": {"asset_id": 15}, "author": 7}}'
```

```json Response 200
{ "version_id": 119, "status": "draft" }
```

On a `page` type, a value in the type's `slug` field also becomes the entry's `uid`. If another entry of the type already has it, the save is a `422`: `The URL slug "second-post" is already used by another entry.`

### Publish an entry

```http
POST /api/v1/{project}/manage/documents/{id}/publish
```

Publishes one locale of an entry, after checking it against the field rules. Needs the `publish` operation.

| Field | Type | Description |
| --- | --- | --- |
| `lang` | string | The locale to publish. |
| `data` | object | Content to publish in this request. Leave it out to publish the newest draft. |

```bash
curl -X POST https://mojimoto.com/api/v1/acme/manage/documents/42/publish \
  -H "Authorization: Bearer mjmt_your_write_token" \
  -H "Content-Type: application/json" \
  -d '{"lang": "en-gb"}'
```

The response is the published entry as the Delivery API returns it, with media and links resolved:

```json Response 200
{
  "id": 42,
  "uid": "hello-world",
  "type": "post",
  "lang": "en-gb",
  "status": "published",
  "published_at": "2026-11-26T12:20:27+00:00",
  "updated_at": "2026-11-26T12:20:27+00:00",
  "data": {
    "title": "Hello world",
    "hero": {
      "id": 15,
      "url": "https://files.example.com/projects/12/assets/9d7dTJjfS0MyX5P8nOiF9hzWlwmUkAJkt3LjEq8E.jpg",
      "alt": "A lighthouse at dusk",
      "width": 2400,
      "height": 1200,
      "content_type": "image/jpeg",
      "fit": "cover"
    },
    "author": {
      "id": 7,
      "uid": "ada",
      "type": "author",
      "lang": "en-gb",
      "status": "published",
      "published_at": "2026-11-26T12:20:27+00:00",
      "updated_at": "2026-11-26T12:20:27+00:00",
      "data": { "name": "Ada Lovelace" }
    }
  }
}
```

Content that breaks a field rule is a `422` and nothing is published. See [Validation](#validation). A successful publish fires the `document.published` [webhook](/docs/concepts/webhooks).

### Unpublish an entry

```http
POST /api/v1/{project}/manage/documents/{id}/unpublish
```

Takes one locale of an entry off the Delivery API. Its content is kept as the draft, so publishing again brings it back. Needs the `publish` operation.

| Field | Type | Description |
| --- | --- | --- |
| `lang` | string | The locale to unpublish. |

```bash
curl -X POST https://mojimoto.com/api/v1/acme/manage/documents/42/unpublish \
  -H "Authorization: Bearer mjmt_your_write_token"
```

```json Response 200
{ "unpublished": true, "id": 42, "lang": "en-gb" }
```

A locale that is not published is a `422`: `This locale is not published - there is nothing to unpublish.` A successful unpublish fires the `document.unpublished` webhook.

### Delete an entry

```http
DELETE /api/v1/{project}/manage/documents/{id}
```

Deletes an entry in every locale, with its whole version history. It cannot be undone. Needs the `delete` operation.

```bash
curl -X DELETE https://mojimoto.com/api/v1/acme/manage/documents/42 \
  -H "Authorization: Bearer mjmt_your_write_token"
```

```json Response 200
{ "deleted": 42 }
```

A field that linked to the entry is delivered as `null`, and the entry drops out of any list of links. If the entry was published, the `document.deleted` webhook fires. When the content might come back, unpublish instead.

## Media

### Upload an asset

```http
POST /api/v1/{project}/manage/assets
```

Uploads one file to the project's media library and returns the `id` you put in a media field. Send it as `multipart/form-data`, not JSON. Needs the `upload` operation.

| Field | Type | Description |
| --- | --- | --- |
| `file` | file | Required. Up to 20 MB. Any kind of file. |
| `alt` | string | Alt text, up to 255 characters. It is delivered wherever the asset is used. |
| `filename` | string | A name to keep instead of the uploaded file's own name, up to 255 characters. |

```bash
curl -X POST https://mojimoto.com/api/v1/acme/manage/assets \
  -H "Authorization: Bearer mjmt_your_write_token" \
  -F "file=@hero.jpg" \
  -F "alt=A lighthouse at dusk"
```

```json Response 201
{
  "id": 15,
  "url": "https://files.example.com/projects/12/assets/9d7dTJjfS0MyX5P8nOiF9hzWlwmUkAJkt3LjEq8E.jpg",
  "filename": "hero.jpg",
  "mime_type": "image/jpeg",
  "width": 2400,
  "height": 1200,
  "alt": "A lighthouse at dusk"
}
```

`width` and `height` are `null` for a file that is not an image. The file is stored under a random name and `files.example.com` stands in for the real file host, so use `url` as returned. The Delivery API calls `mime_type` `content_type`.

## Write formats by field type

This is what to put in `data` for each type of field.

| Field type | Send | Example |
| --- | --- | --- |
| `symbol`, `text`, `select`, `slug` | A string | `"Hello world"` |
| `number` | A number | `4` |
| `boolean` | `true` or `false` | `true` |
| `date` | A date and time string. The editor writes `YYYY-MM-DDTHH:MM`. | `"2026-11-26T09:00"` |
| `location` | An object with `lat` and `lon` | `{"lat": 53.7457, "lon": -0.3367}` |
| `json` | Any JSON object | `{"theme": "dark"}` |
| `media` | An object with `asset_id` and, if you like, `fit` | `{"asset_id": 15, "fit": "contain"}` |
| `reference` | The id of one entry | `7` |
| `references` | An array of entry ids, in the order to show them | `[11, 12, 13]` |
| `rich_text` | An array of blocks, or an HTML string | See [Writing rich text](#writing-rich-text) |
| `blocks` | An array of blocks, each with a `type` and `data` | See [Writing blocks](#writing-blocks) |

Only `rich_text`, `media` and `blocks` values are reshaped as they come in. Everything else is stored as you send it, and so is any key in `data` that is not a field of the content type.

> **Note:** The API does not check that a `number` is a number, that a `date` parses, that a `select` value is one of its options, or that a linked entry is of a content type the field allows. Check those in your script.

### Writing media

[Upload the file](#upload-an-asset) first, then write `{"asset_id": 15, "fit": "cover"}`. `fit` is `cover` or `contain` and defaults to `cover`. The asset has to belong to the same project, which is checked when you publish.

An object with other keys and no `asset_id`, such as an image object copied from another CMS, is refused with a `422` when you save. The message under the field's id is:

```text
Media fields store {"asset_id": <id>, "fit": "cover"|"contain"}. Upload the file first (POST /manage/assets, or the upload-asset MCP tool) and write the returned id - a raw media object would be stored url-only and deliver with null width/alt.
```

A plain URL string is still accepted for old content, but it is delivered with `id`, `alt`, `width` and `height` all `null`.

### Writing rich text

Rich text is stored as an array of blocks. Each text block has a `type`, its plain `text`, and `spans` that mark up ranges of that text.

```json
[
  { "type": "heading2", "text": "Intro", "spans": [] },
  {
    "type": "paragraph",
    "text": "Hello there, see this.",
    "spans": [
      { "start": 6, "end": 11, "type": "strong" },
      { "start": 17, "end": 21, "type": "hyperlink", "data": { "link_type": "Web", "url": "https://example.com" } }
    ]
  }
]
```

| Block type | Shape |
| --- | --- |
| `paragraph`, `heading1` to `heading6`, `preformatted` | `text` and `spans` |
| `list-item`, `o-list-item` | `text` and `spans`. One block per item of a bulleted or numbered list. |
| `image` | `url` and an optional `alt` |
| `table` | `rows`, each with `cells`. A cell has `text`, `spans` and `"header": true` for a heading cell. |

A span has `start` and `end` offsets into `text`, counted the way JavaScript indexes a string, and a `type` of `strong`, `em` or `hyperlink`.

You can send an HTML string instead, and it is converted to blocks before it is stored:

```json
{ "body": "<h2>Intro</h2><p>Hello <strong>there</strong>.</p><ul><li>One</li><li>Two</li></ul>" }
```

Either way, a link or image whose URL is not `http`, `https`, `mailto` or relative is dropped. A block array is otherwise stored as sent. For turning the blocks into HTML on your site, see [rendering rich text](/docs/frameworks/rich-text).

### Writing blocks

A `blocks` field takes an ordered array. Each item names a block type from the field's `config.blocks` and carries that block's fields in `data`, in the same formats as the table above.

```json
{
  "sections": [
    { "type": "hero", "data": { "heading": "Welcome", "image": { "asset_id": 15 } } },
    { "id": "pull-quote", "type": "quote", "data": { "text": "<p>Short and <em>sweet</em>.</p>", "cite": "Ada" } }
  ]
}
```

`id` is optional. Without one, an id is derived from the block's position and content, so send your own if your front end needs it to stay the same between edits. See [Blocks](/docs/concepts/blocks).

## Validation

Saving a draft checks very little: `data` has to be an object, media values have to be the right shape, and a slug cannot collide. Publishing checks the content against the rules in each field's `config`:

| Rule | Field types | Message |
| --- | --- | --- |
| `required` | All | `Title is required.` |
| `min` and `max`, in characters | `symbol`, `text`, `slug`, `select` | `Title must be at most 80 characters.` |
| `pattern`, a regular expression | `symbol`, `text`, `slug`, `select` | `Summary is not in the expected format.` |
| `min` and `max`, as values | `number` | `Reading time must be at most 120.` |
| The linked entry exists in this project | `reference`, `references` | `Author references an entry that does not exist in this project.` |
| The asset exists in this project | `media` | `Hero image links to a file that does not exist in this project.` |
| `min` and `max`, as a number of blocks | `blocks` | `Sections allows at most 3 blocks.` |
| Each block has a known type and passes its own fields' rules | `blocks` | `Sections, block 2: unknown block type. Use one of: hero, quote.` |

A required field is missing when it is absent, `null`, an empty string or an empty array. `false` and `0` count as filled. Messages name the field by its label.

In a locale that falls back to another, a field left empty is checked against what the fallback has published, so a translation only has to fill in what differs.

A failed publish is a `422` with one message per field, and nothing is published:

```json Response 422
{
  "message": "Title must be at most 80 characters. (and 2 more errors)",
  "errors": {
    "title": ["Title must be at most 80 characters."],
    "author": ["Author references an entry that does not exist in this project."],
    "sections.0.data.heading": ["Sections, block 1 (Hero): Heading is required."]
  }
}
```

Each key is a field id. Inside a blocks field the key is the path to the field, with the block's position counted from zero. [Errors](/docs/api/errors) has the full error format.

## Plan limits

A write can be refused because of the project's plan. Each of these is a `422`.

| Limit | Applies to | Refused request | Message |
| --- | --- | --- | --- |
| Records | Free plan. 2,000 entries and media files, counted together. | Creating an entry, or uploading an asset | `The Free plan includes 2,000 records (entries and media files). Upgrade the project to add more.` |
| Media storage | Free plan. 1,024 MB. | Uploading an asset | `The Free plan includes 1,024 MB of media. Upgrade the project to upload more.` |
| Locales | A project that already has every locale its plan includes | A write whose `lang` is a locale the project does not have | `This project has no locale "de-de". It has: en-gb, es-es, fr-fr. Its plan includes 3 locales and they are all in use.` |

The record and storage messages come under `errors.uid` when you create an entry and `errors.file` when you upload. Paid plans are not refused at their record and storage allowances. [Technical limits](/docs/technical-limits) has the numbers for each plan.

Two limits are the same on every plan: an upload can be 20 MB at most, and when a project's subscription has ended and its 30-day grace period has passed, every request is a `402`.
