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

# Delete Rules

> Permanently deletes the listed Rules. Partial success is possible; the response reports the deleted count and per-rule failures (e.g. an ID that doesn't exist).



## OpenAPI

````yaml /openapi/phrase-style-guides.json delete /api/v1/rules
openapi: 3.1.0
info:
  version: 2.1.0
  title: Style Guide API
  description: REST API for managing Style Guides on the Phrase Platform
  contact:
    name: Linguistic Assets
    email: engineering@phrase.com
servers:
  - url: https://eu.phrase.com/styleguide
    description: Production EU
  - url: https://us.phrase.com/styleguide
    description: Production US
security:
  - bearerAuth: []
tags:
  - name: Style Guide
    description: Public API for managing Style Guides
  - name: Rule
    description: Public API for managing Rules
paths:
  /api/v1/rules:
    delete:
      tags:
        - Rule
      summary: Delete Rules
      description: >-
        Permanently deletes the listed Rules. Partial success is possible; the
        response reports the deleted count and per-rule failures (e.g. an ID
        that doesn't exist).
      operationId: bulkDeleteRules
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BulkDeleteRulesRequest'
        required: true
      responses:
        '200':
          description: Rules deleted (partial success possible)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BulkDeleteRulesResponse'
        '400':
          description: 'Invalid request data. Error codes: VALIDATION_ERROR.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized - Invalid or missing authentication token
        '403':
          description: >-
            Forbidden - Insufficient permissions, or one of the requested Rules
            belongs to another organization. Error codes: ACCESS_DENIED.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    BulkDeleteRulesRequest:
      type: object
      description: Request to bulk-delete Rules
      properties:
        ruleIds:
          type: array
          description: Rule IDs to permanently delete
          items:
            type: string
            format: uuid
          maxItems: 50
          minItems: 0
      required:
        - ruleIds
    BulkDeleteRulesResponse:
      type: object
      description: Result of a bulk delete Rules operation
      properties:
        deletedCount:
          type: integer
          format: int32
          description: Number of Rules permanently deleted
        failures:
          type: array
          description: Rules that could not be deleted
          items:
            $ref: '#/components/schemas/RuleBulkOperationFailure'
      required:
        - deletedCount
        - failures
    ErrorResponse:
      type: object
      properties:
        code:
          type: string
        message:
          type: string
        detail:
          type: string
    RuleBulkOperationFailure:
      type: object
      description: A single Rule that failed within a bulk operation
      properties:
        ruleId:
          type: string
          format: uuid
          description: Rule ID that could not be processed
        errorCode:
          type: string
          description: Error code indicating the failure reason
          enum:
            - RULE_NOT_FOUND
            - RULE_ACTIVE_LIMIT_REACHED
            - RULE_DELETION_FAILED
        errorMessage:
          type: string
          description: Human-readable error message
      required:
        - errorCode
        - errorMessage
        - ruleId
  securitySchemes:
    bearerAuth:
      type: http
      description: 'JWT from IDM (Authorization: Bearer <token>)'
      scheme: bearer
      bearerFormat: JWT

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.