> ## Documentation Index
> Fetch the complete documentation index at: https://docs.capedigital.co.ke/llms.txt
> Use this file to discover all available pages before exploring further.

# Assignment Service

> Task assignments, agent scheduling, and workforce management.

Manages the full task lifecycle across the CRM — tasks are created by the workflow engine, auto-assigned to eligible agents based on permissions and workload, and tracked through to completion.

**Base URL:** `https://api.diginacape.co.ke/assignment`

## Key resources

| Resource    | Description                                                      |
| ----------- | ---------------------------------------------------------------- |
| Tasks       | Create, list, retrieve, and soft-delete tasks                    |
| Task status | Update task status (open, in-progress, blocked, done, cancelled) |
| Assignment  | Claim, unclaim, reassign, or auto-assign tasks to agents         |
| Transitions | Upsert tasks from workflow engine node transitions               |
| Audit trail | Per-task event history with actor and payload diffs              |

## Assignment logic

When a task is created with a `required_permissions_snapshot`, the service automatically resolves eligible users from the User Service and assigns the task to the agent with the lowest current workload. Manual claim and reassign endpoints allow supervisors to override auto-assignment.

<Note>
  See the **Assignment** tab in the top navigation for the full API reference.
</Note>
