---
title: "Set agent ONLINE/OFFLINE"
method: POST
path: "/agent/status"
tags: ["Agent"]
---

# Set agent ONLINE/OFFLINE

`POST /agent/status`

Updates an agent's availability to online or offline. The agent is selected by `phone` (must match the phone stored on the user profile). Requires Agent Availability to be enabled for the organization. When status changes, an `ASSIGNED_AGENT_STATUS_CHANGED` webhook may be sent per WhatsApp integration where the user has assigned chats.

## Request body

- PublicAgentStatusBodyDto
  - `status` 'ONLINE' | 'OFFLINE', required — Target availability for the resolved user.
  - `phone` string, required — Agent phone number; matched digit-only against `User.phone` for a user in `UserOrganization` for this org.

## Response `200`

Status updated.

- PublicAgentStatusResponseDto
  - `success` boolean, required
  - `previousStatus` string, nullable — Prior UserOrganization.status before this update (if any).

## Other responses

- `400` — Invalid status, or Agent Availability not enabled for the org.
- `401` — Unauthorized

---

[API](https://skmtc.net/doubletick/apis/doubletick-public-apis.md) · [All operations](https://skmtc.net/doubletick/apis/doubletick-public-apis/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/doubletick/doubletick-public-apis/versions/bba484527d34/schema)
