Skip to content

Operations

Create a monitor

Create a monitor for one query. It is all or nothing: if the call fails, no monitor exists.

POST/v1/monitors

Send your API key as Authorization: Bearer. See Authentication. How each option works: Monitors.

Request body

querystring
What to watch for, as a plain sentence. You cannot change it later.
options.frequencystringdefault "1d"
How often Telem runs the query: 1h, 6h, 12h, 1d or 7d.
options.include_domainsstring[]1 to 20 items
Only results from these sites and their subdomains, such as sec.gov. Host names only.
options.searchobject
Also search the web for the query on each run, with these options. {} uses the default search. See Monitors.
options.search.num_resultsintegerdefault 101 to 20
Results for each provider on each run.
options.search.tierstringdefault "default"one of minimalist, default, extended, max
Which fields each result has.
webhook_urlstringat most 2048 characters
An https URL. Telem sends the new results to it. See Get results by webhook.
ttlstring
How long the monitor lives, such as 12h or 7d, at most 30d. Without it, the monitor does not expire.
agentbooleandefault true
The monitor agent checks every result against the query and keeps the ones that match. You read what it keeps in the console. Send false to create the monitor without an agent.
More fields: metadata
metadataobject
Query lineage keys, as in a search.

Response

201

idstring (UUID)
The ID of the monitor.
querystring
What the monitor watches for.
frequencystring
How often Telem runs the query.
statusstringone of active, paused, ended
active: 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 shows active: see Monitors.
session_idstring (UUID)
The session where Telem records your polls.
created_atstring (date-time)
When you created the monitor.
last_polled_atstring (date-time) or null
Your last poll or delivered webhook, or null.
expires_atstring (date-time) or null
When the monitor ends, or null without a ttl.
webhook_urlstring or null
Where Telem sends new results, or null.
webhook_secretstring or null
The secret to check webhook requests with. Only the response that sets webhook_url has it, so keep it.
agent_notestring or null
Only in the answer to a create: why the monitor agent did not start, or null. The monitor then runs without an agent.

Errors

StatusCodeWhen
400invalid_requestA field is not correct, such as a frequency that is not in the list, or a search provider refused the request. In that case, sending it unchanged will not help.
400invalid_sessionThe session in metadata is not correct.
402payment_requiredThe account cannot pay for the monitor. The message says why.
422invalid_requestThe body is not valid. For example: an unknown field, an empty query, a webhook_url that is not https, a ttl that is not correct, or an options.search option that the monitor sets itself.
401unauthorizedThe API key is missing or not valid.
403The API key has no access to monitors.
429rate_limitedYour key went over its requests-per-minute cap, or Telem is busy. Wait for the seconds in Retry-After, then try again.
503unavailableTelem cannot run monitors now. Try again later.
500internal_errorTelem could not create the monitor. No monitor exists. Try again.
502unavailableThe monitor failed. You can send the same request again.

What each error means and what to do: Errors.

Was this page helpful?