# Dienstplan automatisch planen

`POST https://{tenant}.stamp.eu/rest/rosters/{roster}/auto_schedule`

The queue job carries no user context, so the cross-site permission
check and the scope resolution MUST happen here before dispatch:
without roster:plan-cross-site the pool_units flag is discarded and
the run behaves exactly like a single-unit scheduling

## Pfadparameter

| Name | Typ | Pflicht | Beschreibung |
| --- | --- | --- | --- |
| `roster` | string | ja | The roster ID |

## Request-Body

| Feld | Typ | Pflicht |
| --- | --- | --- |
| `pool_units` | boolean | nein |

## Antworten

### 202

| Feld | Typ | Pflicht |
| --- | --- | --- |
| `message` | null \| beliebig[] \| string | ja |

### 401: Unauthenticated

| Feld | Typ | Pflicht | Beschreibung |
| --- | --- | --- | --- |
| `message` | string | ja | Error overview. |

### 404: Not found

| Feld | Typ | Pflicht | Beschreibung |
| --- | --- | --- | --- |
| `message` | string | ja | Error overview. |
