Get the current key
Try itReturns the key making the request: its scopes, its maker and the endpoints it may call now.
https:/ / tablebuddy.radioworkflow.com/ api/ v1/ keyAny valid key may call it, about itself: its name, its prefix, the scopes it was made with, when it expires, who made it, and the endpoints it may call now.
endpoints is worked out when you ask, from the key's scopes and its maker's permissions today. A key's scopes never change: what they let it call follows its maker's permissions, and the endpoints filed under a scope grow only by a dated line in the changelog. Permissions are worked out endpoint by endpoint, so there is no single list of what the key holds. See Authentication.
Authentication
Authorization: Bearer <key>, or the same key in x-api-key. A key acts as the person who made it, cut down to this endpoint’s scope, and never as an owner. How keys workRequest headers
AuthorizationrequiredBearer <key>. x-api-key: <key> works too; Authorization wins when both are sent.Idempotency-KeyignoredQuery parameters
None. A query string is answered 422 invalid_request.
Response
The secret is never returned, only its prefix: Table Buddy keeps a hash of it and nothing else.
currencystringISO 4217minor_digitsinteger0–3keyobjectkey.idstringidkey.namestringkey.prefixstring15 charsMatches ^tb_live_[A-Za-z0-9_-]{7}$
key.scopesarray of enummenu:readmenu:writetables:readtables:writeorders:readorders:writeorders:cancelinventory:readinventory:writepayroll:readreports:readkey.expires_atstringISO 8601nullablekey.created_byobjectkey.created_by.user_idstringidkey.created_by.namestringnullablekey.endpointsarray of string≤ 48 charsMatches ^[a-z]+(?:-[a-z]+)*$
An answer may gain fields within v1: ignore the ones you do not know. Versioning
Response headers
request-idalwaysCache-Controlalwaysno-store: an answer is never cached.RateLimit-Limit, RateLimit-Remaining, RateLimit-Resetonce the key is knownx-error-codeon an errorerror.code in the body.Retry-Afteron a 429WWW-Authenticateon a 401Errors
issuer_access_endedFix: Make a new key from an active account.
invalid_requestFix: Send the request with no query string.
missing_api_keyNo Authorization: Bearer header and no x-api-key header.invalid_api_keyThe key is unknown, revoked or expired (answered alike).rate_limitedOver the key's 60 units a minute, or over 30 unknown keys a minute from one network (an address; an IPv6 caller's /64).internal_errorSomething failed on our side. Nothing kept the Idempotency-Key.curl -X GET "$TABLEBUDDY_URL/api/v1/key" \ -H "Authorization: Bearer $TABLEBUDDY_API_KEY"
{
"currency": "USD",
"minor_digits": 2,
"key": {
"id": "cmg5x9a1b0007tb2jq4w8e2rt",
"name": "Kitchen display sync",
"prefix": "tb_live_9fQ2xLb",
"scopes": [
"menu:read",
"orders:read"
],
"expires_at": "2027-09-29T15:02:11.000Z",
"created_by": {
"user_id": "cmg5w7t3e0001tb2jz7m3n8qp",
"name": "Dana Reyes"
},
"endpoints": [
"get-restaurant",
"get-current-key",
"list-menu-categories",
"list-menu-items",
"get-menu-item",
"list-orders",
"get-order"
]
}
}