{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://raw.githubusercontent.com/api-evangelist/plainrouter/main/json-schema/plainrouter-action-proposal-input-schema.json", "title": "ActionProposalInput", "x-generated": "2026-10-18", "x-method": "derived", "x-generator": "derive-json-schema.py", "x-source": "openapi/plainrouter-openapi.json#/components/schemas/ActionProposalInput", "properties": { "limit": { "description": "Maximum complete result actions; the shared JSON byte budget can return fewer.", "default": 25, "minimum": 1, "maximum": 100, "type": "integer" }, "cursor": { "description": "Continue using next_cursor. Read saved proposal actions with get_action_batch to avoid another write; dry runs repeat the same inputs.", "minimum": 0, "type": "integer" }, "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": { "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": [ "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": { "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": [ "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": { "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": [ "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": { "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": [ "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": { "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": [ "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": { "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": [ "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": { "additionalProperties": false, "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": { "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": [ "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": { "additionalProperties": false, "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": { "additionalProperties": false, "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_inventory_metrics", "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" }, "workspace_id": { "minimum": 1, "type": "integer" } }, "type": "object", "required": [ "actions", "rationale", "idempotency_key", "evidence", "target_source" ] }