Krobar.ai Invite Tokens API
Endpoints for managing invite tokens that allow users to bypass the waitlist
Endpoints for managing invite tokens that allow users to bypass the waitlist
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-invite-tokens-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 Invite Tokens 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: Invite Tokens
description: Endpoints for managing invite tokens that allow users to bypass the waitlist
paths:
/invites/tokens:
post:
tags:
- Invite Tokens
summary: Create Token
description: 'Create a new invite token.
Only admins can create tokens. The invite token can optionally specify:
- `description`: Optional description for the token
- `expires_in_days`: Number of days until the token expires (null for no expiration)
- `team_id`: Optional team ID to associate with this token
- `role`: Optional role to assign to the user who uses this token. The role must be a valid, non-superuser role in the system. If omitted, the user will receive the default user role upon onboarding.
**Role Assignment Logic:**
- If a role is provided, it must be a valid role (see `/users/roles`) and cannot be `superuser`.
- If the role is invalid or `superuser`, the invite token will not be created (422 error).
- If no role is provided, the user will be assigned the default user role upon onboarding.
**Example request:**
```json
{
"description": "Invite for team Alpha",
"expires_in_days": 14,
"team_id": "b1c2d3e4-f5a6-7890-1234-56789abcdef0",
"role": "approved"
}
```
**Example response:**
```json
{
"id": "...",
"token": "...",
"description": "Invite for team Alpha",
"is_used": false,
"used_by": null,
"used_at": null,
"expires_at": "2024-07-01T00:00:00Z",
"created_at": "2024-06-01T12:00:00Z",
"created_by": "...",
"team_id": "b1c2d3e4-f5a6-7890-1234-56789abcdef0"
}
```
**Status Codes:**
- 201: Token created
- 422: Invalid role or parameters
- 401/403: Unauthorized'
operationId: create_invite_token
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/TokenCreate'
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/TokenResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
get:
tags:
- Invite Tokens
summary: List Tokens
description: 'List invite tokens.
Only admins can view tokens. Supports filtering by used/expired status and team.
**Query parameters:**
- `include_used`: Whether to include used tokens
- `include_expired`: Whether to include expired tokens
- `team_id`: Filter tokens by team ID
- `limit`: Maximum number of tokens to return
- `offset`: Number of tokens to skip
**Example response:**
```json
[
{ ...token fields... },
{ ... }
]
```'
operationId: list_invite_tokens
parameters:
- name: include_used
in: query
required: false
schema:
type: boolean
description: Whether to include used tokens
default: false
title: Include Used
description: Whether to include used tokens
- name: include_expired
in: query
required: false
schema:
type: boolean
description: Whether to include expired tokens
default: false
title: Include Expired
description: Whether to include expired tokens
- name: team_id
in: query
required: false
schema:
anyOf:
- type: string
format: uuid
- type: 'null'
description: Filter tokens by team ID
title: Team Id
description: Filter tokens by team ID
- name: limit
in: query
required: false
schema:
type: integer
maximum: 500
minimum: 1
description: Maximum number of tokens to return
default: 100
title: Limit
description: Maximum number of tokens to return
- name: offset
in: query
required: false
schema:
type: integer
minimum: 0
description: Number of tokens to skip
default: 0
title: Offset
description: Number of tokens to skip
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/TokensListResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/invites/tokens/{token_id}:
get:
tags:
- Invite Tokens
summary: Get Token
description: 'Get a specific invite token by ID.
Only admins can view tokens.
**Path parameter:**
- `token_id`: UUID of the token
**Status Codes:**
- 200: Token found
- 404: Token not found
- 401/403: Unauthorized'
operationId: get_invite_token
parameters:
- name: token_id
in: path
required: true
schema:
type: string
format: uuid
title: Token Id
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/TokenResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
delete:
tags:
- Invite Tokens
summary: Delete Token
description: 'Delete an invite token.
Only admins can delete tokens.
**Path parameter:**
- `token_id`: UUID of the token
**Status Codes:**
- 204: Token deleted
- 404: Token not found
- 401/403: Unauthorized'
operationId: delete_invite_token
parameters:
- name: token_id
in: path
required: true
schema:
type: string
format: uuid
title: Token Id
responses:
'204':
description: Successful Response
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/invites/tokens/{token_id}/invalidate:
post:
tags:
- Invite Tokens
summary: Invalidate Token
description: 'Invalidate a token by marking it as used.
Only admins can invalidate tokens.
**Path parameter:**
- `token_id`: UUID of the token
**Status Codes:**
- 200: Token invalidated
- 404: Token not found
- 401/403: Unauthorized'
operationId: invalidate_invite_token
parameters:
- name: token_id
in: path
required: true
schema:
type: string
format: uuid
title: Token Id
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/TokenResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/invites/validate:
post:
tags:
- Invite Tokens
summary: Validate Token
description: 'Validate a token without using it.
Any authenticated user can validate tokens. Returns token validity and metadata.
**Query parameter:**
- `token_str`: The token string to validate
**Example response:**
```json
{
"valid": true,
"message": "Token is valid",
"team_id": "...",
"used": false,
"expires_at": "2024-07-01T00:00:00Z"
}
```'
operationId: validate_invite_token
parameters:
- name: token_str
in: query
required: true
schema:
type: string
description: The token string to validate
title: Token Str
description: The token string to validate
responses:
'200':
description: Successful Response
content:
application/json:
schema:
type: object
additionalProperties: true
title: Response Validate Invite Token
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
components:
schemas:
TokensListResponse:
properties:
tokens:
items:
$ref: '#/components/schemas/TokenResponse'
type: array
title: Tokens
total:
type: integer
title: Total
skip:
type: integer
title: Skip
limit:
type: integer
title: Limit
type: object
required:
- tokens
- total
- skip
- limit
title: TokensListResponse
description: Schema for paginated list of invite tokens.
HTTPValidationError:
properties:
detail:
items:
$ref: '#/components/schemas/ValidationError'
type: array
title: Detail
type: object
title: HTTPValidationError
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
TokenCreate:
properties:
description:
anyOf:
- type: string
- type: 'null'
title: Description
description: Optional description for the token
expires_in_days:
anyOf:
- type: integer
- type: 'null'
title: Expires In Days
description: Number of days until the token expires (null for no expiration)
default: 30
team_id:
anyOf:
- type: string
format: uuid
- type: 'null'
title: Team Id
description: Optional team ID to associate with this token
role:
anyOf:
- type: string
- type: 'null'
title: Role
description: Optional role to assign to the user who uses this token
type: object
title: TokenCreate
description: Schema for creating an invite token.
TokenResponse:
properties:
id:
type: string
format: uuid
title: Id
token:
type: string
title: Token
description:
anyOf:
- type: string
- type: 'null'
title: Description
is_used:
type: boolean
title: Is Used
used_by:
anyOf:
- type: string
format: uuid
- type: 'null'
title: Used By
used_at:
anyOf:
- type: string
format: date-time
- type: 'null'
title: Used At
expires_at:
anyOf:
- type: string
format: date-time
- type: 'null'
title: Expires At
created_at:
type: string
format: date-time
title: Created At
created_by:
anyOf:
- type: string
format: uuid
- type: 'null'
title: Created By
team_id:
anyOf:
- type: string
format: uuid
- type: 'null'
title: Team Id
type: object
required:
- id
- token
- is_used
- created_at
title: TokenResponse
description: Schema for returning token information.
securitySchemes:
APIKeyCookie:
type: apiKey
in: cookie
name: access_token
APIKeyHeader:
type: apiKey
in: header
name: X-API-Key