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

# Delete a match rule

> Use this endpoint to delete a specific match rule by its identifier.



## OpenAPI

````yaml /en/openapi/v3-current/matcher.yaml delete /v1/contexts/{contextId}/rules/{ruleId}
openapi: 3.1.0
info:
  title: Matcher APIs
  description: >-
    Complete API reference for the Matcher reconciliation engine, providing
    automated transaction matching between Midaz Ledger and external systems.
  version: v2.1.1
  license:
    name: Elastic License 2.0
    url: https://www.elastic.co/licensing/elastic-license
servers:
  - url: https://matcher.sandbox.lerian.net
security: []
paths:
  /v1/contexts/{contextId}/rules/{ruleId}:
    delete:
      tags:
        - Configuration Match Rules
      summary: Delete a match rule
      description: Use this endpoint to delete a specific match rule by its identifier.
      operationId: deleteMatchRule
      parameters:
        - description: A unique identifier for tracing the request across services.
          in: header
          name: X-Request-Id
          schema:
            type: string
        - description: The unique identifier of the reconciliation context.
          in: path
          name: contextId
          required: true
          schema:
            type: string
        - description: The unique identifier of the match rule.
          in: path
          name: ruleId
          required: true
          schema:
            type: string
      responses:
        '204':
          description: Match rule successfully deleted
        '400':
          description: Invalid rule ID
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: The request lacks valid authentication credentials.
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: You do not have permission to access this resource.
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                ErrorM0103:
                  $ref: '#/components/examples/ErrorM0103'
        '404':
          description: Match rule not found
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                ErrorM0208:
                  $ref: '#/components/examples/ErrorM0208'
      security:
        - BearerAuth: []
components:
  schemas:
    ErrorResponse:
      description: Standard error response returned by all API endpoints
      type: object
      required:
        - code
        - title
        - message
      properties:
        code:
          type: string
          description: HTTP status code as a string.
          example: '404'
        title:
          type: string
          description: Error type identifier.
          example: not_found
        message:
          type: string
          description: Human-readable error message with details.
          example: context not found
        error:
          type: string
          description: Deprecated. Error message for backward compatibility.
          deprecated: true
        details:
          description: Additional error context as key-value pairs
          additionalProperties: {}
          type: object
  examples:
    ErrorM0103:
      summary: Insufficient Privileges
      value:
        code: '403'
        title: forbidden
        message: >-
          You do not have the necessary permissions to perform this action.
          Please contact your administrator if you believe this is an error.
    ErrorM0208:
      summary: Rule Not Found
      value:
        code: '404'
        title: not_found
        message: rule not found
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: 'Bearer token authentication (format: "Bearer {token}")'

````