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

# Delete a rule



## OpenAPI

````yaml /api-reference/openapi.json delete /rules/{id}
openapi: 3.1.0
info:
  title: Joinery REST API
  version: 1.0.0
  description: >-
    Endpoints added to WordPress by Joinery Core, under /wp-json/joinery/v1.
    Price preview is public; rule management needs a user with the
    manage_woocommerce capability.
  license:
    name: GPL-2.0-or-later
    identifier: GPL-2.0-or-later
servers:
  - url: https://{site}/wp-json/joinery/v1
    variables:
      site:
        default: example.com
        description: Your WordPress site's host.
security: []
tags:
  - name: Prices
    description: For storefronts, including headless.
  - name: Rules
    description: Manage pricing and reward rules.
paths:
  /rules/{id}:
    parameters:
      - name: id
        in: path
        required: true
        schema:
          type: integer
    delete:
      tags:
        - Rules
      summary: Delete a rule
      operationId: deleteRule
      responses:
        '204':
          description: Deleted.
        '401':
          description: Not signed in.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Needs the manage_woocommerce capability.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - applicationPassword: []
        - cookieNonce: []
components:
  schemas:
    Error:
      type: object
      properties:
        code:
          type: string
        message:
          type: string
        data:
          type: object
          properties:
            status:
              type: integer
  securitySchemes:
    applicationPassword:
      type: http
      scheme: basic
      description: >-
        A WordPress application password (Users → Profile → Application
        passwords).
    cookieNonce:
      type: apiKey
      in: header
      name: X-WP-Nonce
      description: >-
        The logged-in cookie plus a wp_rest nonce, for requests from wp-admin or
        the same site.

````

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