Operations
Update a monitor
Pause, resume, change the frequency or the webhook. A failed PATCH is safe to repeat.
PATCH/v1/monitors/{monitor_id}
Send your API key as Authorization: Bearer. See Authentication. How each option works: Monitors.
Path parameter
monitor_id- The ID of the monitor, from the response that created it.
Request body
Send one or more fields. You cannot change query: end the monitor and create a new one.
statuspausedpauses the monitor.activeresumes it.frequency- A new frequency:
1h,6h,12h,1dor7d. webhook_url- A new webhook URL. The response gives a new
webhook_secret.nullremoves the webhook.
Response
200
id- The ID of the monitor.
query- What the monitor watches for.
frequency- How often Telem runs the query.
statusactive: Telem runs the query on the schedule.paused: you paused it.ended: its end time passed, or its API key was revoked or expired, and it does not run again. A monitor that nobody polls stops its runs but still showsactive: see Monitors.session_id- The session where Telem records your polls.
created_at- When you created the monitor.
last_polled_at- Your last poll or delivered webhook, or
null. expires_at- When the monitor ends, or
nullwithout attl. webhook_url- Where Telem sends new results, or
null. webhook_secret- The secret to check webhook requests with. Only the response that sets
webhook_urlhas it, so keep it. agent_note- Only in the answer to a create: why the monitor agent did not start, or
null. The monitor then runs without an agent.
Errors
| Status | Code | When |
|---|---|---|
400 | invalid_request | The body is empty, or a field is not correct, such as a frequency that is not in the list. Or a provider no longer has this monitor: sending the request again will not help, so end the monitor and create a new one. |
400 | query_immutable | The body has query. |
401 | unauthorized | The API key is missing or not valid. |
403 | The API key has no access to monitors. | |
404 | not_found | The monitor does not exist, or another API key created it. |
429 | rate_limited | Your key went over its requests-per-minute cap, or Telem is busy. Wait for the seconds in Retry-After, then try again. |
503 | unavailable | Telem cannot run monitors now. Try again later. |
409 | poll_in_progress | Another call uses this monitor now. Try again. |
409 | monitor_ended | The monitor has ended: its end time passed, or its API key was revoked or expired. Its results stay readable. Create a new monitor. |
409 | pause_not_supported | This monitor cannot make this change, because one of its sources does not support it. Nothing changed. update_not_supported is the same for other changes. |
502 | unavailable | The change failed. Send the same request again: a repeat is safe. |
What each error means and what to do: Errors.