Skip to main content
POST
Create a monitor

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.
  • type names a registered monitor type and parameters is validated against that type’s schema. Read List monitor types first, and build parameters from the type’s parameters_schema.
  • Every channel_ids entry must name a channel you own, so create the channel before the monitor. An id that names no channel of yours answers 404.
  • name is your label. Tako never fills one in and never reads it.
  • fire_once defaults to true, which pauses the monitor after its first firing. Set it false to fire on every new occurrence — a type that reports fire_once_only refuses that.
  • active_from defaults to the moment of creation. active_until must be in the future and after active_from.
A monitor never fires for something that already happened. A firing needs an occurrence that happens after the monitor exists, so creating a monitor is not a way to query history. Each type’s lookback_seconds in List monitor types says how far back an occurrence may have happened and still fire, and its description says how long its source takes to report one.

Check the resolved subject

The 201 is the only response that carries resolved — the subject the type matched from your parameters, such as the listing a ticker named. Get a monitor and List monitors don’t return it. Read it here and confirm the monitor watches what you meant before you rely on it.

When the subject is ambiguous

A 400 returns a MonitorCreateRejected with an error_type:
  • AMBIGUOUS_SUBJECT — your parameters could have meant more than one subject. candidates lists every one, best first. Narrow the parameters and retry.
  • BAD_REQUEST — anything else. candidates is empty.

Authorizations

X-API-Key
string
header
required

Body

application/json
type
string
required

A registered monitor type name, domain.subtype, for example stocks.pct_change.

Maximum string length: 64
parameters
Parameters · object
required

Validated against the type's parameter schema.

channel_ids
string<uuid>[]
required
Required array length: 1 - 20 elements
name
string
default:""

Your label for the monitor. Tako never fills one in, and never reads it.

Maximum string length: 255
fire_once
boolean
default:true

Pause the monitor after its first firing. Set false to fire on every new occurrence, which a type reporting fire_once_only refuses.

active_from
string<date-time> | null

Ignore occurrences before this instant. Null means from creation.

active_until
string<date-time> | null

Pause the monitor as expired after this instant. Null means no end. Must be after active_from and in the future.

Response

The created monitor, with the resolved subject this response alone returns

id
string<uuid>
required
name
string
required
type
string
required
parameters
Parameters · object
required
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 the evaluation rule last ran for 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 invalidated that verdict. An active monitor with no firings and a recent predates_monitor or before_window here is alive and waiting for an occurrence that happens after it was created. no_occurrence means the type read 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
created_at
string<date-time>
required
updated_at
string<date-time>
required
resolved
Resolved · object
required

The subject the type resolved from your parameters, for example the listing a ticker named. Check it before trusting the monitor; this response is the only one that carries it.