Skip to content

Webhooks API

Register HTTPS endpoints to receive real-time notifications when agents, events, or proposals change. Chronary signs every delivery with HMAC-SHA256 and retries failed deliveries with a fixed backoff schedule.

POST /v1/webhooks
FieldTypeRequiredDescription
urlstringYesHTTPS URL to receive webhook deliveries
eventsstring[]YesAt least one event type (see Event catalog below)
  • event.created — event created with status=confirmed or tentative
  • event.updated
  • event.deleted
  • event.started — fires at the scheduled start_time of a confirmed event
  • event.ended — fires at the scheduled end_time of a confirmed event
  • event.reminder — fires ahead of a confirmed event’s start_time, one per configured reminder offset
  • event.hold_created — tentative hold placed
  • event.hold_expired — hold auto-expired by TTL or pre-empted by higher-priority hold
  • event.hold_released — hold manually released via /release
  • event.hold_confirmed — hold promoted to confirmed event via /confirm
  • agent.created
  • agent.updated
  • proposal.created
  • proposal.responded
  • proposal.confirmed
  • proposal.expired
  • proposal.cancelled
  • org.plan_changed — the account’s plan changed (upgrade, downgrade, or subscription end)
  • calendar_connection.reauthorization_required — a connected human calendar stopped accepting access
  • usage.threshold_crossed — a monthly usage metric reached 50, 80, 90, 95 or 100% of your plan’s limit
Terminal window
curl -X POST https://api.chronary.ai/v1/webhooks \
-H "Authorization: Bearer chr_sk_your_key_here" \
-H "Content-Type: application/json" \
-d '{
"url": "https://your-server.com/webhooks/chronary",
"events": ["event.created", "event.updated", "event.deleted"]
}'
{
"id": "whk_01H9X4A1B2C3D4E5F6",
"orgId": "org_01H9X4M2P5R8T6V0",
"url": "https://your-server.com/webhooks/chronary",
"events": ["event.created", "event.updated", "event.deleted"],
"active": true,
"consecutiveFailures": 0,
"firstFailureAt": null,
"deactivatedAt": null,
"deactivatedReason": null,
"previousSecretExpiresAt": null,
"createdAt": "2026-04-04T12:00:00Z",
"secret": "whsec_abc123..."
}

deactivatedAt and deactivatedReason say when and why the endpoint last went inactive, and are null while it is active. The reason is manual (you paused it), circuit_breaker (too many failed deliveries in a row), unsafe_destination_url (the URL points to a private or local address) or account_deletion (an account deletion is scheduled).

The secret is only returned on creation — save it for HMAC signature verification. To replace it later, rotate the signing secret; previousSecretExpiresAt is set while the old secret still works after a rotation.

A retry with the same Idempotency-Key returns the stored 201 response, secret included, once the first request has finished. A retry that arrives while the first request is still running, or after it failed partway, gets 409 idempotency_conflict instead: the message names the webhook that request created. Retry with the same key a moment later, or delete that webhook and create a new one with a new key. A new secret is never returned for a webhook that already exists.

StatusTypeCause
400validation_errorInvalid URL or request body
403anonymous_org_restrictedA claimable organization can’t create webhook endpoints until it is claimed
409webhook_endpoint_capThe plan’s webhook endpoint limit is reached. Carries metric, limit, docs_url, and upgrade_url or contact_url
409idempotency_conflictAn earlier request with this Idempotency-Key created the webhook and is still running or never finished. The message names the webhook

GET /v1/webhooks
ParameterTypeDefaultDescription
limitinteger201–100
offsetinteger0Pagination offset, at most 10,000
expandstring—Comma-separated extras for each endpoint: last_delivery, failures_24h

Endpoints are listed oldest first.

With expand, each endpoint gains the fields you asked for. Without it the response is unchanged.

FieldDescription
last_deliveryThe newest delivery to the endpoint as { id, status, attempted_at, response_status }, or null when it has none. attempted_at and response_status are null before the first attempt.
failures_24hFailed deliveries created in the last 24 hours. Test events are not counted.
Terminal window
curl "https://api.chronary.ai/v1/webhooks" \
-H "Authorization: Bearer chr_sk_your_key_here"

GET /v1/webhooks/:id
StatusTypeCause
404not_foundWebhook not found

PATCH /v1/webhooks/:id
FieldTypeDescription
urlstringNew delivery URL
eventsstring[]New event type list
activebooleanEnable/disable deliveries

Pausing (active: false on an active endpoint) sets deactivatedAt and deactivatedReason: "manual". Retries that were still queued for the endpoint end as failed with last_error_code: "endpoint_disabled", and no further deliveries are sent until you re-enable it.

Changing url applies to deliveries already queued: retries that were waiting for the old URL go to the new one.

Re-enabling (active: true on an inactive endpoint) starts the endpoint clean: the URL is checked again, and consecutiveFailures, firstFailureAt, deactivatedAt and deactivatedReason are cleared, so one more failure can’t disable it again at once. Deliveries that were cancelled while it was inactive are not resent. Before re-enabling a disabled endpoint, send a test event to check your fix. Sending active: true to an endpoint that is already active changes nothing.

Terminal window
curl -X PATCH https://api.chronary.ai/v1/webhooks/whk_01H9X4A1B2C3D4E5F6 \
-H "Authorization: Bearer chr_sk_your_key_here" \
-H "Content-Type: application/json" \
-d '{ "active": false }'
StatusTypeCause
400validation_errorInvalid body, or re-enabling with a private or local URL, or re-enabling while an account deletion is scheduled
404not_foundWebhook not found

DELETE /v1/webhooks/:id

Returns 204 No Content.

StatusTypeCause
404not_foundWebhook not found

Inspect delivery history for a subscription — useful for diagnosing failures, confirming events were received, or auditing retry counts.

GET /v1/webhooks/:id/deliveries

Auth: Organization key only. Agent keys (chr_ak_*) return 403.

Finished deliveries (delivered, failed or dropped) are kept for 90 days, then deleted with their attempt log. Their payloads are removed earlier, after 30 days. Pending deliveries are kept until they finish.

ParameterTypeDefaultDescription
limitinteger20Results per page (1–100)
offsetinteger0Pagination offset, at most 10,000. Cannot be combined with cursor.
cursorstring—The next_cursor from the previous page
statusstring—Filter by status: pending, delivered, failed or dropped
event_typestring—An exact event type (event.created), or a prefix ending in a dot (event.) for every type in that group
created_afterstring—Only deliveries created at or after this time (ISO 8601; Z or a numeric offset)
created_beforestring—Only deliveries created before this time (ISO 8601; Z or a numeric offset). Must be later than created_after.
delivery_idstring—Only the delivery with this id (whd_…)
is_testboolean—true for test events only, false to leave them out
include_payloadbooleanfalseInclude the full event payload in each delivery record. Pass true or false — do not omit the value, as some query string parsers treat the bare key as truthy.

Deliveries are listed newest first. To page through them, pass each response’s next_cursor as cursor until has_more is false. Cursor paging stays stable while new deliveries arrive; offset paging still works but can skip or repeat rows when deliveries are added between requests.

{
"data": [
{
"id": "whd_01H9X4M2P5R8T6V0",
"subscription_id": "whk_01H9X4M2P5R8T6V0",
"event_type": "event.created",
"status": "failed",
"attempts": 3,
"last_attempt_at": "2026-04-18T10:00:00.000Z",
"next_retry_at": null,
"created_at": "2026-04-18T09:55:00.000Z",
"last_response_status": 503,
"last_error_code": "non_2xx",
"last_duration_ms": 87,
"is_test": false,
"replay_of_delivery_id": null
}
],
"total": 42,
"limit": 20,
"offset": 0,
"next_cursor": "WyIyMDI2LTA0LTE4IDA5OjU1OjAwLjEyMzQ1NiswMCIsIndoZF8wMUg5WDRNMlA1UjhUNlYwIl0",
"has_more": true,
"stats": {
"pending": 2,
"delivered": 35,
"failed": 5,
"dropped": 0
}
}

payload is absent unless include_payload=true is specified.

total counts the deliveries that match your filters. next_cursor is null on the last page.

stats reflects all-time counts for this webhook — not filtered by the query params. Use it to render a success-rate summary without additional requests.

On the Free plan and the Developer plan, once the monthly webhook delivery limit is reached, further deliveries are not sent. Each one is still recorded, with status: "dropped" and last_error_code: "quota_exceeded", so you can see what was missed. Dropped deliveries are never retried and do not count toward the limit. After you upgrade to Developer or Pro, you can replay them. When an event goes to several endpoints and only some fit under the limit, the endpoints created first are served first. Pro and Custom plans never drop deliveries: their monthly delivery limit is soft.

replay_of_delivery_id is set on a replay: the ID of the original delivery. It is null on every other delivery.

last_response_status, last_error_code and last_duration_ms describe the most recent attempt. They are null before the first attempt, and last_response_status is null when no response was received. See error codes.

StatusTypeCause
400validation_errorInvalid query value, cursor combined with a non-zero offset, created_after not before created_before, or a cursor that is not one we issued (Invalid cursor)
403forbiddenCalled with an Agent key
404not_foundWebhook not found or not owned by caller

Fetch one delivery with its payload and every attempt, oldest first. Each attempt records the HTTP status your endpoint returned, how long it took to respond, the first 2 KB of the response body and an error code.

GET /v1/webhooks/:id/deliveries/:delivery_id

Auth: Organization key only. Agent keys (chr_ak_*) return 403.

{
"id": "whd_01H9X4M2P5R8T6V0",
"subscription_id": "whk_01H9X4M2P5R8T6V0",
"event_type": "event.created",
"status": "pending",
"attempts": 2,
"max_attempts": 4,
"last_attempt_at": "2026-04-18T10:01:00.000Z",
"next_retry_at": "2026-04-18T10:06:00.000Z",
"created_at": "2026-04-18T10:00:00.000Z",
"last_response_status": 503,
"last_error_code": "non_2xx",
"last_duration_ms": 87,
"is_test": false,
"replay_of_delivery_id": null,
"payload": { "calendar_id": "cal_abc", "event": { "id": "evt_abc" } },
"payload_redacted": false,
"request_headers": {
"content-type": "application/json",
"x-delivery-id": "whd_01H9X4M2P5R8T6V0",
"x-chronary-event-type": "event.created"
},
"attempt_log": [
{
"id": "wha_01H9X4M2P5R8",
"attempt_number": 1,
"started_at": "2026-04-18T10:00:00.000Z",
"duration_ms": 10000,
"response_status": null,
"response_body": null,
"error_code": "timeout"
},
{
"id": "wha_01H9X4M2P5R9",
"attempt_number": 2,
"started_at": "2026-04-18T10:01:00.000Z",
"duration_ms": 87,
"response_status": 503,
"response_body": "Service Unavailable",
"error_code": "non_2xx"
}
]
}
FieldDescription
max_attemptsAttempts your current plan allows. A delivery keeps the retry schedule it started with, so after a plan change this can differ from the schedule the delivery follows.
payload_redactedtrue when the payload was replaced by a redaction marker. Payloads of finished deliveries are kept for 30 days.
request_headersThe headers sent on every attempt. X-Signature-V2, X-Signature-V2-Previous, X-Signature, X-Signature-Previous and X-Timestamp change on each attempt and are not stored. A replay also lists x-chronary-replay-of.
attempt_logEvery attempt, oldest first. attempts is the count; attempt_log is the detail.
attempt_log[].duration_msTime until your endpoint returned response headers. null when no request was made.
attempt_log[].response_bodyUp to the first 2,048 bytes of your endpoint’s response body; null when it was empty, and cleared 30 days after the attempt. Response headers are never stored.

Deliveries sent before attempt recording began have an empty attempt_log.

CodeMeaning
timeoutYour endpoint didn’t answer within 10 seconds
connection_errorThe connection failed (for example, DNS lookup or connection refused)
tls_errorThe TLS handshake failed, for example because of an invalid certificate
redirect_not_followedYour endpoint answered with a 3xx redirect. Redirects are not followed; point the webhook at the final URL.
unsafe_destination_urlThe URL points to a private or local address, so no request was made
non_2xxYour endpoint answered with a status outside 200–299

A delivery’s last_error_code can also be endpoint_disabled: the endpoint was paused or disabled before the delivery was sent, so it was cancelled without a request. Or it can be quota_exceeded: the delivery was dropped by the Free plan monthly limit.

StatusTypeCause
403forbiddenCalled with an Agent key
404not_foundDelivery not found, or it belongs to another webhook or organization

Send a signed sample payload of one event type to the endpoint, to check that your handler receives and verifies deliveries.

POST /v1/webhooks/:id/test

Auth: Organization key only. Agent keys (chr_ak_*) return 403.

FieldTypeRequiredDescription
event_typestringYesThe event type whose sample payload to send. The endpoint must subscribe to it.

The test delivery:

  • is signed like any other delivery and carries one extra header, X-Chronary-Test: 1, which X-Signature-V2 covers, so it cannot be removed to pass a test as a live event;
  • carries a fixed sample payload with placeholder IDs that end in _test;
  • makes exactly one attempt and is never retried;
  • does not count toward your monthly webhook delivery quota and never affects the failure count that disables an endpoint;
  • is sent even when the endpoint is paused or disabled, so you can check a fix before re-enabling it;
  • appears in the delivery list with is_test: true.

You can send 10 test events per minute.

Terminal window
curl -X POST https://api.chronary.ai/v1/webhooks/whk_01H9X4A1B2C3D4E5F6/test \
-H "Authorization: Bearer chr_sk_your_key_here" \
-H "Content-Type: application/json" \
-d '{ "event_type": "event.created" }'
{
"delivery_id": "whd_01H9X4M2P5R8T6V1",
"webhook_id": "whk_01H9X4A1B2C3D4E5F6",
"event_type": "event.created",
"status": "pending",
"is_test": true
}

The event is sent within a few seconds. Fetch the result with Get a webhook delivery.

StatusTypeCause
400validation_errorUnknown event_type, or the endpoint isn’t subscribed to it
403forbiddenCalled with an Agent key
404not_foundWebhook not found
429rate_limit_errorMore than 10 test events in a minute. Retry after the Retry-After header (60 seconds).

Send a failed or dropped delivery again, for example after your endpoint was down or after you upgraded from Free. Requires the Developer or Pro plan.

POST /v1/webhooks/:id/deliveries/:delivery_id/replay

Auth: Organization key only. Agent keys (chr_ak_*) return 403. No request body.

A replay is a new delivery with its own delivery_id. The original delivery and its attempts don’t change. The replay:

  • sends the stored payload unchanged, so the event ID inside it is the same;
  • is signed with the endpoint’s current secret and a fresh X-Timestamp, and goes to the endpoint’s current URL;
  • carries an X-Chronary-Replay-Of header with the ID of the original delivery, covered by X-Signature-V2. When you replay a replay, the header still names the original;
  • follows your plan’s normal retry schedule and counts toward the failure count that disables an endpoint;
  • counts toward your monthly webhook delivery quota.

You can replay a delivery only when:

  • its status is failed or dropped. That includes deliveries cancelled with last_error_code: "endpoint_disabled", which re-enabling an endpoint doesn’t send again;
  • it isn’t a test event (send a new test instead);
  • the endpoint is active. Re-enable a paused or disabled endpoint first;
  • its payload is still stored, which is 30 days.

You can replay 30 deliveries per minute. Send an Idempotency-Key header to make retries safe: a retry with the same key returns the same replay. The SDKs send one for you.

Terminal window
curl -X POST https://api.chronary.ai/v1/webhooks/whk_01H9X4A1B2C3D4E5F6/deliveries/whd_01H9X4M2P5R8T6V0/replay \
-H "Authorization: Bearer chr_sk_your_key_here" \
-H "Idempotency-Key: replay-whd_01H9X4M2P5R8T6V0"
{
"delivery_id": "whd_01H9X4M2P5R8T6V2",
"webhook_id": "whk_01H9X4A1B2C3D4E5F6",
"event_type": "event.created",
"status": "pending",
"replay_of_delivery_id": "whd_01H9X4M2P5R8T6V0"
}

The new delivery appears in the delivery list with replay_of_delivery_id set. Past the monthly delivery limit, a plan whose limit is soft still sends the replay and the response carries RateLimit-Soft-Exceeded: true; a plan whose limit is hard gets 429 quota_exceeded.

StatusTypeCause
403plan_requiredYour plan doesn’t include replay (feature: "webhook_replay"). Upgrade to Developer or Pro.
403forbiddenCalled with an Agent key
404not_foundWebhook or delivery not found, or it belongs to another webhook or organization
409webhook_inactiveThe endpoint is paused or disabled. Re-enable it, then replay.
409delivery_not_replayableThe delivery is pending or delivered, or it’s a test event
409payload_redactedThe payload was removed after 30 days
429rate_limit_errorMore than 30 replays in a minute. Retry after the Retry-After header (60 seconds).
429quota_exceededMonthly webhook delivery limit reached on a plan whose limit is hard (metric: "webhook_deliveries")

Replace an endpoint’s signing secret without rejecting deliveries while your receiver switches over. Developer or Pro plan.

POST /v1/webhooks/:id/secret/rotate

Auth: Organization key only. Agent keys (chr_ak_*) return 403. In the console, you confirm your password if you signed in more than 5 minutes ago.

FieldTypeRequiredDescription
expire_old_instringNoWhen the old secret stops working: now, 1h, 24h (default) or 7d.

The new secret is returned once, in this response. From the next delivery attempt, including retries and test events already queued:

  • X-Signature-V2 (and the deprecated v1 X-Signature) is signed with the new secret;
  • X-Signature-V2-Previous (and v1 X-Signature-Previous) is signed with the old secret, in the same format and over the same message, until previous_secret_expires_at. With now it is never sent.

The SDK verifiers accept a delivery whose X-Signature-V2 or X-Signature-V2-Previous matches your configured secret, so the receiver keeps working whether it still holds the old secret or already has the new one. To rotate safely:

  1. Update to a current SDK (or check both headers in your own verifier, see Signature verification).
  2. Rotate, and store the new secret.
  3. Deploy the new secret to your receiver before previous_secret_expires_at.

Rotating again before the old secret expires replaces it: only the current secret and the one it replaced are ever valid. Rotation works on paused and disabled endpoints and does not change active. The endpoint’s previousSecretExpiresAt shows when the old secret stops working, and is null when no old secret is valid. A retry with the same Idempotency-Key within 24 hours returns the same new secret.

Terminal window
curl -X POST https://api.chronary.ai/v1/webhooks/whk_01H9X4A1B2C3D4E5F6/secret/rotate \
-H "Authorization: Bearer chr_sk_your_key_here" \
-H "Content-Type: application/json" \
-d '{ "expire_old_in": "24h" }'
{
"webhook_id": "whk_01H9X4A1B2C3D4E5F6",
"secret": "whsec_abc123...",
"previous_secret_expires_at": "2026-11-05T10:00:00.000Z"
}

previous_secret_expires_at is null when expire_old_in is now.

StatusTypeCause
400validation_errorexpire_old_in is not now, 1h, 24h or 7d
401reauth_requiredConsole session signed in more than 5 minutes ago. Confirm your password and retry.
403plan_requiredYour plan doesn’t include secret rotation (feature webhook_secret_rotation)
403forbiddenCalled with an Agent key
404not_foundWebhook not found
409conflictAnother request rotated the secret at the same moment. Check the endpoint, then retry.

Every webhook delivery is an HTTP POST to your configured URL with a JSON body and a set of headers. The JSON body is the event-specific payload (see Event catalog) — the envelope metadata lives in the headers, and X-Signature-V2 signs it together with the body.

HeaderDescription
Content-TypeAlways application/json
X-Signature-V2HMAC-SHA256 signature, formatted as sha256=<hex>, over the body and X-Timestamp, X-Delivery-Id, X-Chronary-Event-Type, X-Chronary-Test and X-Chronary-Replay-Of (see Signature verification). Verify this one.
X-Signature-V2-PreviousSent only while an old secret is still valid after a rotation: the same v2 signature computed with the old secret. Absent otherwise.
X-SignatureDeprecated v1 signature, sha256=<hex> over `${timestamp}.${body}` only. Still sent, no removal date. It does not cover the headers below.
X-Signature-PreviousDeprecated v1 twin of X-Signature-V2-Previous.
X-TimestampUnix epoch seconds (decimal string, e.g. 1745784205) at the moment the delivery was signed. Signed, to prevent replay.
X-Delivery-IdUnique delivery ID (whd_...). Idempotency key — the same logical event can be retried with the same X-Delivery-Id. Signed by X-Signature-V2.
X-Chronary-Event-TypeThe event type for this delivery (e.g. event.created, event.reminder). Signed by X-Signature-V2. Route on it once the signature verifies, and pass it to parseWebhookEvent.
X-Chronary-Test1 on a test event; absent on every other delivery. Signed by X-Signature-V2.
X-Chronary-Replay-OfOn a replay: the ID of the original delivery. Absent on every other delivery. Signed by X-Signature-V2.

The body is the raw event payload as JSON. The body does not include the event type, delivery ID, or timestamp — those travel in headers, not the body, and X-Signature-V2 covers them. After verifying X-Signature-V2, your handler should read X-Delivery-Id for idempotency and X-Chronary-Event-Type for the event type. Do not trust them on a delivery you checked only with the deprecated v1 X-Signature. A replay has a new X-Delivery-Id; to treat it as the same delivery as the original, deduplicate on X-Chronary-Replay-Of when it is present, or on the event ID in the payload.

Your endpoint must respond with any 2xx status within 10 seconds to be considered delivered. Any non-2xx status, timeout, or network error is retried.

Failed deliveries are retried at fixed offsets:

  • Free: 4 attempts: immediate → +1 min → +5 min → +30 min.
  • Developer: 6 attempts: immediate → +1m → +5m → +30m → +1h → +2h.
  • Pro: 8 attempts: immediate → +1 min → +5 min → +30 min → +1 h → +2 h → +6 h → +12 h.

After the last attempt, the delivery is marked failed. A subscription is automatically disabled (active: false, deactivatedReason: "circuit_breaker") after 20 consecutive failed deliveries or 24 hours of continuous failures, whichever comes first. A subscription whose URL turns out to point to a private or local address is disabled at once (deactivatedReason: "unsafe_destination_url").

When an endpoint is disabled:

  • its queued retries end as failed with last_error_code: "endpoint_disabled";
  • a webhook.deactivated event goes to your other active endpoints;
  • your account email gets one “Your webhook endpoint was disabled” email with the endpoint, the last error and a link to re-enable it. You can turn this email off in the console’s notification settings.

Fix the endpoint, send a test event, then re-enable it. Re-enabling doesn’t send the cancelled deliveries again; on Developer or Pro, replay the ones you need.


Verify X-Signature-V2 before trusting the body or any delivery header. The SDKs (verifySignature / constructEvent, verify_signature / unwrap, VerifySignature / ConstructEvent) do this for you. To verify by hand, compute an HMAC-SHA256 with your webhook secret over this message: seven fields joined by a single line feed (\n), in this order, with no trailing line feed after the body:

v2
<X-Timestamp>
<X-Delivery-Id>
<X-Chronary-Event-Type>
<1 if X-Chronary-Test is 1, 0 if the header is absent>
<X-Chronary-Replay-Of, or an empty line if the header is absent>
<raw request body, byte for byte>

Compare sha256=<hex digest> with X-Signature-V2 in constant time. Reject a delivery whose X-Chronary-Test is anything other than 1 or absent, and one whose header values contain a carriage return or line feed. The first six fields can never contain a line feed, so they cannot shift into each other, and the body comes last.

After a secret rotation, and until the old secret expires, the delivery also carries X-Signature-V2-Previous, signed with the old secret over the same message. Accept the delivery when your secret matches either header, as the SDK verifiers do: call the function below once with X-Signature-V2 and, if that fails and the header is present, once with X-Signature-V2-Previous. Never fall back to the v1 X-Signature: a delivery without X-Signature-V2 did not come from Chronary.

import crypto from 'node:crypto';
// headers: the request headers with lower-case names (Node's req.headers).
// body: the raw request body as a UTF-8 string.
// signature: X-Signature-V2 (or X-Signature-V2-Previous during a rotation).
function verifyChronarySignature(secret, headers, body, signature) {
const test = headers['x-chronary-test'] ?? '';
if (test !== '' && test !== '1') return false;
const fields = [
headers['x-timestamp'] ?? '',
headers['x-delivery-id'] ?? '',
headers['x-chronary-event-type'] ?? '',
test === '1' ? '1' : '0',
headers['x-chronary-replay-of'] ?? '',
];
if (!fields[0] || !fields[1] || !fields[2]) return false;
if (fields.some((f) => /[\r\n]/.test(f))) return false;
const message = ['v2', ...fields, body].join('\n');
const expected = 'sha256=' + crypto.createHmac('sha256', secret).update(message).digest('hex');
const a = Buffer.from(expected);
const b = Buffer.from(signature ?? '');
return a.length === b.length && crypto.timingSafeEqual(a, b);
}

For example, with secret whsec_v2_test_vector, X-Timestamp: 1745784205, X-Delivery-Id: whd_vector1, X-Chronary-Event-Type: event.created, no test or replay header and the body {"calendar_id":"cal_1","event":{"id":"evt_1"}}, X-Signature-V2 is sha256=5ee321bd30e58aef4e26fb8cb10850982d8d11531e767983737f346908a88560.

X-Signature (and X-Signature-Previous during a rotation) is the v1 signature: sha256=<hex> of an HMAC-SHA256 over `${X-Timestamp}.${raw_body}` only. It is still sent, with no removal date, so existing verifiers keep working, but it does not cover X-Delivery-Id, X-Chronary-Event-Type, X-Chronary-Test or X-Chronary-Replay-Of: anyone holding a copy of a delivery can re-send it within the timestamp window with those headers changed. Move hand-written verifiers to v2, and upgrade the SDKs (@chronary/sdk 0.14.0, chronary 0.14.0, chronary-go 0.13.0 and later verify v2 only).

Reject the request if the signature does not match or if X-Timestamp is older than ~5 minutes (to mitigate replay attacks).


Chronary emits 21 event types across six domains: agents, events (including tentative holds), scheduling proposals, your account (plan and usage), human calendar connections, and your webhook endpoints. Subscribe to any subset on a per-webhook basis via the events array.

EventWhen it firesKey payload fields
Agent events
agent.createdAn agent is created via POST /v1/agentsagent
agent.updatedAn agent is updated via PATCH /v1/agents/:idagent
Event lifecycle
event.createdA non-hold event is created via POST /v1/calendars/:cal_id/eventscalendar_id, event
event.updatedAn event is updated via PATCH /v1/calendars/:cal_id/events/:idcalendar_id, event
event.deletedAn event is deleted via DELETE /v1/calendars/:cal_id/events/:idcalendar_id, event_id
Event execution (fired by lifecycle scheduler)
event.startedA confirmed event’s start_time is reachedevent_id, calendar_id, title, start_time, end_time, occurrence_start?
event.endedA confirmed event’s end_time is reachedevent_id, calendar_id, title, start_time, end_time, occurrence_start?
event.reminderA confirmed event’s start_time minus a configured reminder offset is reachedevent_id, calendar_id, title, start_time, end_time, reminder_minutes, occurrence_start?
Temporal holds
event.hold_createdA tentative hold is created via POST /v1/calendars/:cal_id/events with status=holdcalendar_id, event
event.hold_expiredA hold’s TTL elapses, or a higher-priority hold pre-empts itcalendar_id, event_id
event.hold_releasedA hold is manually released via PUT /v1/events/:id/releasecalendar_id, event_id
event.hold_confirmedA hold is promoted to a confirmed event via PUT /v1/events/:id/confirmcalendar_id, event
Proposal events
proposal.createdA proposal is created via POST /v1/scheduling/proposalsproposal
proposal.respondedA participant posts a response via POST /v1/scheduling/proposals/:id/respondproposal_id, agent_id, response
proposal.confirmedA proposal is resolved to a winning slot and a calendar event is createdproposal_id, resolved_slot, created_event_id
proposal.cancelledThe organizer cancels the proposal, or all participants declineproposal_id, reason
proposal.expiredThe proposal’s expires_at is reached while still pendingproposal_id
Account events
org.plan_changedThe account’s plan changes — an upgrade completes, a subscription ends, or a plan is adjustedorg_id, previous_plan, plan, source
usage.threshold_crossedA monthly usage metric reaches 50, 80, 90, 95 or 100% of your plan’s limitmetric, used, limit, threshold_pct, period, resets_at
Human calendar events
calendar_connection.reauthorization_requiredA connected Google or Microsoft calendar stops accepting access and needs its owner to reconnectconnection_id, provider, reauthorization_reason, impacted_agent_count, occurred_at
Webhook endpoint events
webhook.deactivatedAn endpoint is disabled automatically (see Retry schedule); sent to your other active endpointswebhook_id, webhook_origin, webhook_path, reason (circuit_breaker or unsafe_destination_url)

Fires when a new agent is created. Payload wraps the raw agent row under an agent key. Field names are camelCase (orgId, createdAt, updatedAt) — this payload is the raw database row, not the snake_case POST /v1/agents response body.

{
"agent": {
"id": "agt_01H9X4A1B2C3D4E5F6",
"orgId": "5a0f6b9a-6a3c-4a8f-9c3d-1e2f3a4b5c6d",
"name": "Booking Bot",
"type": "ai",
"description": "Handles inbound booking requests.",
"status": "active",
"metadata": { "team": "ops" },
"createdAt": "2026-04-16T12:00:00.000Z",
"updatedAt": "2026-04-16T12:00:00.000Z"
}
}

Fires when an agent is patched. Payload contains the fully-updated agent row. Same camelCase shape as agent.created.

{
"agent": {
"id": "agt_01H9X4A1B2C3D4E5F6",
"orgId": "5a0f6b9a-6a3c-4a8f-9c3d-1e2f3a4b5c6d",
"name": "Booking Bot",
"type": "ai",
"description": "Handles inbound booking requests for EMEA.",
"status": "active",
"metadata": { "team": "ops", "region": "emea" },
"createdAt": "2026-04-16T12:00:00.000Z",
"updatedAt": "2026-04-16T13:15:00.000Z"
}
}

Fires when a calendar event is created. The payload includes the event row and its parent calendar_id for routing convenience.

{
"calendar_id": "cal_01H9X4A1B2C3D4E5F6",
"event": {
"id": "evt_01H9X4A1B2C3D4E5F6",
"calendarId": "cal_01H9X4A1B2C3D4E5F6",
"title": "Strategy sync with Acme Corp",
"startTime": "2026-04-17T14:00:00Z",
"endTime": "2026-04-17T14:30:00Z",
"description": "Quarterly strategy alignment",
"allDay": false,
"status": "confirmed",
"source": "internal",
"metadata": { "deal_id": "deal_789" },
"createdAt": "2026-04-16T12:00:00Z",
"updatedAt": "2026-04-16T12:00:00Z"
}
}

Fires when an event is patched. Same shape as event.created; event reflects the post-update state.

{
"calendar_id": "cal_01H9X4A1B2C3D4E5F6",
"event": {
"id": "evt_01H9X4A1B2C3D4E5F6",
"calendarId": "cal_01H9X4A1B2C3D4E5F6",
"title": "Strategy sync with Acme Corp",
"startTime": "2026-04-17T15:00:00Z",
"endTime": "2026-04-17T15:30:00Z",
"description": "Quarterly strategy alignment — rescheduled",
"allDay": false,
"status": "confirmed",
"source": "internal",
"metadata": { "deal_id": "deal_789" },
"createdAt": "2026-04-16T12:00:00Z",
"updatedAt": "2026-04-16T13:42:00Z"
}
}

Fires when an event is deleted. Only the identifiers are included — the full row is no longer retrievable.

{
"calendar_id": "cal_01H9X4A1B2C3D4E5F6",
"event_id": "evt_01H9X4A1B2C3D4E5F6"
}

Fires when a confirmed event’s start_time is reached. Dispatched by Chronary’s lifecycle scheduler — not in response to any API call. Stale fires (where the event was rescheduled, cancelled, or deleted, or its calendar was deleted) are suppressed automatically.

For a recurring event, one event.started fires per occurrence. The payload carries occurrence_start (the ISO start of that occurrence), and start_time / end_time are the occurrence’s own times, while event_id is the series master’s id. Occurrences cancelled via occurrence_start do not fire.

{
"event_id": "evt_01H9X4A1B2C3D4E5F6",
"calendar_id": "cal_01H9X4A1B2C3D4E5F6",
"title": "Strategy sync with Acme Corp",
"start_time": "2026-04-17T14:00:00Z",
"end_time": "2026-04-17T14:30:00Z",
"occurrence_start": "2026-04-17T14:00:00Z"
}

The occurrence_start field is present only for recurring-series occurrences; one-off events omit it.

Fires when a confirmed event’s end_time is reached. Same payload shape as event.started — including occurrence_start for recurring-series occurrences. Stale fires are suppressed the same way.

{
"event_id": "evt_01H9X4A1B2C3D4E5F6",
"calendar_id": "cal_01H9X4A1B2C3D4E5F6",
"title": "Strategy sync with Acme Corp",
"start_time": "2026-04-17T14:00:00Z",
"end_time": "2026-04-17T14:30:00Z"
}

Fires ahead of a confirmed event’s start_time, once per resolved reminder offset (the event’s own reminders, or the calendar’s default_reminders, or the system default of [10]). Dispatched by the lifecycle scheduler — not in response to any API call. reminder_minutes identifies which offset fired, so a handler can distinguish the 1-day-before reminder from the 10-minute-before one. Reminders fire only for confirmed events; stale fires (rescheduled, cancelled, or deleted events, or events whose calendar was deleted) are suppressed. See Reminders.

For a recurring event, reminders fire per occurrence, and the payload carries occurrence_start alongside reminder_minutes.

{
"event_id": "evt_01H9X4A1B2C3D4E5F6",
"calendar_id": "cal_01H9X4A1B2C3D4E5F6",
"title": "Strategy sync with Acme Corp",
"start_time": "2026-04-17T14:00:00Z",
"end_time": "2026-04-17T14:30:00Z",
"reminder_minutes": 10
}

Fires when a tentative hold is placed via POST /v1/calendars/:cal_id/events with status: "hold". Payload carries the full event row (same shape as event.created) with status: "hold" and the hold-specific fields populated.

{
"calendar_id": "cal_01H9X4A1B2C3D4E5F6",
"event": {
"id": "evt_01H9X4A1B2C3D4E5F6",
"calendarId": "cal_01H9X4A1B2C3D4E5F6",
"title": "Tentative: client call",
"startTime": "2026-04-17T14:00:00Z",
"endTime": "2026-04-17T14:30:00Z",
"description": null,
"allDay": false,
"status": "hold",
"source": "internal",
"metadata": {},
"holdExpiresAt": "2026-04-17T13:55:00Z",
"holdPriority": 5,
"createdAt": "2026-04-17T13:50:00Z",
"updatedAt": "2026-04-17T13:50:00Z"
}
}

Fires when a hold’s TTL elapses or when a higher-priority hold pre-empts it. Only identifiers are included — the event row may have been deleted or mutated by the time the webhook arrives.

{
"calendar_id": "cal_01H9X4A1B2C3D4E5F6",
"event_id": "evt_01H9X4A1B2C3D4E5F6"
}

Fires when a hold is manually released via PUT /v1/events/:id/release before its TTL. Only identifiers are included.

{
"calendar_id": "cal_01H9X4A1B2C3D4E5F6",
"event_id": "evt_01H9X4A1B2C3D4E5F6"
}

Fires when a hold is promoted to a confirmed event via PUT /v1/events/:id/confirm. The payload carries the post-promotion event row (same shape as event.created) with status: "confirmed".

{
"calendar_id": "cal_01H9X4A1B2C3D4E5F6",
"event": {
"id": "evt_01H9X4A1B2C3D4E5F6",
"calendarId": "cal_01H9X4A1B2C3D4E5F6",
"title": "Client call",
"startTime": "2026-04-17T14:00:00Z",
"endTime": "2026-04-17T14:30:00Z",
"description": null,
"allDay": false,
"status": "confirmed",
"source": "internal",
"metadata": {},
"holdExpiresAt": null,
"holdPriority": 0,
"createdAt": "2026-04-17T13:50:00Z",
"updatedAt": "2026-04-17T13:54:00Z"
}
}

Fires when an organizer creates a scheduling proposal. Payload contains the fully-expanded proposal with slots and (empty) responses.

{
"proposal": {
"id": "spr_01H9X4A1B2C3D4E5F6",
"title": "Q2 planning sync",
"description": "60-minute working session",
"organizer_agent_id": "agt_01H9X4A1B2C3D4E5F6",
"participant_agent_ids": ["agt_01H9X4A1B2C3D4E5F7", "agt_01H9X4A1B2C3D4E5F8"],
"calendar_id": "cal_01H9X4A1B2C3D4E5F6",
"status": "pending",
"expires_at": "2026-04-19T12:00:00Z",
"resolved_slot": null,
"created_event_id": null,
"metadata": {},
"created_at": "2026-04-16T12:00:00Z",
"updated_at": "2026-04-16T12:00:00Z",
"slots": [
{
"id": "slt_01H9X4A1B2C3D4E5F6",
"start_time": "2026-04-20T14:00:00Z",
"end_time": "2026-04-20T15:00:00Z",
"weight": 1.0,
"calendar_id": null
}
],
"responses": []
}
}

Fires each time a participant accepts, counters, or declines a proposal.

{
"proposal_id": "spr_01H9X4A1B2C3D4E5F6",
"agent_id": "agt_01H9X4A1B2C3D4E5F7",
"response": "accept"
}

response is one of accept, counter, or decline.

Fires when a proposal resolves to a winning slot (either via explicit POST /resolve or automatically when the last participant responds). A confirmed calendar event is created atomically; its ID is included as created_event_id.

{
"proposal_id": "spr_01H9X4A1B2C3D4E5F6",
"resolved_slot": {
"id": "slt_01H9X4A1B2C3D4E5F6",
"start_time": "2026-04-20T14:00:00Z",
"end_time": "2026-04-20T15:00:00Z",
"weight": 1.0,
"calendar_id": "cal_01H9X4A1B2C3D4E5F6"
},
"created_event_id": "evt_01H9X4A1B2C3D4E5F9"
}

Fires when a proposal is cancelled. reason is one of:

  • organizer_cancelled — explicit cancel via POST /v1/scheduling/proposals/:id/cancel
  • all_declined — every participant declined, so auto-resolution cancelled the proposal
{
"proposal_id": "spr_01H9X4A1B2C3D4E5F6",
"reason": "organizer_cancelled"
}

Fires when a pending proposal’s expires_at is reached. Dispatched by the lifecycle scheduler.

{
"proposal_id": "spr_01H9X4A1B2C3D4E5F6"
}

Fires once when the account’s plan actually changes: an upgrade completes (including one your agent requested with POST /v1/billing/upgrade-requests), a subscription ends, or the plan is adjusted. Use it instead of polling GET /v1/billing. Retry the call that hit a plan limit after this arrives.

source is one of subscription (a paid subscription started, renewed into a new state, or ended), founding_expiry, admin_override, soft_launch_toggle, or system. subscription_status and interval are null when no subscription is involved. upgrade_request_id is set when the change completed an upgrade request.

{
"org_id": "5b1f3c2e-9a4d-4e8b-b1c2-7d6e5f4a3b2c",
"previous_plan": "free",
"plan": "pro",
"source": "subscription",
"subscription_status": "active",
"interval": "year",
"upgrade_request_id": "upr_V1StGXR8Z5jd"
}

calendar_connection.reauthorization_required

Section titled “calendar_connection.reauthorization_required”

Fires when a human calendar the account connected stops accepting access, for example because the owner revoked it or changed their password. It is announced once per lapse, and delivered at least once: if sending it fails, it is sent again within about 20 minutes, so the same notice can arrive twice. Deduplicate on connection_id and occurred_at. It is not sent again if the owner has reconnected by then. Until the owner reconnects, availability that reads this calendar fails closed: affected agents see the owner as busy. impacted_agent_count is how many active agents read the calendar. The payload never includes the owner’s account email.

{
"connection_id": "con_V1StGXR8Z5jd",
"provider": "google",
"reauthorization_reason": "credentials_rejected",
"impacted_agent_count": 2,
"occurred_at": "2026-11-01T12:00:00.000Z"
}

Fires when usage reaches 50, 80, 90, 95 or 100% of your plan’s monthly limit. Each threshold is announced once per metric, month and limit: if a limit is raised during the month (for example after an upgrade), the thresholds of the new limit are announced again with the new limit. Delivery is at least once: if sending fails, the event is sent again within about 20 minutes, so the same notice can arrive twice. Deduplicate on metric, period, threshold_pct and limit. Use it to slow an agent down before requests start failing. metric is a counter name: api_calls, events, webhook_deliveries, availability_queries or proposals. resets_at is when the counter resets, the start of the next UTC month. Only the highest threshold reached is announced: usage that jumps from 40% to 85% fires 80, not 50. The event can arrive up to 15 minutes after the threshold is crossed. api_calls thresholds, 100 included, are sent right away.

{
"metric": "api_calls",
"used": 800,
"limit": 1000,
"threshold_pct": 80,
"period": "2026-11",
"resets_at": "2026-12-01T00:00:00.000Z"
}

The event fires whether or not usage alert emails are turned on. If your plan is hard-limited, 100 means new requests are now rejected until resets_at; on a plan that serves requests past its limit, 100 means you are over the limit and still being served.


Sequence: event.started / event.ended lifecycle

Section titled “Sequence: event.started / event.ended lifecycle”

When a confirmed event is created, Chronary schedules two deferred queue messages — one for start_time, one for end_time. At fire time, the scheduler re-reads the event from the database and suppresses the fire if the event was deleted, cancelled, or rescheduled, or its calendar was deleted. Only events with status: "confirmed" trigger lifecycle webhooks.

sequenceDiagram
participant Agent
participant API as Chronary API
participant Sched as Lifecycle Scheduler
participant Consumer as Your Endpoint
Agent->>API: POST /v1/calendars/:cal_id/events
API->>Sched: schedule event.started at start_time
API->>Sched: schedule event.ended at end_time
API-->>Agent: 201 Created (evt_...)
API->>Consumer: POST webhook (event.created)
Note over Sched: time passes...
Sched->>API: fire event.started (re-reads event row)
API->>Consumer: POST webhook (event.started)
Note over Sched: event runs...
Sched->>API: fire event.ended (re-reads event row)
API->>Consumer: POST webhook (event.ended)

If the event is updated (start_time or end_time changes), the scheduler enqueues fresh messages. Stale queue messages from the old schedule are detected and dropped at fire time.


A tentative hold reserves a slot with a TTL. Only one sequence of events fires per hold depending on how it resolves.

sequenceDiagram
participant Agent
participant API as Chronary API
participant Consumer as Your Endpoint
Agent->>API: POST /v1/calendars/:cal/events (status=hold)
API-->>Agent: 201 Created (evt_..., status=hold)
API->>Consumer: POST webhook (event.hold_created)
alt Agent promotes the hold before TTL
Agent->>API: PUT /v1/events/:id/confirm
API->>Consumer: POST webhook (event.hold_confirmed)
else Agent releases the hold manually
Agent->>API: PUT /v1/events/:id/release
API->>Consumer: POST webhook (event.hold_released)
else Higher-priority hold pre-empts
Note over API: POST /v1/calendars/:cal/events with higher hold_priority overlapping
API->>Consumer: POST webhook (event.hold_expired) — for the bumped hold
API->>Consumer: POST webhook (event.hold_created) — for the new higher-priority hold
else TTL elapses with no action
Note over API: hold_expires_at reached
API->>Consumer: POST webhook (event.hold_expired)
end

When a new hold bumps an existing one, Chronary fires the event.hold_expired for the bumped hold before the event.hold_created for the new one — see the “Priority bump ordering” note above.


Proposals follow a state machine: pending → (confirmed | cancelled | expired). The exact webhook sequence depends on how the proposal resolves.

sequenceDiagram
participant Org as Organizer Agent
participant Part as Participant Agents
participant API as Chronary API
participant Consumer as Your Endpoint
Org->>API: POST /v1/scheduling/proposals
API->>Consumer: POST webhook (proposal.created)
loop for each participant response
Part->>API: POST /proposals/:id/respond
API->>Consumer: POST webhook (proposal.responded)
end
alt All participants responded, at least one non-decline
API->>API: auto-resolve (pick best slot, create event)
API->>Consumer: POST webhook (event.created)
API->>Consumer: POST webhook (proposal.confirmed)
else All participants declined
API->>Consumer: POST webhook (proposal.cancelled) [reason: all_declined]
else Organizer cancels before resolution
Org->>API: POST /proposals/:id/cancel
API->>Consumer: POST webhook (proposal.cancelled) [reason: organizer_cancelled]
else Proposal expires while still pending
Note over API: expires_at reached
API->>Consumer: POST webhook (proposal.expired)
end

Auto-resolution only fires when every participant has responded. If any participant never responds, the proposal stays pending until the organizer explicitly resolves it (POST /proposals/:id/resolve), cancels it, or it expires.