---
title: "Assigns people to a job — additively by default, or as the complete new crew with `replace: true`."
method: POST
path: "/api/v1/jobs/{id}/assignees"
tags: ["Jobs"]
---

# Assigns people to a job — additively by default, or as the complete new crew with \`replace: true\`.

`POST /api/v1/jobs/{id}/assignees`

## Request

- Base URL: `https://app.flexonthejob.com`
- URL: `https://app.flexonthejob.com/api/v1/jobs/{id}/assignees`
- Auth: HTTP bearer

Requires the Scheduling module. User ids come from `GET /api/v1/users` and must be
active members of the organization. People already on the job keep their crew
(schedule group) context; newly added people are assigned as individuals. With
`replace: true` anyone not listed is unassigned (an empty list clears the job).
Requires an `Idempotency-Key` header.

## Path parameters

- `id` integer, required

## Request body

- AssignJobRequest: Body of `POST /api/v1/jobs/{id}/assignees`.
  - `userIds` string[], required: Identity user ids (see `GET /api/v1/users`) to assign. All must be active members of the organization.
  - `replace` boolean: `true`: the list becomes the complete set of assignees (people not listed are unassigned; an empty list unassigns everyone). `false` (default): the listed people are added to whoever is already assigned.

## Response `200`

Job id and a message listing who was assigned / unassigned (or "Assignments unchanged.").

- ApiOperationResponse: Body of a successful workflow-style write that has no richer resource to return (assign, start, complete, void…). Id is the affected resource's id; Warning carries a non-fatal note from the service (e.g. an email that could not be sent).
  - `id` integer: Id of the resource the operation acted on (e.g. the job id).
  - `message` string, nullable: Human-readable confirmation from the service (e.g. "Job started."). May be null.
  - `warning` string, nullable: Non-fatal problem encountered while completing the operation (e.g. a notification email that could not be sent). Null when there was none.

## Other responses

- `400`: `userIds` missing, or missing `Idempotency-Key`.
- `401`: Unauthorized
- `403`: Scheduling module not active for this organization.
- `404`: No such job in this organization.
- `409`: The key's creator is unknown on this server.
- `422`: One or more `userIds` are not active members of this organization (listed in the message).
- `429`: Too Many Requests

---

[API](https://skmtc.dev/flexonthejob/apis/flex-api.md) · [All operations](https://skmtc.dev/flexonthejob/apis/flex-api/llms.txt) · [OpenAPI document](https://skmtc.dev/flexonthejob/apis/flex-api/revisions/19c8f4d27acf?raw)
