Skip to content

User information
Stable

Request

Retrieves the profile and account details of the authenticated user associated with the current API key.

Use this endpoint to confirm which user identity is bound to your API credentials — useful for debugging access issues, verifying role assignments, or bootstrapping workflows that need to know the acting user's context before proceeding.

About Get User Info

Every Esper API key is tied to a specific user account within a tenant. This endpoint surfaces that user's full profile, including their role, group memberships, EMM linkage, and account status. It requires no path parameters — the response is scoped entirely to the authenticated caller. This is the canonical way to confirm "who am I?" in the Esper API context.

Key Fields

username — the login identifier for this user

profile.role — the user's assigned role (e.g., Enterprise Admin, Viewer, Group Admin)

profile.enterprise — the enterprise UUID this user belongs to

emm — linked EMM account details, if applicable

is_active — whether this user account is currently enabled

last_login — timestamp of the most recent authenticated session

Common Use Cases

Confirming which user identity is in use before executing sensitive operations

Retrieving the caller's enterprise ID for use in subsequent API calls

Auditing role assignments for an API key owner

Best Practices

Call this endpoint at the start of integrations to validate API key identity and capture the enterprise ID, rather than hardcoding it

Check is_active to ensure the account hasn't been deactivated before proceeding with bulk operations

Use profile.role to conditionally adapt your integration's behavior based on permission level

Workflow

Authenticate with your API key

Call GET /user_info/ to retrieve the caller's identity, enterprise ID, and role

Store profile.enterprise for use as enterprise_id in downstream API calls

Security
esper_cloud_api_apiKey
cURL
curl -i -X GET \
  https://api.esper.io/_mock/openapi/user_info/ \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

User Info

Bodyapplication/json
idinteger(ID)
usernamestring(User name)
emailstring, (email)(Email)
first_namestring(First name)
last_namestring(Last name)
full_namestring(Last name)
is_staffbooleanread-only
is_superuserbooleanread-only
is_activeboolean(Is user active)
profileobject(User Profile)
emmobject(EMM details)read-only
last_loginstring(Last login)
tokenstring(Token)
has_emmboolean(Has EMM)
is_email_verifiedboolean(Is Email Verified)
Response
{ "id": 0, "username": "string", "email": "user@example.com", "first_name": "string", "last_name": "string", "full_name": "string", "is_staff": true, "is_superuser": true, "is_active": true, "profile": { "id": 0, "enterprise_user_id": "string", "authn_user_id": "77ba949a-db0b-4544-a77c-b27f70fe06cd", "authn_connection_id": "500f8424-a17b-4138-9b34-dcf4c445232c", "authz_role_id": "c85d5e04-56ba-49f9-8ef1-94165471fa4c", "role": "Shoonya Admin", "enterprise": "796caaf9-a7de-4817-9ffa-39d04bf83de9", "is_customer": true, "is_endpoint_creator": true, "created_on": "2019-08-24T14:15:22Z", "updated_on": "2019-08-24T14:15:22Z", "setup_wizard_complete": true, "default_password_changed": true, "is_developer": true, "can_factory_reset": true, "groups": [] }, "emm": { "id": 0, "user": 0, "account_identifier": "string", "account_type": "string", "display_name": "string", "google_user_id": "string", "google_enterprise": 0, "is_active": true, "created_on": "2019-08-24T14:15:22Z", "updated_on": "2019-08-24T14:15:22Z", "authentication_token": {} }, "last_login": "string", "token": "string", "has_emm": true, "is_email_verified": true }