---
title: "Change chat status"
method: POST
path: "/api/v2/chats/status"
tags: ["Chats"]
---

# Change chat status

`POST /api/v2/chats/status`

<a class="try-sandbox-link" href="https://sandbox.textmagic.com/#/Chats/setChatStatus" target="_blank">Try in sandbox</a><br>Set the status of the chat given by ID.

## Request body

- object
  - `id` integer, required — Chat ID.
  - `status` 'a' | 'c' | 'd', required — Chat status: * **a** - Active; * **c** - Closed; * **d** - Deleted.

## Response `201`

Returned when successful.

- ResourceLinkResponse — Response contains paginated list of data items.
  - `id` integer, required — Resource ID.
  - `href` string, required — A link to this resource. If you want to fetch it, just **GET** this address.

## Other responses

- `400` — Bad request.
- `401` — Unauthorized request.

---

[API](https://skmtc.net/textmagic/apis/textmagic-api.md) · [All operations](https://skmtc.net/textmagic/apis/textmagic-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/textmagic/textmagic-api/revisions/3e4029d19684/schema)
