Access
Preview

The signed-in caller

GET
/me
cookiebetter-auth.session_token<token>

Better Auth session cookie. Production uses the __Secure- prefixed name.

Response Body

The caller, their active organization and role.

application/json
  1. response
userId*string
name*string
email*string
avatarUrl?string
orgId*string
orgRole*OrgRole
Value in"owner""admin""contributor""viewer"
teamIds*array<string>
ownsOrganization*boolean

Whether the caller owns an organization that is not their personal one.

canCreateOrganization*boolean

Whether POST /me/organizations would make one now.

createOrganizationBlockedReason?string

Why not, when canCreateOrganization is false. not_individual: an organization's invitation, single sign-on or provisioning brought the account in. owner_limit: the caller owns as many as they may. create_used: the caller has already made as many as they may, even if someone else owns them now.

Value in"not_individual""owner_limit""create_used"
organizations*array<>

Every organization the caller belongs to.

support?

Present only in a support session.

Example Request
curl -X GET 'https://wardn.example.com/api/v1/me'
Example Response
{  "userId": "string",  "name": "string",  "email": "string",  "avatarUrl": "string",  "orgId": "string",  "orgRole": "owner",  "teamIds": [    "string"  ],  "ownsOrganization": true,  "canCreateOrganization": true,  "createOrganizationBlockedReason": "not_individual",  "organizations": [    {      "id": "string",      "name": "string",      "role": "owner",      "personal": true,      "memberCount": 0    }  ],  "support": {    "grantId": "4eda52b3-a1b8-4aae-b545-9c8c3c9c7709",    "expiresAt": "2019-08-24T14:15:22Z"  }}