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

# Turn a rule on or off. Turning OFF is immediate. Turning ON is two-step (preview + confirmationToken) because an active auto_run rule acts on live ads without asking; only owners/admins can activate auto_run rules.

> Turn a rule on or off. Turning OFF is immediate. Turning ON is two-step (preview + confirmationToken) because an active auto_run rule acts on live ads without asking; only owners/admins can activate auto_run rules.



## OpenAPI

````yaml /openapi.json post /tools/set_automation_rule_active
openapi: 3.1.0
info:
  title: AdStellar API
  version: 1.0.0
  description: >-
    Public REST API for AdStellar — creative generation, video generation,
    campaign management, and analytics. Every endpoint maps 1:1 to an AdStellar
    MCP tool.
servers:
  - url: https://app.adstellar.ai/api/v1
security: []
paths:
  /tools/set_automation_rule_active:
    post:
      summary: >-
        Turn a rule on or off. Turning OFF is immediate. Turning ON is two-step
        (preview + confirmationToken) because an active auto_run rule acts on
        live ads without asking; only owners/admins can activate auto_run rules.
      description: >-
        Turn a rule on or off. Turning OFF is immediate. Turning ON is two-step
        (preview + confirmationToken) because an active auto_run rule acts on
        live ads without asking; only owners/admins can activate auto_run rules.
      operationId: set_automation_rule_active
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $schema: https://json-schema.org/draft/2020-12/schema
              type: object
              properties:
                ruleId:
                  type: string
                  format: uuid
                  pattern: >-
                    ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                  description: Rule id from list_automation_rules.
                isActive:
                  type: boolean
                  description: true to activate, false to pause the rule.
                confirmationToken:
                  description: >-
                    Omit on the first call to get a preview + token; pass the
                    token back to execute.
                  type: string
                workspaceId:
                  description: >-
                    Limit to one workspace this credential can access. Omit to
                    span all of them.
                  type: string
                  format: uuid
                  pattern: >-
                    ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
              required:
                - ruleId
                - isActive
              additionalProperties: false
      responses:
        '200':
          description: Tool result
        '401':
          description: Missing or invalid API key
        '403':
          description: Missing required scope
        '429':
          description: Rate limit exceeded
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: AdStellar API key (ast_live_...)

````

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