> ## 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.

# Propose actions

> Submit a governed proposal for an advertising account available to this workspace key. A matching idempotency key returns the saved batch.



## OpenAPI

````yaml https://plainrouter.com/openapi.json post /agent/workspaces/{workspace}/actions
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:
    post:
      tags:
        - ActionProposalApi
      summary: Propose actions
      description: >-
        Submit a governed proposal for an advertising account available to this
        workspace key. A matching idempotency key returns the saved batch.
      operationId: actions.api.propose
      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: Saved idempotent proposal.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ActionProposalRead'
        '201':
          description: New proposal created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ActionProposalRead'
        '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
    ActionProposalRead:
      type: object
      properties:
        proposal:
          type: object
          properties:
            id:
              type: string
            scope: {}
            evidence_provenance: {}
            status:
              type: string
              enum:
                - pending
                - approved
                - approved_without_execution
                - auto_approved
                - rejected
                - executing
                - executed_pending_verification
                - compensating
                - measuring
                - completed
                - failed
                - rolled_back
                - rollback_incomplete
                - blocked
                - halted
            policy_decision:
              type: string
              enum:
                - allow
                - require_approval
                - block
            policy_reasons:
              type: array
              items:
                type: string
            approval_required:
              type: boolean
            inbox_url:
              type: string
            approval_queue_url:
              type: string
            rationale:
              type: string
            proposed_by:
              type: object
              properties:
                type:
                  type: string
                id:
                  type: string
                name:
                  type:
                    - string
                    - 'null'
              required:
                - type
                - id
                - name
            actions:
              type: array
              items:
                type: object
                properties:
                  id:
                    type: string
                  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
                          - 'null'
                    required:
                      - type
                      - id
                      - name
                  params:
                    anyOf:
                      - type: object
                        additionalProperties: {}
                      - type: array
                        items: {}
                  rationale:
                    type: string
                  proposed_by:
                    type: object
                    properties:
                      type:
                        type: string
                      id:
                        type: string
                      name:
                        type:
                          - string
                          - 'null'
                    required:
                      - type
                      - id
                      - name
                  policy_decision:
                    type: string
                    enum:
                      - allow
                      - require_approval
                      - block
                  policy_reasons:
                    type: array
                    items:
                      type: string
                  policy_evidence: {}
                required:
                  - id
                  - type
                  - target_entity
                  - params
                  - rationale
                  - proposed_by
                  - policy_decision
                  - policy_reasons
                  - policy_evidence
          required:
            - id
            - scope
            - evidence_provenance
            - status
            - policy_decision
            - policy_reasons
            - approval_required
            - inbox_url
            - approval_queue_url
            - rationale
            - proposed_by
            - actions
      required:
        - proposal
      title: ActionProposalRead
    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

````