---
title: "Evaluate a trigger definition with inline input"
method: POST
path: "/triggers:run"
tags: ["Triggers"]
---

# Evaluate a trigger definition with inline input

`POST /triggers:run`

Requires a user Bearer JWT; partner assertion alone is not sufficient.

## Request body

- RunTriggerRequest
  - `trigger` union, required
    - object
      - `type` 'manual', required
      - `config` ManualTriggerConfig, required — User-initiated trigger; no chain context.
        - `data` unknown
        - `headers` object — HTTP headers (for webhook testing).
        - `pathParams` object — Path parameters (for webhook testing).
        - `lang` 'javascript' | 'json' | 'graphql' | 'handlebars', required — Language/format of an inline payload (e.g., custom code source, manual trigger data). Mirrors the proto `Lang` enum minus the `LANG_` prefix. Wire values are lowercase.
    - object
      - `type` 'fixedTime', required
      - `config` FixedTimeTriggerConfig, required — Fires at one or more absolute Unix-epoch milliseconds.
        - `epochs` integer[], required
    - object
      - `type` 'cron', required
      - `config` CronTriggerConfig, required — Fires on one or more cron schedules.
        - `schedules` string[], required
        - `timezone` string — IANA timezone (e.g., `UTC`, `America/New_York`). Default UTC.
    - object
      - `type` 'block', required
      - `config` BlockTriggerConfig, required — Fires every N blocks on the target chain.
        - `interval` integer, required — Fire every N blocks.
        - `chainId` integer, required — Numeric chain ID (e.g. 11155111 for Sepolia, 8453 for Base). On chain-aware trigger/node configs this is required and must be a configured chain; on query/filter params it is optional.
    - object
      - `type` 'event', required
      - `config` EventTriggerConfig, required — Fires when matching on-chain events are observed.
        - `queries` EventTriggerQuery[], required
          - `addresses` EthereumAddress[] — Contract addresses to filter events from. Empty matches any contract.
          - `topics` string[] — Topic filters (`topics[0]` is the event signature, `topics[1..]` are indexed parameter values). `null` means wildcard at that position.
          - `maxEventsPerBlock` integer — Safety ceiling per query per block. Exceeded → task cancelled.
          - `contractAbi` unknown[] — Contract ABI entries (JSON form) for event decoding.
            - unknown
          - `conditions` EventCondition[] — Filters applied to decoded event data.
            - `fieldName` string, required
            - `operator` 'eq' | 'ne' | 'gt' | 'gte' | 'lt' | 'lte' | 'contains', required
            - `value` string, required — Value to compare against, encoded as a string. The operator parses it according to `fieldType` (e.g. `int256` / `uint256` → big.Int, `address` → checksummed hex, `bool` → "true"/"false"). Matches the proto `EventCondition.value`, which is also a string.
            - `fieldType` string
          - `methodCalls` EventMethodCall[] — Method calls used to enrich decoded event data (e.g., `decimals`).
            - `methodName` string, required
            - `callData` string — Arbitrary-length hex-encoded byte string.
            - `applyToFields` string[]
            - `methodParams` string[]
        - `cooldownSeconds` integer — Seconds to wait after a fire before allowing the same task to trigger again. Default 300. 0 disables cooldown.
        - `chainId` integer, required — Numeric chain ID (e.g. 11155111 for Sepolia, 8453 for Base). On chain-aware trigger/node configs this is required and must be a configured chain; on query/filter params it is optional.
  - `triggerInput` InputVariables — Free-form key-value bag of values used to resolve `{{variable.path}}` template references inside trigger and node configs. Conventional well-known keys: `settings.runner` (smart wallet address), `settings.chainId` (chain id). camelCase keys; back-compat support for snake_case keys exists during the migration window.

## Response `200`

Trigger evaluation result.

- RunTriggerResponse
  - `success` boolean, required
  - `error` string
  - `errorCode` string
  - `output` unknown
  - `metadata` unknown

## Other responses

- `400` — Request validation failed.
- `401` — Missing or invalid bearer token.

---

[API](https://skmtc.net/avaprotocol/apis/ava-protocol-avs-api.md) · [All operations](https://skmtc.net/avaprotocol/apis/ava-protocol-avs-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/avaprotocol/ava-protocol-avs-api/revisions/caa86e825f53/schema)
