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

> ## Agent Instructions
> Test in the sandbox first: base URL https://api-sandbox.y.uno (Test Mode in the Dashboard). Production is https://api.y.uno (Live Mode).
> Every API request needs the public-api-key and private-secret-key headers. Get them in the Dashboard at https://dashboard.y.uno/developers (Developers > Credentials); sandbox and production keys are different.
> Send an X-Idempotency-Key (a UUID) when creating payments, refunds and cancels, so retries do not create duplicates.
> Start with the Quickstart (https://docs.y.uno/docs/quickstart.md) and the agent guide (https://docs.y.uno/agents.md). To search these docs from a coding agent, connect the docs MCP server at https://docs.y.uno/mcp.

# Actualizar el estado de una regla

> Actualiza el estado de una regla de campaña para activarla o desactivarla sin eliminarla.

Actualiza el estado de una regla a `ACTIVE` o `INACTIVE`, sin eliminarla.


## OpenAPI

````yaml openapi/es/communications-campaigns/update-rule-status.json PATCH /campaigns/{campaign_id}/rules/{rule_id}/status
openapi: 3.0.0
info:
  version: 1.0.0
  title: Communications Campaigns
servers:
  - url: https://api-sandbox.y.uno/v1
    description: Sandbox
  - url: https://api.y.uno/v1
    description: Production (US)
security:
  - public-api-key: []
    private-secret-key: []
paths:
  /campaigns/{campaign_id}/rules/{rule_id}/status:
    patch:
      operationId: patch_campaigns-campaign-id-rules-rule-id-status
      parameters:
        - in: path
          name: campaign_id
          schema:
            type: string
          required: true
          description: El identificador de la campaña (UUID).
        - in: path
          name: rule_id
          schema:
            type: string
          required: true
          description: El identificador de la regla (UUID).
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                status:
                  type: string
                  description: '`ACTIVE` o `INACTIVE`'
              required:
                - status
            examples:
              Example:
                summary: Example
                value:
                  status: INACTIVE
      responses:
        '200':
          description: ''
          content:
            application/json:
              examples:
                OK:
                  summary: OK
                  value:
                    data:
                      id: 2383cfa3-f743-412b-aa8d-1d8045cb4bcd
                      campaign_id: a50d838e-4e93-4bc9-93ea-6be4ae8b1d44
                      rule_type: PAYMENT_STATUS
                      values:
                        - DECLINED
                        - REJECTED
                      conditional: ONE_OF
                      status: INACTIVE
                      created_at: '2026-10-22T03:48:20.092358Z'
                      updated_at: '2026-10-22T03:48:49.88105Z'
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                        example: 2383cfa3-f743-412b-aa8d-1d8045cb4bcd
                      campaign_id:
                        type: string
                        example: a50d838e-4e93-4bc9-93ea-6be4ae8b1d44
                      rule_type:
                        type: string
                        example: PAYMENT_STATUS
                      values:
                        type: array
                        items:
                          type: string
                        example:
                          - DECLINED
                          - REJECTED
                      conditional:
                        type: string
                        example: ONE_OF
                      status:
                        type: string
                        example: INACTIVE
                      created_at:
                        type: string
                        example: '2026-10-22T03:48:20.092358Z'
                      updated_at:
                        type: string
                        example: '2026-10-22T03:48:49.88105Z'
        '404':
          description: No encontrado. La campaña o la regla no existe para esta cuenta.
          content:
            application/json:
              examples:
                Not Found:
                  value:
                    code: NOT_FOUND
                    messages:
                      - Not Found
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: NOT_FOUND
                  messages:
                    type: array
                    items:
                      type: string
                      example: Not Found
components:
  securitySchemes:
    public-api-key:
      type: apiKey
      in: header
      name: public-api-key
    private-secret-key:
      type: apiKey
      in: header
      name: private-secret-key

````

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