Krobar.ai Users API
Endpoints for user administration and management
Endpoints for user administration and management
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/krobar-ai:krobar-ai-users-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Krobar AI Users API
description: '# API Krobar AI
Welcome to the Krobar AI API! A FastAPI-based service that is the backend for Krobar.ai
## Authentication
**IMPORTANT**: This API requires an API key for all endpoints except for /health. The API key must be provided in the `X-API-Key` header.
```bash
curl -H "X-API-Key: your-api-key" https://api.krobar.ai/endpoint
```'
contact:
name: API Support
email: tristan@kromatic.com
version: 1.0.0
tags:
- name: Users
description: Endpoints for user administration and management
paths:
/users/roles:
get:
tags:
- Users
summary: Get Roles
description: 'List all available roles in the system.
Requires superuser permission.
Returns:
- List of available roles with descriptions'
operationId: get_roles_users_roles_get
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/RolesListResponse'
/users:
get:
tags:
- Users
summary: Get Users
description: 'Retrieve a paginated list of all users with optional filtering.
Requires superuser permission.
Parameters:
- skip: Number of users to skip (pagination)
- limit: Maximum number of users to return (pagination)
- search: Optional search term to filter users by email or name
- role: Optional role filter
- is_active: Optional filter for active status
Returns:
- List of user objects with pagination metadata'
operationId: get_users_users_get
parameters:
- name: skip
in: query
required: false
schema:
type: integer
default: 0
title: Skip
- name: limit
in: query
required: false
schema:
type: integer
default: 100
title: Limit
- name: search
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: Search
- name: role
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: Role
- name: is_active
in: query
required: false
schema:
anyOf:
- type: boolean
- type: 'null'
title: Is Active
- name: sort_by
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: Field to sort by (e.g. email, first_name, last_name, created_at, updated_at)
title: Sort By
description: Field to sort by (e.g. email, first_name, last_name, created_at, updated_at)
- name: sort_order
in: query
required: false
schema:
anyOf:
- $ref: '#/components/schemas/SortOrder'
- type: 'null'
description: Sort order (asc or desc)
default: asc
title: Sort Order
description: Sort order (asc or desc)
- name: all
in: query
required: false
schema:
anyOf:
- type: boolean
- type: 'null'
description: If True, list all users (admin only)
default: false
title: All
description: If True, list all users (admin only)
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/UsersListResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
post:
tags:
- Users
summary: Create User
description: 'Create a new user account (for admin provisioning).
Requires superuser permission.
Parameters:
- user data including email, password, name, etc.
- role: Initial role to assign to the user
Returns:
- Created user object'
operationId: create_user_users_post
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/UserCreate'
responses:
'201':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/UserAdminResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/users/{user_id}:
get:
tags:
- Users
summary: Get User
description: 'Retrieve detailed information for a specific user.
Requires superuser permission.
Parameters:
- user_id: UUID of the user to retrieve
Returns:
- User object with detailed information'
operationId: get_user_users__user_id__get
parameters:
- name: user_id
in: path
required: true
schema:
type: string
format: uuid
title: User Id
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/UserAdminResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
put:
tags:
- Users
summary: Update User
description: 'Update a user''s profile information.
Requires superuser permission.
Parameters:
- user_id: UUID of the user to update
- user data to update (name, email, etc.)
Returns:
- Updated user object'
operationId: update_user_users__user_id__put
parameters:
- name: user_id
in: path
required: true
schema:
type: string
format: uuid
title: User Id
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/UserUpdate'
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/UserAdminResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
delete:
tags:
- Users
summary: Delete User
description: 'Remove a user from the system.
Requires superuser permission.
Parameters:
- user_id: UUID of the user to delete
Returns:
- Success message'
operationId: delete_user_users__user_id__delete
parameters:
- name: user_id
in: path
required: true
schema:
type: string
format: uuid
title: User Id
responses:
'204':
description: Successful Response
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/users/{user_id}/teams:
get:
tags:
- Users
summary: Get User Teams
description: Get all teams that a user is a member of with their role in each team.
operationId: get_user_teams_users__user_id__teams_get
parameters:
- name: user_id
in: path
required: true
schema:
type: string
format: uuid
title: User Id
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/TeamsListResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/users/{user_id}/role:
put:
tags:
- Users
summary: Update User Role
description: 'Modify a user''s role in the RBAC Casbin policies.
Requires superuser permission.
Parameters:
- user_id: UUID of the user to update
- role: New role to assign
Returns:
- Updated user object with new role'
operationId: update_user_role_users__user_id__role_put
parameters:
- name: user_id
in: path
required: true
schema:
type: string
format: uuid
title: User Id
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/UserRoleUpdate'
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/UserAdminResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/users/{user_id}/status:
put:
tags:
- Users
summary: Update User Status
description: 'Enable or disable a user account.
Requires superuser permission.
Parameters:
- user_id: UUID of the user to update
- is_active: Boolean indicating whether the account should be active
Returns:
- Updated user object with new status'
operationId: update_user_status_users__user_id__status_put
parameters:
- name: user_id
in: path
required: true
schema:
type: string
format: uuid
title: User Id
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/UserStatusUpdate'
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/UserAdminResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
components:
schemas:
SortOrder:
type: string
enum:
- asc
- desc
title: SortOrder
description: Sort order options.
UserUpdate:
properties:
email:
anyOf:
- type: string
format: email
- type: 'null'
title: Email
description: User's email address
first_name:
anyOf:
- type: string
- type: 'null'
title: First Name
description: User's first name
last_name:
anyOf:
- type: string
- type: 'null'
title: Last Name
description: User's last name
profile_picture:
anyOf:
- type: string
- type: 'null'
title: Profile Picture
description: URL to user's profile picture
user_prompt_bio:
anyOf:
- type: string
- type: 'null'
title: User Prompt Bio
description: User's bio for LLM system prompts
password:
anyOf:
- type: string
- type: 'null'
title: Password
description: New password (if changing)
type: object
title: UserUpdate
description: Schema for updating an existing user.
UserStatusUpdate:
properties:
is_active:
type: boolean
title: Is Active
description: Whether the user account should be active
type: object
required:
- is_active
title: UserStatusUpdate
description: Schema for updating a user's active status.
TeamsListResponse:
properties:
teams:
items:
$ref: '#/components/schemas/TeamSummary'
type: array
title: Teams
total:
type: integer
title: Total
skip:
type: integer
title: Skip
limit:
type: integer
title: Limit
type: object
required:
- teams
- total
- skip
- limit
title: TeamsListResponse
description: Schema for paginated teams list response.
OAuthProvider:
type: string
enum:
- GOOGLE
- APPLE
- MICROSOFT
title: OAuthProvider
description: Enum for OAuth providers.
UsersListResponse:
properties:
users:
items:
$ref: '#/components/schemas/UserAdminResponse'
type: array
title: Users
total:
type: integer
title: Total
skip:
type: integer
title: Skip
limit:
type: integer
title: Limit
type: object
required:
- users
- total
- skip
- limit
title: UsersListResponse
description: Schema for paginated users list response.
HTTPValidationError:
properties:
detail:
items:
$ref: '#/components/schemas/ValidationError'
type: array
title: Detail
type: object
title: HTTPValidationError
RolesListResponse:
properties:
roles:
items:
$ref: '#/components/schemas/RoleDescription'
type: array
title: Roles
type: object
required:
- roles
title: RolesListResponse
description: Schema for roles list response.
UserAdminResponse:
properties:
id:
type: string
format: uuid
title: Id
email:
type: string
title: Email
first_name:
anyOf:
- type: string
- type: 'null'
title: First Name
last_name:
anyOf:
- type: string
- type: 'null'
title: Last Name
profile_picture:
anyOf:
- type: string
- type: 'null'
title: Profile Picture
user_prompt_bio:
anyOf:
- type: string
- type: 'null'
title: User Prompt Bio
is_active:
type: boolean
title: Is Active
is_verified:
type: boolean
title: Is Verified
role:
type: string
title: Role
oauth_provider:
anyOf:
- type: string
- type: 'null'
title: Oauth Provider
created_at:
type: string
format: date-time
title: Created At
updated_at:
type: string
format: date-time
title: Updated At
frontend_permissions:
items:
type: string
type: array
title: Frontend Permissions
default: []
estimation_policy_agreed_at:
anyOf:
- type: string
format: date-time
- type: 'null'
title: Estimation Policy Agreed At
estimation_policy_signature:
anyOf:
- type: string
- type: 'null'
title: Estimation Policy Signature
estimation_policy_id:
anyOf:
- type: string
format: uuid
- type: 'null'
title: Estimation Policy Id
type: object
required:
- id
- email
- is_active
- is_verified
- role
- created_at
- updated_at
title: UserAdminResponse
description: Schema for detailed user response in admin endpoints.
RoleDescription:
properties:
name:
type: string
title: Name
description:
type: string
title: Description
permissions:
items:
type: string
type: array
title: Permissions
description: List of domain names for this role's permissions
type: object
required:
- name
- description
- permissions
title: RoleDescription
description: Schema for role description.
UserRoleUpdate:
properties:
role:
type: string
title: Role
description: New role to assign to the user
type: object
required:
- role
title: UserRoleUpdate
description: Schema for updating a user's role.
ValidationError:
properties:
loc:
items:
anyOf:
- type: string
- type: integer
type: array
title: Location
msg:
type: string
title: Message
type:
type: string
title: Error Type
input:
title: Input
ctx:
type: object
title: Context
type: object
required:
- loc
- msg
- type
title: ValidationError
UserCreate:
properties:
email:
type: string
format: email
title: Email
description: User's email address
password:
anyOf:
- type: string
- type: 'null'
title: Password
description: User's password (leave empty for OAuth users)
first_name:
anyOf:
- type: string
- type: 'null'
title: First Name
description: User's first name
last_name:
anyOf:
- type: string
- type: 'null'
title: Last Name
description: User's last name
profile_picture:
anyOf:
- type: string
- type: 'null'
title: Profile Picture
description: URL to user's profile picture
is_active:
type: boolean
title: Is Active
description: Whether the user account is active
default: true
is_verified:
type: boolean
title: Is Verified
description: Whether the user email is verified
default: true
role:
type: string
title: Role
description: User's role in the system - must be a valid role from Casbin rules
oauth_provider:
anyOf:
- $ref: '#/components/schemas/OAuthProvider'
- type: 'null'
description: OAuth provider if applicable
type: object
required:
- email
- role
title: UserCreate
description: Schema for creating a new user through the admin API.
TeamSubscriptionResponse:
properties:
has_subscription:
type: boolean
title: Has Subscription
status:
type: string
title: Status
plan:
anyOf:
- additionalProperties: true
type: object
- type: 'null'
title: Plan
limits:
additionalProperties: true
type: object
title: Limits
usage:
additionalProperties:
type: integer
type: object
title: Usage
trial_expired:
type: boolean
title: Trial Expired
trial_start_date:
anyOf:
- type: string
- type: 'null'
title: Trial Start Date
trial_end_date:
anyOf:
- type: string
- type: 'null'
title: Trial End Date
subscription_start_date:
anyOf:
- type: string
- type: 'null'
title: Subscription Start Date
subscription_end_date:
anyOf:
- type: string
- type: 'null'
title: Subscription End Date
type: object
required:
- has_subscription
- status
- limits
- usage
- trial_expired
title: TeamSubscriptionResponse
description: Response schema for team subscription status.
TeamSummary:
properties:
id:
type: string
format: uuid
title: Id
name:
type: string
title: Name
description:
anyOf:
- type: string
- type: 'null'
title: Description
created_at:
type: string
format: date-time
title: Created At
updated_at:
type: string
format: date-time
title: Updated At
member_count:
type: integer
title: Member Count
created_by:
anyOf:
- type: string
format: uuid
- type: 'null'
title: Created By
description: ID of the user who created the team
updated_by:
anyOf:
- type: string
format: uuid
- type: 'null'
title: Updated By
description: ID of the user who last updated the team
user_role:
anyOf:
- type: string
- type: 'null'
title: User Role
subscription:
anyOf:
- $ref: '#/components/schemas/TeamSubscriptionResponse'
- type: 'null'
type: object
required:
- id
- name
- created_at
- updated_at
- member_count
title: TeamSummary
description: Schema for team summary without detailed member information.
securitySchemes:
APIKeyCookie:
type: apiKey
in: cookie
name: access_token
APIKeyHeader:
type: apiKey
in: header
name: X-API-Key