---
title: "Turn a single agent assignment on or off"
method: PATCH
path: "/companies/{company}/agents/{agent}/assignments/{assignment}"
tags: ["AI Agent"]
---

# Turn a single agent assignment on or off

`PATCH /companies/{company}/agents/{agent}/assignments/{assignment}`

Stops (or resumes) the agent answering on one assigned number or call flow, without unassigning it.

What changes depends on the assignment's context: an `ai_ivr` assignment flips `use_ai_ivr` on the
number or call flow, while a `forward` assignment closes the agent's leg inside the routing so calls
walk straight past it. Resuming a forward restores 24/7 — the previous window is not kept.

## Path parameters

- `company` integer, required
- `agent` integer, required
- `assignment` integer, required

## Request body

- object
  - `active` boolean, required

## Response `200`

Updated assignment

- AgentAssignmentResource
  - `id` integer
  - `isActive` boolean — Whether the agent currently answers here. False means the assignment is kept but paused — AI IVR switched off, or the agent's leg closed inside the routing.
  - `context` object
    - `type` 'ai_ivr' | 'forward'
    - `label` string
  - `answerTriggers` string[], nullable — When the AI receptionist answers on this assignment. Empty/null means every call. Always null for forward-context assignments.
  - `assignable` object, nullable
    - `type` 'number' | 'number_template'
    - `id` integer
    - `label` string, nullable
    - `useAiIvr` boolean
    - `numbersCount` integer — Call flows only: how many numbers are on it. Zero means nothing can be dialled into its routing. Absent for a number.
    - `routes` object[]
      - `id` integer
      - `type` string
      - `extension` integer, nullable
      - `voicemailEnabled` boolean
      - `forwards` object[]
        - `type` string
        - `label` string, nullable
        - `number` string
        - `order` integer
  - `createdBy` string, nullable
  - `createdAt` string, date-time

## Other responses

- `404` — Agent or assignment not found

---

[API](https://skmtc.dev/800/apis/public-api.md) · [All operations](https://skmtc.dev/800/apis/public-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/800/public-api/revisions/aab9efc97342/schema)
