---
title: "Toggle a user's active status"
method: POST
path: "/api/v{version}/users/{id}/toggle-status"
tags: ["users"]
---

# Toggle a user's active status

`POST /api/v{version}/users/{id}/toggle-status`

## Request

- Base URL: `https://api.zrexpress.app`
- URL: `https://api.zrexpress.app/api/v{version}/users/{id}/toggle-status`
- Auth: HTTP bearer and API key in header `X-Api-Key`
- TypeScript: <https://skmtc.dev/zrexpress/apis/zrexpress-api/docs/api/v:version/users/:id/toggle-status/post.ts> (a function with typed inputs; its response is checked against the schema)

Toggle a user's active status

## Path parameters

- `version` string, required
- `id` string, required

## Headers

- `X-Tenant` string, required

## Request body

- ToggleUserStatusRequest
  - `activateUser` boolean
  - `userId` string, nullable

## Response `200`

OK

## Changes

- **2026-11-03** `652262902df9`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/zrexpress/apis/zrexpress-api/changes/api/v:version/users/:id/toggle-status/post.md)

---

[API](https://skmtc.dev/zrexpress/apis/zrexpress-api.md) - [All operations](https://skmtc.dev/zrexpress/apis/zrexpress-api/llms.txt) - [OpenAPI document](https://skmtc.dev/zrexpress/apis/zrexpress-api/revisions/652262902df9?raw)
