Skip to content

Identify the caller

GET
/api/me
curl --request GET \
--url https://example.com/api/me \
--header 'Authorization: Bearer <token>'

Who does this access token say is calling? Returns the verified claims: typ (contact | merchant), sub, role and merchantId for a merchant-scoped caller. The dashboard uses it as its session probe.

The verified claims of the presented token — nothing the token did not say.

Media typeapplication/json
object
typ
required

What kind of caller this token belongs to: a dashboard human, or a merchant’s server.

string
Allowed values: contact merchant
sub
required

Who they are — the contact’s id, or the merchant’s.

string
role

Contacts only: what they may do in the dashboard.

string
Allowed values: admin user
merchantId

Merchant tokens only: the merchant every call is scoped to.

string
email

Contacts only: the human’s display identity — informational.

string
Example
{
"typ": "contact",
"role": "admin"
}

Unauthorized — the only code this response carries: no usable access token (absent, malformed, expired). One answer for every failure shape, so nothing can be learned by watching which one comes back.

Media typeapplication/json
object
code
required

Stable machine-readable code — the one thing to branch on. Never parse the message.

string
message
required

English sentence for logs and operators. Wording may change; the code will not.

string
Example
{
"code": "Unauthorized",
"message": "a valid access token is required"
}