Skip to the page
Docs menu

Docs API reference

API keys

Create, roll and revoke keys. Dashboard sessions only.

The api key object#

An API key as the dashboard shows it. Only the creating or rolling response carries the secret; POST /api_keys/{id}/reveal shows a key again.

FieldDescription
idstringKey id, prefixed key_. It is also the middle part of the key itself.
objectapi_keyString representing the object type. Always api_key.
livemodebooleanfalse for a te_test_ key.
kindsecret \| restricted \| capture \| publishablesecret has full access, restricted the listed scopes, capture is a short-lived device token, publishable is safe to embed in a mobile app and can only capture.
namestring, nullableThe label you gave it.
scopesarray of stringScopes the key holds (every scope for a secret key).
redacted_keystringThe key's prefix and id with the secret left out, for display: te_test_sk_<keyid>_….
last4string, nullableThe key's last four characters, for a masked display (te_test_sk_••••abcd). null for keys created before it was recorded.
revealablebooleanWhether POST /api_keys/{id}/reveal can show the full key: true for a secret, restricted or publishable key created since keys are stored for showing again. false for older keys, which keep working (roll one to get a revealable successor).
is_defaultbooleanThe organisation's default key of this kind and mode, made for it automatically: the key the console shows on Home. A roll passes it to the new key; when it is revoked, a new default is made unless another key that can be shown remains.
publishable_keystring, nullablePublishable keys only, which are not secrets. The full key, in the list, to owners and developers; null for other kinds, for other roles and for publishable keys created before keys were stored.
secretstring, nullableThe full key. Present in the response that creates or rolls it; null everywhere else, including a replay. A key whose revealable is true can be shown again with POST /api_keys/{id}/reveal.
created_atstringCreation time.
expires_atstring, nullableWhen the key stops working: set on a capture token, and on a key that was rolled with a grace period. null otherwise.
revoked_atstring, nullableWhen the key was revoked, or replaced by a roll without grace. null while it works.
last_used_atstring, nullableThe start of the hour in which the key last authenticated a request. null if it never has.
rolled_fromstring, nullableThe id of the key this one replaced.
allowed_app_idsarray of string, nullablePublishable keys only. The app identifiers (iOS bundle identifiers, Android package names) the key is restricted to, or null for none. Always null for other kinds.
limitsPublishableKeyLimits, nullablePublishable keys only. The key's effective limits (its own values over the defaults). Always null for other kinds.
limits.requests_per_secondintegerRequests per second. Default 10.
limits.scans_per_dayintegerScans (sittings) a day. Default 2,000; 0 turns scanning off.
limits.items_per_dayintegerScanned items and qr_count observations.
limits.image_bytes_per_dayintegerBytes declared (content_length) or uploaded (multipart).
limits.groups_opened_per_dayintegerGroups opened by reference a day. Default 500; 0 turns opening off.
group_accessany \| opened_only \| null, nullablePublishable keys only: any (default) captures into any group whose id the app presents, plus groups opened by reference; opened_only only into groups the key opened by reference. null for other kinds. Whether the key may change a group's spec shows in scopes (groups:write).

Also in this resource, for the Timbereye console only (a dashboard session, not an API key): List API keys, Create an API key, Roll an API key, Show a key again, Rename a key or change a publishable key, Revoke an API key, Remove what a publishable key captured.