Skip to the page
Docs menu

Docs API reference

Account

The account a request acts for.

The account object#

The account the key or session acts for.

FieldDescription
idstringAccount id, prefixed acct_.
objectaccountString representing the object type. Always account.
livemodebooleantrue for objects in the live account, false for objects in the test account. Test and live data never mix.
namestringOrganisation name.
modelive \| testWhich of the organisation's two accounts this is.
display_unitsmetric \| imperialUnits the SDK formatters and the Capture app display. Always metric.
default_volume_rulestringRule used for summary.volume (v1: jas).
created_atstringCreation time.
keyKeyRights, nullableFor a publishable key or a capture token, what that credential may do, so a scanner can hide what it may not do instead of learning it from a 403. null for secret and restricted keys and dashboard sessions.
key.objectkey_rights
key.kindpublishable \| capture \| devicedevice: the Timbereye app signed in as a worker, with a publishable key's rights and limits.
key.specread \| writewrite: the scanner may change a group's species, length and grade (PATCH /groups/{id}). read: show them only.
key.group_accessany \| opened_only \| null, nullablePublishable keys: any, any group of the account whose id the app presents, and groups it opened by reference; opened_only, only groups it opened by reference from this installation. null for capture tokens.
key.group_idsarray of string, nullableCapture tokens limited to groups: those groups. null otherwise.
key.limitsPublishableKeyLimits, nullablePublishable keys: the key's limits. null for capture tokens.
key.remaining_todayKeyCapsRemaining, nullablePublishable keys: what is left of each daily cap until resets_at (00:00 UTC). Reading it uses none of them. null for capture tokens.
key.resets_atstring, nullableWhen the daily caps start again (00:00 UTC). null for capture tokens.
live_writesenum (allowed, not_enabled, payment_overdue, spend_cap_reached)Whether new live work (scans, groups, capture tokens, live keys) may start now. not_enabled: live mode is off (403 live_mode_not_enabled). payment_overdue: an invoice is unpaid past the grace period (402 payment_overdue). spend_cap_reached: the monthly spend cap is reached and set to pause (402 spend_cap_reached). Reads, and finishing scans already started, always work.
billingAccountBilling, nullableThis month's live usage and estimated charge, and the billing status. null for publishable keys, capture tokens and the Timbereye app.
billing.objectaccount_billing
billing.planself_serve \| contract
billing.statussetup_required \| pending_review \| active \| past_due \| paused \| stopped \| contract
billing.periodstringThis month, YYYY-MM.
billing.refined_m3numberRefined m³ billed this month in live mode.
billing.estimated_amount_centsintegerThis month so far, US cents, before any tax.
billing.currencyusd
data_useAccountDataUseWhat the organisation lets Timbereye do with its data beyond providing the service (Terms of Service, "Your data and our models"). The same for test and live keys: it is the organisation's setting. Test-mode data is never used for training, whatever it says.
data_use.objectaccount_data_use
data_use.model_trainingbooleanWhether Timbereye may use the images and measurements of the organisation's live account to train and improve its counting and measuring models. On unless an owner turned it off in the console (Data and privacy). Images are never published, sold or shared.
data_use.changed_atstring, nullableWhen an owner last changed it; null if never, and for publishable keys and capture tokens.
data_use.changed_bystring, nullableWho last changed it (email); null if never, and for publishable keys and capture tokens.
logoobject, nullableThe organisation's logo on its documents (GET /account/logo has the image); null when it has none.
logo.content_typeimage/png \| image/jpeg
logo.widthinteger
logo.heightinteger
logo.size_bytesinteger
logo.sha256string
logo.updated_atstring
lumberAccountLumberSettingsThe organisation's lumber settings in this mode, for every caller including the Timbereye app (which offers "Lumber bundle" only when enabled, and only the products listed). Change them with PATCH /account/lumber.
lumber.enabledbooleanWhether lumber and panel groups can be opened from a phone (POST /groups/open). Default on in test mode, off in live mode.
lumber.board_foot_methodnhla_board_measure \| nominal_piece_tally \| width_length_tally \| exact \| mill_half_foot_downThe named board-foot method of a lumber bundle tallied board by board (per_piece) when its request names no rule, and the policies a request naming that method's rule leaves out (a request naming sm_round gets the rest of the method that rounding belongs to). nhla_board_measure (the default; follows the NHLA board measure rule: surface measure per board = full width × length in whole feet ÷ 12, to the nearest whole foot, exact halves alternately up and down in tally order; board feet = Σ SM × thickness, under 4/4 as 4/4, shown with decimals for 5/4 and 6/4), nominal_piece_tally (nominal thickness × width × length ÷ 12 per piece, no rounding per piece; always the rule of imperial units of one size), width_length_tally (widths to whole inches, the export tally lumber_bf_width_length_tally, or metric width classes; always the rule of width-class bundles), exact (width × whole feet ÷ 12 unrounded, the bundle rounded once) or mill_half_foot_down (half-inch width sections and surface measure in half feet, both rounded down; the behaviour before 24 November 2026, formerly per_board). Each bundle records the method it was created with (rule.method) and keeps it.
lumber.photos_requiredbooleanWhether a new bundle or unit that states no photos policy needs its photos (the product's default kinds) before its tally is final. Default false: photos are optional, and a tally submitted without one is accepted (its photos.no_photo is true). An organisation may turn it on; a group created with its own photos keeps that.
lumber.productsarray of lumber \| panelThe products phones may open when enabled (POST /groups/open with product); another is 403 product_not_enabled. Default both: [lumber, panel]. Sawlogs are not affected.

Retrieve the account#

GET/v1/account

Returns the account the request acts for. Any key may call it, including restricted keys with no scopes and capture tokens. For a publishable key or a capture token, key says what that credential may do (change the spec, which groups it reaches) and, for a publishable key, what is left of today's caps, so a scanner can hide "Change" up front. Reading it counts against no cap. live_writes says whether new live work may start now (refused while live mode is off, while an invoice is overdue past its grace period, or at a spend cap set to pause). For secret and restricted keys and sessions, billing sums up this month's live usage and estimated charge.

Keys: secret key; restricted key; capture token (Allowed); publishable key (Allowed. key describes the key's own rights and caps).

Request

A phone does not call this itself: the Swift and Kotlin SDKs make this call for the scanner, with the app's key. See Scan in your app. The samples are for your server.

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

Response

JSON
// 200
{
  "id": "acct_1Fq8Zt",
  "object": "account",
  "livemode": true,
  "name": "Coastal Timber Exports",
  "mode": "live",
  "display_units": "metric",
  "default_volume_rule": "jas",
  "created_at": "2026-11-02T12:00:00Z",
  "key": null,
  "live_writes": "allowed",
  "billing": {
    "object": "account_billing",
    "plan": "self_serve",
    "status": "active",
    "period": "2027-02",
    "refined_m3": 1234.567,
    "estimated_amount_cents": 24691,
    "currency": "usd"
  },
  "data_use": {
    "object": "account_data_use",
    "model_training": true,
    "changed_at": null,
    "changed_by": 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.

Change the lumber settings#

PATCH/v1/account/lumber

Changes the organisation's lumber settings in the request's mode (GET /account lumber): whether phones may open lumber and panel groups and which of the two (products), the default board-foot method of hardwood bundles tallied board by board, and whether new bundles need photos. Fields left out keep their value. Applies to groups created afterwards; no tally already submitted changes. Secret keys and console sessions of owners (account.settings); phones are refused.

Keys: secret key.

Body

FieldDescription
enabledbooleanWhether lumber and panel groups can be opened from a phone (POST /groups/open). Default on in test mode, off in live mode.
board_foot_methodnhla_board_measure \| nominal_piece_tally \| width_length_tally \| exact \| mill_half_foot_downThe named board-foot method for bundles created from now on; bundles already created keep theirs.
photos_requiredbooleanWhether a new bundle or unit that states no photos policy needs its photos (the product's default kinds) before its tally is final. Default false: photos are optional, and a tally submitted without one is accepted (its photos.no_photo is true). An organisation may turn it on; a group created with its own photos keeps that.
productsarray of lumber \| panelA non-empty list of distinct values; returned in the order lumber, panel.

Request

TypeScript
const result = await timbereye.account.updateLumber({ boardFootMethod: "mill_half_foot_down" })
curl
curl -X PATCH https://api.timbereye.com/v1/account/lumber \
  -H "Authorization: Bearer $TIMBEREYE_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{"board_foot_method":"mill_half_foot_down"}'
CLI
timbereye account lumber --board-foot-method mill_half_foot_down --json

Response

JSON
// 200
{
  "object": "account_lumber",
  "livemode": false,
  "enabled": true,
  "board_foot_method": "mill_half_foot_down",
  "photos_required": false,
  "products": ["lumber", "panel"]
}
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.
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.

GET/v1/account/logo

The organisation's logo, printed top left on the documents read from its groups (the packing list PDF), in both modes: what it is and the image itself (data, base64). 404 when the organisation has none; its documents then set its name. See https://www.timbereye.com/docs/lumber-and-panels/#the-packing-list-as-a-pdf.

Keys: secret key; restricted key.

Request

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

Response

200: a AccountLogo object.

Errors
StatusWhen
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.

PUT/v1/account/logo

Sets the organisation's logo, replacing any: a PNG or JPEG, base64-encoded in data, at most 256 KB, each side 16 to 4,000 pixels. SVG is not accepted. A PNG is kept re-encoded, without its metadata. One logo for the organisation, in both modes; documents made afterwards carry it. Secret keys and console sessions of owners (account.settings); phones are refused.

Keys: secret key.

Body

FieldDescription
data requiredstringThe PNG or JPEG image, base64-encoded: at most 256 KB, each side 16 to 4,000 pixels.

Request

TypeScript
const result = await timbereye.account.logo.set({ data: "iVBORw0KGgoAAAANSUhEUgAAAWgAAABg..." })
curl
curl -X PUT https://api.timbereye.com/v1/account/logo \
  -H "Authorization: Bearer $TIMBEREYE_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{"data":"iVBORw0KGgoAAAANSUhEUgAAAWgAAABg..."}'

Response

200: a AccountLogo 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.
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/v1/account/logo

Removes the organisation's logo; documents set its name again. Removing a logo that is not there changes nothing. Secret keys and console sessions of owners (account.settings).

Keys: secret key.

Request

TypeScript
const result = await timbereye.account.logo.delete()
curl
curl -X DELETE https://api.timbereye.com/v1/account/logo \
  -H "Authorization: Bearer $TIMBEREYE_SECRET_KEY"
CLI
timbereye account logo remove --yes --json

Response

200: a AccountLogoDeleted object.

Errors
StatusWhen
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.
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.

Also in this resource, for the Timbereye console only (a dashboard session, not an API key): Get or create the test account.