# Zugangsdaten erzeugen

`POST https://{tenant}.stamp.eu/rest/employees/credentials`

Apply: set logins/passwords, e-mail those with an address, and return the
plaintext credentials of the rest for download

## Request-Body

| Feld | Typ | Pflicht | Beschreibung |
| --- | --- | --- | --- |
| `scope` | `missing`, `all`, `selected` | ja |  |
| `login_schema` | `reference_no`, `firstname.lastname`, `f.lastname`, `email`, `template` | ja | Strategy for deriving an employee's login code when bulk-generating credentials (e.g. after a DLS import). The actual derivation lives in {@see \App\Services\Credentials\LoginGenerator}. |
| `template` | string \| null | nein |  |
| `overwrite_existing_login` | boolean | nein |  |
| `force_change` | boolean | nein |  |
| `password_length` | integer | nein |  |
| `send_email` | boolean | nein |  |
| `employee_ids` | string[] | nein |  |

## Antworten

### 200

| Feld | Typ | Pflicht |
| --- | --- | --- |
| `data` | object | ja |
| `data.generated` | string | ja |
| `data.emailed` | integer | ja |
| `data.skipped` | integer | ja |
| `data.credentials` | string[] | ja |

### 401: Unauthenticated

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

### 422: Validation error

| Feld | Typ | Pflicht | Beschreibung |
| --- | --- | --- | --- |
| `message` | string | ja | Errors overview. |
| `errors` | object | ja | A detailed description of each field that failed validation. |
