## Create a section definition (tenant:forge:write and maintainer, or tenant:forge:admin)

`POST /api/forge/v1/projects/{key}/section-defs`

Module: Forge · operationId: `createForgeSectionDef` · Tag: Configuration · Auth: access token (`Authorization: Bearer <accessToken>`)

Requires `tenant:forge:admin`, or `tenant:forge:write` and project role maintainer or admin. Writes `forge.config.updated`.

### Parameters

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `key` | path | string | yes | Project key (e.g. APP) |

### Request body

`application/json` (required)

- `key` (string): Create: section key; fixed afterwards
- `kind` (string): markdown (default) or checklist (one of `markdown`, `checklist`)
- `label` (string): Display label (max length 80)
- `placement` (string): tab (default) or aside (one of `tab`, `aside`)
- `typeKeys` (array of string): Item type keys; empty = every type
- `version` (integer): PATCH: the version the change is based on

Example:

```json
{
  "key": "testplan",
  "kind": "checklist",
  "label": "Testplan",
  "placement": "aside",
  "typeKeys": [
    "story",
    "fehler"
  ]
}
```

### Responses

- **201** Created (`application/json`)
- **400** Error (`application/json`)
- **403** Error (`application/json`)
- **404** Error (`application/json`)
- **409** Error (`application/json`)

Fields of the 201 answer:

- `id` (string (uuid), required): Section definition id
- `key` (string, required): Section key; never changes
- `kind` (string, required): markdown or checklist (one of `markdown`, `checklist`)
- `label` (string, required): Display label
- `placement` (string, required): Where the portal shows it: a tab or the side column (one of `tab`, `aside`)
- `position` (integer, required): Order in the configuration
- `typeKeys` (array of string, required): Item type keys the section applies to; empty = every type
- `version` (integer, required): Optimistic-locking version; send it with PATCH

Example 201 answer:

```json
{
  "id": "bd7e8f9a-0b1c-4d2e-9fd0-7b8c9d0e1f03",
  "key": "acceptance",
  "kind": "checklist",
  "label": "Akzeptanzkriterien",
  "placement": "tab",
  "position": 2,
  "typeKeys": [],
  "version": 1
}
```

### Example request

```bash
curl -X POST 'https://api.mbcom.cloud/api/forge/v1/projects/string/section-defs' \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H 'Content-Type: application/json' \
  --data '{"key":"testplan","kind":"checklist","label":"Testplan","placement":"aside","typeKeys":["story","fehler"]}'
```
