Skip to main content
GET
Get a unit

Authorizations

Authorization
string
header
required

A project key (Developers → API keys). Keep it on your server, not in an app.

Headers

traceparent
string

W3C Trace Context; joins your trace to ours

Path Parameters

id
string
required

A unit_… ID or the unit's key

Example:

"points"

Response

Get a unit

id
string
required

The unit_… ID

key
string
required

The unit's key: lowercase letters, numbers, - and _, starting with a letter, up to 64 characters. Rules and calls name the unit by it

Pattern: ^[a-z][a-z0-9_-]{0,63}$
name
string
required

The unit's name, as people see it: Beans, XP

singular
string
required

One of it: Bean, day, Free drink

group
enum<string>
required

The tab the unit sits in: points, progress, badge or perk. A label for how people think of it; what it can do comes from its switches

Available options:
points,
progress,
badge,
perk
shows_as
enum<string>
required

amount: a token and a number. thing: its own art, like a badge. level: a hexagon with the level in it

Available options:
amount,
thing,
level
color
enum<string> | null
required

The color apps draw it in (a level's hexagon, a chart's line). Null until one is chosen: the app picks its own

Available options:
blue,
green,
amber,
red,
purple,
pink,
teal,
gray,
null
switches
object
required

What the unit allows. Each setting is checked on every change to a balance

stats
object
required

Totals across everyone, kept up to date by Lurk

created_at
string<date-time>
required

When it was created: UTC, ISO 8601

updated_at
string<date-time>
required

When it last changed: UTC, ISO 8601