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

# Disable a ruleset

Sets the ruleset status to PAUSED, preventing it from being triggered and executed. If the ruleset is already PAUSED, no changes are made. A disabled ruleset will not execute even if its trigger conditions and filters are met.


## OpenAPI

````yaml https://api.getfernand.com/openapi.json post /organization/rules/{id}/disable
openapi: 3.0.3
info:
  title: Fernand API Documentation
  version: '3.0'
  description: This is the documentation for the [Fernand](https://getfernand.com) API.
  termsOfService: https://getfernand.com/terms
  contact:
    name: Fernand Support
    url: https://getfernand.com
    email: support@getfernand.com
  x-logo:
    url: https://app.getfernand.com/images/favicon/icon_128.png
servers:
  - url: https://api.getfernand.com
    description: ''
    x-last-modified: 1764750693905
security:
  - apiKeyHeader: []
externalDocs:
  description: You can access our documentation online by visiting https://api.fernand.help
  url: https://api.fernand.help
paths:
  /organization/rules/{id}/disable:
    post:
      tags:
        - Rulesets
      summary: Disable a ruleset
      description: >-
        Sets the ruleset status to PAUSED, preventing it from being triggered
        and executed. If the ruleset is already PAUSED, no changes are made. A
        disabled ruleset will not execute even if its trigger conditions and
        filters are met.
      operationId: disableRuleset
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: integer
          description: ID of the ruleset to disable.
      responses:
        '200':
          description: Ruleset disabled successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Ruleset'
        '404':
          description: Ruleset not found.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
components:
  schemas:
    Ruleset:
      type: object
      properties:
        id:
          type: integer
          format: int32
          description: Unique identifier for the ruleset
        name:
          type: string
          maxLength: 250
          description: Name of the ruleset
          example: Auto-close spam conversations
        description:
          type: string
          maxLength: 500
          nullable: true
          description: Optional description of what the ruleset does
          example: Automatically closes conversations marked as spam
        status:
          type: string
          enum:
            - PAUSED
            - LIVE
          description: Current status of the ruleset
          example: LIVE
        priority:
          type: integer
          format: int16
          description: Priority order for rule execution (lower numbers execute first)
          example: 0
        stop:
          type: boolean
          description: If true, stops processing subsequent rules when this rule matches
          example: false
        trigger_name:
          type: string
          maxLength: 50
          description: |
            Event that triggers this rule. Accepted triggers:
            - messages.new_conversation
            - messages.incoming
            - messages.response
            - messages.delivery_failure
            - messages.spam
            - messages.note
            - messages.disable_ai
            - status.closed
            - status.opened
            - status.snoozed
            - status.unsnoozed
            - teammates.assigned
            - teammate.mentioned
            - time.unanswered_by_client
            - time.unanswered_by_team
            - tickets.ticket_done
          example: messages.incoming
        trigger_data:
          type: string
          maxLength: 250
          nullable: true
          description: >
            Additional data for the trigger (required for certain triggers):

            - For "teammates.assigned" or "teammate.mentioned": "no_one",
            "anyone", or an Agent ID

            - For "time.*" triggers: duration and period in format "{duration}
            {period}" (e.g., "2 hours", "3 days")
          example: 2 hours
        filters:
          type: array
          nullable: true
          description: |
            Array of filter conditions that must be met for the rule to execute.
            Each filter contains conditions to match against the entity.
          items:
            type: object
          example:
            - field: conversation.status
              operator: equals
              value: OPENED
        actions:
          type: array
          description: |
            Array of actions to execute when the rule matches.
            Each action has a name and optional data.
          items:
            type: object
            properties:
              name:
                type: string
                description: Name of the action to execute
              data:
                type: object
                description: Optional data for the action
          example:
            - name: conversation.close
              data: {}
        created:
          type: string
          format: date-time
          description: Timestamp when the ruleset was created (UTC)
          example: '2025-01-21T10:30:00Z'
        last_applied_at:
          type: string
          format: date-time
          nullable: true
          description: Timestamp when the rule was last applied (UTC)
          example: '2025-01-21T15:45:30Z'
        applied_count:
          type: integer
          format: int32
          description: Number of times this rule has been successfully applied
          example: 42
      required:
        - id
        - name
        - status
        - priority
        - stop
        - trigger_name
        - created
        - applied_count
      x-computed-hash: 825d70624279e89eaa8af56e2d0dde159a1fa02f03c1369b8e6285e19c4c5cd8
      x-last-modified: 1776152542
  securitySchemes:
    apiKeyHeader:
      type: apiKey
      description: >-
        Authenticate your account by including your secret key in API requests.

        You can manage your API keys in the
        [Dashboard](https://app.getfernand.com/).


        Authentication to the API is performed by using the HTTP Header
        X-API-Key.
      name: X-API-Key
      in: header
      x-last-modified: 1764750344730

````