Account, keys and webhooks ›
Get me
GET
/v1/meGet me.
RequestTypeScript
- import { Agental } from "agental-sdk";
- const agental = new Agental();
- const me = await agental.me();
Answer200 OK
- {
- "id": string,
- "name": string,
- "email": string | null,
- "role": string,
- "activeOrganizationId": string,
- "organizations": [{
- "id": string,
- "name": string,
- "personal": boolean,
- "role": "owner" | "admin" | "member" | "null" | null,
- "membersAllowed": boolean,
- }],
- "closed": {
- "closedAt": string,
- "eraseAt": string,
- },
- }
The caller: the account behind the session or API key.
Headers
AuthorizationrequiredBearer key | An API key that may make this call. |
Returns
200 The caller: the account behind the session or API key.
JSON7 fields
idstring
namestring
emailstringnull
rolestring
activeOrganizationIdstring
organizationsobject[]5 fields
The organizations the caller is in, their own first, with their role in each.
idstring
namestring
personalboolean
Whether it is the caller's own organization.
roleowneradminmembernullnull
membersAllowedboolean
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.closedClosedAccountnull2 fields
When the account was closed and when it will be erased.
More
Null while it is open.closedAtstring
When the account was closed.
eraseAtstring
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.