Headers
The request body
A channel whosekind is webhook receives JSON in this shape:
monitor carries id, name, type, and parameters, which is the stored parameter object rather than the input you sent to Create a monitor. A type that resolves a subject stores the resolved value, so a monitor you created with a ticker carries a trading_item_id.
firing carries id, occurrence_key, occurred_at, and trigger:
occurrence_keyidentifies the occurrence. Tako records one firing per key per monitor, so a source that reposts the same occurrence doesn’t fire twice.occurred_atis when the occurrence happened in the data.created_atis when Tako recorded it. The gap between them is however long the source took to report.triggersays what woke the monitor.push, meaning new data arrived, is the only value Tako sends today.
Verify the signature
Tako signs the concatenation of the delivery id, the timestamp, and the raw request body, joined with periods:secret after the whsec_ prefix. The signature is v1, followed by the base64 HMAC-SHA256 digest.
Sign the bytes you received, not a re-serialized object. Tako sends compact JSON with no spaces after separators, and any reformatting breaks the signature.
webhook-timestamp far from the current time so an attacker can’t replay an old delivery.
How Tako retries
Tako allows 10 seconds for a response, and doesn’t follow redirects.
A delivery gets 6 attempts: the first one, then retries after 1 minute, 5 minutes, 15 minutes, 1 hour, and 2 hours 45 minutes. Tako stops retrying a delivery more than 4 hours 30 minutes old, even when attempts remain.
Respond
2xx as soon as you’ve stored the delivery, and do the slow work afterwards. A receiver that works for longer than 10 seconds gets retried, and receives the firing again.
After 2 consecutive failed deliveries, Tako pauses the channel and sets its status_reason to delivery_failures. Monitors that post to a paused channel keep evaluating and recording firings, and those firings reach no one. Fix the destination, then resume the channel, which clears the consecutive-failure count.
To see how each delivery went, call List a monitor’s firings and read deliveries.
Payload fields by monitor type
payload is a flat object of strings, numbers, booleans, and nulls. The fields depend on the monitor’s type.
stocks.pct_change
stocks.pct_change
stocks.crosses
stocks.crosses
stocks.new_52w_extreme
stocks.new_52w_extreme
crypto.crosses
crypto.crosses
sports.game_start
sports.game_start
sports.game_result
sports.game_result
sports.score_event
sports.score_event
sports.odds_crosses
sports.odds_crosses
The fields a type sends are its contract. Tako can add a field, which your receiver should ignore, and removing one is a breaking change. While monitors is experimental, these shapes can change without a deprecation window.
Slack workflow bodies
A channel whosekind is slack_workflow receives a flat body of strings instead, because a Slack Workflow Builder trigger rejects nested values:
payload, so a receiver that needs the values that caused the firing needs a webhook channel. Tako signs and retries both kinds the same way.
What Tako accepts as a URL
Create a notification channel rejects aurl that:
- Doesn’t use
https. - Uses a port other than 443 or 8443.
- Embeds credentials, as in
https://user:pass@example.com/hook. - Has a host that doesn’t resolve.
- Has a host that resolves to a loopback, link-local, multicast, private, reserved, or shared address.
url in the response to see what Tako posts to.