Skip to main content
PATCH
/
search-monitors
/
{id}
Update a Monitor
curl --request PATCH \
  --url https://api.exa.ai/search-monitors/{id} \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "name": "<string>",
  "status": "active",
  "search": {
    "query": "<string>",
    "numResults": 50,
    "contents": {
      "text": true,
      "highlights": true,
      "summary": true,
      "extras": {
        "links": 500,
        "imageLinks": 500,
        "richImageLinks": 500,
        "richLinks": 500,
        "codeBlocks": 500
      },
      "context": true,
      "livecrawl": "never",
      "livecrawlTimeout": 45000,
      "maxAgeHours": 123,
      "filterEmptyResults": true,
      "subpages": 50,
      "subpageTarget": "<string>"
    }
  },
  "trigger": {
    "type": "cron",
    "expression": "<string>",
    "timezone": "Etc/UTC"
  },
  "outputSchema": {
    "type": "text",
    "description": "<string>",
    "properties": {},
    "required": [
      "<string>"
    ],
    "additionalProperties": false
  },
  "metadata": {
    "team": "growth",
    "project": "competitor-tracking"
  },
  "webhook": {
    "url": "<string>",
    "events": [
      "monitor.created"
    ]
  }
}
'
{
  "id": "<string>",
  "object": "search_monitor",
  "name": "<string>",
  "status": "active",
  "search": {
    "query": "<string>",
    "numResults": 50,
    "contents": {
      "text": true,
      "highlights": true,
      "summary": true,
      "extras": {
        "links": 500,
        "imageLinks": 500,
        "richImageLinks": 500,
        "richLinks": 500,
        "codeBlocks": 500
      },
      "context": true,
      "livecrawl": "never",
      "livecrawlTimeout": 45000,
      "maxAgeHours": 123,
      "filterEmptyResults": true,
      "subpages": 50,
      "subpageTarget": "<string>"
    }
  },
  "trigger": {
    "type": "cron",
    "expression": "0 9 * * 1",
    "timezone": "Etc/UTC"
  },
  "outputSchema": {
    "type": "text",
    "description": "<string>",
    "properties": {},
    "required": [
      "<string>"
    ],
    "additionalProperties": false
  },
  "metadata": {
    "team": "growth",
    "project": "competitor-tracking"
  },
  "webhook": {
    "url": "<string>",
    "events": [
      "monitor.created"
    ]
  },
  "nextRunAt": "2023-11-07T05:31:56Z",
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z"
}

Authorizations

x-api-key
string
header
required

Path Parameters

id
string
required

The monitor ID

Body

application/json
name
string | null

Update the monitor name

status
enum<string>

Update the monitor status (can only set to active or paused)

Available options:
active,
paused

Partial search params to merge. All fields are optional for updates.

trigger
object

Update the schedule. Set to null to remove the schedule.

outputSchema
object

Controls the format of the run output. Defaults to { "type": "text" } if not specified. When type is "text", the output is a plain text summary. When type is "object", the output is structured JSON. If no properties are specified with "object" type, a schema is inferred automatically; otherwise the output adheres to the provided schema.

metadata
object

Update metadata. Set to null to remove.

Example:
{
  "team": "growth",
  "project": "competitor-tracking"
}
webhook
object

Partial webhook params to merge. All fields are optional for updates.

Response

The updated monitor

id
string
required

The unique identifier for the monitor

object
enum<string>
required

The type of object

Available options:
search_monitor
name
string | null
required

An optional display name

status
enum<string>
required

The status of the monitor. active monitors run on schedule and can be triggered manually. paused monitors can only be triggered manually. disabled monitors are auto-disabled after 10 consecutive authentication failures.

Available options:
active,
paused,
disabled
trigger
object
required

The cron-based schedule for automatic runs. Null if no schedule is set.

outputSchema
object
required

Controls the format of the run output. Defaults to { "type": "text" } if not specified. When type is "text", the output is a plain text summary. When type is "object", the output is structured JSON. If no properties are specified with "object" type, a schema is inferred automatically; otherwise the output adheres to the provided schema.

metadata
object
required

Optional key-value metadata for your own tracking

Example:
{
  "team": "growth",
  "project": "competitor-tracking"
}
webhook
object
required
nextRunAt
string<date-time> | null
required

When the next scheduled run will occur. Null if no trigger is set.

createdAt
string<date-time>
required

When the monitor was created

updatedAt
string<date-time>
required

When the monitor was last updated