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

# Delete Categories

> Delete categories by id. Each one's child categories and products move up to its parent, then it is removed. Returns per-item results { deleted, rejected } — the batch never fails as a whole. Rejection reasons: not_found, name_conflict (a child moving up would clash with an existing sibling name).



## OpenAPI

````yaml https://api.peec.ai/customer/v1/openapi/json post /categories/delete
openapi: 3.0.3
info:
  title: Peec AI Customer API
  description: Development documentation
  version: 1.0.0
  contact:
    name: Peec AI Team
    email: support@peec.ai
servers:
  - url: https://api.peec.ai/customer/v1
security: []
paths:
  /categories/delete:
    post:
      tags:
        - Products
      summary: Delete Categories
      description: >-
        Delete categories by id. Each one's child categories and products move
        up to its parent, then it is removed. Returns per-item results {
        deleted, rejected } — the batch never fails as a whole. Rejection
        reasons: not_found, name_conflict (a child moving up would clash with an
        existing sibling name).
      operationId: postCategoriesDelete
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                project_id:
                  description: Required if using a company api key
                  example: or_f45b94ba-5e35-4982-93ed-285e72ee14eb
                  type: string
                category_ids:
                  minItems: 1
                  maxItems: 1000
                  type: array
                  items:
                    type: string
                    format: uuid
                    pattern: >-
                      ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
              required:
                - category_ids
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                project_id:
                  description: Required if using a company api key
                  example: or_f45b94ba-5e35-4982-93ed-285e72ee14eb
                  type: string
                category_ids:
                  minItems: 1
                  maxItems: 1000
                  type: array
                  items:
                    type: string
                    format: uuid
                    pattern: >-
                      ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
              required:
                - category_ids
          multipart/form-data:
            schema:
              type: object
              properties:
                project_id:
                  description: Required if using a company api key
                  example: or_f45b94ba-5e35-4982-93ed-285e72ee14eb
                  type: string
                category_ids:
                  minItems: 1
                  maxItems: 1000
                  type: array
                  items:
                    type: string
                    format: uuid
                    pattern: >-
                      ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
              required:
                - category_ids
      responses:
        '200':
          description: Per-item delete results
          content:
            application/json:
              schema:
                type: object
                properties:
                  deleted:
                    type: array
                    items:
                      type: object
                      properties:
                        category_id:
                          type: string
                          format: uuid
                          pattern: >-
                            ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                      required:
                        - category_id
                  rejected:
                    type: array
                    items:
                      type: object
                      properties:
                        category_id:
                          type: string
                          format: uuid
                          pattern: >-
                            ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                        reason:
                          type: string
                          enum:
                            - not_found
                            - name_conflict
                        message:
                          type: string
                      required:
                        - category_id
                        - reason
                        - message
                required:
                  - deleted
                  - rejected
                description: Per-item delete results
      security:
        - APIKeyHeader: []
        - APIKeyQuery: []
        - BearerAuth: []
components:
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key
    APIKeyQuery:
      type: apiKey
      in: query
      name: api_key
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````