read
automation

Run an action through the store's own gates against its real state, and keep nothing.

Changed on

Returns what each gate would decide — store_rail (the merchant's own rules), policy (kill switch, dry-run, automation, rate limits, credit budget), ownership (who holds the field, via field), and ceiling:ad_spend / ceiling:money_out (the company ceilings, via spend or money_out) — each as allow, clamp, review, deny, not_evaluated or unavailable, plus the refusals and clamps collected. The run is one database transaction that is always aborted; shadow.status reports aborted or the call fails. mode and autonomy default to the store's marketing plan and may be set to ask a what-if. would_run is the one field to branch on. Differs from /api/v1/preflight, which is public, reads no store, and judges against the published guardbook only.

post/api/v1/simulate

Request

  • Base URL
    https://app.magistry.io
  • Auth
    • HTTP bearer
    • or OAuth 2
      Authorization codehttps://app.magistry.io/api/oauth/authorize
      Token URLhttps://app.magistry.io/api/oauth/token
      Scopesautomation:read

Request body

object required
store_id, string uuid

The store to simulate against. Defaults to the store the credential was issued for.

domain, string required

e.g. ads_google, pricing, feed.

action, string required

The verb, e.g. adjust_budget.

facts, object

What the store's rules match on (e.g. discount_pct, budget_change_pct).

confidence, number
reversibility_class, 'reversible' | 'compensatable' | 'irreversible'
mode, 'off' | 'dry_run' | 'approval_only' | 'autopilot'
autonomy, 'conservative' | 'moderate' | 'aggressive'
rate_action, string
automation_feature, string
kill_scope, string
estimated_llm_cost_usd, number
field, object

The field this action writes. Ownership is asked for the calling app.

spend, object

A store-wide daily ad spend to check against the ad-spend ceilings.

money_out, object

Money leaving the store (a refund, a credit) to check against the refund ceilings.

Response

Result

object required
ok, boolean required
result, unknown required

Changes

    • warning

      added the new method_not_allowed enum value to the error response property for the response status

    • warning

      added the new method_not_allowed enum value to the error response property for the response status

    • warning

      added the new method_not_allowed enum value to the error response property for the response status

    11 more changes in this revision