> ## Documentation Index
> Fetch the complete documentation index at: https://docs.urban-things.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Toggle Category Publish Status

## Overview

Toggle the publish status of a category. This allows you to show or hide categories from public view without deleting them.

## Authorization

* User must be authenticated with a valid Bearer token
* User must be a member of the tenant
* Requires X-Tenant-ID header

## Use Cases

* Temporarily hide categories during inventory updates
* Seasonal category management
* A/B testing different category structures

## Example Usage

```bash theme={null}
curl -X PATCH \
  https://faisalshop.mvp-apps.ae/api/v2/admin/category/5 \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'X-Tenant-ID: 123'
```

```javascript theme={null}
await axios.patch(
  `/api/v2/admin/category/${categoryId}`,
  {},
  {
    headers: {
      Authorization: `Bearer ${token}`,
      'X-Tenant-ID': tenantId
    }
  }
);
```


## OpenAPI

````yaml PATCH /api/v2/admin/category/{id}
openapi: 3.1.0
info:
  title: Urban Things API
  description: Multi-tenant e-commerce platform API
  version: 2.0.0
  contact:
    email: info@faisalkc.com
servers:
  - url: https://faisalshop.mvp-apps.ae
    description: Production server
  - url: http://localhost:3000
    description: Development server
security:
  - bearerAuth: []
paths:
  /api/v2/admin/category/{id}:
    patch:
      tags:
        - Categories
      summary: Toggle category publish status
      parameters:
        - $ref: '#/components/parameters/TenantIdHeader'
        - name: id
          in: path
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: Status toggled
components:
  parameters:
    TenantIdHeader:
      name: X-Tenant-ID
      in: header
      required: true
      schema:
        type: string
      description: Tenant ID for multi-tenancy
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````