Docs
Account, keys and webhooks ›

Get me

GET/v1/me

Get me.

RequestTypeScript
  1. import { Agental } from "agental-sdk";
  2. const agental = new Agental();
  3. const me = await agental.me();
Answer200 OK
  1. {
  2. "id": string,
  3. "name": string,
  4. "email": string | null,
  5. "role": string,
  6. "activeOrganizationId": string,
  7. "organizations": [{
  8. "id": string,
  9. "name": string,
  10. "personal": boolean,
  11. "role": "owner" | "admin" | "member" | "null" | null,
  12. "membersAllowed": boolean,
  13. }],
  14. "closed": {
  15. "closedAt": string,
  16. "eraseAt": string,
  17. },
  18. }

The caller: the account behind the session or API key.

Headers

Authorizationrequired
Bearer key
An API key that may make this call.

Returns

200 The caller: the account behind the session or API key.

JSON7 fields
id
string
name
string
email
stringnull
role
string
activeOrganizationId
string
organizations
object[]5 fields
The organizations the caller is in, their own first, with their role in each.
id
string
name
string
personal
boolean
Whether it is the caller's own organization.
role
owneradminmembernullnull
membersAllowed
boolean
Whether its plan lets it have members besides its owners: $500 or $2000, or limits of that level given by hand.
More Below that, only its owners may use it. A person's own organization takes members on those plans too, with its person its only owner.
closed
ClosedAccountnull2 fields
When the account was closed and when it will be erased.
More Null while it is open.
closedAt
string
When the account was closed.
eraseAt
string
When it will be erased, unless it is reopened before then: 30 days after it was closed.

Errors and other answers

404 Not found.

Every error answers { "error": { "code", "message" } }; a key without the action a call needs answers 403 key_action_forbidden, naming it.