Skip to main content

Get current user

GET https://api.rollstack.com/public/v1/me

The user and API key making the request: the user's id, name and email, the organization the key belongs to with the role the key acts with, and the key's id and scopes. Call it to check that a key works.

Works with any valid API key.

Operation ID: getMe.

Response 200

Success

application/json

  • id (number, required): Unique identifier for the user the API key belongs to: the same id that listMembers returns for them.
  • email (string, required): The email address of the user the API key belongs to.
  • name (string, required): The name of the user the API key belongs to, as shown in Rollstack.
  • organization (object, required): The organization the API key belongs to. A key works only in the organization it was created in.
    • id (string, required): Unique identifier for the organization: the same id that getOrganization returns.
    • name (string, required): The organization's name, as shown in Rollstack.
    • role (string, required): The role the API key acts with in the organization, which limits what it can do on top of its scopes. As an owner or admin, the key can call the endpoints limited to owners and admins, but only as an owner can it turn the organization's features on or off or change who can access its Authentication settings. As a member, it can do neither. It is the user's current role, but never higher than the one they had when the key was created or its scopes were last edited, so promoting the user doesn't raise it. One of owner, admin, member.
  • apiKey (object, required): The API key that made the request.
    • id (string, required): Unique identifier for the API key that made the request. It identifies the key without revealing its secret.
    • scopes (array of string, required): The scopes the API key carries, which decide the endpoints it can call: each endpoint states the scope it needs, and the Scopes section of the introduction lists what each one allows. While the key acts as a member, it loses users:read, users:write and organization:write, the scopes only owners and admins may grant, even if it was created with them.