Skip to content

Actions

An action is what a decision turns into. Allow, reject, change an author's status or define your own, and act on the webhook each run sends.

An action is what a decision becomes: allow, reject, a change of an author's status, or an operation you define, such as asking a seller to edit a listing. A reviewer runs one from an item of the review queue. Your backend runs one through the API.

Infrared changes nothing in your product. Running an action applies its effect inside Infrared (the queue item, the author's status), writes a log entry and sends the action.executed webhook event. Your backend acts on that event.

Here a custom action, request_edits, runs on a listing that is waiting in the queue:

curl https://api.useinfrared.com/v1/actions/request_edits/execute \
  -H "Authorization: Bearer $INFRARED_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "moderation_id": "mod_6IYSa2qBKpMi4Xnxm1jkOB",
    "value": {
      "reason": "off_platform_link",
      "message": "Remove the link from the description."
    },
    "note": "Second listing from this seller with an outside link."
  }'
201 CreatedJSON
{
  "object": "action_log",
  "id": "al_2vl5zS0SnY5XqWDjRROnpk",
  "action_id": "act_2BdP4rjezzQ5PTND66nyLi",
  "action": "request_edits",
  "target_type": "moderation",
  "moderation_id": "mod_6IYSa2qBKpMi4Xnxm1jkOB",
  "author_id": null,
  "queue_item_id": "qi_0eietVVV87wOZub5qkiPfU",
  "actor_user_id": null,
  "source": "api",
  "value": {
    "reason": "off_platform_link",
    "message": "Remove the link from the description."
  },
  "note": "Second listing from this seller with an outside link.",
  "created_at": "2026-10-08T08:48:22.177Z"
}
One execution, in order
Sample data
POST /v1/actions/request_edits/executeOr a reviewer picks Request edits on a queue item.
  1. Checks

    Enabled, has its target, value allowed.Else 409 action_disabled or 422, and nothing below runs.

    Passed:OK
  2. Built-in effect

    Only block_author, suspend_author and enable_author have one.

    Nothing to apply:None for a custom action
  3. Queue behaviourResolve

    Item qi_0eietVVV87wOZub5qkiPfU becomes resolved.

    resolution: "action:request_edits"queue_item.actioned
  4. Log entry

    One entry a run.

    al_2vl5zS0SnY5XqWDjRROnpksource: "api"
  5. Webhook

    action.executed
    sent to your endpoint
    Your backendAsks the seller to edit listing_20932.

Sample data

What one execution does, in order.

Built-in actions

Every project starts with five.

KeyRuns onQueue itemWhat Infrared does
allowContentResolvedResolves the item as allowed.
rejectContentResolvedResolves the item as rejected.
block_authorAuthorKeptSets the author's status to blocked.
suspend_authorAuthorKeptSets the status to suspended.
enable_authorAuthorKeptSets the status back to enabled.

block_author and suspend_author accept a value: a string is the reason, an object is { "reason": "...", "until": "2026-10-13T00:00:00Z" }. Only suspend_author reads until.

A built-in can be renamed, hidden from the dashboard or disabled, never deleted. Disabling allow or reject makes the Allow and Reject buttons of the queue, and resolution in the API, answer 409 action_disabled.

Custom actions

A custom action names something your product does: request edits, hide a listing, warn a seller. Create it in the dashboard under Actions, with Create action. The API runs actions and does not create or edit them.

The Actions page: five built-in and three custom actions with their targets and queue behaviour, and the recent executions under them.
Dashboard, ActionsThe project's actions, built-in and custom, and the latest executions.
SettingWhat it decides
NameWhat reviewers see in the queue.
KeyHow the API and the webhook name the action: lowercase letters, digits and underscores, 2 to 64 characters, starting with a letter. It cannot change later.
TargetContent runs on a moderation. Author runs on an author.
Queue behaviourWhat happens to the moderation's queue item, below.
Visible in dashboardWhether reviewers find it under More actions on a queue item. A hidden action still runs through the API.
Accepts a valueWhether a run may carry a value: a reason, a date, a message.
Queue behaviourEffect on the item
Resolve the queue itemAn open item becomes resolved, with action: and the key as its resolution.
Keep it in the queueThe item stays as it is. A note sent with the run is attached to it.
Reopen a resolved itemA resolved item becomes reopened.

Infrared does not check a value: whatever JSON a run carries goes to the log and the webhook as it is. Validate it in your handler. The value_schema field of an action object is not used today.

Run an action

In the dashboard, actions run from a queue item: Allow and Reject are buttons, the rest are under More actions. The Actions page itself has no run button.

Through the API, name the action in the path and say what it runs on.

moderation_idstring

The moderation to act on. Required for an action whose target is content.

author_idstring

The author to act on, as your own id. Required for an action whose target is an author, unless moderation_id names a moderation that has one. An id Infrared has not seen creates the author.

valueany

Allowed only when the action accepts a value.

notestring

Up to 4,000 characters, kept with the log entry.

GET /v1/actions lists the project's enabled actions, hidden ones included.

StatusCodeWhen
404not_foundNo action has that key, or the moderation is not in this project.
409action_disabledThe action is disabled.
422validation_errorA content action without moderation_id, an author action without an author, or a value sent to an action that takes none.

Execute ignores the Idempotency-Key header, so a retried request runs the action again and sends the event again. Make your handler safe to run twice.

What your backend receives

The run above sent this event:

action.executed, trimmedJSON
{
  "id": "evt_4m24Cq6qE5xjatO20hxDK6",
  "type": "action.executed",
  "created_at": "2026-10-08T08:48:22.365Z",
  "api_version": "2026-09-01",
  "data": {
    "value": {
      "reason": "off_platform_link",
      "message": "Remove the link from the description."
    },
    "action": {
      "id": "act_2BdP4rjezzQ5PTND66nyLi",
      "key": "request_edits",
      "name": "Request edits",
      "target": "content",
      "built_in": false,
      "accepts_value": true,
      "queue_behavior": "resolve"
    },
    "source": "api",
    "author_id": null,
    "content_id": "listing_20932",
    "executed_at": "2026-10-08T08:48:22.177Z",
    "moderation_id": "mod_6IYSa2qBKpMi4Xnxm1jkOB",
    "queue_item_id": "qi_0eietVVV87wOZub5qkiPfU"
  }
}

data.action is the whole action object, shortened here, and content_id is the id you sent with the moderation. source is api or dashboard.

author_id is Infrared's id of the author, starting with aut_, not the id you use. The API looks authors up by your id only, so keep both ids from the moderation response, or send yours in value.

Other events can come first. An action that resolves a queue item sends queue_item.allowed, queue_item.rejected or queue_item.actioned before it: this run sent queue_item.actioned, with the resolution action:request_edits. A built-in author action sends author.blocked, author.suspended or author.enabled before it.

A status change made on an author's page or with the author endpoints is not an action. It sends its author.* event only, so follow status through those events, not through action.executed.

The action log

Every run adds one entry, and entries never change. Recent executions on the Actions page lists them with the action, the target, the source, the note and who ran it. An author's page lists the runs on that author.

The API returns the entry as the answer to execute and has no endpoint that lists the log. GET /v1/webhooks/events?type=action.executed lists the same runs as events for 30 days, whether or not a webhook endpoint exists.

Who can do what

In the dashboard, creating, editing, disabling and deleting an action needs the Developer role or one above it. Any member can run an action from a queue item. An API key needs the read scope to list actions and the write scope to execute one.

Next

Something missing or unclear on this page? Write to support@useinfrared.com.