# Types

Object types are the schema half of the Objects module. Fetch them to learn which content types exist for the store and what shape their records have. See the [Objects concept page](./index) for the full property type reference, including publishing, addresses and localized values.

## GET /v1/api/objects/types

List all object types with their active (non-archived) property definitions, ordered by type name. The list is not paginated; the response is a plain `data` array. Requires the `objects:read` scope.

No parameters.

```bash title="Request"
curl https://api.borkol.com/v1/api/objects/types \
  -H "Authorization: Bearer {api_key}"
```

```javascript title="Request (JS)"
const res = await fetch("https://api.borkol.com/v1/api/objects/types", {
  headers: { Authorization: `Bearer ${apiKey}` },
});
const { data: types } = await res.json();
```

Status: `200 OK`. Each type contains:

| Field | Type | Description |
| --- | --- | --- |
| `name` | string | Singular display name. |
| `plural_name` | string | Plural display name. |
| `key` | string | Unique slug. Use it in `GET /v1/api/objects/types/{key}/records`. |
| `settings` | object | `{publishable, slug?, menu, singleton, hierarchical}`. `publishable` is `true` when records of this type are drafts until published; `slug` (`{source, prefixes}`) is present only when records have addresses; `menu` is `{placement, icon, position}` (where the dashboard shows the type); `singleton` is `true` when the type holds one record; `hierarchical` is `true` when records can have a parent. Types saved before these keys existed report their defaults. See the [Objects concept page](./index#menu-single-records-and-subpages). |
| `system_key` | string or null | `page` on the standard Pages type, `null` on every type the store created. See [The standard Pages type](./index#the-standard-pages-type). |
| `site` | string or null | The key of the connected site that manages this type's structure (see [Build a site](/api/build-a-site/index)); `null` for types made in the dashboard. |
| `help` | string or null | What the type is for, set by the connected site. |
| `properties` | array | Active property definitions, each `{key, label, help, type, options, localized, config, is_required, position}`, plus `section_type_keys` (the allowed section type keys) on a `sections` property. `help` is the property's help text or `null`. Archived properties are omitted. `localized` says the value is a per-language map; `config` carries the repeater fields or the allowed record types for reference kinds, and is `null` otherwise. |

```json title="Response"
{
  "data": [
    {
      "name": "FAQ",
      "plural_name": "FAQs",
      "key": "faq",
      "system_key": null,
      "site": null,
      "help": null,
      "settings": {
        "publishable": true,
        "menu": { "placement": "sidebar", "icon": "circle-help", "position": 20 },
        "singleton": false,
        "hierarchical": false,
        "slug": {
          "source": "name",
          "prefixes": { "en": "/faq", "nl": "/veelgestelde-vragen" }
        }
      },
      "properties": [
        {
          "key": "name",
          "label": "Name",
          "type": "text",
          "options": null,
          "localized": true,
          "config": null,
          "is_required": true,
          "position": 0
        },
        {
          "key": "answer",
          "label": "Answer",
          "type": "textarea",
          "options": null,
          "localized": true,
          "config": null,
          "is_required": true,
          "position": 1
        },
        {
          "key": "category",
          "label": "Category",
          "type": "select",
          "options": ["shipping", "returns", "payment"],
          "localized": false,
          "config": null,
          "is_required": false,
          "position": 2
        },
        {
          "key": "steps",
          "label": "Steps",
          "type": "repeater",
          "options": null,
          "localized": false,
          "config": {
            "fields": [
              { "key": "text", "label": "Text", "kind": "text", "required": true, "localized": true, "config": {} }
            ],
            "item_label_field": "text"
          },
          "is_required": false,
          "position": 3
        }
      ]
    }
  ]
}
```

### Errors

- `403` `{"error":"Module not enabled: objects"}` when the Objects module is disabled.
- `403` `{"message":"Invalid ability provided."}` when the API key lacks the `objects:read` scope.
