stack/docs-mintlify/openapi/client.json
Devin AI c7b356a9b1 fix(docs): exclude /internal/* routes from generated API reference
Co-Authored-By: aman <aman@stack-auth.com>
2026-06-03 18:32:30 -07:00

6240 lines
218 KiB
JSON

{
"openapi": "3.1.0",
"info": {
"title": "Hexclave REST API",
"version": "1.0.0",
"description": "The Hexclave REST API. All request headers are documented as canonical `X-Hexclave-*`; the equivalent `X-Stack-*` aliases are accepted on every endpoint for backwards compatibility. Response headers `X-Hexclave-actual-status`, `X-Hexclave-known-error`, and `X-Hexclave-request-id` are emitted alongside their legacy `X-Stack-*` equivalents."
},
"servers": [
{
"url": "https://api.hexclave.com/api/v1",
"description": "Hexclave REST API"
}
],
"paths": {
"/": {
"get": {
"summary": "/api/v1",
"description": "Returns a human-readable message with some useful information about the API.",
"parameters": [
{
"name": "X-Hexclave-Project-Id",
"in": "header",
"schema": {
"type": "string",
"example": "e0b52f4d-dece-408c-af49-d23061bb0f8d",
"description": "The unique identifier of the project"
},
"description": "The unique identifier of the project",
"example": "e0b52f4d-dece-408c-af49-d23061bb0f8d",
"required": false
},
{
"name": "X-Hexclave-Branch-Id",
"in": "header",
"schema": {
"type": "string",
"example": "e0b52f4d-dece-408c-af49-d23061bb0f8d",
"description": "The unique identifier of the project"
},
"description": "The unique identifier of the project",
"example": "e0b52f4d-dece-408c-af49-d23061bb0f8d",
"required": false
},
{
"name": "X-Hexclave-Access-Type",
"in": "header",
"schema": {
"type": "string",
"enum": [
"client",
"server",
"admin"
]
},
"required": false
},
{
"name": "X-Hexclave-Access-Token",
"in": "header",
"schema": {
"type": "string"
},
"required": false
},
{
"name": "X-Hexclave-Refresh-Token",
"in": "header",
"schema": {
"type": "string"
},
"required": false
},
{
"name": "X-Hexclave-Publishable-Client-Key",
"in": "header",
"schema": {
"type": "string"
},
"required": false
},
{
"name": "X-Hexclave-Secret-Server-Key",
"in": "header",
"schema": {
"type": "string"
},
"required": false
},
{
"name": "X-Hexclave-Super-Secret-Admin-Key",
"in": "header",
"schema": {
"type": "string"
},
"required": false
},
{
"name": "X-Stack-Project-Id",
"in": "header",
"schema": {
"type": "string",
"example": "e0b52f4d-dece-408c-af49-d23061bb0f8d",
"description": "The unique identifier of the project"
},
"description": "The unique identifier of the project",
"example": "e0b52f4d-dece-408c-af49-d23061bb0f8d",
"required": false
},
{
"name": "X-Stack-Branch-Id",
"in": "header",
"schema": {
"type": "string",
"example": "e0b52f4d-dece-408c-af49-d23061bb0f8d",
"description": "The unique identifier of the project"
},
"description": "The unique identifier of the project",
"example": "e0b52f4d-dece-408c-af49-d23061bb0f8d",
"required": false
},
{
"name": "X-Stack-Access-Type",
"in": "header",
"schema": {
"type": "string",
"enum": [
"client",
"server",
"admin"
]
},
"required": false
},
{
"name": "X-Stack-Access-Token",
"in": "header",
"schema": {
"type": "string"
},
"required": false
},
{
"name": "X-Stack-Refresh-Token",
"in": "header",
"schema": {
"type": "string"
},
"required": false
},
{
"name": "X-Stack-Publishable-Client-Key",
"in": "header",
"schema": {
"type": "string"
},
"required": false
},
{
"name": "X-Stack-Secret-Server-Key",
"in": "header",
"schema": {
"type": "string"
},
"required": false
},
{
"name": "X-Stack-Super-Secret-Admin-Key",
"in": "header",
"schema": {
"type": "string"
},
"required": false
}
],
"tags": [],
"x-full-url": "https://api.hexclave.com/api/v1/",
"responses": {
"200": {
"description": "Successful response",
"content": {
"text/plain": {
"schema": {
"type": "string",
"example": "Welcome to the Hexclave API endpoint! Please refer to the documentation at https://docs.hexclave.com/\n\nAuthentication: None"
}
}
}
}
}
}
},
"/auth/anonymous/sign-up": {
"post": {
"summary": "Sign up anonymously",
"description": "Create a new anonymous account with no email",
"parameters": [],
"tags": [
"Anonymous"
],
"x-full-url": "https://api.hexclave.com/api/v1/auth/anonymous/sign-up",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"access_token": {
"type": "string"
},
"refresh_token": {
"type": "string"
},
"user_id": {
"type": "string"
}
},
"required": [
"access_token",
"refresh_token",
"user_id"
]
}
}
}
}
}
}
},
"/team-api-keys": {
"get": {
"summary": "List team API keys",
"description": "List all team API keys for the project with their metadata and status",
"parameters": [
{
"name": "team_id",
"in": "query",
"schema": {
"type": "string"
},
"required": true
}
],
"tags": [
"API Keys"
],
"x-full-url": "https://api.hexclave.com/api/v1/team-api-keys",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"description": {
"type": "string"
},
"expires_at_millis": {
"type": "number"
},
"manually_revoked_at_millis": {
"type": "number"
},
"created_at_millis": {
"type": "number"
},
"is_public": {
"type": "boolean"
},
"value": {
"type": "object",
"properties": {
"last_four": {
"type": "string"
}
},
"required": [
"last_four"
]
},
"type": {
"type": "string",
"enum": [
"team"
]
},
"team_id": {
"type": "string"
}
},
"required": [
"id",
"description",
"created_at_millis",
"is_public",
"value",
"type",
"team_id"
]
}
},
"pagination": {
"type": "object",
"properties": {
"next_cursor": {
"type": "string",
"example": "b3d396b8-c574-4c80-97b3-50031675ceb2",
"description": "The cursor to fetch the next page of results. null if there is no next page."
}
},
"required": []
}
},
"required": [
"items"
]
}
}
}
}
}
},
"post": {
"summary": "Create team API key",
"description": "Create a new API key for a user or team",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"description": {
"type": "string"
},
"expires_at_millis": {
"type": "number"
},
"is_public": {
"type": "boolean"
},
"team_id": {
"type": "string"
}
},
"required": [
"description",
"team_id"
],
"example": {}
}
}
}
},
"tags": [
"API Keys"
],
"x-full-url": "https://api.hexclave.com/api/v1/team-api-keys",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"value": {
"type": "string"
},
"id": {
"type": "string"
},
"description": {
"type": "string"
},
"expires_at_millis": {
"type": "number"
},
"manually_revoked_at_millis": {
"type": "number"
},
"created_at_millis": {
"type": "number"
},
"is_public": {
"type": "boolean"
},
"type": {
"type": "string",
"enum": [
"team"
]
},
"team_id": {
"type": "string"
}
},
"required": [
"value",
"id",
"description",
"created_at_millis",
"is_public",
"type",
"team_id"
]
}
}
}
}
}
}
},
"/team-api-keys/{api_key_id}": {
"get": {
"summary": "Get team API key details",
"description": "Get details of a specific team API key",
"parameters": [
{
"name": "api_key_id",
"in": "path",
"schema": {
"type": "string"
},
"required": true
}
],
"tags": [
"API Keys"
],
"x-full-url": "https://api.hexclave.com/api/v1/team-api-keys/{api_key_id}",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"description": {
"type": "string"
},
"expires_at_millis": {
"type": "number"
},
"manually_revoked_at_millis": {
"type": "number"
},
"created_at_millis": {
"type": "number"
},
"is_public": {
"type": "boolean"
},
"value": {
"type": "object",
"properties": {
"last_four": {
"type": "string"
}
},
"required": [
"last_four"
]
},
"type": {
"type": "string",
"enum": [
"team"
]
},
"team_id": {
"type": "string"
}
},
"required": [
"id",
"description",
"created_at_millis",
"is_public",
"value",
"type",
"team_id"
]
}
}
}
}
}
},
"patch": {
"summary": "Update team API key",
"description": "Update an team API key",
"parameters": [
{
"name": "api_key_id",
"in": "path",
"schema": {
"type": "string"
},
"required": true
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"description": {
"type": "string"
},
"revoked": {
"type": "boolean"
}
},
"example": {}
}
}
}
},
"tags": [
"API Keys"
],
"x-full-url": "https://api.hexclave.com/api/v1/team-api-keys/{api_key_id}",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"description": {
"type": "string"
},
"expires_at_millis": {
"type": "number"
},
"manually_revoked_at_millis": {
"type": "number"
},
"created_at_millis": {
"type": "number"
},
"is_public": {
"type": "boolean"
},
"value": {
"type": "object",
"properties": {
"last_four": {
"type": "string"
}
},
"required": [
"last_four"
]
},
"type": {
"type": "string",
"enum": [
"team"
]
},
"team_id": {
"type": "string"
}
},
"required": [
"id",
"description",
"created_at_millis",
"is_public",
"value",
"type",
"team_id"
]
}
}
}
}
}
}
},
"/user-api-keys": {
"get": {
"summary": "List user API keys",
"description": "List all user API keys for the project with their metadata and status",
"parameters": [
{
"name": "user_id",
"in": "query",
"schema": {
"type": "string"
},
"required": false
}
],
"tags": [
"API Keys"
],
"x-full-url": "https://api.hexclave.com/api/v1/user-api-keys",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"description": {
"type": "string"
},
"expires_at_millis": {
"type": "number"
},
"manually_revoked_at_millis": {
"type": "number"
},
"created_at_millis": {
"type": "number"
},
"is_public": {
"type": "boolean"
},
"value": {
"type": "object",
"properties": {
"last_four": {
"type": "string"
}
},
"required": [
"last_four"
]
},
"type": {
"type": "string",
"enum": [
"user"
]
},
"user_id": {
"type": "string",
"example": "3241a285-8329-4d69-8f3d-316e08cf140c",
"description": "The ID of the user, or the special value `me` for the currently authenticated user"
}
},
"required": [
"id",
"description",
"created_at_millis",
"is_public",
"value",
"type",
"user_id"
]
}
},
"pagination": {
"type": "object",
"properties": {
"next_cursor": {
"type": "string",
"example": "b3d396b8-c574-4c80-97b3-50031675ceb2",
"description": "The cursor to fetch the next page of results. null if there is no next page."
}
},
"required": []
}
},
"required": [
"items"
]
}
}
}
}
}
},
"post": {
"summary": "Create user API key",
"description": "Create a new API key for a user or team",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"description": {
"type": "string"
},
"expires_at_millis": {
"type": "number"
},
"is_public": {
"type": "boolean"
},
"user_id": {
"type": "string",
"example": "3241a285-8329-4d69-8f3d-316e08cf140c",
"description": "The ID of the user, or the special value `me` for the currently authenticated user"
}
},
"required": [
"description",
"user_id"
],
"example": {
"user_id": "3241a285-8329-4d69-8f3d-316e08cf140c"
}
}
}
}
},
"tags": [
"API Keys"
],
"x-full-url": "https://api.hexclave.com/api/v1/user-api-keys",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"value": {
"type": "string"
},
"id": {
"type": "string"
},
"description": {
"type": "string"
},
"expires_at_millis": {
"type": "number"
},
"manually_revoked_at_millis": {
"type": "number"
},
"created_at_millis": {
"type": "number"
},
"is_public": {
"type": "boolean"
},
"type": {
"type": "string",
"enum": [
"user"
]
},
"user_id": {
"type": "string",
"example": "3241a285-8329-4d69-8f3d-316e08cf140c",
"description": "The ID of the user, or the special value `me` for the currently authenticated user"
}
},
"required": [
"value",
"id",
"description",
"created_at_millis",
"is_public",
"type",
"user_id"
]
}
}
}
}
}
}
},
"/user-api-keys/{api_key_id}": {
"get": {
"summary": "Get user API key details",
"description": "Get details of a specific user API key",
"parameters": [
{
"name": "api_key_id",
"in": "path",
"schema": {
"type": "string"
},
"required": true
}
],
"tags": [
"API Keys"
],
"x-full-url": "https://api.hexclave.com/api/v1/user-api-keys/{api_key_id}",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"description": {
"type": "string"
},
"expires_at_millis": {
"type": "number"
},
"manually_revoked_at_millis": {
"type": "number"
},
"created_at_millis": {
"type": "number"
},
"is_public": {
"type": "boolean"
},
"value": {
"type": "object",
"properties": {
"last_four": {
"type": "string"
}
},
"required": [
"last_four"
]
},
"type": {
"type": "string",
"enum": [
"user"
]
},
"user_id": {
"type": "string",
"example": "3241a285-8329-4d69-8f3d-316e08cf140c",
"description": "The ID of the user, or the special value `me` for the currently authenticated user"
}
},
"required": [
"id",
"description",
"created_at_millis",
"is_public",
"value",
"type",
"user_id"
]
}
}
}
}
}
},
"patch": {
"summary": "Update user API key",
"description": "Update an user API key",
"parameters": [
{
"name": "api_key_id",
"in": "path",
"schema": {
"type": "string"
},
"required": true
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"description": {
"type": "string"
},
"revoked": {
"type": "boolean"
}
},
"example": {}
}
}
}
},
"tags": [
"API Keys"
],
"x-full-url": "https://api.hexclave.com/api/v1/user-api-keys/{api_key_id}",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"description": {
"type": "string"
},
"expires_at_millis": {
"type": "number"
},
"manually_revoked_at_millis": {
"type": "number"
},
"created_at_millis": {
"type": "number"
},
"is_public": {
"type": "boolean"
},
"value": {
"type": "object",
"properties": {
"last_four": {
"type": "string"
}
},
"required": [
"last_four"
]
},
"type": {
"type": "string",
"enum": [
"user"
]
},
"user_id": {
"type": "string",
"example": "3241a285-8329-4d69-8f3d-316e08cf140c",
"description": "The ID of the user, or the special value `me` for the currently authenticated user"
}
},
"required": [
"id",
"description",
"created_at_millis",
"is_public",
"value",
"type",
"user_id"
]
}
}
}
}
}
}
},
"/auth/cli": {
"post": {
"summary": "Initiate CLI authentication",
"description": "Create a new CLI authentication session and return polling and login codes",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"expires_in_millis": {
"type": "number",
"default": 120000
},
"anon_refresh_token": {
"type": "string"
}
},
"example": {}
}
}
}
},
"tags": [
"CLI Authentication"
],
"x-full-url": "https://api.hexclave.com/api/v1/auth/cli",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"polling_code": {
"type": "string"
},
"login_code": {
"type": "string"
},
"expires_at": {
"type": "string"
}
},
"required": [
"polling_code",
"login_code",
"expires_at"
]
}
}
}
}
}
}
},
"/auth/cli/complete": {
"post": {
"summary": "Complete CLI authentication",
"description": "Inspect, claim, or complete a CLI authentication session",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"login_code": {
"type": "string"
},
"mode": {
"type": "string",
"enum": [
"check",
"claim-anon-session",
"complete"
],
"default": "complete"
},
"refresh_token": {
"type": "string"
}
},
"required": [
"login_code"
],
"example": {}
}
}
}
},
"tags": [
"CLI Authentication"
],
"x-full-url": "https://api.hexclave.com/api/v1/auth/cli/complete",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": {
"type": "boolean"
}
},
"required": [
"success"
]
}
}
}
}
}
}
},
"/auth/cli/poll": {
"post": {
"summary": "Poll CLI authentication status",
"description": "Check the status of a CLI authentication session using the polling code",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"polling_code": {
"type": "string"
}
},
"required": [
"polling_code"
],
"example": {}
}
}
}
},
"tags": [
"CLI Authentication"
],
"x-full-url": "https://api.hexclave.com/api/v1/auth/cli/poll",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"status": {
"type": "string",
"enum": [
"waiting",
"success",
"expired",
"used"
]
},
"refresh_token": {
"type": "string"
}
},
"required": [
"status"
]
}
}
}
},
"201": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"status": {
"type": "string",
"enum": [
"waiting",
"success",
"expired",
"used"
]
},
"refresh_token": {
"type": "string"
}
},
"required": [
"status"
]
}
}
}
}
}
}
},
"/connected-accounts/{user_id}": {
"get": {
"summary": "List connected accounts",
"description": "Retrieves a list of all connected accounts for a user.",
"parameters": [
{
"name": "user_id",
"in": "path",
"schema": {
"type": "string",
"example": "3241a285-8329-4d69-8f3d-316e08cf140c",
"description": "The ID of the user, or the special value `me` for the currently authenticated user"
},
"description": "The ID of the user, or the special value `me` for the currently authenticated user",
"required": false
}
],
"tags": [
"Connected Accounts"
],
"x-full-url": "https://api.hexclave.com/api/v1/connected-accounts/{user_id}",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"user_id": {
"type": "string",
"example": "3241a285-8329-4d69-8f3d-316e08cf140c",
"description": "The ID of the user, or the special value `me` for the currently authenticated user"
},
"provider": {
"type": "string",
"example": "google",
"description": "Provider config ID of the OAuth provider. This uniquely identifies the provider config on config.json file"
},
"provider_account_id": {
"type": "string",
"example": "google-account-id-12345",
"description": "Account ID of the OAuth provider. This uniquely identifies the account on the provider side."
}
},
"required": [
"user_id",
"provider",
"provider_account_id"
]
}
},
"pagination": {
"type": "object",
"properties": {
"next_cursor": {
"type": "string",
"example": "b3d396b8-c574-4c80-97b3-50031675ceb2",
"description": "The cursor to fetch the next page of results. null if there is no next page."
}
},
"required": []
}
},
"required": [
"items"
]
}
}
}
}
}
}
},
"/contact-channels": {
"get": {
"summary": "List contact channels",
"description": "Retrieves a list of all contact channels for a user.",
"parameters": [
{
"name": "user_id",
"in": "query",
"schema": {
"type": "string",
"example": "3241a285-8329-4d69-8f3d-316e08cf140c",
"description": "The ID of the user, or the special value `me` for the currently authenticated user"
},
"description": "The ID of the user, or the special value `me` for the currently authenticated user",
"required": false
},
{
"name": "contact_channel_id",
"in": "query",
"schema": {
"type": "string"
},
"required": false
}
],
"tags": [
"Contact Channels"
],
"x-full-url": "https://api.hexclave.com/api/v1/contact-channels",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"user_id": {
"type": "string",
"example": "3241a285-8329-4d69-8f3d-316e08cf140c",
"description": "The unique identifier of the user"
},
"id": {
"type": "string",
"example": "b3d396b8-c574-4c80-97b3-50031675ceb2",
"description": "The unique identifier of the contact channel"
},
"value": {
"type": "string",
"example": "johndoe@example.com",
"description": "The value of the contact channel. For email, this should be a valid email address."
},
"type": {
"type": "string",
"enum": [
"email"
],
"example": "email",
"description": "The type of the contact channel. Currently only \"email\" is supported."
},
"used_for_auth": {
"type": "boolean",
"example": true,
"description": "Whether the contact channel is used for authentication. If this is set to `true`, the user will be able to sign in with the contact channel with password or OTP."
},
"is_verified": {
"type": "boolean",
"example": true,
"description": "Whether the contact channel has been verified. If this is set to `true`, the contact channel has been verified to belong to the user."
},
"is_primary": {
"type": "boolean",
"example": true,
"description": "Whether the contact channel is the primary contact channel. If this is set to `true`, it will be used for authentication and notifications by default."
}
},
"required": [
"user_id",
"id",
"value",
"type",
"used_for_auth",
"is_verified",
"is_primary"
]
}
},
"pagination": {
"type": "object",
"properties": {
"next_cursor": {
"type": "string",
"example": "b3d396b8-c574-4c80-97b3-50031675ceb2",
"description": "The cursor to fetch the next page of results. null if there is no next page."
}
},
"required": []
}
},
"required": [
"items"
]
}
}
}
}
}
},
"post": {
"summary": "Create a contact channel",
"description": "Add a new contact channel for a user.",
"parameters": [
{
"name": "user_id",
"in": "query",
"schema": {
"type": "string",
"example": "3241a285-8329-4d69-8f3d-316e08cf140c",
"description": "The ID of the user, or the special value `me` for the currently authenticated user"
},
"description": "The ID of the user, or the special value `me` for the currently authenticated user",
"required": false
},
{
"name": "contact_channel_id",
"in": "query",
"schema": {
"type": "string"
},
"required": false
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"user_id": {
"type": "string",
"example": "3241a285-8329-4d69-8f3d-316e08cf140c",
"description": "The ID of the user, or the special value `me` for the currently authenticated user"
},
"value": {
"type": "string",
"example": "johndoe@example.com",
"description": "The value of the contact channel. For email, this should be a valid email address."
},
"type": {
"type": "string",
"enum": [
"email"
],
"example": "email",
"description": "The type of the contact channel. Currently only \"email\" is supported."
},
"used_for_auth": {
"type": "boolean",
"example": true,
"description": "Whether the contact channel is used for authentication. If this is set to `true`, the user will be able to sign in with the contact channel with password or OTP."
},
"is_primary": {
"type": "boolean",
"example": true,
"description": "Whether the contact channel is the primary contact channel. If this is set to `true`, it will be used for authentication and notifications by default."
}
},
"required": [
"user_id",
"value",
"type",
"used_for_auth"
],
"example": {
"user_id": "3241a285-8329-4d69-8f3d-316e08cf140c",
"value": "johndoe@example.com",
"type": "email",
"used_for_auth": true,
"is_primary": true
}
}
}
}
},
"tags": [
"Contact Channels"
],
"x-full-url": "https://api.hexclave.com/api/v1/contact-channels",
"responses": {
"201": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"user_id": {
"type": "string",
"example": "3241a285-8329-4d69-8f3d-316e08cf140c",
"description": "The unique identifier of the user"
},
"id": {
"type": "string",
"example": "b3d396b8-c574-4c80-97b3-50031675ceb2",
"description": "The unique identifier of the contact channel"
},
"value": {
"type": "string",
"example": "johndoe@example.com",
"description": "The value of the contact channel. For email, this should be a valid email address."
},
"type": {
"type": "string",
"enum": [
"email"
],
"example": "email",
"description": "The type of the contact channel. Currently only \"email\" is supported."
},
"used_for_auth": {
"type": "boolean",
"example": true,
"description": "Whether the contact channel is used for authentication. If this is set to `true`, the user will be able to sign in with the contact channel with password or OTP."
},
"is_verified": {
"type": "boolean",
"example": true,
"description": "Whether the contact channel has been verified. If this is set to `true`, the contact channel has been verified to belong to the user."
},
"is_primary": {
"type": "boolean",
"example": true,
"description": "Whether the contact channel is the primary contact channel. If this is set to `true`, it will be used for authentication and notifications by default."
}
},
"required": [
"user_id",
"id",
"value",
"type",
"used_for_auth",
"is_verified",
"is_primary"
]
}
}
}
}
}
}
},
"/contact-channels/verify": {
"post": {
"summary": "Verify an email",
"description": "Verify an email address of a user",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"code": {
"type": "string",
"example": "u3h6gn4w24pqc8ya679inrhjwh1rybth6a7thurqhnpf2",
"description": "A 45 character code"
}
},
"required": [
"code"
],
"example": {
"code": "u3h6gn4w24pqc8ya679inrhjwh1rybth6a7thurqhnpf2"
}
}
}
}
},
"tags": [
"Contact Channels"
],
"x-full-url": "https://api.hexclave.com/api/v1/contact-channels/verify",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": {
"type": "boolean",
"description": "Always equal to true.",
"example": true
}
},
"required": [
"success"
]
}
}
}
}
}
}
},
"/contact-channels/verify/check-code": {
"post": {
"summary": "Check email verification code",
"description": "Check if an email verification code is valid without using it",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"code": {
"type": "string",
"example": "u3h6gn4w24pqc8ya679inrhjwh1rybth6a7thurqhnpf2",
"description": "A 45 character code"
}
},
"required": [
"code"
],
"example": {
"code": "u3h6gn4w24pqc8ya679inrhjwh1rybth6a7thurqhnpf2"
}
}
}
}
},
"tags": [
"Contact Channels"
],
"x-full-url": "https://api.hexclave.com/api/v1/contact-channels/verify/check-code",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"is_code_valid": {
"type": "boolean"
}
},
"required": [
"is_code_valid"
]
}
}
}
}
}
}
},
"/contact-channels/{user_id}/{contact_channel_id}": {
"get": {
"summary": "Get a contact channel",
"description": "Retrieves a specific contact channel by the user ID and the contact channel ID.",
"parameters": [
{
"name": "user_id",
"in": "query",
"schema": {
"type": "string",
"example": "3241a285-8329-4d69-8f3d-316e08cf140c",
"description": "The ID of the user, or the special value `me` for the currently authenticated user"
},
"description": "The ID of the user, or the special value `me` for the currently authenticated user",
"required": false
},
{
"name": "contact_channel_id",
"in": "query",
"schema": {
"type": "string"
},
"required": false
},
{
"name": "user_id",
"in": "path",
"schema": {
"type": "string",
"example": "me",
"description": "the user that the contact channel belongs to"
},
"description": "the user that the contact channel belongs to",
"required": true
},
{
"name": "contact_channel_id",
"in": "path",
"schema": {
"type": "string",
"example": "b3d396b8-c574-4c80-97b3-50031675ceb2",
"description": "the target contact channel"
},
"description": "the target contact channel",
"required": true
}
],
"tags": [
"Contact Channels"
],
"x-full-url": "https://api.hexclave.com/api/v1/contact-channels/{user_id}/{contact_channel_id}",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"user_id": {
"type": "string",
"example": "3241a285-8329-4d69-8f3d-316e08cf140c",
"description": "The unique identifier of the user"
},
"id": {
"type": "string",
"example": "b3d396b8-c574-4c80-97b3-50031675ceb2",
"description": "The unique identifier of the contact channel"
},
"value": {
"type": "string",
"example": "johndoe@example.com",
"description": "The value of the contact channel. For email, this should be a valid email address."
},
"type": {
"type": "string",
"enum": [
"email"
],
"example": "email",
"description": "The type of the contact channel. Currently only \"email\" is supported."
},
"used_for_auth": {
"type": "boolean",
"example": true,
"description": "Whether the contact channel is used for authentication. If this is set to `true`, the user will be able to sign in with the contact channel with password or OTP."
},
"is_verified": {
"type": "boolean",
"example": true,
"description": "Whether the contact channel has been verified. If this is set to `true`, the contact channel has been verified to belong to the user."
},
"is_primary": {
"type": "boolean",
"example": true,
"description": "Whether the contact channel is the primary contact channel. If this is set to `true`, it will be used for authentication and notifications by default."
}
},
"required": [
"user_id",
"id",
"value",
"type",
"used_for_auth",
"is_verified",
"is_primary"
]
}
}
}
}
}
},
"delete": {
"summary": "Delete a contact channel",
"description": "Removes a contact channel for a given user.",
"parameters": [
{
"name": "user_id",
"in": "query",
"schema": {
"type": "string",
"example": "3241a285-8329-4d69-8f3d-316e08cf140c",
"description": "The ID of the user, or the special value `me` for the currently authenticated user"
},
"description": "The ID of the user, or the special value `me` for the currently authenticated user",
"required": false
},
{
"name": "contact_channel_id",
"in": "query",
"schema": {
"type": "string"
},
"required": false
},
{
"name": "user_id",
"in": "path",
"schema": {
"type": "string",
"example": "me",
"description": "the user that the contact channel belongs to"
},
"description": "the user that the contact channel belongs to",
"required": true
},
{
"name": "contact_channel_id",
"in": "path",
"schema": {
"type": "string",
"example": "b3d396b8-c574-4c80-97b3-50031675ceb2",
"description": "the target contact channel"
},
"description": "the target contact channel",
"required": true
}
],
"tags": [
"Contact Channels"
],
"x-full-url": "https://api.hexclave.com/api/v1/contact-channels/{user_id}/{contact_channel_id}",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": {
"type": "boolean",
"description": "Always equal to true.",
"example": true
}
},
"required": [
"success"
]
}
}
}
}
}
},
"patch": {
"summary": "Update a contact channel",
"description": "Updates an existing contact channel. Only the values provided will be updated.",
"parameters": [
{
"name": "user_id",
"in": "query",
"schema": {
"type": "string",
"example": "3241a285-8329-4d69-8f3d-316e08cf140c",
"description": "The ID of the user, or the special value `me` for the currently authenticated user"
},
"description": "The ID of the user, or the special value `me` for the currently authenticated user",
"required": false
},
{
"name": "contact_channel_id",
"in": "query",
"schema": {
"type": "string"
},
"required": false
},
{
"name": "user_id",
"in": "path",
"schema": {
"type": "string",
"example": "me",
"description": "the user that the contact channel belongs to"
},
"description": "the user that the contact channel belongs to",
"required": true
},
{
"name": "contact_channel_id",
"in": "path",
"schema": {
"type": "string",
"example": "b3d396b8-c574-4c80-97b3-50031675ceb2",
"description": "the target contact channel"
},
"description": "the target contact channel",
"required": true
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"value": {
"type": "string",
"example": "johndoe@example.com",
"description": "The value of the contact channel. For email, this should be a valid email address."
},
"type": {
"type": "string",
"enum": [
"email"
],
"example": "email",
"description": "The type of the contact channel. Currently only \"email\" is supported."
},
"used_for_auth": {
"type": "boolean",
"example": true,
"description": "Whether the contact channel is used for authentication. If this is set to `true`, the user will be able to sign in with the contact channel with password or OTP."
},
"is_primary": {
"type": "boolean",
"example": true,
"description": "Whether the contact channel is the primary contact channel. If this is set to `true`, it will be used for authentication and notifications by default."
}
},
"example": {
"value": "johndoe@example.com",
"type": "email",
"used_for_auth": true,
"is_primary": true
}
}
}
}
},
"tags": [
"Contact Channels"
],
"x-full-url": "https://api.hexclave.com/api/v1/contact-channels/{user_id}/{contact_channel_id}",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"user_id": {
"type": "string",
"example": "3241a285-8329-4d69-8f3d-316e08cf140c",
"description": "The unique identifier of the user"
},
"id": {
"type": "string",
"example": "b3d396b8-c574-4c80-97b3-50031675ceb2",
"description": "The unique identifier of the contact channel"
},
"value": {
"type": "string",
"example": "johndoe@example.com",
"description": "The value of the contact channel. For email, this should be a valid email address."
},
"type": {
"type": "string",
"enum": [
"email"
],
"example": "email",
"description": "The type of the contact channel. Currently only \"email\" is supported."
},
"used_for_auth": {
"type": "boolean",
"example": true,
"description": "Whether the contact channel is used for authentication. If this is set to `true`, the user will be able to sign in with the contact channel with password or OTP."
},
"is_verified": {
"type": "boolean",
"example": true,
"description": "Whether the contact channel has been verified. If this is set to `true`, the contact channel has been verified to belong to the user."
},
"is_primary": {
"type": "boolean",
"example": true,
"description": "Whether the contact channel is the primary contact channel. If this is set to `true`, it will be used for authentication and notifications by default."
}
},
"required": [
"user_id",
"id",
"value",
"type",
"used_for_auth",
"is_verified",
"is_primary"
]
}
}
}
}
}
}
},
"/contact-channels/{user_id}/{contact_channel_id}/send-verification-code": {
"post": {
"summary": "Send contact channel verification code",
"description": "Send a code to the user's contact channel for verifying the contact channel.",
"parameters": [
{
"name": "user_id",
"in": "path",
"schema": {
"type": "string",
"example": "me",
"description": "The user to send the verification code to."
},
"description": "The user to send the verification code to.",
"required": true
},
{
"name": "contact_channel_id",
"in": "path",
"schema": {
"type": "string",
"example": "b3d396b8-c574-4c80-97b3-50031675ceb2",
"description": "The contact channel to send the verification code to."
},
"description": "The contact channel to send the verification code to.",
"required": true
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"callback_url": {
"type": "string",
"example": "https://example.com/handler/email-verification",
"description": "The base callback URL to construct a verification link for the verification e-mail. A query parameter `code` with the verification code will be appended to it. The page should then make a request to the `/contact-channels/verify` endpoint."
}
},
"required": [
"callback_url"
],
"example": {
"callback_url": "https://example.com/handler/email-verification"
}
}
}
}
},
"tags": [
"Contact Channels"
],
"x-full-url": "https://api.hexclave.com/api/v1/contact-channels/{user_id}/{contact_channel_id}/send-verification-code",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": {
"type": "boolean",
"description": "Always equal to true.",
"example": true
}
},
"required": [
"success"
]
}
}
}
}
}
}
},
"/emails/notification-preference/{user_id}": {
"get": {
"summary": "List notification preferences",
"description": "Get all notification preferences for a user, showing which notification categories are enabled or disabled.",
"parameters": [
{
"name": "user_id",
"in": "path",
"schema": {
"type": "string",
"example": "3241a285-8329-4d69-8f3d-316e08cf140c",
"description": "The ID of the user, or the special value `me` for the currently authenticated user"
},
"description": "The ID of the user, or the special value `me` for the currently authenticated user",
"required": false
}
],
"tags": [
"Emails"
],
"x-full-url": "https://api.hexclave.com/api/v1/emails/notification-preference/{user_id}",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"notification_category_id": {
"type": "string"
},
"notification_category_name": {
"type": "string"
},
"enabled": {
"type": "boolean"
},
"can_disable": {
"type": "boolean"
}
},
"required": [
"notification_category_id",
"notification_category_name",
"enabled",
"can_disable"
]
}
},
"pagination": {
"type": "object",
"properties": {
"next_cursor": {
"type": "string",
"example": "b3d396b8-c574-4c80-97b3-50031675ceb2",
"description": "The cursor to fetch the next page of results. null if there is no next page."
}
},
"required": []
}
},
"required": [
"items"
]
}
}
}
}
}
}
},
"/emails/notification-preference/{user_id}/{notification_category_id}": {
"patch": {
"summary": "Update notification preference",
"description": "Enable or disable a specific notification category for a user.",
"parameters": [
{
"name": "user_id",
"in": "path",
"schema": {
"type": "string",
"example": "3241a285-8329-4d69-8f3d-316e08cf140c",
"description": "The ID of the user, or the special value `me` for the currently authenticated user"
},
"description": "The ID of the user, or the special value `me` for the currently authenticated user",
"required": true
},
{
"name": "notification_category_id",
"in": "path",
"schema": {
"type": "string"
},
"required": false
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
}
},
"required": [
"enabled"
],
"example": {}
}
}
}
},
"tags": [
"Emails"
],
"x-full-url": "https://api.hexclave.com/api/v1/emails/notification-preference/{user_id}/{notification_category_id}",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"notification_category_id": {
"type": "string"
},
"notification_category_name": {
"type": "string"
},
"enabled": {
"type": "boolean"
},
"can_disable": {
"type": "boolean"
}
},
"required": [
"notification_category_id",
"notification_category_name",
"enabled",
"can_disable"
]
}
}
}
}
}
}
},
"/auth/oauth/authorize/{provider_id}": {
"get": {
"summary": "OAuth authorize endpoint",
"description": "This endpoint is used to initiate the OAuth authorization flow. there are two purposes for this endpoint: 1. Authenticate a user with an OAuth provider. 2. Link an existing user with an OAuth provider.",
"parameters": [
{
"name": "type",
"in": "query",
"schema": {
"type": "string",
"enum": [
"authenticate",
"link"
],
"default": "authenticate"
},
"required": false
},
{
"name": "token",
"in": "query",
"schema": {
"type": "string",
"default": ""
},
"required": false
},
{
"name": "provider_scope",
"in": "query",
"schema": {
"type": "string"
},
"required": false
},
{
"name": "error_redirect_uri",
"in": "query",
"schema": {
"type": "string"
},
"required": false
},
{
"name": "after_callback_redirect_url",
"in": "query",
"schema": {
"type": "string"
},
"required": false
},
{
"name": "stack_response_mode",
"in": "query",
"schema": {
"type": "string",
"enum": [
"json",
"redirect"
],
"description": "Response mode for the OAuth authorize endpoint. Defaults to 'redirect' if not provided."
},
"description": "Response mode for the OAuth authorize endpoint. Defaults to 'redirect' if not provided.",
"required": false
},
{
"name": "hexclave_response_mode",
"in": "query",
"schema": {
"type": "string",
"enum": [
"json",
"redirect"
],
"description": "Response mode for the OAuth authorize endpoint. Defaults to 'redirect' if not provided."
},
"description": "Response mode for the OAuth authorize endpoint. Defaults to 'redirect' if not provided.",
"required": false
},
{
"name": "bot_challenge_token",
"in": "query",
"schema": {
"type": "string"
},
"required": false
},
{
"name": "bot_challenge_phase",
"in": "query",
"schema": {
"type": "string",
"enum": [
"invisible",
"visible"
]
},
"required": false
},
{
"name": "bot_challenge_unavailable",
"in": "query",
"schema": {
"type": "string",
"enum": [
"true"
]
},
"required": false
},
{
"name": "client_id",
"in": "query",
"schema": {
"type": "string"
},
"required": true
},
{
"name": "client_secret",
"in": "query",
"schema": {
"type": "string"
},
"required": true
},
{
"name": "redirect_uri",
"in": "query",
"schema": {
"type": "string"
},
"required": true
},
{
"name": "scope",
"in": "query",
"schema": {
"type": "string"
},
"required": true
},
{
"name": "state",
"in": "query",
"schema": {
"type": "string"
},
"required": true
},
{
"name": "grant_type",
"in": "query",
"schema": {
"type": "string",
"enum": [
"authorization_code"
]
},
"required": true
},
{
"name": "code_challenge",
"in": "query",
"schema": {
"type": "string"
},
"required": true
},
{
"name": "code_challenge_method",
"in": "query",
"schema": {
"type": "string"
},
"required": true
},
{
"name": "response_type",
"in": "query",
"schema": {
"type": "string"
},
"required": true
},
{
"name": "provider_id",
"in": "path",
"schema": {
"type": "string"
},
"required": true
}
],
"tags": [
"Oauth"
],
"x-full-url": "https://api.hexclave.com/api/v1/auth/oauth/authorize/{provider_id}",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"location": {
"type": "string"
}
},
"required": [
"location"
]
}
}
}
},
"307": {
"description": "Successful response",
"content": {
"text/plain": {
"schema": {
"type": "string"
}
}
}
}
}
}
},
"/auth/oauth/cross-domain/authorize": {
"post": {
"summary": "Create cross-domain auth handoff redirect",
"description": "Creates a one-time OAuth authorization code redirect for cross-domain sign-in handoff using PKCE.",
"parameters": [
{
"name": "x-stack-publishable-client-key",
"in": "header",
"schema": {
"type": "string"
},
"required": true
},
{
"name": "x-stack-refresh-token",
"in": "header",
"schema": {
"type": "string"
},
"required": true
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"redirect_uri": {
"type": "string"
},
"state": {
"type": "string"
},
"code_challenge": {
"type": "string"
},
"code_challenge_method": {
"type": "string",
"enum": [
"S256"
],
"default": "S256"
},
"after_callback_redirect_url": {
"type": "string"
}
},
"required": [
"redirect_uri",
"state",
"code_challenge"
],
"example": {}
}
}
}
},
"tags": [
"Oauth"
],
"x-full-url": "https://api.hexclave.com/api/v1/auth/oauth/cross-domain/authorize",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"redirect_url": {
"type": "string"
}
},
"required": [
"redirect_url"
]
}
}
}
}
}
}
},
"/auth/oauth/token": {
"post": {
"summary": "OAuth token endpoints",
"description": "This endpoint is used to exchange an authorization code or refresh token for an access token.",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"grant_type": {
"type": "string",
"enum": [
"authorization_code",
"refresh_token"
]
},
"client_id": {
"type": "string"
},
"client_secret": {
"type": "string"
}
},
"required": [
"grant_type"
],
"example": {}
}
}
}
},
"tags": [
"Oauth"
],
"x-full-url": "https://api.hexclave.com/api/v1/auth/oauth/token",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {}
}
}
}
}
}
},
"/oauth-providers": {
"get": {
"summary": "List OAuth providers",
"description": "Retrieves a list of all OAuth providers for a user.",
"parameters": [
{
"name": "user_id",
"in": "query",
"schema": {
"type": "string"
},
"required": false
}
],
"tags": [
"Oauth"
],
"x-full-url": "https://api.hexclave.com/api/v1/oauth-providers",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"user_id": {
"type": "string",
"example": "3241a285-8329-4d69-8f3d-316e08cf140c",
"description": "The ID of the user, or the special value `me` for the currently authenticated user"
},
"id": {
"type": "string",
"example": "b3d396b8-c574-4c80-97b3-50031675ceb2",
"description": "The unique identifier of the OAuth provider"
},
"email": {
"type": "string",
"example": "test@gmail.com",
"description": "Email of the OAuth provider. This is used to display and identify the OAuth provider in the UI."
},
"provider_config_id": {
"type": "string",
"example": "google",
"description": "Provider config ID of the OAuth provider. This uniquely identifies the provider config on config.json file"
},
"type": {
"type": "string",
"enum": [
"google",
"github",
"microsoft",
"spotify",
"facebook",
"discord",
"gitlab",
"bitbucket",
"linkedin",
"apple",
"x",
"twitch"
],
"example": "google",
"description": "OAuth provider type, one of `google`, `github`, `microsoft`, `spotify`, `facebook`, `discord`, `gitlab`, `bitbucket`, `linkedin`, `apple`, `x`, `twitch`"
},
"allow_sign_in": {
"type": "boolean",
"example": true,
"description": "Whether the user can use this OAuth provider to sign in. Only one OAuth provider per type can have this set to `true`."
},
"allow_connected_accounts": {
"type": "boolean",
"example": true,
"description": "Whether the user can use this OAuth provider as connected account. Multiple OAuth providers per type can have this set to `true`."
}
},
"required": [
"user_id",
"id",
"provider_config_id",
"type",
"allow_sign_in",
"allow_connected_accounts"
]
}
},
"pagination": {
"type": "object",
"properties": {
"next_cursor": {
"type": "string",
"example": "b3d396b8-c574-4c80-97b3-50031675ceb2",
"description": "The cursor to fetch the next page of results. null if there is no next page."
}
},
"required": []
}
},
"required": [
"items"
]
}
}
}
}
}
}
},
"/oauth-providers/{user_id}/{provider_id}": {
"get": {
"summary": "Get an OAuth provider",
"description": "Retrieves a specific OAuth provider by the user ID and the OAuth provider ID.",
"parameters": [
{
"name": "provider_id",
"in": "path",
"schema": {
"type": "string"
},
"required": true
},
{
"name": "user_id",
"in": "path",
"schema": {
"type": "string",
"example": "3241a285-8329-4d69-8f3d-316e08cf140c",
"description": "The ID of the user, or the special value `me` for the currently authenticated user"
},
"description": "The ID of the user, or the special value `me` for the currently authenticated user",
"required": true
}
],
"tags": [
"Oauth"
],
"x-full-url": "https://api.hexclave.com/api/v1/oauth-providers/{user_id}/{provider_id}",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"user_id": {
"type": "string",
"example": "3241a285-8329-4d69-8f3d-316e08cf140c",
"description": "The ID of the user, or the special value `me` for the currently authenticated user"
},
"id": {
"type": "string",
"example": "b3d396b8-c574-4c80-97b3-50031675ceb2",
"description": "The unique identifier of the OAuth provider"
},
"email": {
"type": "string",
"example": "test@gmail.com",
"description": "Email of the OAuth provider. This is used to display and identify the OAuth provider in the UI."
},
"provider_config_id": {
"type": "string",
"example": "google",
"description": "Provider config ID of the OAuth provider. This uniquely identifies the provider config on config.json file"
},
"type": {
"type": "string",
"enum": [
"google",
"github",
"microsoft",
"spotify",
"facebook",
"discord",
"gitlab",
"bitbucket",
"linkedin",
"apple",
"x",
"twitch"
],
"example": "google",
"description": "OAuth provider type, one of `google`, `github`, `microsoft`, `spotify`, `facebook`, `discord`, `gitlab`, `bitbucket`, `linkedin`, `apple`, `x`, `twitch`"
},
"allow_sign_in": {
"type": "boolean",
"example": true,
"description": "Whether the user can use this OAuth provider to sign in. Only one OAuth provider per type can have this set to `true`."
},
"allow_connected_accounts": {
"type": "boolean",
"example": true,
"description": "Whether the user can use this OAuth provider as connected account. Multiple OAuth providers per type can have this set to `true`."
}
},
"required": [
"user_id",
"id",
"provider_config_id",
"type",
"allow_sign_in",
"allow_connected_accounts"
]
}
}
}
}
}
},
"delete": {
"summary": "Delete an OAuth provider",
"description": "Removes an OAuth provider for a given user.",
"parameters": [
{
"name": "provider_id",
"in": "path",
"schema": {
"type": "string"
},
"required": true
},
{
"name": "user_id",
"in": "path",
"schema": {
"type": "string",
"example": "3241a285-8329-4d69-8f3d-316e08cf140c",
"description": "The ID of the user, or the special value `me` for the currently authenticated user"
},
"description": "The ID of the user, or the special value `me` for the currently authenticated user",
"required": true
}
],
"tags": [
"Oauth"
],
"x-full-url": "https://api.hexclave.com/api/v1/oauth-providers/{user_id}/{provider_id}",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": {
"type": "boolean",
"description": "Always equal to true.",
"example": true
}
},
"required": [
"success"
]
}
}
}
}
}
},
"patch": {
"summary": "Update an OAuth provider",
"description": "Updates an existing OAuth provider for a user.",
"parameters": [
{
"name": "provider_id",
"in": "path",
"schema": {
"type": "string"
},
"required": true
},
{
"name": "user_id",
"in": "path",
"schema": {
"type": "string",
"example": "3241a285-8329-4d69-8f3d-316e08cf140c",
"description": "The ID of the user, or the special value `me` for the currently authenticated user"
},
"description": "The ID of the user, or the special value `me` for the currently authenticated user",
"required": true
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"allow_sign_in": {
"type": "boolean",
"example": true,
"description": "Whether the user can use this OAuth provider to sign in. Only one OAuth provider per type can have this set to `true`."
},
"allow_connected_accounts": {
"type": "boolean",
"example": true,
"description": "Whether the user can use this OAuth provider as connected account. Multiple OAuth providers per type can have this set to `true`."
}
},
"example": {
"allow_sign_in": true,
"allow_connected_accounts": true
}
}
}
}
},
"tags": [
"Oauth"
],
"x-full-url": "https://api.hexclave.com/api/v1/oauth-providers/{user_id}/{provider_id}",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"user_id": {
"type": "string",
"example": "3241a285-8329-4d69-8f3d-316e08cf140c",
"description": "The ID of the user, or the special value `me` for the currently authenticated user"
},
"id": {
"type": "string",
"example": "b3d396b8-c574-4c80-97b3-50031675ceb2",
"description": "The unique identifier of the OAuth provider"
},
"email": {
"type": "string",
"example": "test@gmail.com",
"description": "Email of the OAuth provider. This is used to display and identify the OAuth provider in the UI."
},
"provider_config_id": {
"type": "string",
"example": "google",
"description": "Provider config ID of the OAuth provider. This uniquely identifies the provider config on config.json file"
},
"type": {
"type": "string",
"enum": [
"google",
"github",
"microsoft",
"spotify",
"facebook",
"discord",
"gitlab",
"bitbucket",
"linkedin",
"apple",
"x",
"twitch"
],
"example": "google",
"description": "OAuth provider type, one of `google`, `github`, `microsoft`, `spotify`, `facebook`, `discord`, `gitlab`, `bitbucket`, `linkedin`, `apple`, `x`, `twitch`"
},
"allow_sign_in": {
"type": "boolean",
"example": true,
"description": "Whether the user can use this OAuth provider to sign in. Only one OAuth provider per type can have this set to `true`."
},
"allow_connected_accounts": {
"type": "boolean",
"example": true,
"description": "Whether the user can use this OAuth provider as connected account. Multiple OAuth providers per type can have this set to `true`."
}
},
"required": [
"user_id",
"id",
"provider_config_id",
"type",
"allow_sign_in",
"allow_connected_accounts"
]
}
}
}
}
}
}
},
"/auth/mfa/sign-in": {
"post": {
"summary": "MFA sign in",
"description": "Complete multi-factor authorization to sign in, with a TOTP and an MFA attempt code",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"totp"
]
},
"totp": {
"type": "string"
},
"code": {
"type": "string",
"example": "u3h6gn4w24pqc8ya679inrhjwh1rybth6a7thurqhnpf2",
"description": "A 45 character code"
}
},
"required": [
"type",
"totp",
"code"
],
"example": {
"code": "u3h6gn4w24pqc8ya679inrhjwh1rybth6a7thurqhnpf2"
}
}
}
}
},
"tags": [
"OTP"
],
"x-full-url": "https://api.hexclave.com/api/v1/auth/mfa/sign-in",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"refresh_token": {
"type": "string",
"example": "i8ns3aq2...14y",
"description": "Long-lived refresh token that can be used to obtain a new access token"
},
"access_token": {
"type": "string",
"example": "eyJhmMiJB2TO...diI4QT",
"description": "Short-lived access token that can be used to authenticate the user"
},
"is_new_user": {
"type": "boolean",
"example": true,
"description": "Whether the user is a new user"
},
"user_id": {
"type": "string",
"example": "3241a285-8329-4d69-8f3d-316e08cf140c",
"description": "The unique identifier of the user"
}
},
"required": [
"refresh_token",
"access_token",
"is_new_user",
"user_id"
]
}
}
}
}
}
}
},
"/auth/otp/send-sign-in-code": {
"post": {
"summary": "Send sign-in code",
"description": "Send a code to the user's email address for sign-in.",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"email": {
"type": "string",
"example": "johndoe@example.com",
"description": "The email to sign in with."
},
"callback_url": {
"type": "string",
"example": "https://example.com/handler/magic-link-callback",
"description": "The base callback URL to construct the magic link from. A query parameter `code` with the verification code will be appended to it. The page should then make a request to the `/auth/otp/sign-in` endpoint."
},
"bot_challenge_token": {
"type": "string"
},
"bot_challenge_phase": {
"type": "string",
"enum": [
"invisible",
"visible"
]
},
"bot_challenge_unavailable": {
"type": "string",
"enum": [
"true"
]
}
},
"required": [
"email",
"callback_url"
],
"example": {
"email": "johndoe@example.com",
"callback_url": "https://example.com/handler/magic-link-callback"
}
}
}
}
},
"tags": [
"OTP"
],
"x-full-url": "https://api.hexclave.com/api/v1/auth/otp/send-sign-in-code",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"nonce": {
"type": "string",
"example": "u3h6gn4w24pqc8ya679inrhjwh1rybth6a7thurqhnpf2",
"description": "A token that must be stored temporarily and provided when verifying the 6-digit code"
}
},
"required": [
"nonce"
]
}
}
}
}
}
}
},
"/auth/otp/sign-in": {
"post": {
"summary": "Sign in with a code",
"description": "",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"code": {
"type": "string",
"example": "u3h6gn4w24pqc8ya679inrhjwh1rybth6a7thurqhnpf2",
"description": "A 45-character verification code. For magic links, this is the code found in the \"code\" URL query parameter. For OTP, this is formed by concatenating the 6-digit code entered by the user with the nonce (received during code creation)"
}
},
"required": [
"code"
],
"example": {
"code": "u3h6gn4w24pqc8ya679inrhjwh1rybth6a7thurqhnpf2"
}
}
}
}
},
"tags": [
"OTP"
],
"x-full-url": "https://api.hexclave.com/api/v1/auth/otp/sign-in",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"refresh_token": {
"type": "string",
"example": "i8ns3aq2...14y",
"description": "Long-lived refresh token that can be used to obtain a new access token"
},
"access_token": {
"type": "string",
"example": "eyJhmMiJB2TO...diI4QT",
"description": "Short-lived access token that can be used to authenticate the user"
},
"is_new_user": {
"type": "boolean",
"example": true,
"description": "Whether the user is a new user"
},
"user_id": {
"type": "string",
"example": "3241a285-8329-4d69-8f3d-316e08cf140c",
"description": "The unique identifier of the user"
}
},
"required": [
"refresh_token",
"access_token",
"is_new_user",
"user_id"
]
}
}
}
}
}
}
},
"/auth/otp/sign-in/check-code": {
"post": {
"summary": "Check sign in code",
"description": "Check if a sign in code is valid without using it",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"code": {
"type": "string",
"example": "u3h6gn4w24pqc8ya679inrhjwh1rybth6a7thurqhnpf2",
"description": "A 45-character verification code. For magic links, this is the code found in the \"code\" URL query parameter. For OTP, this is formed by concatenating the 6-digit code entered by the user with the nonce (received during code creation)"
}
},
"required": [
"code"
],
"example": {
"code": "u3h6gn4w24pqc8ya679inrhjwh1rybth6a7thurqhnpf2"
}
}
}
}
},
"tags": [
"OTP"
],
"x-full-url": "https://api.hexclave.com/api/v1/auth/otp/sign-in/check-code",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"is_code_valid": {
"type": "boolean"
}
},
"required": [
"is_code_valid"
]
}
}
}
}
}
}
},
"/auth/password/reset": {
"post": {
"summary": "Reset password with a code",
"description": "Reset password with a code",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"password": {
"type": "string"
},
"code": {
"type": "string",
"example": "u3h6gn4w24pqc8ya679inrhjwh1rybth6a7thurqhnpf2",
"description": "A 45 character code"
}
},
"required": [
"password",
"code"
],
"example": {
"code": "u3h6gn4w24pqc8ya679inrhjwh1rybth6a7thurqhnpf2"
}
}
}
}
},
"tags": [
"Password"
],
"x-full-url": "https://api.hexclave.com/api/v1/auth/password/reset",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": {
"type": "boolean",
"description": "Always equal to true.",
"example": true
}
},
"required": [
"success"
]
}
}
}
}
}
}
},
"/auth/password/reset/check-code": {
"post": {
"summary": "Check reset password code",
"description": "Check if a reset password code is valid without using it",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"code": {
"type": "string",
"example": "u3h6gn4w24pqc8ya679inrhjwh1rybth6a7thurqhnpf2",
"description": "A 45 character code"
}
},
"required": [
"code"
],
"example": {
"code": "u3h6gn4w24pqc8ya679inrhjwh1rybth6a7thurqhnpf2"
}
}
}
}
},
"tags": [
"Password"
],
"x-full-url": "https://api.hexclave.com/api/v1/auth/password/reset/check-code",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"is_code_valid": {
"type": "boolean"
}
},
"required": [
"is_code_valid"
]
}
}
}
}
}
}
},
"/auth/password/send-reset-code": {
"post": {
"summary": "Send reset password code",
"description": "Send a code to the user's email address for resetting the password.",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"email": {
"type": "string"
},
"callback_url": {
"type": "string"
}
},
"required": [
"email",
"callback_url"
],
"example": {}
}
}
}
},
"tags": [
"Password"
],
"x-full-url": "https://api.hexclave.com/api/v1/auth/password/send-reset-code",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": {
"type": "string",
"enum": [
"maybe, only if user with e-mail exists"
]
}
},
"required": [
"success"
]
}
}
}
}
}
}
},
"/auth/password/set": {
"post": {
"summary": "Set password",
"description": "Set a new password for the current user",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"password": {
"type": "string"
}
},
"required": [
"password"
],
"example": {}
}
}
}
},
"tags": [
"Password"
],
"x-full-url": "https://api.hexclave.com/api/v1/auth/password/set",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": {
"type": "boolean",
"description": "Always equal to true.",
"example": true
}
},
"required": [
"success"
]
}
}
}
}
}
}
},
"/auth/password/sign-in": {
"post": {
"summary": "Sign in with email and password",
"description": "Sign in to an account with email and password",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"email": {
"type": "string"
},
"password": {
"type": "string"
}
},
"required": [
"email",
"password"
],
"example": {}
}
}
}
},
"tags": [
"Password"
],
"x-full-url": "https://api.hexclave.com/api/v1/auth/password/sign-in",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"access_token": {
"type": "string"
},
"refresh_token": {
"type": "string"
},
"user_id": {
"type": "string"
}
},
"required": [
"access_token",
"refresh_token",
"user_id"
]
}
}
}
}
}
}
},
"/auth/password/sign-up": {
"post": {
"summary": "Sign up with email and password",
"description": "Create a new account with email and password",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"email": {
"type": "string",
"example": "johndoe@example.com",
"description": "The email to sign in with."
},
"password": {
"type": "string"
},
"verification_callback_url": {
"type": "string",
"example": "https://example.com/handler/email-verification",
"description": "The base callback URL to construct a verification link for the verification e-mail. A query parameter `code` with the verification code will be appended to it. The page should then make a request to the `/contact-channels/verify` endpoint."
},
"bot_challenge_token": {
"type": "string"
},
"bot_challenge_phase": {
"type": "string",
"enum": [
"invisible",
"visible"
]
},
"bot_challenge_unavailable": {
"type": "string",
"enum": [
"true"
]
}
},
"required": [
"email",
"password"
],
"example": {
"email": "johndoe@example.com",
"verification_callback_url": "https://example.com/handler/email-verification"
}
}
}
}
},
"tags": [
"Password"
],
"x-full-url": "https://api.hexclave.com/api/v1/auth/password/sign-up",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"access_token": {
"type": "string"
},
"refresh_token": {
"type": "string"
},
"user_id": {
"type": "string"
}
},
"required": [
"access_token",
"refresh_token",
"user_id"
]
}
}
}
}
}
}
},
"/auth/password/update": {
"post": {
"summary": "Update password",
"description": "Update the password of the current user, requires the old password",
"parameters": [
{
"name": "x-stack-refresh-token",
"in": "header",
"schema": {
"type": "string"
},
"required": false
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"old_password": {
"type": "string"
},
"new_password": {
"type": "string"
}
},
"required": [
"old_password",
"new_password"
],
"example": {}
}
}
}
},
"tags": [
"Password"
],
"x-full-url": "https://api.hexclave.com/api/v1/auth/password/update",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": {
"type": "boolean",
"description": "Always equal to true.",
"example": true
}
},
"required": [
"success"
]
}
}
}
}
}
}
},
"/payments/items/{customer_type}/{customer_id}/{item_id}": {
"get": {
"summary": "Get Item",
"description": "Retrieves information about a specific item (credits, quotas, etc.) for a customer.",
"parameters": [
{
"name": "customer_type",
"in": "path",
"schema": {
"type": "string",
"enum": [
"user",
"team",
"custom"
],
"example": "user",
"description": "The type of customer"
},
"description": "The type of customer",
"required": true
},
{
"name": "customer_id",
"in": "path",
"schema": {
"type": "string",
"example": "user_1234567890abcdef",
"description": "The ID of the customer"
},
"description": "The ID of the customer",
"required": true
},
{
"name": "item_id",
"in": "path",
"schema": {
"type": "string",
"example": "credits",
"description": "The ID of the item to retrieve"
},
"description": "The ID of the item to retrieve",
"required": true
}
],
"tags": [
"Payments"
],
"x-full-url": "https://api.hexclave.com/api/v1/payments/items/{customer_type}/{customer_id}/{item_id}",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"id": {
"type": "string",
"example": "credits",
"description": "The ID of the item"
},
"display_name": {
"type": "string",
"example": "API Credits",
"description": "The human-readable name of the item"
},
"quantity": {
"type": "number",
"example": 1000,
"description": "The current quantity of the item (can be negative)"
}
},
"required": [
"id",
"display_name",
"quantity"
]
}
}
}
}
}
}
},
"/payments/purchases/create-purchase-url": {
"post": {
"summary": "Create Purchase URL",
"description": "Creates a secure checkout URL for purchasing a product.",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"customer_type": {
"type": "string",
"enum": [
"user",
"team",
"custom"
],
"example": "user",
"description": "The type of customer making the purchase"
},
"customer_id": {
"type": "string",
"example": "user_1234567890abcdef",
"description": "The ID of the customer (user ID, team ID, or custom customer ID)"
},
"product_id": {
"type": "string",
"example": "prod_premium_monthly",
"description": "The ID of the product to purchase. Either this or product_inline should be given."
},
"product_inline": {
"type": "object",
"properties": {
"display_name": {
"type": "string"
},
"customer_type": {
"type": "string",
"enum": [
"user",
"team",
"custom"
]
},
"free_trial": {
"type": "array",
"items": {
"type": "integer"
}
},
"server_only": {
"type": "boolean",
"default": true
},
"stackable": {
"type": "boolean",
"default": false
},
"prices": {
"type": "object",
"properties": {},
"required": []
},
"included_items": {
"type": "object",
"properties": {},
"required": []
},
"client_metadata": {
"type": "object",
"example": {
"featureFlag": true,
"source": "marketing-campaign"
},
"description": "Client metadata. Used as a data store, accessible from the client side. Do not store information that should not be exposed to the client."
},
"client_read_only_metadata": {
"type": "object",
"example": {
"featureFlag": true,
"source": "marketing-campaign"
},
"description": "Client read-only, server-writable metadata. Used as a data store, accessible from the client side. Do not store information that should not be exposed to the client. The client can read this data, but cannot modify it. This is useful for things like subscription status."
},
"server_metadata": {
"type": "object",
"example": {
"featureFlag": true,
"source": "marketing-campaign"
},
"description": "Server metadata. Used as a data store, only accessible from the server side. You can store secret information related to the product here."
}
},
"required": [
"display_name",
"customer_type"
],
"description": "Inline product definition. Either this or product_id should be given."
},
"return_url": {
"type": "string",
"example": "https://myapp.com/purchase-success",
"description": "URL to redirect to after purchase completion. Must be configured as a trusted domain in the project configuration."
}
},
"required": [
"customer_type",
"customer_id"
],
"example": {
"customer_type": "user",
"customer_id": "user_1234567890abcdef",
"product_id": "prod_premium_monthly",
"return_url": "https://myapp.com/purchase-success"
}
}
}
}
},
"tags": [
"Payments"
],
"x-full-url": "https://api.hexclave.com/api/v1/payments/purchases/create-purchase-url",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"url": {
"type": "string",
"description": "The secure checkout URL for completing the purchase"
}
},
"required": [
"url"
]
}
}
}
}
}
}
},
"/payments/purchases/purchase-session": {
"post": {
"summary": "Create Purchase Session",
"description": "Creates a purchase session for completing a purchase.",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"full_code": {
"type": "string",
"example": "proj_abc123_def456ghi789",
"description": "The verification code, given as a query parameter in the purchase URL"
},
"price_id": {
"type": "string",
"example": "price_1234567890abcdef",
"description": "The Stack auth price ID to purchase"
},
"quantity": {
"type": "integer",
"example": 1,
"description": "The quantity to purchase",
"default": 1
}
},
"required": [
"full_code",
"price_id"
],
"example": {
"full_code": "proj_abc123_def456ghi789",
"price_id": "price_1234567890abcdef",
"quantity": 1
}
}
}
}
},
"tags": [
"Payments"
],
"x-full-url": "https://api.hexclave.com/api/v1/payments/purchases/purchase-session",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"client_secret": {
"type": "string",
"example": "1234567890abcdef_secret_xyz123",
"description": "Stripe client secret used by the browser to confirm payment via Stripe Elements. Omitted when no payment step is required from the customer; in that case the purchase is being settled without a confirmation step and the caller should skip mounting Stripe Elements."
}
}
}
}
}
}
}
}
},
"/payments/purchases/validate-code": {
"post": {
"summary": "Validate Purchase Code",
"description": "Validates a purchase verification code and returns purchase details including available prices.",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"full_code": {
"type": "string",
"example": "proj_abc123_def456ghi789",
"description": "The verification code, given as a query parameter in the purchase URL"
},
"return_url": {
"type": "string",
"example": "https://myapp.com/purchase-success",
"description": "URL to redirect to after purchase completion"
}
},
"required": [
"full_code"
],
"example": {
"full_code": "proj_abc123_def456ghi789",
"return_url": "https://myapp.com/purchase-success"
}
}
}
}
},
"tags": [
"Payments"
],
"x-full-url": "https://api.hexclave.com/api/v1/payments/purchases/validate-code",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"product": {
"type": "object",
"properties": {
"display_name": {
"type": "string"
},
"customer_type": {
"type": "string",
"enum": [
"user",
"team",
"custom"
]
},
"free_trial": {
"type": "array",
"items": {
"type": "integer"
}
},
"server_only": {
"type": "boolean",
"default": true
},
"stackable": {
"type": "boolean",
"default": false
},
"prices": {
"type": "object",
"properties": {},
"required": []
},
"included_items": {
"type": "object",
"properties": {},
"required": []
},
"client_metadata": {
"type": "object",
"example": {
"featureFlag": true,
"source": "marketing-campaign"
},
"description": "Client metadata. Used as a data store, accessible from the client side. Do not store information that should not be exposed to the client."
},
"client_read_only_metadata": {
"type": "object",
"example": {
"featureFlag": true,
"source": "marketing-campaign"
},
"description": "Client read-only, server-writable metadata. Used as a data store, accessible from the client side. Do not store information that should not be exposed to the client. The client can read this data, but cannot modify it. This is useful for things like subscription status."
},
"server_metadata": {
"type": "object",
"example": {
"featureFlag": true,
"source": "marketing-campaign"
},
"description": "Server metadata. Used as a data store, only accessible from the server side. You can store secret information related to the product here."
}
},
"required": [
"display_name",
"customer_type"
]
},
"stripe_account_id": {
"type": "string"
},
"project_id": {
"type": "string"
},
"project_logo_url": {
"type": "string"
},
"already_bought_non_stackable": {
"type": "boolean"
},
"conflicting_products": {
"type": "array",
"items": {
"type": "object",
"properties": {
"product_id": {
"type": "string"
},
"display_name": {
"type": "string"
}
},
"required": [
"product_id",
"display_name"
]
}
},
"test_mode": {
"type": "boolean"
},
"charges_enabled": {
"type": "boolean"
}
},
"required": [
"project_id",
"already_bought_non_stackable",
"conflicting_products",
"test_mode"
]
}
}
}
}
}
}
},
"/project-permissions": {
"get": {
"summary": "List project permissions",
"description": "List global permissions of the current user. `user_id=me` must be set for client requests. `(user_id, permission_id)` together uniquely identify a permission.",
"parameters": [
{
"name": "user_id",
"in": "query",
"schema": {
"type": "string",
"example": "me",
"description": "Filter with the user ID. If set, only the permissions this user has will be returned. Client request must set `user_id=me`"
},
"description": "Filter with the user ID. If set, only the permissions this user has will be returned. Client request must set `user_id=me`",
"required": false
},
{
"name": "permission_id",
"in": "query",
"schema": {
"type": "string",
"example": "16399452-c4f3-4554-8e44-c2d67bb60360",
"description": "Filter with the permission ID. If set, only the permissions with this specific ID will be returned"
},
"description": "Filter with the permission ID. If set, only the permissions with this specific ID will be returned",
"required": false
},
{
"name": "recursive",
"in": "query",
"schema": {
"type": "string",
"enum": [
"true",
"false"
],
"example": "true",
"description": "Whether to list permissions recursively. If set to `false`, only the permission the users directly have will be listed. If set to `true` all the direct and indirect permissions will be listed."
},
"description": "Whether to list permissions recursively. If set to `false`, only the permission the users directly have will be listed. If set to `true` all the direct and indirect permissions will be listed.",
"required": false
}
],
"tags": [
"Permissions"
],
"x-full-url": "https://api.hexclave.com/api/v1/project-permissions",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"example": "read_secret_info",
"description": "The permission ID used to uniquely identify a permission. Can either be a custom permission with lowercase letters, numbers, `:`, and `_` characters, or one of the system permissions: `$update_team`, `$delete_team`, `$read_members`, `$remove_members`, `$invite_members`, `$manage_api_keys`"
},
"user_id": {
"type": "string",
"example": "3241a285-8329-4d69-8f3d-316e08cf140c",
"description": "The unique identifier of the user"
}
},
"required": [
"id",
"user_id"
]
}
},
"pagination": {
"type": "object",
"properties": {
"next_cursor": {
"type": "string",
"example": "b3d396b8-c574-4c80-97b3-50031675ceb2",
"description": "The cursor to fetch the next page of results. null if there is no next page."
}
},
"required": []
}
},
"required": [
"items"
]
}
}
}
}
}
}
},
"/team-permissions": {
"get": {
"summary": "List team permissions",
"description": "List team permissions of the current user. `user_id=me` must be set for client requests. Note that this might contain the permissions with the same permission ID across different teams. `(team_id, user_id, permission_id)` together uniquely identify a permission.",
"parameters": [
{
"name": "team_id",
"in": "query",
"schema": {
"type": "string",
"example": "cce084a3-28b7-418e-913e-c8ee6d802ea4",
"description": "Filter with the team ID. If set, only the permissions of the members in a specific team will be returned."
},
"description": "Filter with the team ID. If set, only the permissions of the members in a specific team will be returned.",
"required": false
},
{
"name": "user_id",
"in": "query",
"schema": {
"type": "string",
"example": "me",
"description": "Filter with the user ID. If set, only the permissions this user has will be returned. Client request must set `user_id=me`"
},
"description": "Filter with the user ID. If set, only the permissions this user has will be returned. Client request must set `user_id=me`",
"required": false
},
{
"name": "permission_id",
"in": "query",
"schema": {
"type": "string",
"example": "16399452-c4f3-4554-8e44-c2d67bb60360",
"description": "Filter with the permission ID. If set, only the permissions with this specific ID will be returned"
},
"description": "Filter with the permission ID. If set, only the permissions with this specific ID will be returned",
"required": false
},
{
"name": "recursive",
"in": "query",
"schema": {
"type": "string",
"enum": [
"true",
"false"
],
"example": "true",
"description": "Whether to list permissions recursively. If set to `false`, only the permission the users directly have will be listed. If set to `true` all the direct and indirect permissions will be listed."
},
"description": "Whether to list permissions recursively. If set to `false`, only the permission the users directly have will be listed. If set to `true` all the direct and indirect permissions will be listed.",
"required": false
}
],
"tags": [
"Permissions"
],
"x-full-url": "https://api.hexclave.com/api/v1/team-permissions",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"example": "read_secret_info",
"description": "The permission ID used to uniquely identify a permission. Can either be a custom permission with lowercase letters, numbers, `:`, and `_` characters, or one of the system permissions: `$update_team`, `$delete_team`, `$read_members`, `$remove_members`, `$invite_members`, `$manage_api_keys`"
},
"user_id": {
"type": "string",
"example": "3241a285-8329-4d69-8f3d-316e08cf140c",
"description": "The unique identifier of the user"
},
"team_id": {
"type": "string",
"example": "ad962777-8244-496a-b6a2-e0c6a449c79e",
"description": "The unique identifier of the team"
}
},
"required": [
"id",
"user_id",
"team_id"
]
}
},
"pagination": {
"type": "object",
"properties": {
"next_cursor": {
"type": "string",
"example": "b3d396b8-c574-4c80-97b3-50031675ceb2",
"description": "The cursor to fetch the next page of results. null if there is no next page."
}
},
"required": []
}
},
"required": [
"items"
]
}
}
}
}
}
}
},
"/projects/current": {
"get": {
"summary": "Get the current project",
"description": "Get the current project information including display name, OAuth providers and authentication methods. Useful for displaying the available login options to the user.",
"parameters": [],
"tags": [
"Projects"
],
"x-full-url": "https://api.hexclave.com/api/v1/projects/current",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"id": {
"type": "string",
"example": "e0b52f4d-dece-408c-af49-d23061bb0f8d",
"description": "The unique identifier of the project"
},
"display_name": {
"type": "string",
"example": "MyMusic",
"description": "Human-readable project display name. This is not a unique identifier."
}
},
"required": [
"id",
"display_name"
]
}
}
}
}
}
}
},
"/auth/sessions": {
"get": {
"summary": "List sessions",
"description": "List all sessions for the current user.",
"parameters": [
{
"name": "user_id",
"in": "query",
"schema": {
"type": "string",
"example": "3241a285-8329-4d69-8f3d-316e08cf140c",
"description": "The ID of the user, or the special value `me` for the currently authenticated user"
},
"description": "The ID of the user, or the special value `me` for the currently authenticated user",
"required": true
}
],
"tags": [
"Sessions"
],
"x-full-url": "https://api.hexclave.com/api/v1/auth/sessions",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"user_id": {
"type": "string"
},
"created_at": {
"type": "number"
},
"is_impersonation": {
"type": "boolean"
},
"last_used_at": {
"type": "number"
},
"is_current_session": {
"type": "boolean"
},
"last_used_at_end_user_ip_info": {
"type": "object",
"properties": {
"ip": {
"type": "string"
},
"countryCode": {
"type": "string"
},
"regionCode": {
"type": "string"
},
"cityName": {
"type": "string"
},
"latitude": {
"type": "number"
},
"longitude": {
"type": "number"
},
"tzIdentifier": {
"type": "string"
}
},
"required": [
"ip"
]
}
},
"required": [
"id",
"user_id",
"created_at",
"is_impersonation"
]
}
},
"pagination": {
"type": "object",
"properties": {
"next_cursor": {
"type": "string",
"example": "b3d396b8-c574-4c80-97b3-50031675ceb2",
"description": "The cursor to fetch the next page of results. null if there is no next page."
}
},
"required": []
}
},
"required": [
"items"
]
}
}
}
}
}
}
},
"/auth/sessions/current": {
"delete": {
"summary": "Sign out of the current session",
"description": "Sign out of the current session and invalidate the refresh token",
"parameters": [],
"tags": [
"Sessions"
],
"x-full-url": "https://api.hexclave.com/api/v1/auth/sessions/current",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": {
"type": "boolean",
"description": "Always equal to true.",
"example": true
}
},
"required": [
"success"
]
}
}
}
}
}
}
},
"/auth/sessions/current/refresh": {
"post": {
"summary": "Refresh access token",
"description": "Get a new access token using a refresh token",
"parameters": [
{
"name": "x-stack-refresh-token",
"in": "header",
"schema": {
"type": "string"
},
"required": true
}
],
"tags": [
"Sessions"
],
"x-full-url": "https://api.hexclave.com/api/v1/auth/sessions/current/refresh",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"access_token": {
"type": "string"
}
},
"required": [
"access_token"
]
}
}
}
}
}
}
},
"/auth/sessions/{id}": {
"delete": {
"summary": "Delete session",
"description": "Delete a session by ID.",
"parameters": [
{
"name": "user_id",
"in": "query",
"schema": {
"type": "string",
"example": "3241a285-8329-4d69-8f3d-316e08cf140c",
"description": "The ID of the user, or the special value `me` for the currently authenticated user"
},
"description": "The ID of the user, or the special value `me` for the currently authenticated user",
"required": true
},
{
"name": "id",
"in": "path",
"schema": {
"type": "string"
},
"required": true
}
],
"tags": [
"Sessions"
],
"x-full-url": "https://api.hexclave.com/api/v1/auth/sessions/{id}",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": {
"type": "boolean",
"description": "Always equal to true.",
"example": true
}
},
"required": [
"success"
]
}
}
}
}
}
}
},
"/team-invitations": {
"get": {
"summary": "List team invitations",
"description": "",
"parameters": [
{
"name": "team_id",
"in": "query",
"schema": {
"type": "string",
"description": "The team ID to list invitations for. Required unless user_id is provided."
},
"description": "The team ID to list invitations for. Required unless user_id is provided.",
"required": false
},
{
"name": "user_id",
"in": "query",
"schema": {
"type": "string",
"description": "List invitations sent to this user's verified emails. Must be \"me\" for client access. Cannot be combined with team_id."
},
"description": "List invitations sent to this user's verified emails. Must be \"me\" for client access. Cannot be combined with team_id.",
"required": false
}
],
"tags": [
"Teams"
],
"x-full-url": "https://api.hexclave.com/api/v1/team-invitations",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"team_id": {
"type": "string",
"example": "ad962777-8244-496a-b6a2-e0c6a449c79e",
"description": "The unique identifier of the team"
},
"team_display_name": {
"type": "string"
},
"expires_at_millis": {
"type": "number"
},
"recipient_email": {
"type": "string"
}
},
"required": [
"id",
"team_id",
"team_display_name",
"expires_at_millis",
"recipient_email"
]
}
},
"pagination": {
"type": "object",
"properties": {
"next_cursor": {
"type": "string",
"example": "b3d396b8-c574-4c80-97b3-50031675ceb2",
"description": "The cursor to fetch the next page of results. null if there is no next page."
}
},
"required": []
}
},
"required": [
"items"
]
}
}
}
}
}
}
},
"/team-invitations/accept": {
"post": {
"summary": "Accept the team invitation",
"description": "Accept invitation and add user to the team",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"code": {
"type": "string",
"example": "u3h6gn4w24pqc8ya679inrhjwh1rybth6a7thurqhnpf2",
"description": "A 45 character code"
}
},
"required": [
"code"
],
"example": {
"code": "u3h6gn4w24pqc8ya679inrhjwh1rybth6a7thurqhnpf2"
}
}
}
}
},
"tags": [
"Teams"
],
"x-full-url": "https://api.hexclave.com/api/v1/team-invitations/accept",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {}
}
}
}
}
}
}
},
"/team-invitations/accept/check-code": {
"post": {
"summary": "Check if a team invitation code is valid",
"description": "Check if a team invitation code is valid without using it",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"code": {
"type": "string",
"example": "u3h6gn4w24pqc8ya679inrhjwh1rybth6a7thurqhnpf2",
"description": "A 45 character code"
}
},
"required": [
"code"
],
"example": {
"code": "u3h6gn4w24pqc8ya679inrhjwh1rybth6a7thurqhnpf2"
}
}
}
}
},
"tags": [
"Teams"
],
"x-full-url": "https://api.hexclave.com/api/v1/team-invitations/accept/check-code",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"is_code_valid": {
"type": "boolean"
}
},
"required": [
"is_code_valid"
]
}
}
}
}
}
}
},
"/team-invitations/accept/details": {
"post": {
"summary": "Get team invitation details",
"description": "Get additional information about a team invitation code",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"code": {
"type": "string",
"example": "u3h6gn4w24pqc8ya679inrhjwh1rybth6a7thurqhnpf2",
"description": "A 45 character code"
}
},
"required": [
"code"
],
"example": {
"code": "u3h6gn4w24pqc8ya679inrhjwh1rybth6a7thurqhnpf2"
}
}
}
}
},
"tags": [
"Teams"
],
"x-full-url": "https://api.hexclave.com/api/v1/team-invitations/accept/details",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"team_id": {
"type": "string"
},
"team_display_name": {
"type": "string"
}
},
"required": [
"team_id",
"team_display_name"
]
}
}
}
}
}
}
},
"/team-invitations/send-code": {
"post": {
"summary": "Send an email to invite a user to a team",
"description": "The user receiving this email can join the team by clicking on the link in the email. If the user does not have an account yet, they will be prompted to create one.",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"team_id": {
"type": "string",
"example": "ad962777-8244-496a-b6a2-e0c6a449c79e",
"description": "The unique identifier of the team"
},
"email": {
"type": "string",
"example": "johndoe@example.com",
"description": "The email of the user to invite."
},
"callback_url": {
"type": "string",
"example": "https://example.com/handler/team-invitation",
"description": "The base callback URL to construct an invite link with. A query parameter `code` with the verification code will be appended to it. The page should then make a request to the `/team-invitations/accept` endpoint."
}
},
"required": [
"team_id",
"email",
"callback_url"
],
"example": {
"team_id": "ad962777-8244-496a-b6a2-e0c6a449c79e",
"email": "johndoe@example.com",
"callback_url": "https://example.com/handler/team-invitation"
}
}
}
}
},
"tags": [
"Teams"
],
"x-full-url": "https://api.hexclave.com/api/v1/team-invitations/send-code",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": {
"type": "boolean"
},
"id": {
"type": "string"
}
},
"required": [
"success",
"id"
]
}
}
}
}
}
}
},
"/team-invitations/{id}": {
"delete": {
"summary": "Delete a team invitation",
"description": "",
"parameters": [
{
"name": "team_id",
"in": "query",
"schema": {
"type": "string",
"description": "The team ID to list invitations for. Required unless user_id is provided."
},
"description": "The team ID to list invitations for. Required unless user_id is provided.",
"required": false
},
{
"name": "id",
"in": "path",
"schema": {
"type": "string"
},
"required": true
}
],
"tags": [
"Teams"
],
"x-full-url": "https://api.hexclave.com/api/v1/team-invitations/{id}",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": {
"type": "boolean",
"description": "Always equal to true.",
"example": true
}
},
"required": [
"success"
]
}
}
}
}
}
}
},
"/team-invitations/{id}/accept": {
"post": {
"summary": "Accept a team invitation by ID",
"description": "Accepts a team invitation for the specified user. The user must have a verified email matching the invitation's recipient email. This marks the invitation as used and adds the user to the team.",
"parameters": [
{
"name": "user_id",
"in": "query",
"schema": {
"type": "string",
"example": "3241a285-8329-4d69-8f3d-316e08cf140c",
"description": "The ID of the user, or the special value `me` for the currently authenticated user"
},
"description": "The ID of the user, or the special value `me` for the currently authenticated user",
"required": true
},
{
"name": "id",
"in": "path",
"schema": {
"type": "string"
},
"required": true
}
],
"tags": [
"Teams"
],
"x-full-url": "https://api.hexclave.com/api/v1/team-invitations/{id}/accept",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {}
}
}
}
}
}
}
},
"/team-member-profiles": {
"get": {
"summary": "List team members profiles",
"description": "List team members profiles. You always need to specify a `team_id` that your are a member of on the client. You can always filter for your own profile by setting `me` as the `user_id` in the path parameters. If you want list all the profiles in a team, you need to have the `$read_members` permission in that team.",
"parameters": [
{
"name": "user_id",
"in": "query",
"schema": {
"type": "string"
},
"required": false
},
{
"name": "team_id",
"in": "query",
"schema": {
"type": "string"
},
"required": false
}
],
"tags": [
"Teams"
],
"x-full-url": "https://api.hexclave.com/api/v1/team-member-profiles",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"team_id": {
"type": "string",
"example": "ad962777-8244-496a-b6a2-e0c6a449c79e",
"description": "The unique identifier of the team"
},
"user_id": {
"type": "string",
"example": "3241a285-8329-4d69-8f3d-316e08cf140c",
"description": "The unique identifier of the user"
},
"display_name": {
"type": "string",
"example": "John Doe",
"description": "Human-readable team member display name. This is not a unique identifier. Note that this is separate from the display_name of the user."
},
"profile_image_url": {
"type": "string",
"example": "https://example.com/image.jpg",
"description": "URL of the profile image for team member. Can be a Base64 encoded image. Must be smaller than 100KB. Please compress and crop to a square before passing in."
}
},
"required": [
"team_id",
"user_id"
]
}
},
"pagination": {
"type": "object",
"properties": {
"next_cursor": {
"type": "string",
"example": "b3d396b8-c574-4c80-97b3-50031675ceb2",
"description": "The cursor to fetch the next page of results. null if there is no next page."
}
},
"required": []
}
},
"required": [
"items"
]
}
}
}
}
}
}
},
"/team-member-profiles/{team_id}/{user_id}": {
"get": {
"summary": "Get a team member profile",
"description": "Get a team member profile. you can always get your own profile by setting `me` as the `user_id` in the path parameters on the client. If you want to get someone else's profile in a team, you need to have the `$read_members` permission in that team.",
"parameters": [
{
"name": "team_id",
"in": "path",
"schema": {
"type": "string"
},
"required": true
},
{
"name": "user_id",
"in": "path",
"schema": {
"type": "string",
"example": "3241a285-8329-4d69-8f3d-316e08cf140c",
"description": "The ID of the user, or the special value `me` for the currently authenticated user"
},
"description": "The ID of the user, or the special value `me` for the currently authenticated user",
"required": true
}
],
"tags": [
"Teams"
],
"x-full-url": "https://api.hexclave.com/api/v1/team-member-profiles/{team_id}/{user_id}",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"team_id": {
"type": "string",
"example": "ad962777-8244-496a-b6a2-e0c6a449c79e",
"description": "The unique identifier of the team"
},
"user_id": {
"type": "string",
"example": "3241a285-8329-4d69-8f3d-316e08cf140c",
"description": "The unique identifier of the user"
},
"display_name": {
"type": "string",
"example": "John Doe",
"description": "Human-readable team member display name. This is not a unique identifier. Note that this is separate from the display_name of the user."
},
"profile_image_url": {
"type": "string",
"example": "https://example.com/image.jpg",
"description": "URL of the profile image for team member. Can be a Base64 encoded image. Must be smaller than 100KB. Please compress and crop to a square before passing in."
}
},
"required": [
"team_id",
"user_id"
]
}
}
}
}
}
},
"patch": {
"summary": "Update your team member profile",
"description": "Update your own team member profile. `user_id` must be `me` in the path parameters on the client.",
"parameters": [
{
"name": "team_id",
"in": "path",
"schema": {
"type": "string"
},
"required": true
},
{
"name": "user_id",
"in": "path",
"schema": {
"type": "string",
"example": "3241a285-8329-4d69-8f3d-316e08cf140c",
"description": "The ID of the user, or the special value `me` for the currently authenticated user"
},
"description": "The ID of the user, or the special value `me` for the currently authenticated user",
"required": true
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"display_name": {
"type": "string",
"example": "John Doe",
"description": "Human-readable team member display name. This is not a unique identifier. Note that this is separate from the display_name of the user."
},
"profile_image_url": {
"type": "string",
"example": "https://example.com/image.jpg",
"description": "URL of the profile image for team member. Can be a Base64 encoded image. Must be smaller than 100KB. Please compress and crop to a square before passing in."
}
},
"example": {
"display_name": "John Doe",
"profile_image_url": "https://example.com/image.jpg"
}
}
}
}
},
"tags": [
"Teams"
],
"x-full-url": "https://api.hexclave.com/api/v1/team-member-profiles/{team_id}/{user_id}",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"team_id": {
"type": "string",
"example": "ad962777-8244-496a-b6a2-e0c6a449c79e",
"description": "The unique identifier of the team"
},
"user_id": {
"type": "string",
"example": "3241a285-8329-4d69-8f3d-316e08cf140c",
"description": "The unique identifier of the user"
},
"display_name": {
"type": "string",
"example": "John Doe",
"description": "Human-readable team member display name. This is not a unique identifier. Note that this is separate from the display_name of the user."
},
"profile_image_url": {
"type": "string",
"example": "https://example.com/image.jpg",
"description": "URL of the profile image for team member. Can be a Base64 encoded image. Must be smaller than 100KB. Please compress and crop to a square before passing in."
}
},
"required": [
"team_id",
"user_id"
]
}
}
}
}
}
}
},
"/team-memberships/{team_id}/{user_id}": {
"delete": {
"summary": "Remove a user from a team",
"description": "All the users are allowed to remove themselves from a team (`user_id=me`). Only the users who have the `$remove_members` permission are allowed to remove other users from a team. `team_id` is must an ID of a team that the user is a member of.",
"parameters": [
{
"name": "team_id",
"in": "path",
"schema": {
"type": "string"
},
"required": true
},
{
"name": "user_id",
"in": "path",
"schema": {
"type": "string",
"example": "3241a285-8329-4d69-8f3d-316e08cf140c",
"description": "The ID of the user, or the special value `me` for the currently authenticated user"
},
"description": "The ID of the user, or the special value `me` for the currently authenticated user",
"required": true
}
],
"tags": [
"Teams"
],
"x-full-url": "https://api.hexclave.com/api/v1/team-memberships/{team_id}/{user_id}",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": {
"type": "boolean",
"description": "Always equal to true.",
"example": true
}
},
"required": [
"success"
]
}
}
}
}
}
}
},
"/teams": {
"get": {
"summary": "List teams",
"description": "List all the teams that the current user is a member of. `user_id=me` must be passed in the query parameters.",
"parameters": [
{
"name": "user_id",
"in": "query",
"schema": {
"type": "string",
"example": "me",
"description": "Filter for the teams that the user is a member of. Can be either `me` or an ID. Must be `me` in the client API"
},
"description": "Filter for the teams that the user is a member of. Can be either `me` or an ID. Must be `me` in the client API",
"required": false
},
{
"name": "order_by",
"in": "query",
"schema": {
"type": "string",
"enum": [
"created_at"
],
"example": "created_at",
"description": "Field to order results by. Currently only `created_at` is supported."
},
"description": "Field to order results by. Currently only `created_at` is supported.",
"required": false
},
{
"name": "desc",
"in": "query",
"schema": {
"type": "string",
"enum": [
"true",
"false"
],
"example": "false",
"description": "Whether to order results in descending order. Defaults to false (ascending)."
},
"description": "Whether to order results in descending order. Defaults to false (ascending).",
"required": false
},
{
"name": "limit",
"in": "query",
"schema": {
"type": "integer",
"description": "The maximum number of items to return (capped at 200)."
},
"description": "The maximum number of items to return (capped at 200).",
"required": false
},
{
"name": "cursor",
"in": "query",
"schema": {
"type": "string",
"description": "The cursor to start the result set from. Requires `limit` to also be set."
},
"description": "The cursor to start the result set from. Requires `limit` to also be set.",
"required": false
},
{
"name": "query",
"in": "query",
"schema": {
"type": "string",
"description": "A search query to filter the results by. Free-text search applied to the team's id (exact-match) and display name."
},
"description": "A search query to filter the results by. Free-text search applied to the team's id (exact-match) and display name.",
"required": false
}
],
"tags": [
"Teams"
],
"x-full-url": "https://api.hexclave.com/api/v1/teams",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"example": "ad962777-8244-496a-b6a2-e0c6a449c79e",
"description": "The unique identifier of the team"
},
"display_name": {
"type": "string",
"example": "My Team",
"description": "Human-readable team display name. This is not a unique identifier."
},
"profile_image_url": {
"type": "string",
"example": "https://example.com/image.jpg",
"description": "URL of the profile image for team. Can be a Base64 encoded image. Must be smaller than 100KB. Please compress and crop to a square before passing in."
},
"client_metadata": {
"type": "object",
"example": {
"key": "value"
},
"description": "Client metadata. Used as a data store, accessible from the client side. Do not store information that should not be exposed to the client."
},
"client_read_only_metadata": {
"type": "object",
"example": {
"key": "value"
},
"description": "Client read-only, server-writable metadata. Used as a data store, accessible from the client side. Do not store information that should not be exposed to the client. The client can read this data, but cannot modify it. This is useful for things like subscription status."
}
},
"required": [
"id",
"display_name"
]
}
},
"pagination": {
"type": "object",
"properties": {
"next_cursor": {
"type": "string",
"example": "b3d396b8-c574-4c80-97b3-50031675ceb2",
"description": "The cursor to fetch the next page of results. null if there is no next page."
}
},
"required": []
}
},
"required": [
"items"
]
}
}
}
}
}
},
"post": {
"summary": "Create a team",
"description": "Create a new team and optionally add the current user as a member.",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"display_name": {
"type": "string",
"example": "My Team",
"description": "Human-readable team display name. This is not a unique identifier."
},
"creator_user_id": {
"type": "string",
"example": "me",
"description": "The ID of the creator of the team. If not specified, the user will not be added to the team. Can be either \"me\" or the ID of the user. Only used on the client side."
},
"profile_image_url": {
"type": "string",
"example": "https://example.com/image.jpg",
"description": "URL of the profile image for team. Can be a Base64 encoded image. Must be smaller than 100KB. Please compress and crop to a square before passing in."
},
"client_metadata": {
"type": "object",
"example": {
"key": "value"
},
"description": "Client metadata. Used as a data store, accessible from the client side. Do not store information that should not be exposed to the client."
}
},
"required": [
"display_name"
],
"example": {
"display_name": "My Team",
"creator_user_id": "me",
"profile_image_url": "https://example.com/image.jpg",
"client_metadata": {
"key": "value"
}
}
}
}
}
},
"tags": [
"Teams"
],
"x-full-url": "https://api.hexclave.com/api/v1/teams",
"responses": {
"201": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"id": {
"type": "string",
"example": "ad962777-8244-496a-b6a2-e0c6a449c79e",
"description": "The unique identifier of the team"
},
"display_name": {
"type": "string",
"example": "My Team",
"description": "Human-readable team display name. This is not a unique identifier."
},
"profile_image_url": {
"type": "string",
"example": "https://example.com/image.jpg",
"description": "URL of the profile image for team. Can be a Base64 encoded image. Must be smaller than 100KB. Please compress and crop to a square before passing in."
},
"client_metadata": {
"type": "object",
"example": {
"key": "value"
},
"description": "Client metadata. Used as a data store, accessible from the client side. Do not store information that should not be exposed to the client."
},
"client_read_only_metadata": {
"type": "object",
"example": {
"key": "value"
},
"description": "Client read-only, server-writable metadata. Used as a data store, accessible from the client side. Do not store information that should not be exposed to the client. The client can read this data, but cannot modify it. This is useful for things like subscription status."
}
},
"required": [
"id",
"display_name"
]
}
}
}
}
}
}
},
"/teams/{team_id}": {
"get": {
"summary": "Get a team",
"description": "Get a team that the current user is a member of.",
"parameters": [
{
"name": "team_id",
"in": "path",
"schema": {
"type": "string"
},
"required": true
}
],
"tags": [
"Teams"
],
"x-full-url": "https://api.hexclave.com/api/v1/teams/{team_id}",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"id": {
"type": "string",
"example": "ad962777-8244-496a-b6a2-e0c6a449c79e",
"description": "The unique identifier of the team"
},
"display_name": {
"type": "string",
"example": "My Team",
"description": "Human-readable team display name. This is not a unique identifier."
},
"profile_image_url": {
"type": "string",
"example": "https://example.com/image.jpg",
"description": "URL of the profile image for team. Can be a Base64 encoded image. Must be smaller than 100KB. Please compress and crop to a square before passing in."
},
"client_metadata": {
"type": "object",
"example": {
"key": "value"
},
"description": "Client metadata. Used as a data store, accessible from the client side. Do not store information that should not be exposed to the client."
},
"client_read_only_metadata": {
"type": "object",
"example": {
"key": "value"
},
"description": "Client read-only, server-writable metadata. Used as a data store, accessible from the client side. Do not store information that should not be exposed to the client. The client can read this data, but cannot modify it. This is useful for things like subscription status."
}
},
"required": [
"id",
"display_name"
]
}
}
}
}
}
},
"delete": {
"summary": "Delete a team",
"description": "Delete a team. Only allowed if the current user is a member of the team and has the `$delete_team` permission.",
"parameters": [
{
"name": "team_id",
"in": "path",
"schema": {
"type": "string"
},
"required": true
}
],
"tags": [
"Teams"
],
"x-full-url": "https://api.hexclave.com/api/v1/teams/{team_id}",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": {
"type": "boolean",
"description": "Always equal to true.",
"example": true
}
},
"required": [
"success"
]
}
}
}
}
}
},
"patch": {
"summary": "Update a team",
"description": "Update the team information. Only allowed if the current user is a member of the team and has the `$update_team` permission.",
"parameters": [
{
"name": "team_id",
"in": "path",
"schema": {
"type": "string"
},
"required": true
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"display_name": {
"type": "string",
"example": "My Team",
"description": "Human-readable team display name. This is not a unique identifier."
},
"profile_image_url": {
"type": "string",
"example": "https://example.com/image.jpg",
"description": "URL of the profile image for team. Can be a Base64 encoded image. Must be smaller than 100KB. Please compress and crop to a square before passing in."
},
"client_metadata": {
"type": "object",
"example": {
"key": "value"
},
"description": "Client metadata. Used as a data store, accessible from the client side. Do not store information that should not be exposed to the client."
}
},
"example": {
"display_name": "My Team",
"profile_image_url": "https://example.com/image.jpg",
"client_metadata": {
"key": "value"
}
}
}
}
}
},
"tags": [
"Teams"
],
"x-full-url": "https://api.hexclave.com/api/v1/teams/{team_id}",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"id": {
"type": "string",
"example": "ad962777-8244-496a-b6a2-e0c6a449c79e",
"description": "The unique identifier of the team"
},
"display_name": {
"type": "string",
"example": "My Team",
"description": "Human-readable team display name. This is not a unique identifier."
},
"profile_image_url": {
"type": "string",
"example": "https://example.com/image.jpg",
"description": "URL of the profile image for team. Can be a Base64 encoded image. Must be smaller than 100KB. Please compress and crop to a square before passing in."
},
"client_metadata": {
"type": "object",
"example": {
"key": "value"
},
"description": "Client metadata. Used as a data store, accessible from the client side. Do not store information that should not be exposed to the client."
},
"client_read_only_metadata": {
"type": "object",
"example": {
"key": "value"
},
"description": "Client read-only, server-writable metadata. Used as a data store, accessible from the client side. Do not store information that should not be exposed to the client. The client can read this data, but cannot modify it. This is useful for things like subscription status."
}
},
"required": [
"id",
"display_name"
]
}
}
}
}
}
}
},
"/users/me": {
"get": {
"summary": "Get current user",
"description": "Gets the currently authenticated user.",
"parameters": [],
"tags": [
"Users"
],
"x-full-url": "https://api.hexclave.com/api/v1/users/me",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"selected_team": {
"type": "object",
"properties": {
"id": {
"type": "string",
"example": "ad962777-8244-496a-b6a2-e0c6a449c79e",
"description": "The unique identifier of the team"
},
"display_name": {
"type": "string",
"example": "My Team",
"description": "Human-readable team display name. This is not a unique identifier."
},
"profile_image_url": {
"type": "string",
"example": "https://example.com/image.jpg",
"description": "URL of the profile image for team. Can be a Base64 encoded image. Must be smaller than 100KB. Please compress and crop to a square before passing in."
},
"client_metadata": {
"type": "object",
"example": {
"key": "value"
},
"description": "Client metadata. Used as a data store, accessible from the client side. Do not store information that should not be exposed to the client."
},
"client_read_only_metadata": {
"type": "object",
"example": {
"key": "value"
},
"description": "Client read-only, server-writable metadata. Used as a data store, accessible from the client side. Do not store information that should not be exposed to the client. The client can read this data, but cannot modify it. This is useful for things like subscription status."
}
},
"required": [
"id",
"display_name"
]
},
"id": {
"type": "string",
"example": "3241a285-8329-4d69-8f3d-316e08cf140c",
"description": "The unique identifier of the user"
},
"primary_email": {
"type": "string",
"example": "johndoe@example.com",
"description": "Primary email"
},
"primary_email_verified": {
"type": "boolean",
"example": true,
"description": "Whether the primary email has been verified to belong to this user"
},
"display_name": {
"type": "string",
"example": "John Doe",
"description": "Human-readable user display name. This is not a unique identifier."
},
"client_metadata": {
"type": "object",
"example": {
"key": "value"
},
"description": "Client metadata. Used as a data store, accessible from the client side. Do not store information that should not be exposed to the client."
},
"client_read_only_metadata": {
"type": "object",
"example": {
"key": "value"
},
"description": "Client read-only, server-writable metadata. Used as a data store, accessible from the client side. Do not store information that should not be exposed to the client. The client can read this data, but cannot modify it. This is useful for things like subscription status."
},
"profile_image_url": {
"type": "string",
"example": "https://example.com/image.jpg",
"description": "URL of the profile image for user. Can be a Base64 encoded image. Must be smaller than 100KB. Please compress and crop to a square before passing in."
},
"signed_up_at_millis": {
"type": "number",
"example": 1630000000000,
"description": "The time the user signed up (identify) => `(the number of milliseconds since epoch, January 1, 1970, UTC)`"
},
"selected_team_id": {
"type": "string",
"example": "team-id",
"description": "ID of the team currently selected by the user"
},
"is_anonymous": {
"type": "boolean"
},
"is_restricted": {
"type": "boolean",
"example": false,
"description": "Whether the user is in restricted state (has signed up but not completed onboarding requirements)"
},
"restricted_reason": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"anonymous",
"email_not_verified",
"restricted_by_administrator"
]
}
},
"required": [
"type"
],
"example": null,
"description": "The reason why the user is restricted (e.g., type: \"email_not_verified\", \"anonymous\", or \"restricted_by_administrator\"), null if not restricted"
},
"restricted_by_admin": {
"type": "boolean",
"example": false,
"description": "Whether the user is restricted by an administrator. Can be set manually or by sign-up rules."
},
"restricted_by_admin_reason": {
"type": "string",
"example": null,
"description": "Public reason shown to the user explaining why they are restricted. Optional."
}
},
"required": [
"id",
"primary_email_verified",
"signed_up_at_millis",
"is_anonymous",
"is_restricted",
"restricted_by_admin"
]
}
}
}
}
}
},
"delete": {
"summary": "Delete current user",
"description": "Deletes the currently authenticated user. Use this with caution.",
"parameters": [],
"tags": [
"Users"
],
"x-full-url": "https://api.hexclave.com/api/v1/users/me",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": {
"type": "boolean",
"description": "Always equal to true.",
"example": true
}
},
"required": [
"success"
]
}
}
}
}
}
},
"patch": {
"summary": "Update current user",
"description": "Updates the currently authenticated user. Only the values provided will be updated.",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"display_name": {
"type": "string",
"example": "John Doe",
"description": "Human-readable user display name. This is not a unique identifier."
},
"profile_image_url": {
"type": "string",
"example": "https://example.com/image.jpg",
"description": "URL of the profile image for user. Can be a Base64 encoded image. Must be smaller than 100KB. Please compress and crop to a square before passing in."
},
"client_metadata": {
"type": "object",
"example": {
"key": "value"
},
"description": "Client metadata. Used as a data store, accessible from the client side. Do not store information that should not be exposed to the client."
},
"selected_team_id": {
"type": "string",
"example": "team-id",
"description": "ID of the team currently selected by the user"
},
"totp_secret_base64": {
"type": "string",
"example": "dG90cC1zZWNyZXQ=",
"description": "Enables 2FA and sets a TOTP secret for the user. Set to null to disable 2FA."
},
"primary_email": {
"type": "string",
"example": "johndoe@example.com",
"description": "Primary email"
}
},
"example": {
"display_name": "John Doe",
"profile_image_url": "https://example.com/image.jpg",
"client_metadata": {
"key": "value"
},
"selected_team_id": "team-id",
"totp_secret_base64": "dG90cC1zZWNyZXQ=",
"primary_email": "johndoe@example.com"
}
}
}
}
},
"tags": [
"Users"
],
"x-full-url": "https://api.hexclave.com/api/v1/users/me",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"selected_team": {
"type": "object",
"properties": {
"id": {
"type": "string",
"example": "ad962777-8244-496a-b6a2-e0c6a449c79e",
"description": "The unique identifier of the team"
},
"display_name": {
"type": "string",
"example": "My Team",
"description": "Human-readable team display name. This is not a unique identifier."
},
"profile_image_url": {
"type": "string",
"example": "https://example.com/image.jpg",
"description": "URL of the profile image for team. Can be a Base64 encoded image. Must be smaller than 100KB. Please compress and crop to a square before passing in."
},
"client_metadata": {
"type": "object",
"example": {
"key": "value"
},
"description": "Client metadata. Used as a data store, accessible from the client side. Do not store information that should not be exposed to the client."
},
"client_read_only_metadata": {
"type": "object",
"example": {
"key": "value"
},
"description": "Client read-only, server-writable metadata. Used as a data store, accessible from the client side. Do not store information that should not be exposed to the client. The client can read this data, but cannot modify it. This is useful for things like subscription status."
}
},
"required": [
"id",
"display_name"
]
},
"id": {
"type": "string",
"example": "3241a285-8329-4d69-8f3d-316e08cf140c",
"description": "The unique identifier of the user"
},
"primary_email": {
"type": "string",
"example": "johndoe@example.com",
"description": "Primary email"
},
"primary_email_verified": {
"type": "boolean",
"example": true,
"description": "Whether the primary email has been verified to belong to this user"
},
"display_name": {
"type": "string",
"example": "John Doe",
"description": "Human-readable user display name. This is not a unique identifier."
},
"client_metadata": {
"type": "object",
"example": {
"key": "value"
},
"description": "Client metadata. Used as a data store, accessible from the client side. Do not store information that should not be exposed to the client."
},
"client_read_only_metadata": {
"type": "object",
"example": {
"key": "value"
},
"description": "Client read-only, server-writable metadata. Used as a data store, accessible from the client side. Do not store information that should not be exposed to the client. The client can read this data, but cannot modify it. This is useful for things like subscription status."
},
"profile_image_url": {
"type": "string",
"example": "https://example.com/image.jpg",
"description": "URL of the profile image for user. Can be a Base64 encoded image. Must be smaller than 100KB. Please compress and crop to a square before passing in."
},
"signed_up_at_millis": {
"type": "number",
"example": 1630000000000,
"description": "The time the user signed up (identify) => `(the number of milliseconds since epoch, January 1, 1970, UTC)`"
},
"selected_team_id": {
"type": "string",
"example": "team-id",
"description": "ID of the team currently selected by the user"
},
"is_anonymous": {
"type": "boolean"
},
"is_restricted": {
"type": "boolean",
"example": false,
"description": "Whether the user is in restricted state (has signed up but not completed onboarding requirements)"
},
"restricted_reason": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"anonymous",
"email_not_verified",
"restricted_by_administrator"
]
}
},
"required": [
"type"
],
"example": null,
"description": "The reason why the user is restricted (e.g., type: \"email_not_verified\", \"anonymous\", or \"restricted_by_administrator\"), null if not restricted"
},
"restricted_by_admin": {
"type": "boolean",
"example": false,
"description": "Whether the user is restricted by an administrator. Can be set manually or by sign-up rules."
},
"restricted_by_admin_reason": {
"type": "string",
"example": null,
"description": "Public reason shown to the user explaining why they are restricted. Optional."
}
},
"required": [
"id",
"primary_email_verified",
"signed_up_at_millis",
"is_anonymous",
"is_restricted",
"restricted_by_admin"
]
}
}
}
}
}
}
}
}
}