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

# CreateMutingRule



## OpenAPI

````yaml openapi/api_v1_config_openapi3_DOCUMENTATION_ONLY.json POST /api/v1/config/muting-rules
openapi: 3.0.3
info:
  description: >

    The Config API provides standard HTTP/JSON REST endpoints for creating,
    reading,

    updating, deleting, and listing configurable Chronosphere resources.


    Use this link to download the raw Swagger specification:

    <a href="/api/v1/config/swagger.json">/api/v1/config/swagger.json</a>
  title: Config V1 API
  version: v1
servers:
  - url: https://{tenant}.chronosphere.io
    variables:
      tenant:
        default: tenant
        description: tenant ID assigned by the service provider
security:
  - ApiKeyAuth: []
tags:
  - name: ConfigV1
paths:
  /api/v1/config/muting-rules:
    post:
      tags:
        - MutingRule
      operationId: CreateMutingRule
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/configv1CreateMutingRuleRequest'
        required: true
        x-originalParamName: body
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/configv1CreateMutingRuleResponse'
          description: A successful response containing the created MutingRule.
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiError'
          description: Cannot create the MutingRule because the request is invalid.
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiError'
          description: >-
            Cannot create the MutingRule because there is a conflict with an
            existing MutingRule.
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiError'
          description: An unexpected error response.
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/genericError'
          description: An undefined error response.
components:
  schemas:
    configv1CreateMutingRuleRequest:
      properties:
        dry_run:
          description: >-
            If `true`, validates the specified configuration without creating
            the MutingRule. If the specified configuration is valid, the
            endpoint returns a partial response without the MutingRule. If the
            specified configuration is invalid, the endpoint returns an error.
          type: boolean
        muting_rule:
          allOf:
            - $ref: '#/components/schemas/configv1MutingRule'
          description: The MutingRule to create.
      type: object
    configv1CreateMutingRuleResponse:
      properties:
        muting_rule:
          $ref: '#/components/schemas/configv1MutingRule'
      type: object
    apiError:
      properties:
        message:
          description: An error message describing what went wrong.
          type: string
      type: object
    genericError:
      additionalProperties: true
      type: object
    configv1MutingRule:
      properties:
        comment:
          description: Descriptive comment that explains why the muting rule was created.
          type: string
        created_at:
          description: >-
            Timestamp of when the MutingRule was created. Cannot be set by
            clients.
          format: date-time
          readOnly: true
          type: string
        ends_at:
          description: >-
            Required. Timestamp of when the muting rule stops being active. On a

            recurring rule this bounds the recurrence as a whole rather than any
            one

            occurrence.
          format: date-time
          type: string
        label_matchers:
          description: >-
            Required. Specifies which series are silenced by the muting rule.
            Alerting

            series must match all muting rule matchers to be silenced. You can't
            update this

            value. Updates must specify the original value.
          items:
            $ref: '#/components/schemas/configv1MutingRuleLabelMatcher'
          type: array
        name:
          description: >-
            The name of the MutingRule. You can modify this value after the
            MutingRule is created.
          type: string
        recurrence:
          allOf:
            - $ref: '#/components/schemas/MutingRuleRecurrence'
          description: >-
            Optional weekly schedule during which the muting rule mutes. When
            unset the

            rule mutes continuously between `starts_at` and `ends_at`.


            A recurring rule only mutes during an occurrence that also falls
            between

            `starts_at` and `ends_at`. You can't update this value; updates must
            specify

            the original value.
        slug:
          description: >-
            The unique identifier of the MutingRule. If a `slug` isn't provided,
            one is generated based on the `name` field. You can't modify this
            field after the MutingRule is created.
          type: string
        starts_at:
          description: >-
            Required. Timestamp of when the muting rule becomes active. You
            can't update

            this value. Updates must specify the original value.
          format: date-time
          type: string
        updated_at:
          description: >-
            Timestamp of when the MutingRule was last updated. Cannot be set by
            clients.
          format: date-time
          readOnly: true
          type: string
      required:
        - name
      type: object
    configv1MutingRuleLabelMatcher:
      properties:
        name:
          description: Required. Always matches against an exact label name.
          type: string
        type:
          allOf:
            - $ref: '#/components/schemas/configv1MutingRuleLabelMatcherMatcherType'
          description: Required. Determines how the label value is matched.
        value:
          description: >-
            Required. Matches against a label value based on the configured
            type.
          type: string
      type: object
    MutingRuleRecurrence:
      description: >
        Recurrence makes a muting rule mute on a repeating weekly schedule
        rather

        than continuously.
      properties:
        timezone:
          description: >-
            Required. The timezone the time ranges are interpreted in, as an
            IANA name

            such as `"America/New_York"`. Ranges are matched against wall-clock
            time in

            this zone, so they keep their local meaning across daylight saving
            changes.
          type: string
        weekly_schedule:
          allOf:
            - $ref: '#/components/schemas/MutingRuleRecurrenceWeeklySchedule'
          description: >-
            Specifies when the rule mutes on each day of the week. Days you omit
            are

            days the rule does not mute.
      type: object
    configv1MutingRuleLabelMatcherMatcherType:
      enum:
        - EXACT
        - REGEX
        - NOT_EXACT
        - NOT_REGEXP
      type: string
    MutingRuleRecurrenceWeeklySchedule:
      properties:
        friday:
          $ref: '#/components/schemas/RecurrenceDaySchedule'
        monday:
          $ref: '#/components/schemas/RecurrenceDaySchedule'
        saturday:
          $ref: '#/components/schemas/RecurrenceDaySchedule'
        sunday:
          $ref: '#/components/schemas/RecurrenceDaySchedule'
        thursday:
          $ref: '#/components/schemas/RecurrenceDaySchedule'
        tuesday:
          $ref: '#/components/schemas/RecurrenceDaySchedule'
        wednesday:
          $ref: '#/components/schemas/RecurrenceDaySchedule'
      type: object
    RecurrenceDaySchedule:
      properties:
        ranges:
          description: >-
            The time ranges during which the rule mutes on this day. Ranges must
            not

            overlap.
          items:
            $ref: '#/components/schemas/MutingRuleRecurrenceTimeRange'
          type: array
      type: object
    MutingRuleRecurrenceTimeRange:
      properties:
        end_hh_mm:
          description: >-
            End time in the format `"<hour>:<minute>"`. For example, `"06:00"`.

            Use `"24:00"` for the end of the day: a window that crosses midnight
            is

            expressed as one range ending at `"24:00"` and another on the
            following

            day starting at `"00:00"`.
          type: string
        start_hh_mm:
          description: >-
            Start time in the format `"<hour>:<minute>"`. For example,
            `"22:00"`.
          type: string
      type: object
  securitySchemes:
    ApiKeyAuth:
      description: Cortex XCOR API token
      in: header
      name: API-Token
      type: apiKey

````

## Related topics

- [Setting monitor muting rules](/investigate/alerts/muting-rules.md)
- [Respond to incidents](/overview/guides/incident-response.md)
- [UpdateMutingRule](/tooling/api-info/definition/operations/UpdateMutingRule.md)
- [ReadMutingRule](/tooling/api-info/definition/operations/ReadMutingRule.md)
- [ListMutingRules](/tooling/api-info/definition/operations/ListMutingRules.md)


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