---
title: "POST /api/{session}/add-or-remove-label"
method: POST
path: "/api/{session}/add-or-remove-label"
tags: ["Labels"]
---

# POST /api/{session}/add-or-remove-label

`POST /api/{session}/add-or-remove-label`

## Path parameters

- `session` string, required

## Request body

- object
  - `chatIds` string[], required
  - `options` object[]
    - `labelId` string
    - `type` string

## Response `201`

Created

## Other responses

- `401` — Unauthorized
- `500` — Internal Server Error

## Changes

- **2023-06-04** `a9f5cf036471` — 1 breaking
  - added required request body
- **2023-05-31** `21a80b8287f1` — 1 info
  - endpoint added
- **2022-07-21** `5384d2ef4ae9` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/wppconnect-team/apis/wppconnect-api-rest/changes/api/:session/add-or-remove-label/post.md)

---

[API](https://skmtc.dev/wppconnect-team/apis/wppconnect-api-rest.md) · [All operations](https://skmtc.dev/wppconnect-team/apis/wppconnect-api-rest/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/wppconnect-team/wppconnect-api-rest/revisions/4ae2377201e7/schema)
