Skip to the page
Docs menu

Docs API reference

Webhook endpoints

Where events are delivered.

The webhook endpoint object#

Where Timbereye sends events. Deliveries follow the Standard Webhooks specification: headers webhook-id (the event id), webhook-timestamp (Unix seconds) and webhook-signature, which is v1, followed by the base64 HMAC-SHA256 of <webhook-id>.<webhook-timestamp>.<body> keyed with the base64-decoded part of the secret after whsec_. For 24 hours after roll_secret the header carries two space-separated signatures (new secret first), so a verifier holding either secret accepts it. 10-second timeout; ten attempts over about three days (see the webhook payload entries for the schedule), then the endpoint is disabled without any email or event. Ordering is not guaranteed.

FieldDescription
idstringUnique identifier, prefixed whk_.
objectwebhook_endpointString representing the object type. Always webhook_endpoint.
livemodebooleantrue for objects in the live account, false for objects in the test account. Test and live data never mix.
urlstringHTTPS URL that receives events.
enabled_eventsarray of enum (scan.created, scan.estimated, scan.refined, scan.failed, item.created, item.updated, item.removed, item.refinement_failed, group.created, group.updated, group.measured, group.deleted, place.updated, place.deleted, usage.threshold_reached) or *Event types sent to this endpoint, or ["*"] for every type.
statusenabled \| disabledenabled or disabled. Set to disabled automatically when every delivery has failed for three days; no email and no event announces it, so poll GET /webhook_endpoints for it. You can also set it yourself. Set to enabled again with PATCH once fixed; deliveries cancelled while it was disabled are not resent.
secretstring, nullableSigning secret, whsec_<base64>. Returned once, when the endpoint is created or its secret is rolled; null on every later read and on an idempotent replay of the create or roll (the secret is never stored for replay; roll it again if it was lost).
created_atstringCreation time.
descriptionstring, nullableYour note about the endpoint.
previous_secret_expires_atstring, nullableAfter roll_secret, until when the previous secret still signs deliveries; null otherwise.
JSON
{
  "id": "whk_6Yc1Ds",
  "object": "webhook_endpoint",
  "livemode": true,
  "url": "https://erp.example.com/timbereye/webhooks",
  "description": "ERP sync",
  "enabled_events": ["scan.refined", "group.measured"],
  "status": "enabled",
  "secret": null,
  "previous_secret_expires_at": null,
  "created_at": "2027-01-15T08:00:00Z"
}

Create a webhook endpoint#

POST/v1/webhook_endpoints

Registers a URL. The response includes the signing secret once; store it to verify deliveries. An account may have at most 16 endpoints; the next create is 400 limit_exceeded.

Keys: secret key; restricted key with webhooks:write.

Body

FieldDescription
url requiredstringHTTPS URL that receives events.
enabled_events requiredarray of enum (scan.created, scan.estimated, scan.refined, scan.failed, item.created, item.updated, item.removed, item.refinement_failed, group.created, group.updated, group.measured, group.deleted, place.updated, place.deleted, usage.threshold_reached) or *Event types sent to this endpoint, or ["*"] for every type.
descriptionstring, nullableYour note about the endpoint.

Request

TypeScript
const result = await timbereye.webhookEndpoints.create({
    url: "https://erp.example.com/timbereye/webhooks",
    description: "ERP sync",
    enabledEvents: ["scan.refined", "group.measured"],
})
curl
curl -X POST https://api.timbereye.com/v1/webhook_endpoints \
  -H "Authorization: Bearer $TIMBEREYE_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://erp.example.com/timbereye/webhooks",
    "description": "ERP sync",
    "enabled_events": ["scan.refined", "group.measured"]
  }'
CLI
timbereye webhooks endpoints create \
  --url https://erp.example.com/timbereye/webhooks \
  --description 'ERP sync' \
  --data '{"enabled_events":["scan.refined","group.measured"]}' \
  --json

Response

JSON
// 200
{
  "id": "whk_6Yc1Ds",
  "object": "webhook_endpoint",
  "livemode": true,
  "url": "https://erp.example.com/timbereye/webhooks",
  "description": "ERP sync",
  "enabled_events": ["scan.refined", "group.measured"],
  "status": "enabled",
  "secret": "whsec_exampleSigningSecretShownOnce00",
  "previous_secret_expires_at": null,
  "created_at": "2027-01-15T08:00:00Z"
}
Errors
StatusWhen
400invalid_request_error: the request was malformed or a field was invalid.
401authentication_error: missing, malformed, expired or revoked key.
403permission_error: the key lacks the scope, the capture token is limited to other groups, or the resource is read-only to you.
404invalid_request_error, resource_missing: no such object. Objects in another account are also reported as 404.
409invalid_request_error: idempotency_key_reused, idempotency_request_in_progress, group_not_empty, group_billed, place_in_use, resource_exists, place_name_taken or another state conflict.
413invalid_request_error, payload_too_large: the upload is over the size limit (10 MB for multipart).
422invalid_request_error: the request was well formed but cannot be applied. Codes: group_cycle, group_depth_exceeded, unit_ambiguous, weight_inconsistent, area_ha_not_allowed, assignment_required.
429rate_limit_error: slow down and retry after the Retry-After delay.
500api_error: something went wrong on our side. Safe to retry with the same Idempotency-Key.

List webhook endpoints#

GET/v1/webhook_endpoints

Returns your endpoints.

Keys: secret key; restricted key with webhooks:read.

Parameters

FieldDescription
limitinteger, queryPage size, 1 to 100.
starting_afterstring, queryOpaque cursor: pass the next_cursor of the previous page. Results are ordered by (created_at, id).
expand[]array of string, queryReplace an id field with the full object, e.g. expand[]=origin_place. Allowed values are listed on each resource.

Request

TypeScript
for await (const endpoint of timbereye.webhookEndpoints.list()) {
    // every page, one at a time
}
curl
curl https://api.timbereye.com/v1/webhook_endpoints \
  -H "Authorization: Bearer $TIMBEREYE_SECRET_KEY"
CLI
timbereye webhooks endpoints list --json

Response

JSON
// 200
{
  "object": "list",
  "data": [
    {
      "id": "whk_6Yc1Ds",
      "object": "webhook_endpoint",
      "livemode": true,
      "url": "https://erp.example.com/timbereye/webhooks",
      "description": "ERP sync",
      "enabled_events": ["scan.refined", "group.measured"],
      "status": "enabled",
      "secret": null,
      "previous_secret_expires_at": null,
      "created_at": "2027-01-15T08:00:00Z"
    }
  ],
  "has_more": false,
  "next_cursor": null
}
Errors
StatusWhen
400invalid_request_error: the request was malformed or a field was invalid.
401authentication_error: missing, malformed, expired or revoked key.
403permission_error: the key lacks the scope, the capture token is limited to other groups, or the resource is read-only to you.
404invalid_request_error, resource_missing: no such object. Objects in another account are also reported as 404.
429rate_limit_error: slow down and retry after the Retry-After delay.
500api_error: something went wrong on our side. Safe to retry with the same Idempotency-Key.

Retrieve a webhook endpoint#

GET/v1/webhook_endpoints/{id}

Returns one endpoint. The secret is not shown.

Keys: secret key; restricted key with webhooks:read.

Parameters

FieldDescription
id requiredstring, pathWebhook endpoint id.

Request

TypeScript
const result = await timbereye.webhookEndpoints.retrieve("whk_6Yc1Ds")
curl
curl https://api.timbereye.com/v1/webhook_endpoints/whk_6Yc1Ds \
  -H "Authorization: Bearer $TIMBEREYE_SECRET_KEY"
CLI
timbereye webhooks endpoints get whk_6Yc1Ds --json

Response

JSON
// 200
{
  "id": "whk_6Yc1Ds",
  "object": "webhook_endpoint",
  "livemode": true,
  "url": "https://erp.example.com/timbereye/webhooks",
  "description": "ERP sync",
  "enabled_events": ["scan.refined", "group.measured"],
  "status": "enabled",
  "secret": null,
  "previous_secret_expires_at": null,
  "created_at": "2027-01-15T08:00:00Z"
}
Errors
StatusWhen
400invalid_request_error: the request was malformed or a field was invalid.
401authentication_error: missing, malformed, expired or revoked key.
403permission_error: the key lacks the scope, the capture token is limited to other groups, or the resource is read-only to you.
404invalid_request_error, resource_missing: no such object. Objects in another account are also reported as 404.
429rate_limit_error: slow down and retry after the Retry-After delay.
500api_error: something went wrong on our side. Safe to retry with the same Idempotency-Key.

Update a webhook endpoint#

PATCH/v1/webhook_endpoints/{id}

Changes the URL, events or status. Set status to enabled to resume a disabled endpoint.

Keys: secret key; restricted key with webhooks:write.

Parameters

FieldDescription
id requiredstring, pathWebhook endpoint id.

Body

FieldDescription
urlstringHTTPS URL that receives events.
enabled_eventsarray of enum (scan.created, scan.estimated, scan.refined, scan.failed, item.created, item.updated, item.removed, item.refinement_failed, group.created, group.updated, group.measured, group.deleted, place.updated, place.deleted, usage.threshold_reached) or *Event types sent to this endpoint, or ["*"] for every type.
statusenabled \| disabledEnable or disable delivery.
descriptionstring, nullableYour note about the endpoint.

Request

TypeScript
const result = await timbereye.webhookEndpoints.update("whk_6Yc1Ds", {
    enabledEvents: ["scan.refined", "group.measured", "item.refinement_failed"],
})
curl
curl -X PATCH https://api.timbereye.com/v1/webhook_endpoints/whk_6Yc1Ds \
  -H "Authorization: Bearer $TIMBEREYE_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "enabled_events": [
      "scan.refined",
      "group.measured",
      "item.refinement_failed"
    ]
  }'
CLI
timbereye webhooks endpoints update whk_6Yc1Ds \
  --data '{"enabled_events":["scan.refined","group.measured","item.refinement_failed"]}' \
  --json

Response

JSON
// 200
{
  "id": "whk_6Yc1Ds",
  "object": "webhook_endpoint",
  "livemode": true,
  "url": "https://erp.example.com/timbereye/webhooks",
  "description": "ERP sync",
  "enabled_events": [
    "scan.refined",
    "group.measured",
    "item.refinement_failed"
  ],
  "status": "enabled",
  "secret": null,
  "previous_secret_expires_at": null,
  "created_at": "2027-01-15T08:00:00Z"
}
Errors
StatusWhen
400invalid_request_error: the request was malformed or a field was invalid.
401authentication_error: missing, malformed, expired or revoked key.
403permission_error: the key lacks the scope, the capture token is limited to other groups, or the resource is read-only to you.
404invalid_request_error, resource_missing: no such object. Objects in another account are also reported as 404.
409invalid_request_error: idempotency_key_reused, idempotency_request_in_progress, group_not_empty, group_billed, place_in_use, resource_exists, place_name_taken or another state conflict.
413invalid_request_error, payload_too_large: the upload is over the size limit (10 MB for multipart).
422invalid_request_error: the request was well formed but cannot be applied. Codes: group_cycle, group_depth_exceeded, unit_ambiguous, weight_inconsistent, area_ha_not_allowed, assignment_required.
429rate_limit_error: slow down and retry after the Retry-After delay.
500api_error: something went wrong on our side. Safe to retry with the same Idempotency-Key.

Delete a webhook endpoint#

DELETE/v1/webhook_endpoints/{id}

Stops deliveries and removes the endpoint.

Keys: secret key; restricted key with webhooks:write.

Parameters

FieldDescription
id requiredstring, pathWebhook endpoint id.

Request

TypeScript
const result = await timbereye.webhookEndpoints.delete("whk_6Yc1Ds")
curl
curl -X DELETE https://api.timbereye.com/v1/webhook_endpoints/whk_6Yc1Ds \
  -H "Authorization: Bearer $TIMBEREYE_SECRET_KEY"
CLI
timbereye webhooks endpoints delete whk_6Yc1Ds --yes --json

Response

JSON
// 200
{ "id": "whk_6Yc1Ds", "object": "webhook_endpoint", "deleted": true }
Errors
StatusWhen
400invalid_request_error: the request was malformed or a field was invalid.
401authentication_error: missing, malformed, expired or revoked key.
403permission_error: the key lacks the scope, the capture token is limited to other groups, or the resource is read-only to you.
404invalid_request_error, resource_missing: no such object. Objects in another account are also reported as 404.
409invalid_request_error: idempotency_key_reused, idempotency_request_in_progress, group_not_empty, group_billed, place_in_use, resource_exists, place_name_taken or another state conflict.
429rate_limit_error: slow down and retry after the Retry-After delay.
500api_error: something went wrong on our side. Safe to retry with the same Idempotency-Key.

List an endpoint's deliveries#

GET/v1/webhook_endpoints/{id}/deliveries

The delivery log of one endpoint, newest first: each event sent to it (test events too), with its status, attempts, the last response status and how long it took, and when the next retry is due. Kept as long as its event: 30 days. Filter by status and type. Read one with GET /webhook_deliveries/{id} for the request and response of every attempt.

Keys: secret key; restricted key with webhooks:read.

Parameters

FieldDescription
id requiredstring, pathWebhook endpoint id.
statusenum (pending, succeeded, failed, canceled), queryOnly deliveries in this state.
typeenum (scan.created, scan.estimated, scan.refined, scan.failed, item.created, item.updated, item.removed, item.refinement_failed, group.created, group.updated, group.measured, group.deleted, place.updated, place.deleted, usage.threshold_reached), queryOnly deliveries of this event type.
limitinteger, queryPage size, 1 to 100.
starting_afterstring, queryOpaque cursor: pass the next_cursor of the previous page. Results are ordered by (created_at, id).

Request

TypeScript
for await (const endpoint of timbereye.webhookEndpoints.listDeliveries("whk_6Yc1Ds")) {
    // every page, one at a time
}
curl
curl https://api.timbereye.com/v1/webhook_endpoints/whk_6Yc1Ds/deliveries \
  -H "Authorization: Bearer $TIMBEREYE_SECRET_KEY"
CLI
timbereye webhooks deliveries list whk_6Yc1Ds --json

Response

200: a WebhookDeliveryList object.

Errors
StatusWhen
400invalid_request_error: the request was malformed or a field was invalid.
401authentication_error: missing, malformed, expired or revoked key.
403permission_error: the key lacks the scope, the capture token is limited to other groups, or the resource is read-only to you.
404invalid_request_error, resource_missing: no such object. Objects in another account are also reported as 404.
429rate_limit_error: slow down and retry after the Retry-After delay.
500api_error: something went wrong on our side. Safe to retry with the same Idempotency-Key.

Retrieve a delivery with its attempts#

GET/v1/webhook_deliveries/{id}

One delivery and every attempt of it, oldest first: the request as sent (headers, with each signature cut to its first characters, and the body, cut at 64 KiB) and the response as received (status and body, cut at 16 KiB), or the error when nothing came back. The signing secret is never part of it.

Keys: secret key; restricted key with webhooks:read.

Parameters

FieldDescription
id requiredstring, pathWebhook delivery id.

Request

TypeScript
const result = await timbereye.webhookEndpoints.retrieveDelivery("whd_4Hn8Qe")
curl
curl https://api.timbereye.com/v1/webhook_deliveries/whd_4Hn8Qe \
  -H "Authorization: Bearer $TIMBEREYE_SECRET_KEY"
CLI
timbereye webhooks deliveries get whd_4Hn8Qe --json

Response

200: a WebhookDeliveryDetail object.

Errors
StatusWhen
400invalid_request_error: the request was malformed or a field was invalid.
401authentication_error: missing, malformed, expired or revoked key.
403permission_error: the key lacks the scope, the capture token is limited to other groups, or the resource is read-only to you.
404invalid_request_error, resource_missing: no such object. Objects in another account are also reported as 404.
429rate_limit_error: slow down and retry after the Retry-After delay.
500api_error: something went wrong on our side. Safe to retry with the same Idempotency-Key.

Resend a delivery#

POST/v1/webhook_deliveries/{id}/resend

Sends the delivery again now, with a fresh set of retries, whatever its state (a pending one is sent at once). Its earlier attempts stay in the log and the next one is marked trigger: resend. The event and its webhook-id are the same, so a receiver that de-duplicates skips it. 409 state_conflict when the endpoint was deleted, or is disabled (a test event excepted): enable it first. In the console, owners and developers may resend; each resend is in the audit log (webhook_delivery.resent).

Keys: secret key; restricted key with webhooks:write.

Parameters

FieldDescription
id requiredstring, pathWebhook delivery id.

Request

TypeScript
const result = await timbereye.webhookEndpoints.resendDelivery("whd_4Hn8Qe")
curl
curl -X POST https://api.timbereye.com/v1/webhook_deliveries/whd_4Hn8Qe/resend \
  -H "Authorization: Bearer $TIMBEREYE_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)"
CLI
timbereye webhooks deliveries resend whd_4Hn8Qe --json

Response

200: a WebhookDelivery object.

Errors
StatusWhen
400invalid_request_error: the request was malformed or a field was invalid.
401authentication_error: missing, malformed, expired or revoked key.
403permission_error: the key lacks the scope, the capture token is limited to other groups, or the resource is read-only to you.
404invalid_request_error, resource_missing: no such object. Objects in another account are also reported as 404.
409invalid_request_error: idempotency_key_reused, idempotency_request_in_progress, group_not_empty, group_billed, place_in_use, resource_exists, place_name_taken or another state conflict.
429rate_limit_error: slow down and retry after the Retry-After delay.
500api_error: something went wrong on our side. Safe to retry with the same Idempotency-Key.

Send a test event#

POST/v1/webhook_endpoints/{id}/test

Queues a test event of the requested type for this endpoint only and returns what was queued, so you can see your handler work without a phone. Its data.object is an example in the shape of that type's real object (a group_tally for group.measured), marked test: true, with ids that end in _test and name nothing that exists. It is sent even to a disabled endpoint, appears in the endpoint's delivery log marked test, and is not in GET /events.

Keys: secret key; restricted key with webhooks:write.

Parameters

FieldDescription
id requiredstring, pathWebhook endpoint id.

Body

FieldDescription
typeenum (scan.created, scan.estimated, scan.refined, scan.failed, item.created, item.updated, item.removed, item.refinement_failed, group.created, group.updated, group.measured, group.deleted, place.updated, place.deleted, usage.threshold_reached)Event type.

Request

TypeScript
const result = await timbereye.webhookEndpoints.test("whk_6Yc1Ds", { type: "scan.refined" })
curl
curl -X POST https://api.timbereye.com/v1/webhook_endpoints/whk_6Yc1Ds/test \
  -H "Authorization: Bearer $TIMBEREYE_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"type":"scan.refined"}'
CLI
timbereye webhooks endpoints test whk_6Yc1Ds --type scan.refined --json

Response

JSON
// 200
{
  "object": "webhook_test",
  "livemode": true,
  "endpoint_id": "whk_6Yc1Ds",
  "event_id": "evt_5Tq1Zr",
  "type": "scan.refined"
}
Errors
StatusWhen
400invalid_request_error: the request was malformed or a field was invalid.
401authentication_error: missing, malformed, expired or revoked key.
403permission_error: the key lacks the scope, the capture token is limited to other groups, or the resource is read-only to you.
404invalid_request_error, resource_missing: no such object. Objects in another account are also reported as 404.
409invalid_request_error: idempotency_key_reused, idempotency_request_in_progress, group_not_empty, group_billed, place_in_use, resource_exists, place_name_taken or another state conflict.
413invalid_request_error, payload_too_large: the upload is over the size limit (10 MB for multipart).
422invalid_request_error: the request was well formed but cannot be applied. Codes: group_cycle, group_depth_exceeded, unit_ambiguous, weight_inconsistent, area_ha_not_allowed, assignment_required.
429rate_limit_error: slow down and retry after the Retry-After delay.
500api_error: something went wrong on our side. Safe to retry with the same Idempotency-Key.

Roll the signing secret#

POST/v1/webhook_endpoints/{id}/roll_secret

Replaces the endpoint's signing secret and returns the endpoint with the new secret, shown once. The old secret keeps signing for 24 hours (previous_secret_expires_at), during which deliveries carry both signatures. Rolling again within those 24 hours ends the older secret at once.

Keys: secret key; restricted key with webhooks:write.

Parameters

FieldDescription
id requiredstring, pathWebhook endpoint id.

Request

TypeScript
const result = await timbereye.webhookEndpoints.rollSecret("whk_6Yc1Ds")
curl
curl -X POST https://api.timbereye.com/v1/webhook_endpoints/whk_6Yc1Ds/roll_secret \
  -H "Authorization: Bearer $TIMBEREYE_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)"
CLI
timbereye webhooks endpoints roll-secret whk_6Yc1Ds --yes --json

Response

JSON
// 200
{
  "id": "whk_6Yc1Ds",
  "object": "webhook_endpoint",
  "livemode": true,
  "url": "https://erp.example.com/timbereye/webhooks",
  "description": "ERP sync",
  "enabled_events": ["scan.refined", "group.measured"],
  "status": "enabled",
  "secret": "whsec_exampleRolledSigningSecret0000",
  "previous_secret_expires_at": "2027-02-04T10:00:00Z",
  "created_at": "2027-01-15T08:00:00Z"
}
Errors
StatusWhen
400invalid_request_error: the request was malformed or a field was invalid.
401authentication_error: missing, malformed, expired or revoked key.
403permission_error: the key lacks the scope, the capture token is limited to other groups, or the resource is read-only to you.
404invalid_request_error, resource_missing: no such object. Objects in another account are also reported as 404.
409invalid_request_error: idempotency_key_reused, idempotency_request_in_progress, group_not_empty, group_billed, place_in_use, resource_exists, place_name_taken or another state conflict.
429rate_limit_error: slow down and retry after the Retry-After delay.
500api_error: something went wrong on our side. Safe to retry with the same Idempotency-Key.