Skip to main content
PATCH
Update a monitor's status, channels, or actions

Notes

  • To authenticate, you’ll need a Tako API key. It’s best practice to store it as an environment variable to avoid hardcoding sensitive credentials in your code.
  • Send status, channel_ids, or both. No other field changes after you create a monitor. To change a monitor’s type, parameters, or window, delete it and create a new one.
  • channel_ids replaces the monitor’s channels with the list you send. An empty list keeps the monitor recording firings, and delivers them to no channel. Every id must be a channel you own.
  • If the monitor’s active_until has already passed, resuming returns 400, because the monitor is expired rather than paused. Create a new monitor with a new window.
  • Resuming sets last_evaluation_outcome back to null, because the pause makes the earlier outcome meaningless.
  • If resuming would put you over your active monitor limit, this endpoint returns 400 with error_type: LIMIT_REACHED and a limit giving your cap. Pause or delete another monitor first. A monitor’s own paused slot never blocks its resume.
  • Pausing keeps the monitor and its firings. When you want to keep the history, pause the monitor instead of deleting it.

Authorizations

X-API-Key
string
header
required

Path Parameters

id
string<uuid>
required

Resource id

Body

application/json
status
enum<string> | null

Set paused to stop evaluating, or active to resume.

Available options:
active,
paused
channel_ids
string<uuid>[] | null

Replace the monitor's destinations with this set. Empty means the monitor keeps recording firings and delivers to none.

Maximum array length: 20
actions
Actions · object[] | null

Replace the monitor's actions with this list. An empty list removes every action. Each entry is an object with kind, that kind's parameters, and optionally channel_ids. channel_ids sets where the action's output goes: leave it out to use the monitor's channels, list channels you own to use those, or send an empty list to keep the output in Tako. Actions aren't available yet, so a non-empty list returns 400.

Maximum array length: 5

Response

One monitor

id
string<uuid>
required
name
string
required
type
string
required
parameters
Parameters · object
required

The parameters in the form createMonitor accepts, as this type's parameters_schema describes them. The ids Tako resolved them to never appear here. The names come back as Tako resolved them rather than as you typed them, so a stock monitor created with ticker aapl reads back ticker AAPL and the exchange MIC that resolution picked. A type whose input accepts more than one name for a subject can return a different one than you sent: a crypto monitor names the asset by coinmarketcap_id whichever name you created it with. A monitor Tako can no longer render against its type's current schema returns a reduced form; subject still names what it watches.

subject
Subject · object
required

The subject the type resolved from your parameters, such as the listing that a ticker matched, in the shape listMonitorTypes returns as subject_schema. Check it before you rely on the monitor. Tako resolves it once, when you create the monitor, and never re-resolves it, so it names what the monitor watches rather than what that subject is called today. Empty for a type that resolves no subject.

fire_once
boolean
required
status
enum<string>
required
Available options:
active,
paused
status_reason
enum<string> | null
required

Why Tako paused the monitor. Null while the monitor is active, and null when you paused it yourself.

Available options:
fired_once,
unloadable,
expired,
completed
active_from
string<date-time> | null
required
active_until
string<date-time> | null
required
last_evaluated_at
string<date-time> | null
required

When Tako last evaluated this monitor. Null until the first evaluation.

last_evaluation_outcome
enum<string> | null
required

How that evaluation ended. Null until the first evaluation, and null again after you resume a paused monitor, because the pause makes the earlier outcome meaningless. On an active monitor with no firings, a recent predates_monitor or before_window means the monitor is running and waiting for an occurrence that happens after you created it. no_occurrence means the type found no occurrence, which includes finding no usable data to compare.

Available options:
fired,
already_fired,
no_occurrence,
predates_monitor,
outside_lookback,
unloadable,
completed,
unknown_type,
inactive,
deleted,
expired,
before_window,
crashed
channel_ids
string<uuid>[]
required
actions
Actions · object[]
required

The monitor's actions as Tako stored them: the fields you set on each action, and channel_ids only on an action where you set it. A field you left out takes the kind's default when the action runs. Empty for a monitor with no actions.

created_at
string<date-time>
required
updated_at
string<date-time>
required