CoderHelm Docs
APIAccount

Get the caller

GET
/api/me

Returns who the request is authenticated as. With an API key this is the key itself: its name, who made it, when it expires, its rate limit, and in capabilities the scopes it holds right now (cut down to what its maker holds). Call it first to check a key works.

Authorization

api_key
headerAuthorizationBearer <token>

A team API key, made by an admin under Settings, API keys. Send it as Authorization: Bearer chk_....

Response Body

The caller.

application/json
  1. response

Who is calling: a person signed in to the dashboard, or a team API key.

api_key?null|
auth_provider*string

How the caller signed in: email, google, github, or api_key.

Example"api_key"
avatar_url?|

The person's picture. Always null for an API key.

Example"https://avatars.githubusercontent.com/u/583231"
capabilities?array<string>|

The capability keys held. For an API key, its scopes as they stand on this request: never more than its maker holds now.

Example
[  "view",  "runs"]
custom_role?null|
email*string

The person's email. For an API key, its maker's.

Example"dev@example.com"
github_login?|

The person's GitHub login. For an API key, its maker's.

Example"octocat"
mfa_enabled*boolean

Whether the person turned on two-factor sign-in.

Examplefalse
platform_admin*boolean

Whether the caller administers the whole CoderHelm install (its operators, set in the install's configuration). Always false for an API key.

Examplefalse
role*string

The built-in role requests run as: viewer, member, admin or owner. For a custom role or an API key, the highest built-in role whose capabilities are all held; capabilities says exactly what is.

Example"viewer"
status*string

The team's account status: active or suspended.

Example"active"
team_id*string

The team every request acts on.

Example"TEAM#4817263"
user_id*string

The caller's id: USER#... for a person, APIKEY#<id> for an API key.

Example"APIKEY#01jb8x6f4m2c9qz3t7v5w1k0ha"
curl -X GET 'https://api.coderhelm.com/api/me' \  -H "Authorization: Bearer $CODERHELM_API_KEY"
{  "api_key": null,  "auth_provider": "api_key",  "avatar_url": "https://avatars.githubusercontent.com/u/583231",  "capabilities": [    "view",    "runs"  ],  "custom_role": null,  "email": "dev@example.com",  "github_login": "octocat",  "mfa_enabled": false,  "platform_admin": false,  "role": "viewer",  "status": "active",  "team_id": "TEAM#4817263",  "user_id": "APIKEY#01jb8x6f4m2c9qz3t7v5w1k0ha"}
Edit on GitHub