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

# Preview actions

> Evaluate a governed proposal for the approved account and preview each policy decision and execution diff without creating a batch or action.



## OpenAPI

````yaml https://plainrouter.com/openapi.json post /agent/workspaces/{workspace}/actions/dry-run
openapi: 3.1.0
info:
  title: Plainrouter Conversion API
  version: 0.5.0
  description: Plainrouter public Signals Conversion API.
servers:
  - url: https://plainrouter.com/api/v1
    description: Production
security:
  - workspaceSecret: []
paths:
  /agent/workspaces/{workspace}/actions/dry-run:
    post:
      tags:
        - ActionDryRunApi
      summary: Preview actions
      description: >-
        Evaluate a governed proposal for the approved account and preview each
        policy decision and execution diff without creating a batch or action.
      operationId: actions.api.dry-run
      parameters:
        - name: workspace
          in: path
          required: true
          description: The workspace ID
          schema:
            type: integer
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ActionProposalInput'
      responses:
        '200':
          description: Evaluated dry-run preview.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ActionDryRunRead'
        '401':
          description: Missing, invalid, or expired workspace key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        '403':
          description: The key lacks the propose-actions grant.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        '404':
          description: Workspace, account, or Actions resource not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        '422':
          description: Request validation failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
      security:
        - workspaceActionKey: []
components:
  schemas:
    ActionProposalInput:
      properties:
        actions:
          minItems: 1
          maxItems: 25
          items:
            anyOf:
              - properties:
                  type:
                    enum:
                      - increase_budget
                    type: string
                  target_entity:
                    additionalProperties: false
                    properties:
                      type:
                        enum:
                          - ad_account
                          - campaign
                          - ad_set
                          - ad
                        maxLength: 64
                        type: string
                      id:
                        maxLength: 128
                        pattern: ^[0-9]+$
                        type: string
                      name:
                        maxLength: 255
                        type:
                          - string
                          - 'null'
                    type: object
                    required:
                      - type
                      - id
                  params:
                    additionalProperties: false
                    properties:
                      new_daily_budget_minor:
                        minimum: 1
                        type: integer
                    type: object
                    required:
                      - new_daily_budget_minor
                  rationale:
                    maxLength: 2000
                    type: string
                  idempotency_key:
                    maxLength: 255
                    type: string
                type: object
                required:
                  - type
                  - target_entity
                  - params
                  - rationale
              - properties:
                  type:
                    enum:
                      - decrease_budget
                    type: string
                  target_entity:
                    additionalProperties: false
                    properties:
                      type:
                        enum:
                          - ad_account
                          - campaign
                          - ad_set
                          - ad
                        maxLength: 64
                        type: string
                      id:
                        maxLength: 128
                        pattern: ^[0-9]+$
                        type: string
                      name:
                        maxLength: 255
                        type:
                          - string
                          - 'null'
                    type: object
                    required:
                      - type
                      - id
                  params:
                    additionalProperties: false
                    properties:
                      new_daily_budget_minor:
                        minimum: 1
                        type: integer
                    type: object
                    required:
                      - new_daily_budget_minor
                  rationale:
                    maxLength: 2000
                    type: string
                  idempotency_key:
                    maxLength: 255
                    type: string
                type: object
                required:
                  - type
                  - target_entity
                  - params
                  - rationale
              - properties:
                  type:
                    enum:
                      - pause
                    type: string
                  target_entity:
                    additionalProperties: false
                    properties:
                      type:
                        enum:
                          - ad_account
                          - campaign
                          - ad_set
                          - ad
                        maxLength: 64
                        type: string
                      id:
                        maxLength: 128
                        pattern: ^[0-9]+$
                        type: string
                      name:
                        maxLength: 255
                        type:
                          - string
                          - 'null'
                    type: object
                    required:
                      - type
                      - id
                  params:
                    additionalProperties: false
                    type: object
                  rationale:
                    maxLength: 2000
                    type: string
                  idempotency_key:
                    maxLength: 255
                    type: string
                type: object
                required:
                  - type
                  - target_entity
                  - params
                  - rationale
              - properties:
                  type:
                    enum:
                      - resume
                    type: string
                  target_entity:
                    additionalProperties: false
                    properties:
                      type:
                        enum:
                          - ad_account
                          - campaign
                          - ad_set
                          - ad
                        maxLength: 64
                        type: string
                      id:
                        maxLength: 128
                        pattern: ^[0-9]+$
                        type: string
                      name:
                        maxLength: 255
                        type:
                          - string
                          - 'null'
                    type: object
                    required:
                      - type
                      - id
                  params:
                    additionalProperties: false
                    type: object
                  rationale:
                    maxLength: 2000
                    type: string
                  idempotency_key:
                    maxLength: 255
                    type: string
                type: object
                required:
                  - type
                  - target_entity
                  - params
                  - rationale
              - properties:
                  type:
                    enum:
                      - replace_creative
                    type: string
                  target_entity:
                    additionalProperties: false
                    properties:
                      type:
                        enum:
                          - ad_account
                          - campaign
                          - ad_set
                          - ad
                        maxLength: 64
                        type: string
                      id:
                        maxLength: 128
                        type: string
                      name:
                        maxLength: 255
                        type:
                          - string
                          - 'null'
                    type: object
                    required:
                      - type
                      - id
                  params:
                    type: object
                  rationale:
                    maxLength: 2000
                    type: string
                  idempotency_key:
                    maxLength: 255
                    type: string
                type: object
                required:
                  - type
                  - target_entity
                  - params
                  - rationale
              - properties:
                  type:
                    enum:
                      - shift_spend
                    type: string
                  target_entity:
                    additionalProperties: false
                    properties:
                      type:
                        enum:
                          - ad_account
                          - campaign
                          - ad_set
                          - ad
                        maxLength: 64
                        type: string
                      id:
                        maxLength: 128
                        type: string
                      name:
                        maxLength: 255
                        type:
                          - string
                          - 'null'
                    type: object
                    required:
                      - type
                      - id
                  params:
                    type: object
                  rationale:
                    maxLength: 2000
                    type: string
                  idempotency_key:
                    maxLength: 255
                    type: string
                type: object
                required:
                  - type
                  - target_entity
                  - params
                  - rationale
              - properties:
                  type:
                    enum:
                      - rollback
                    type: string
                  target_entity:
                    additionalProperties: false
                    properties:
                      type:
                        enum:
                          - ad_account
                          - campaign
                          - ad_set
                          - ad
                        maxLength: 64
                        type: string
                      id:
                        maxLength: 128
                        type: string
                      name:
                        maxLength: 255
                        type:
                          - string
                          - 'null'
                    type: object
                    required:
                      - type
                      - id
                  params:
                    type: object
                  rationale:
                    maxLength: 2000
                    type: string
                  idempotency_key:
                    maxLength: 255
                    type: string
                type: object
                required:
                  - type
                  - target_entity
                  - params
                  - rationale
              - properties:
                  type:
                    enum:
                      - create_campaign
                    type: string
                  target_entity:
                    additionalProperties: false
                    properties:
                      type:
                        enum:
                          - ad_account
                          - campaign
                          - ad_set
                          - ad
                        maxLength: 64
                        type: string
                      id:
                        maxLength: 128
                        type: string
                      name:
                        maxLength: 255
                        type:
                          - string
                          - 'null'
                    type: object
                    required:
                      - type
                      - id
                  params:
                    type: object
                  rationale:
                    maxLength: 2000
                    type: string
                  idempotency_key:
                    maxLength: 255
                    type: string
                type: object
                required:
                  - type
                  - target_entity
                  - params
                  - rationale
              - properties:
                  type:
                    enum:
                      - create_ad_set
                    type: string
                  target_entity:
                    additionalProperties: false
                    properties:
                      type:
                        enum:
                          - ad_account
                          - campaign
                          - ad_set
                          - ad
                        maxLength: 64
                        type: string
                      id:
                        maxLength: 128
                        type: string
                      name:
                        maxLength: 255
                        type:
                          - string
                          - 'null'
                    type: object
                    required:
                      - type
                      - id
                  params:
                    type: object
                  rationale:
                    maxLength: 2000
                    type: string
                  idempotency_key:
                    maxLength: 255
                    type: string
                type: object
                required:
                  - type
                  - target_entity
                  - params
                  - rationale
              - properties:
                  type:
                    enum:
                      - create_ad
                    type: string
                  target_entity:
                    additionalProperties: false
                    properties:
                      type:
                        enum:
                          - ad_account
                          - campaign
                          - ad_set
                          - ad
                        maxLength: 64
                        type: string
                      id:
                        maxLength: 128
                        type: string
                      name:
                        maxLength: 255
                        type:
                          - string
                          - 'null'
                    type: object
                    required:
                      - type
                      - id
                  params:
                    type: object
                  rationale:
                    maxLength: 2000
                    type: string
                  idempotency_key:
                    maxLength: 255
                    type: string
                type: object
                required:
                  - type
                  - target_entity
                  - params
                  - rationale
              - properties:
                  type:
                    enum:
                      - upload_asset
                    type: string
                  target_entity:
                    additionalProperties: false
                    properties:
                      type:
                        enum:
                          - ad_account
                          - campaign
                          - ad_set
                          - ad
                        maxLength: 64
                        type: string
                      id:
                        maxLength: 128
                        type: string
                      name:
                        maxLength: 255
                        type:
                          - string
                          - 'null'
                    type: object
                    required:
                      - type
                      - id
                  params:
                    properties:
                      staged_asset_id:
                        maxLength: 255
                        pattern: ^stage_[a-f0-9]{40}$
                        type: string
                      asset_type:
                        enum:
                          - image
                        type: string
                      filename:
                        maxLength: 255
                        type: string
                      content_sha256:
                        pattern: ^[a-f0-9]{64}$
                        type: string
                      mime_type:
                        maxLength: 255
                        type:
                          - string
                          - 'null'
                      size_bytes:
                        minimum: 1
                        type:
                          - integer
                          - 'null'
                    type: object
                    required:
                      - staged_asset_id
                      - asset_type
                      - filename
                      - content_sha256
                  rationale:
                    maxLength: 2000
                    type: string
                  idempotency_key:
                    maxLength: 255
                    type: string
                type: object
                required:
                  - type
                  - target_entity
                  - params
                  - rationale
              - properties:
                  type:
                    enum:
                      - adjust_budget
                    type: string
                  target_entity:
                    additionalProperties: false
                    properties:
                      type:
                        enum:
                          - ad_account
                          - campaign
                          - ad_set
                          - ad
                        maxLength: 64
                        type: string
                      id:
                        maxLength: 128
                        type: string
                      name:
                        maxLength: 255
                        type:
                          - string
                          - 'null'
                    type: object
                    required:
                      - type
                      - id
                  params:
                    properties:
                      new_daily_budget_minor:
                        minimum: 1
                        type: integer
                    type: object
                    required:
                      - new_daily_budget_minor
                  rationale:
                    maxLength: 2000
                    type: string
                  idempotency_key:
                    maxLength: 255
                    type: string
                type: object
                required:
                  - type
                  - target_entity
                  - params
                  - rationale
              - properties:
                  type:
                    enum:
                      - set_status
                    type: string
                  target_entity:
                    additionalProperties: false
                    properties:
                      type:
                        enum:
                          - ad_account
                          - campaign
                          - ad_set
                          - ad
                        maxLength: 64
                        type: string
                      id:
                        maxLength: 128
                        type: string
                      name:
                        maxLength: 255
                        type:
                          - string
                          - 'null'
                    type: object
                    required:
                      - type
                      - id
                  params:
                    properties:
                      status:
                        enum:
                          - active
                          - paused
                        type: string
                    type: object
                    required:
                      - status
                  rationale:
                    maxLength: 2000
                    type: string
                  idempotency_key:
                    maxLength: 255
                    type: string
                type: object
                required:
                  - type
                  - target_entity
                  - params
                  - rationale
              - properties:
                  type:
                    enum:
                      - duplicate_ad_with_creative
                    type: string
                  target_entity:
                    additionalProperties: false
                    properties:
                      type:
                        enum:
                          - ad_account
                          - campaign
                          - ad_set
                          - ad
                        maxLength: 64
                        type: string
                      id:
                        maxLength: 128
                        type: string
                      name:
                        maxLength: 255
                        type:
                          - string
                          - 'null'
                    type: object
                    required:
                      - type
                      - id
                  params:
                    properties:
                      asset_id:
                        maxLength: 255
                        pattern: ^(image|video):.+$
                        type: string
                      status:
                        enum:
                          - paused
                        type: string
                      name_suffix:
                        maxLength: 100
                        type:
                          - string
                          - 'null'
                    type: object
                    required:
                      - asset_id
                      - status
                  rationale:
                    maxLength: 2000
                    type: string
                  idempotency_key:
                    maxLength: 255
                    type: string
                type: object
                required:
                  - type
                  - target_entity
                  - params
                  - rationale
          type: array
        rationale:
          maxLength: 4000
          type: string
        idempotency_key:
          maxLength: 64
          type: string
        evidence:
          minItems: 1
          maxItems: 3
          items:
            additionalProperties: false
            properties:
              source_tool:
                enum:
                  - get_account_state
                  - get_signal_health
                  - get_performance
                  - get-creative-library
                  - staged-asset-manifest
                type: string
              fields_used:
                minItems: 1
                maxItems: 50
                items:
                  maxLength: 255
                  type: string
                type: array
              action_index:
                minimum: 0
                type: integer
            type: object
            required:
              - source_tool
              - fields_used
          type: array
        target_source:
          enum:
            - human_supplied
          type: string
        account_id:
          minimum: 1
          type: integer
      type: object
      required:
        - actions
        - rationale
        - idempotency_key
        - evidence
        - target_source
      title: ActionProposalInput
    ActionDryRunRead:
      type: object
      properties:
        dry_run:
          type: object
          properties:
            actions:
              type: array
              items:
                anyOf:
                  - type: object
                    properties:
                      type:
                        type: string
                        enum:
                          - increase_budget
                          - decrease_budget
                          - pause
                          - resume
                          - replace_creative
                          - shift_spend
                          - rollback
                          - create_campaign
                          - create_ad_set
                          - create_ad
                          - upload_asset
                          - adjust_budget
                          - set_status
                          - duplicate_ad_with_creative
                          - duplicate_adset
                          - duplicate_ad_with_creative_v2
                      target_entity:
                        type: object
                        properties:
                          type:
                            type: string
                          id:
                            type: string
                          name:
                            type: string
                        required:
                          - type
                          - id
                      status:
                        type: string
                        enum:
                          - evaluated
                      policy_decision:
                        type: string
                        enum:
                          - allow
                          - require_approval
                          - block
                      policy_reasons:
                        type: array
                        items:
                          type: string
                      approval_required:
                        type: boolean
                      would_auto_execute:
                        type: boolean
                      diff:
                        type: object
                        properties:
                          before: {}
                          proposed: {}
                        required:
                          - before
                          - proposed
                    required:
                      - type
                      - target_entity
                      - status
                      - policy_decision
                      - policy_reasons
                      - approval_required
                      - would_auto_execute
                      - diff
                  - type: object
                    properties:
                      type:
                        type: string
                        enum:
                          - increase_budget
                          - decrease_budget
                          - pause
                          - resume
                          - replace_creative
                          - shift_spend
                          - rollback
                          - create_campaign
                          - create_ad_set
                          - create_ad
                          - upload_asset
                          - adjust_budget
                          - set_status
                          - duplicate_ad_with_creative
                          - duplicate_adset
                          - duplicate_ad_with_creative_v2
                      target_entity:
                        type: object
                        properties:
                          type:
                            type: string
                          id:
                            type: string
                          name:
                            type: string
                        required:
                          - type
                          - id
                      status:
                        type: string
                        enum:
                          - dry_run_unavailable
                      reason:
                        type: string
                    required:
                      - type
                      - target_entity
                      - status
                      - reason
          required:
            - actions
      required:
        - dry_run
      title: ActionDryRunRead
    ErrorMessage:
      type: object
      properties:
        message:
          type: string
      required:
        - message
      title: ErrorMessage
    ValidationError:
      type: object
      properties:
        message:
          type: string
        errors:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
      required:
        - message
        - errors
      title: ValidationError
  securitySchemes:
    workspaceSecret:
      type: http
      description: >-
        Per-workspace Server secret. It authenticates only the Signals workspace
        represented by the credential.
      scheme: bearer
    workspaceActionKey:
      type: http
      description: >-
        Workspace execution key with the propose-actions grant. Unbound keys
        select an available advertising account with account_id.
      scheme: bearer

````