Skip to main content
These endpoints operate on the currently authenticated user’s account. They let you fetch your profile and update personal details. To manage other users within a tenant, use the Tenants endpoints.

Get current user

Returns the profile of the authenticated user.
GET https://api-staging.knowledgestack.ai/v1/users/me
Example
curl https://api-staging.knowledgestack.ai/v1/users/me \
  -H "Authorization: Bearer <your-api-key>"
ResponseUserResponse
id
string
UUID of the user.
email
string | null
Email address of the user.
first_name
string | null
First name of the user.
last_name
string | null
Last name of the user.
idp_type
string
Identity provider type used to authenticate this user (e.g. password, google, saml).
current_tenant_id
string
UUID of the tenant the user is currently scoped to.
current_tenant_role
string
The user’s role in their current tenant. One of USER, ADMIN, OWNER.
default_tenant_id
string
UUID of the tenant the user is directed to on sign-in.
Example response
{
  "id": "u1u2u3u4-...",
  "email": "ada@acme.com",
  "first_name": "Ada",
  "last_name": "Lovelace",
  "idp_type": "password",
  "current_tenant_id": "a1b2c3d4-...",
  "current_tenant_role": "ADMIN",
  "default_tenant_id": "a1b2c3d4-..."
}

Update current user

Updates the authenticated user’s profile. All fields are optional — only the fields you include are changed.
PATCH https://api-staging.knowledgestack.ai/v1/users
first_name
string
Updated first name.
last_name
string
Updated last name.
default_tenant_id
string
UUID of the tenant to set as the user’s default login destination.
Example
curl -X PATCH https://api-staging.knowledgestack.ai/v1/users \
  -H "Authorization: Bearer <your-api-key>" \
  -H "Content-Type: application/json" \
  -d '{"first_name": "Ada", "last_name": "Lovelace"}'
ResponseUserResponse Returns the updated user profile. See Get current user for the full field reference.