---
title: "Assign next available engineer"
method: POST
path: "/v1/workflows/assign-next-available-engineer"
tags: ["Workflows"]
---

# Assign next available engineer

`POST /v1/workflows/assign-next-available-engineer`

## Request

- Base URL: `https://api.workwing.io`
- URL: `https://api.workwing.io/v1/workflows/assign-next-available-engineer`
- Auth: HTTP bearer

Find a rostered engineer with no assignment overlapping the job's scheduled window, preferring the lightest workload, and assign the job to them. An unscheduled job has no window to clash with, so the whole roster is considered. Skills and travel are not taken into account. Answers 409 with `E_AP_4005` when the job already has an assignment and 409 with `E_AP_4006` when nobody on the roster is free for its window; 404 means the job itself was not found.

## Headers

- `Idempotency-Key` string, required

## Request body

- object
  - `job_id` string, uuid, required

## Response `200`

Default Response

- object
  - `data` object, required
    - `job_id` string, uuid, required
    - `assignment_id` string, uuid, required
    - `assigned_engineer_id` string, uuid, required: The resource the job was assigned to
    - `assigned_engineer_name` string, required: The resource's name, falling back to their email, then "Unknown"
    - `status` string, required: The new assignment's status
    - `assigned_engineer_active_assignments` integer, required: How many unfinished jobs the resource held before this assignment
  - `meta` object, required
    - `request_id` string, required
    - `timestamp` string, date-time, required

---

[API](https://skmtc.dev/workwing/apis/workwing-api.md) · [All operations](https://skmtc.dev/workwing/apis/workwing-api/llms.txt) · [OpenAPI document](https://skmtc.dev/workwing/apis/workwing-api/revisions/54bb14368a35?raw)
