Drıftstack docs
Docs

Who am I

Check your key

GET /v1/whoami

Returns the account, the key, the plan tier and the scopes behind the API key the request was made with. It needs no particular scope, so any valid key can call it — which makes it the simplest way to check that a key works.

curl https://api.driftstack.dev/v1/whoami \
  -H "Authorization: Bearer $DRIFTSTACK_API_KEY"
{
  "account_id": "acc_00000000-0000-4000-8000-000000000001",
  "api_key_id": "key_00000000-0000-4000-8000-000000000002",
  "tier": "pro_v3",
  "scopes": ["read", "write"]
}
Field Type Notes
account_id string The account the key acts for, prefixed acc_.
api_key_id string The key that made the request, prefixed key_; a signed-in dashboard session reads wsk_.
tier enum The account’s plan tier.
scopes string[] The scopes the key carries. See API key scopes.

A missing, revoked or expired key gets 401. With the SDKs:

const me = await client.account.whoami();
me = client.account.whoami()
me, err := client.Account.Whoami(ctx)

Your account settings, API keys, team, billing and orders are managed in the Driftstack dashboard.