---
title: "Create Training"
method: POST
path: "/api/workforce/training"
tags: ["workforce"]
---

# Create Training

`POST /api/workforce/training`

## Request

- Base URL: `https://api.pigeonly.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.pigeonly.com/api/workforce/training`
- Auth: none declared

Put any number of trainees on a trainer's blocks for a dated window,
new hire or retraining -- CHANGES.md §2. Gated on `people:write`, the
same grant `/supervisor-training` above already uses: both change what
a published schedule is allowed to hold.

⛔RETRAINING DOES NOT PULL THE TRAINEE OFF THEIR OWN BLOCKS YET.
CHANGES.md §2, verbatim: "Retraining does not yet pull the person off
their usual blocks on the grid. Frederick to decide; build as the
design shows." This route only ever writes `workforce_trainings`/
`workforce_training_trainees` (see `training.py`'s own header) -- it
never touches `floor_blocks`/`roster_shifts`, so nobody is removed from
a shift they already hold by calling it.

## Request body

- TrainingCreateBody: `POST /api/workforce/training`'s own wire shape, CHANGES.md §2, verbatim: `{ team, trainees: [id], trainer: id, kind: 'new_hire' | 'retraining', from: date, to: date }`. `from` is a Python keyword, so the field is `from_` with the wire name restored via the alias.
  - `team` 'fulfillment' | 'customer_service', required
  - `trainees` string[], required
  - `trainer` string, uuid, required
  - `kind` 'new_hire' | 'retraining', required
  - `from` string, date, required
  - `to` string, date, required

## Response `200`

Successful Response

- object

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/pigeonly/apis/roost-v2-pigeonly-company-os.md) - [All operations](https://skmtc.dev/pigeonly/apis/roost-v2-pigeonly-company-os/llms.txt) - [OpenAPI document](https://skmtc.dev/pigeonly/apis/roost-v2-pigeonly-company-os/revisions/14571c4b7007?raw)
