Your key › Get the person behind the key
Your key
Get the person behind the key
GET/api/mePermalink
The person behind a personal key. An organisation’s key has no person (403). Changing the profile and ending sessions stay the console’s.
- Permission
- A personal key only: an organisation’s key gets 403
- Plan
- Plans that include the API: Pricing
- Retry
- Safe: a read changes nothing
Example request
curl "https://console.brevily.com/api/me" \ -H "x-api-key: brv_ak_7Fq2Lw9xK3" \ -H "x-api-secret: $BREVILY_SECRET"const res = await fetch("https://console.brevily.com/api/me", { headers: { "x-api-key": "brv_ak_7Fq2Lw9xK3", "x-api-secret": process.env.BREVILY_SECRET, },});const answer = await res.json();Example answer
{ "id": "01JC6Y8QH2M4ZK7T9VRW3XNB5D", "email": "ada@example.com", "name": "example", "language": "example", "organisationCode": "example", "role": "OWNER", "groups": [ "example" ], "hasPassword": false, "twoFactor": false, "recoveryCodesLeft": 1, "passkeys": 1, "signIns": [ "example" ], "theme": "system", "analytics": false, "emails": {}, "sessions": [ { "id": "01JC6Y8QH2M4ZK7T9VRW3XNB5D", "device": "example", "method": "example", "place": "example", "remember": false, "createdOn": "2026-11-05T09:41:00Z", "lastSeenOn": "2026-11-05T09:41:00Z", "expiresOn": "2026-11-05T09:41:00Z" } ], "createdOn": "2026-11-05T09:41:00Z"}{ "code": "ACCESS_DENIED", "message": "An organisation’s key has no person: use a personal key, which acts as its person.", "requestId": "18188559082372202519"}Made-up values.
AnswerPermalink
Me
| Name | Type | Description | Allowed values |
|---|---|---|---|
id | string | The person’s id. | — |
email | string | The address they sign in with. | — |
name | string | Their name; null when none is set. | or null |
language | string | Their language (en, en-GB). | — |
organisationCode | string | Their organisation. | or null |
role | string | Derived, never stored: the owner, else Admin or Billing by the system groups held, else MEMBER. | OWNER, ADMIN, MEMBER |
groups | string[] | The groups they sit in. | — |
hasPassword | boolean | They can sign in with a password; false when they sign in through a provider only. | — |
twoFactor | boolean | Two-factor is on. | — |
recoveryCodesLeft | integer | Unused recovery codes. | — |
passkeys | integer | Passkeys registered. | — |
signIns | string[] | The providers linked to sign them in. | — |
theme | string | The console’s theme. | system, light, dark |
analytics | boolean | Usage analytics in the console: true on, false off; null when never asked. | or null |
emails | object | Each optional email (by its switch’s name) and whether they get it. | — |
sessions | Session[] | Their signed-in sessions, newest first. | — |
createdOn | date-time | When the account was made. | — |
Fields of sessions
| Name | Type | Description | Allowed values |
|---|---|---|---|
id | string | The session’s id: what POST /profile/sessions/{session}/revoke takes. | — |
device | string | The browser and system it was opened on. | — |
method | string | How it signed in ("Password + 2FA", "GitHub"); null when not recorded. | or null |
place | string | Where it signed in from, as the address placed it; null when unknown. | or null |
remember | boolean | "Keep me signed in" was ticked. | — |
createdOn | date-time | When it signed in. | — |
lastSeenOn | date-time | When it was last used; null when not recorded. | or null |
expiresOn | date-time | When it ends, the organisation’s session policy applied. | — |
ErrorsPermalink
| Status | Code | When |
|---|---|---|
| 400 | VALIDATION_FAILED |
A field, a parameter or the body is wrong; details.fields says which. |
| 401 | UNAUTHENTICATED |
No key, a key that does not match, or one expired or revoked. |
| 403 | ACCESS_DENIED |
An organisation’s key: this call needs a personal key, which acts as its person. |
| 404 | NOT_FOUND |
No organisation with that code for this key, or no such record in it. |
| 429 | RATE_LIMITED |
Too many calls: wait Retry-After seconds. |
Rate limitsPermalink
Counted with every other call of the organisation, by plan: Pricing. The answer carries RateLimit-Limit, RateLimit-Remaining and RateLimit-Reset; more on rate limits.
Type a call, a field or a guide.