# unknown_field

Source: https://capacms.com/docs/errors/unknown_field

400 invalid_request. A select, filter or sort names a field the model does not have.

| HTTP status | `type`            | Surfaces      |
| ----------- | ----------------- | ------------- |
| 400         | `invalid_request` | REST, GraphQL |

## What it means

A select, filter or sort names a field the model does not have.

| When                                                                                                                                                                             | What the `hint` tells you                                 |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------- |
| a name in `select`, `filter`, `where` or `sort` is not a field of that model, or a `filter` or `sort` hop into a model [this key may not read](https://capacms.com/docs/api/entries#per-model-keys) | every field of the model, and the system keys at the root |

## What to do

Use the field names the hint lists.

## The response

HTTP 400:

```json
{
  "error": {
    "type": "invalid_request",
    "code": "unknown_field",
    "message": "articles has no field \"subtitle\" in contract 1.",
    "param": "select",
    "hint": "Fields: title, body, views, featured, tags, author, coauthors. System keys: id, model, status, createdAt, updatedAt, publishedAt, version, folder, $tags.",
    "docs": "https://docs.capacms.com/errors/unknown_field"
  },
  "meta": {
    "version": "2026-10-01",
    "contract": 1,
    "requestId": "req_0f3c…"
  }
}
```

## On GraphQL

`/api/graphql` answers the same `code` inside `errors[].extensions`. The status depends on the `Accept` header you send ([status codes](https://capacms.com/docs/api/graphql#status-codes)):

| `application/json` | `graphql-response+json` | When                                                                                                                                                                                                             |
| ------------------ | ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 200                | 400                     | REST planner refusals, with `path` set to the root field. `invalid_select` also refuses one relation list read twice in an entry with different arguments (see [Not built yet](https://capacms.com/docs/api/graphql#not-built-yet)) |

## See also

* [Choosing fields](https://capacms.com/docs/api/entries#choosing-fields-select)
* [Filtering](https://capacms.com/docs/api/entries#filtering)
