---
title: "Simulate a rule."
method: POST
path: "/api/apps/{app}/rules/simulate"
tags: ["Rules"]
---

# Simulate a rule.

`POST /api/apps/{app}/rules/simulate`

## Path parameters

- `app` string, required

## Request body

- CreateRuleDto
  - `trigger` RuleTriggerDto, required
    - `triggerType` string, required
  - `action` RuleActionDto, required
    - `actionType` string, required

## Response `200`

Rule simulated.

- SimulatedRuleEventsDto
  - `_links` object, required — The links.
  - `total` integer, required — The total number of simulated rule events.
  - `items` SimulatedRuleEventDto[], required — The simulated rule events.
    - `eventId` string, guid, required — The unique event id.
    - `uniqueId` string, required — The the unique id of the simulated event.
    - `eventName` string, required — The name of the event.
    - `event` unknown, required
    - `enrichedEvent` unknown
    - `actionName` string, nullable — The data for the action.
    - `actionData` string, nullable — The name of the action.
    - `error` string, nullable — The name of the event.
    - `skipReasons` SkipReason[], required — The reason why the event has been skipped.

## Other responses

- `400` — Validation error.
- `404` — Rule or app not found.
- `500` — Operation failed.

---

[API](https://skmtc.net/squidex/apis/squidex-api.md) · [All operations](https://skmtc.net/squidex/apis/squidex-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/squidex/squidex-api/versions/b4a9b62f113a/schema)
