Skip to main content
POST
/
monitors
/
batch
Batch Action on Monitors
curl --request POST \
  --url https://api.exa.ai/monitors/batch \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "action": "delete",
  "filter": {
    "name": "<string>",
    "status": "active",
    "metadata": {}
  },
  "dry_run": true,
  "limit": 50
}
'
{
  "action": "delete",
  "affected": 123,
  "ids": [
    "<string>"
  ],
  "dry_run": true,
  "has_more": true
}

Authorizations

x-api-key
string
header
required

Body

application/json
action
enum<string>
required

The action to perform on matching monitors. delete permanently removes them, pause sets their status to paused, and unpause sets their status to active.

Available options:
delete,
pause,
unpause
filter
object
required

At least one filter field must be provided to prevent accidental bulk operations.

dry_run
boolean
default:true

When true, returns the monitors that would be affected without performing the action. Defaults to true.

limit
integer
default:50

Maximum number of monitors to process in a single request. Defaults to 50, maximum 500.

Required range: 1 <= x <= 500

Response

Batch action result

action
enum<string>
required

The action that was performed

Available options:
delete,
pause,
unpause
affected
integer
required

The number of monitors affected by the action

ids
string[]
required

The IDs of the monitors that were affected

dry_run
boolean
required

Whether this was a dry run

has_more
boolean
required

Whether there are more monitors matching the filter. If true, repeat the request to process the next batch.