post: operationId: updateClientStatus summary: Activate or deactivate a client account description: | Permission: **ADMIN, OWNER** Changes a client's status between Active and Inactive. - `status: active` → activates an Inactive or Locked client; clears `lock_status` if Locked - `status: inactive` → deactivates an Active client; revokes all mobile sessions **Error codes:** | Code | Condition | |----------|-----------| | `110514` | Forbidden (role is not Admin or Owner) | | `110513` | Client not found | | `110515` | Invalid request data (client_id format, invalid status) | | `110565` | Invalid status transition (e.g. deactivate when already Inactive) | | `100502` | Database query error | tags: [staffManagement] security: - bearerAuth: [] requestBody: required: true content: application/json: schema: $ref: "../../components.yaml#/components/schemas/UpdateClientStatusRequest" example: client_id: "6a2fd6c5be02f295860ec3fe" status: "inactive" responses: "200": description: Client status updated successfully. content: application/json: schema: $ref: "../../components.yaml#/components/schemas/UpdateClientStatusResponse" example: client_id: "6a2fd6c5be02f295860ec3fe" status: "INACTIVE" updated_at: "2026-07-22T15:35:51+07:00" "400": $ref: "../../components.yaml#/components/responses/Failure" "403": $ref: "../../components.yaml#/components/responses/Failure" "404": $ref: "../../components.yaml#/components/responses/Failure" "500": $ref: "../../components.yaml#/components/responses/Failure"