Skip to content

Execute an action

POST/v1/actions/{key}/executeKey scope write

Executes an action on a moderation or on an author and records it in the action log. The built-in author actions change the author's status; for an action of your own Infrared applies the queue behaviour, writes the log and emits action.executed, which is your signal to act. When the moderation has a review queue item, the action's queue_behavior is applied to it.

Needs a key with the write scope. Authentication

curl https://api.useinfrared.com/v1/actions/request_edits/execute \
  -H "Authorization: Bearer $INFRARED_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "moderation_id": "mod_63ajou7C7QWp0VYZDPRRvY",
    "value": "Remove the phone number and the request to pay by bank transfer."
  }'
201 CreatedResponse
{
  "object": "action_log",
  "id": "al_7VQAXTJn066PNllA80gZD3",
  "action_id": "act_2BdP4rjezzQ5PTND66nyLi",
  "action": "request_edits",
  "target_type": "moderation",
  "moderation_id": "mod_63ajou7C7QWp0VYZDPRRvY",
  "author_id": null,
  "queue_item_id": "qi_3mr0Fb23lDSkWuE29vDfTH",
  "actor_user_id": null,
  "source": "api",
  "value": "Remove the phone number and the request to pay by bank transfer.",
  "note": null,
  "created_at": "2026-10-08T09:29:18.969Z"
}

Path parameters

keystringRequired

Key of the action, for example reject, block_author or the key of a custom action.

Request body

moderation_idstring

Id of the moderation to act on: mod_ plus 22 base62 characters. Required for an action whose target is content.

author_idstring

Your id for the author to act on, up to 200 characters. Required for an action whose target is author, unless moderation_id names a moderation that has an author. An unknown id creates the author.

valueany

A value passed to the action, of any JSON type. Only actions with accepts_value set to true take one. The built-in block_author and suspend_author read a reason string, or an object with reason and until (ISO 8601).

notestring

A note of up to 4,000 characters, stored in the action log and, when the moderation has a review queue item, on that item.

Returns

The action log entry, with status 201.

  • 201 CreatedAn action log object

Errors

404
not_found

The project has no action with this key, or no moderation with this id.

409
action_disabled

The action is disabled.

422
validation_error

A content action was called without moderation_id, an author action without an author, value was sent to an action that does not accept one, or moderation_id is not a mod_ id.

Every endpoint can also answer the errors any request can meet: a missing key, a rate limit, a malformed body. Errors

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