# 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.

## 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`. |
| `properties` | array | Active property definitions, each `{key, label, type, options, is_required, position}`. Archived properties are omitted. |

```json title="Response"
{
  "data": [
    {
      "name": "FAQ",
      "plural_name": "FAQs",
      "key": "faq",
      "properties": [
        {
          "key": "name",
          "label": "Name",
          "type": "text",
          "options": null,
          "is_required": true,
          "position": 0
        },
        {
          "key": "answer",
          "label": "Answer",
          "type": "textarea",
          "options": null,
          "is_required": true,
          "position": 1
        },
        {
          "key": "category",
          "label": "Category",
          "type": "select",
          "options": ["shipping", "returns", "payment"],
          "is_required": false,
          "position": 2
        }
      ]
    }
  ]
}
```

### 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.
