Skip to content

API Endpoints ​

Browse all available Scribe API endpoints below. Each endpoint includes request/response schemas, parameters, and example payloads.

API for XC AI Content Automation platform

Servers​

https://api.scribe.thextracode.comProduction
https://demoapi.scribe.thextracode.comDemo
http://localhost:8000Local development

auth​

Authentication — login, token refresh, 2FA verification


Authenticate user credentials​

POST
/api/v1/auth/login

Validate email and password, returning a JWT access token on success. If the user has 2FA enabled, returns a temporary token and triggers the 2FA verification flow instead.

Request Body​

application/json
JSON
{
"email": "string",
"password": "string"
}

Responses​

Successful Response

application/json
JSON
{
"access_token": "string",
"token_type": "bearer",
"two_factor_required": false,
"two_factor_setup_required": false,
"two_factor_method": "string",
"temp_token": "string"
}

Playground​

Server
Body

Samples​


Refresh access token​

POST
/api/v1/auth/refresh

Return a new JWT access token for the currently authenticated user.

Authorizations​

HTTPBearer
Type
HTTP (bearer)

Responses​

Successful Response

application/json
JSON
{
"access_token": "string",
"token_type": "bearer"
}

Playground​

Server
Authorization

Samples​


Sign in with Google​

POST
/api/v1/auth/google

Verify a Google ID token and return a JWT access token. Links to existing account if email matches, or creates new account.

Request Body​

application/json
JSON
{
"credential": "string"
}

Responses​

Successful Response

application/json
JSON
{
"access_token": "string",
"token_type": "bearer",
"two_factor_required": false,
"two_factor_setup_required": false,
"two_factor_method": "string",
"temp_token": "string"
}

Playground​

Server
Body

Samples​


Sign in with Apple​

POST
/api/v1/auth/apple

Verify an Apple ID token and return a JWT access token. Links to existing account if email matches, or creates new account.

Request Body​

application/json
JSON
{
"id_token": "string",
"first_name": null,
"last_name": null
}

Responses​

Successful Response

application/json
JSON
{
"access_token": "string",
"token_type": "bearer",
"two_factor_required": false,
"two_factor_setup_required": false,
"two_factor_method": "string",
"temp_token": "string"
}

Playground​

Server
Body

Samples​


Begin 2FA setup​

POST
/api/v1/auth/2fa/setup

Initiate two-factor authentication setup for the current user. For TOTP, returns a secret and otpauth URI; for email, sends a verification code.

Authorizations​

HTTPBearer
Type
HTTP (bearer)

Request Body​

application/json
JSON
{
"method": "string"
}

Responses​

Successful Response

application/json
JSON
{
"method": "string",
"secret": "string",
"otpauth_uri": "string",
"message": "string"
}

Playground​

Server
Authorization
Body

Samples​


Confirm 2FA setup​

POST
/api/v1/auth/2fa/confirm

Confirm two-factor authentication setup by verifying a code from the chosen method. Returns a set of one-time backup codes on success.

Authorizations​

HTTPBearer
Type
HTTP (bearer)

Request Body​

application/json
JSON
{
"code": "string"
}

Responses​

Successful Response

application/json
JSON
{
"backup_codes": [
"string"
],
"message": "string"
}

Playground​

Server
Authorization
Body

Samples​


Send 2FA disable code​

POST
/api/v1/auth/2fa/send-disable-code

Send an email OTP code to the current user for the purpose of disabling 2FA. Only applicable when the 2FA method is email.

Authorizations​

HTTPBearer
Type
HTTP (bearer)

Responses​

Successful Response

application/json
JSON
[
]

Playground​

Server
Authorization

Samples​


Disable two-factor authentication​

POST
/api/v1/auth/2fa/disable

Disable 2FA for the current user after verifying a valid OTP or backup code. Blocked if the organization enforces 2FA.

Authorizations​

HTTPBearer
Type
HTTP (bearer)

Request Body​

application/json
JSON
{
"code": "string"
}

Responses​

Successful Response

application/json
JSON
[
]

Playground​

Server
Authorization
Body

Samples​


Verify 2FA login code​

POST
/api/v1/auth/verify-2fa

Complete the second step of login by verifying a TOTP, email OTP, or backup code. Returns a full JWT access token on success.

Request Body​

application/json
JSON
{
"temp_token": "string",
"code": "string"
}

Responses​

Successful Response

application/json
JSON
{
"access_token": "string",
"token_type": "bearer",
"two_factor_required": false,
"two_factor_setup_required": false,
"two_factor_method": "string",
"temp_token": "string"
}

Playground​

Server
Body

Samples​


Resend 2FA email code​

POST
/api/v1/auth/resend-2fa

Resend the email OTP code during the login 2FA verification step. Only works for users with the email 2FA method.

Request Body​

application/json
JSON
{
"temp_token": "string"
}

Responses​

Successful Response

application/json
JSON
[
]

Playground​

Server
Body

Samples​


Begin 2FA setup via temp token​

POST
/api/v1/auth/2fa/setup-with-temp

Initiate two-factor authentication setup using a temporary token, intended for organization-enforced 2FA setup during login.

Request Body​

application/json
JSON
{
"temp_token": "string",
"method": "string"
}

Responses​

Successful Response

application/json
JSON
{
"method": "string",
"secret": "string",
"otpauth_uri": "string",
"message": "string"
}

Playground​

Server
Body

Samples​


Confirm 2FA setup via temp token​

POST
/api/v1/auth/2fa/confirm-with-temp

Confirm two-factor authentication setup using a temporary token by verifying a code. Returns backup codes on success.

Request Body​

application/json
JSON
{
"temp_token": "string",
"code": "string"
}

Responses​

Successful Response

application/json
JSON
{
"backup_codes": [
"string"
],
"message": "string"
}

Playground​

Server
Body

Samples​


List organization users​

GET
/api/v1/users

Returns all users belonging to the admin's organization.

Authorizations​

HTTPBearer
Type
HTTP (bearer)

Responses​

Successful Response

application/json
JSON
[
{
"id": "string",
"email": "string",
"first_name": "string",
"last_name": "string",
"phone_number": "string",
"role": "string",
"is_active": true,
"is_super_admin": false,
"two_factor_enabled": false,
"two_factor_method": "string",
"created_at": "string",
"last_login_at": "string",
"organization": {
"id": "string",
"name": "string",
"slug": "string",
"settings": {
},
"address": "string",
"phone_number": "string",
"tax_id": "string",
"billing_email": "string",
"byok_enabled": false,
"has_anthropic_key": false,
"has_deepseek_key": false,
"has_google_key": false,
"enforce_2fa": false,
"created_at": "string"
}
}
]

Playground​

Server
Authorization

Samples​


Create a new user​

POST
/api/v1/users

Creates a new user in the admin's organization and sends a welcome email with credentials.

Authorizations​

HTTPBearer
Type
HTTP (bearer)

Request Body​

application/json
JSON
{
"email": "string",
"password": "string",
"role": "member"
}

Responses​

Successful Response

application/json
JSON
{
"id": "string",
"email": "string",
"first_name": "string",
"last_name": "string",
"phone_number": "string",
"role": "string",
"is_active": true,
"is_super_admin": false,
"two_factor_enabled": false,
"two_factor_method": "string",
"created_at": "string",
"last_login_at": "string",
"organization": {
"id": "string",
"name": "string",
"slug": "string",
"settings": {
},
"address": "string",
"phone_number": "string",
"tax_id": "string",
"billing_email": "string",
"byok_enabled": false,
"has_anthropic_key": false,
"has_deepseek_key": false,
"has_google_key": false,
"enforce_2fa": false,
"created_at": "string"
}
}

Playground​

Server
Authorization
Body

Samples​


Get current user profile​

GET
/api/v1/users/me

Returns the profile of the currently authenticated user.

Authorizations​

HTTPBearer
Type
HTTP (bearer)

Responses​

Successful Response

application/json
JSON
{
"id": "string",
"email": "string",
"first_name": "string",
"last_name": "string",
"phone_number": "string",
"role": "string",
"is_active": true,
"is_super_admin": false,
"two_factor_enabled": false,
"two_factor_method": "string",
"created_at": "string",
"last_login_at": "string",
"organization": {
"id": "string",
"name": "string",
"slug": "string",
"settings": {
},
"address": "string",
"phone_number": "string",
"tax_id": "string",
"billing_email": "string",
"byok_enabled": false,
"has_anthropic_key": false,
"has_deepseek_key": false,
"has_google_key": false,
"enforce_2fa": false,
"created_at": "string"
}
}

Playground​

Server
Authorization

Samples​


Update current user profile​

PATCH
/api/v1/users/me

Updates the authenticated user's own profile fields such as name, phone number, or password.

Authorizations​

HTTPBearer
Type
HTTP (bearer)

Request Body​

application/json
JSON
{
"email": "string",
"first_name": "string",
"last_name": "string",
"phone_number": "string",
"password": "string",
"role": "string",
"is_active": true
}

Responses​

Successful Response

application/json
JSON
{
"id": "string",
"email": "string",
"first_name": "string",
"last_name": "string",
"phone_number": "string",
"role": "string",
"is_active": true,
"is_super_admin": false,
"two_factor_enabled": false,
"two_factor_method": "string",
"created_at": "string",
"last_login_at": "string",
"organization": {
"id": "string",
"name": "string",
"slug": "string",
"settings": {
},
"address": "string",
"phone_number": "string",
"tax_id": "string",
"billing_email": "string",
"byok_enabled": false,
"has_anthropic_key": false,
"has_deepseek_key": false,
"has_google_key": false,
"enforce_2fa": false,
"created_at": "string"
}
}

Playground​

Server
Authorization
Body

Samples​


Deactivate a user​

DELETE
/api/v1/users/{user_id}

Soft-deletes a user by setting their active status to false.

Authorizations​

HTTPBearer
Type
HTTP (bearer)

Parameters​

Path Parameters

user_id*
Type
string
Required
Format
"uuid"

Responses​

Successful Response

Playground​

Server
Authorization
Variables
Key
Value

Samples​


Update a user​

PATCH
/api/v1/users/{user_id}

Allows an admin to update any user's profile within their organization.

Authorizations​

HTTPBearer
Type
HTTP (bearer)

Parameters​

Path Parameters

user_id*
Type
string
Required
Format
"uuid"

Request Body​

application/json
JSON
{
"email": "string",
"first_name": "string",
"last_name": "string",
"phone_number": "string",
"password": "string",
"role": "string",
"is_active": true
}

Responses​

Successful Response

application/json
JSON
{
"id": "string",
"email": "string",
"first_name": "string",
"last_name": "string",
"phone_number": "string",
"role": "string",
"is_active": true,
"is_super_admin": false,
"two_factor_enabled": false,
"two_factor_method": "string",
"created_at": "string",
"last_login_at": "string",
"organization": {
"id": "string",
"name": "string",
"slug": "string",
"settings": {
},
"address": "string",
"phone_number": "string",
"tax_id": "string",
"billing_email": "string",
"byok_enabled": false,
"has_anthropic_key": false,
"has_deepseek_key": false,
"has_google_key": false,
"enforce_2fa": false,
"created_at": "string"
}
}

Playground​

Server
Authorization
Variables
Key
Value
Body

Samples​


Reset user 2FA​

POST
/api/v1/users/{user_id}/2fa/reset

Clears a user's 2FA secret and backup codes, forcing re-setup on next login.

Authorizations​

HTTPBearer
Type
HTTP (bearer)

Parameters​

Path Parameters

user_id*
Type
string
Required
Format
"uuid"

Responses​

Successful Response

application/json
JSON
[
]

Playground​

Server
Authorization
Variables
Key
Value

Samples​


Disable user 2FA​

POST
/api/v1/users/{user_id}/2fa/disable

Temporarily disables a user's 2FA check while preserving their secret for re-enabling later.

Authorizations​

HTTPBearer
Type
HTTP (bearer)

Parameters​

Path Parameters

user_id*
Type
string
Required
Format
"uuid"

Responses​

Successful Response

application/json
JSON
[
]

Playground​

Server
Authorization
Variables
Key
Value

Samples​


Get email notification preferences​

GET
/api/v1/users/me/email-preferences

Returns the current user's email notification preferences.

Authorizations​

HTTPBearer
Type
HTTP (bearer)

Responses​

Successful Response

application/json
JSON
{
"usage_billing": true,
"ai_studio": true,
"system_alerts": true
}

Playground​

Server
Authorization

Samples​


Update email notification preferences​

PATCH
/api/v1/users/me/email-preferences

Updates the current user's email notification preferences.

Authorizations​

HTTPBearer
Type
HTTP (bearer)

Request Body​

application/json
JSON
{
"usage_billing": null,
"ai_studio": null,
"system_alerts": null
}

Responses​

Successful Response

application/json
JSON
{
"usage_billing": true,
"ai_studio": true,
"system_alerts": true
}

Playground​

Server
Authorization
Body

Samples​


Get current organization​

GET
/api/v1/organization

Retrieve the organization details associated with the currently authenticated user.

Authorizations​

HTTPBearer
Type
HTTP (bearer)

Responses​

Successful Response

application/json
JSON
{
"id": "string",
"name": "string",
"slug": "string",
"settings": {
},
"address": "string",
"phone_number": "string",
"tax_id": "string",
"billing_email": "string",
"byok_enabled": false,
"has_anthropic_key": false,
"has_deepseek_key": false,
"has_google_key": false,
"enforce_2fa": false,
"created_at": "string"
}

Playground​

Server
Authorization

Samples​


Update organization details​

PATCH
/api/v1/organization

Update the organization's name, settings, address, phone number, tax ID, billing email, or 2FA enforcement. Requires admin privileges.

Authorizations​

HTTPBearer
Type
HTTP (bearer)

Request Body​

application/json
JSON
{
"name": "string",
"settings": {
},
"address": "string",
"phone_number": "string",
"tax_id": "string",
"billing_email": "string",
"enforce_2fa": true
}

Responses​

Successful Response

application/json
JSON
{
"id": "string",
"name": "string",
"slug": "string",
"settings": {
},
"address": "string",
"phone_number": "string",
"tax_id": "string",
"billing_email": "string",
"byok_enabled": false,
"has_anthropic_key": false,
"has_deepseek_key": false,
"has_google_key": false,
"enforce_2fa": false,
"created_at": "string"
}

Playground​

Server
Authorization
Body

Samples​


Update organization API keys​

PATCH
/api/v1/organization/api-keys

Update the organization's third-party API keys for Anthropic, DeepSeek, or Google. Requires admin privileges and BYOK to be enabled.

Authorizations​

HTTPBearer
Type
HTTP (bearer)

Request Body​

application/json
JSON
{
"anthropic_api_key": "string",
"deepseek_api_key": "string",
"google_api_key": "string"
}

Responses​

Successful Response

application/json
JSON
{
"id": "string",
"name": "string",
"slug": "string",
"settings": {
},
"address": "string",
"phone_number": "string",
"tax_id": "string",
"billing_email": "string",
"byok_enabled": false,
"has_anthropic_key": false,
"has_deepseek_key": false,
"has_google_key": false,
"enforce_2fa": false,
"created_at": "string"
}

Playground​

Server
Authorization
Body

Samples​


List custom tones​

GET
/api/v1/organization/tones

Retrieve all custom tones configured for the current user's organization.

Authorizations​

HTTPBearer
Type
HTTP (bearer)

Responses​

Successful Response

application/json
JSON
[
{
"id": "string",
"name": "string",
"description": "string",
"system_prompt": "string"
}
]

Playground​

Server
Authorization

Samples​


Create custom tone​

POST
/api/v1/organization/tones

Create a new custom tone for the organization. Requires admin privileges. Fails if a tone with the same ID already exists.

Authorizations​

HTTPBearer
Type
HTTP (bearer)

Request Body​

application/json
JSON
{
"id": "string",
"name": "string",
"description": "string",
"system_prompt": "string"
}

Responses​

Successful Response

application/json
JSON
{
"id": "string",
"name": "string",
"description": "string",
"system_prompt": "string"
}

Playground​

Server
Authorization
Body

Samples​


Delete custom tone​

DELETE
/api/v1/organization/tones/{tone_id}

Delete a custom tone by its ID from the organization. Requires admin privileges. Returns 404 if the tone is not found.

Authorizations​

HTTPBearer
Type
HTTP (bearer)

Parameters​

Path Parameters

tone_id*
Type
string
Required

Responses​

Successful Response

application/json
JSON
[
]

Playground​

Server
Authorization
Variables
Key
Value

Samples​


system​


List AI providers​

GET
/api/v1/system/providers

Returns all registered AI providers and their available models.

Responses​

Successful Response

application/json
JSON
[
]

Playground​

Samples​


List e-commerce platforms​

GET
/api/v1/system/platforms

Returns the supported e-commerce platforms (e.g., Magento, WooCommerce, Shopify).

Responses​

Successful Response

application/json
JSON
[
]

Playground​

Samples​


List content types​

GET
/api/v1/system/content-types

Returns the available content item types (e.g., product, category).

Responses​

Successful Response

application/json
JSON
[
]

Playground​

Samples​


List supported languages​

GET
/api/v1/system/languages

Returns the available output languages for content generation.

Responses​

Successful Response

application/json
JSON
[
]

Playground​

Samples​


List writing tones​

GET
/api/v1/system/tones

Returns built-in writing tones plus any custom tones defined in the authenticated user's organization settings.

Authorizations​

HTTPBearer
Type
HTTP (bearer)

Responses​

Successful Response

application/json
JSON
[
]

Playground​

Server
Authorization

Samples​


List all projects​

GET
/api/v1/projects

Retrieve all projects for the current user's organization. Supports filtering to show only active or only deleted (trashed) projects.

Authorizations​

HTTPBearer
Type
HTTP (bearer)

Parameters​

Query Parameters

include_deleted
Type
boolean
Default
false

Responses​

Successful Response

application/json
JSON
[
{
"id": "string",
"name": "string",
"platform": "string",
"status": "string",
"settings": {
},
"created_at": "string",
"completed_at": "string",
"item_count": 0,
"flagged_count": 0,
"source_count": 0,
"deleted_at": "string",
"status_counts": {
"pending": 0,
"generated": 0,
"flagged": 0,
"approved": 0,
"rejected": 0,
"synced": 0
},
"store_connection_id": "string",
"store_connection_name": "string"
}
]

Playground​

Server
Authorization
Variables
Key
Value

Samples​


Create a new project​

POST
/api/v1/projects

Create a new content project by providing a name and selecting a target platform. The project is initialized in draft status.

Authorizations​

HTTPBearer
Type
HTTP (bearer)

Request Body​

application/x-www-form-urlencoded
object
Valid values"woocommerce""shopify""magento2"

Responses​

Successful Response

application/json
JSON
{
"id": "string",
"name": "string",
"platform": "string",
"status": "string",
"settings": {
},
"created_at": "string",
"completed_at": "string",
"item_count": 0,
"flagged_count": 0,
"source_count": 0,
"deleted_at": "string",
"status_counts": {
"pending": 0,
"generated": 0,
"flagged": 0,
"approved": 0,
"rejected": 0,
"synced": 0
},
"store_connection_id": "string",
"store_connection_name": "string"
}

Playground​

Server
Authorization
Body

Samples​


Get project details​

GET
/api/v1/projects/{project_id}

Retrieve a single project by ID, including computed item counts and status breakdowns.

Authorizations​

HTTPBearer
Type
HTTP (bearer)

Parameters​

Path Parameters

project_id*
Type
string
Required
Format
"uuid"

Responses​

Successful Response

application/json
JSON
{
"id": "string",
"name": "string",
"platform": "string",
"status": "string",
"settings": {
},
"created_at": "string",
"completed_at": "string",
"item_count": 0,
"flagged_count": 0,
"source_count": 0,
"deleted_at": "string",
"status_counts": {
"pending": 0,
"generated": 0,
"flagged": 0,
"approved": 0,
"rejected": 0,
"synced": 0
},
"store_connection_id": "string",
"store_connection_name": "string"
}

Playground​

Server
Authorization
Variables
Key
Value

Samples​


Soft-delete a project​

DELETE
/api/v1/projects/{project_id}

Move a project to the trash by setting its deleted timestamp. The project can be restored later.

Authorizations​

HTTPBearer
Type
HTTP (bearer)

Parameters​

Path Parameters

project_id*
Type
string
Required
Format
"uuid"

Responses​

Successful Response

Playground​

Server
Authorization
Variables
Key
Value

Samples​


Update a project​

PATCH
/api/v1/projects/{project_id}

Partially update a project's name, settings, or store connection. Only provided fields are modified.

Authorizations​

HTTPBearer
Type
HTTP (bearer)

Parameters​

Path Parameters

project_id*
Type
string
Required
Format
"uuid"

Request Body​

application/json
JSON
{
"name": "string",
"settings": {
},
"store_connection_id": "string"
}

Responses​

Successful Response

application/json
JSON
{
"id": "string",
"name": "string",
"platform": "string",
"status": "string",
"settings": {
},
"created_at": "string",
"completed_at": "string",
"item_count": 0,
"flagged_count": 0,
"source_count": 0,
"deleted_at": "string",
"status_counts": {
"pending": 0,
"generated": 0,
"flagged": 0,
"approved": 0,
"rejected": 0,
"synced": 0
},
"store_connection_id": "string",
"store_connection_name": "string"
}

Playground​

Server
Authorization
Variables
Key
Value
Body

Samples​


Restore a deleted project​

POST
/api/v1/projects/{project_id}/restore

Restore a previously soft-deleted project from the trash, clearing its deleted timestamp.

Authorizations​

HTTPBearer
Type
HTTP (bearer)

Parameters​

Path Parameters

project_id*
Type
string
Required
Format
"uuid"

Responses​

Successful Response

application/json
JSON
{
"id": "string",
"name": "string",
"platform": "string",
"status": "string",
"settings": {
},
"created_at": "string",
"completed_at": "string",
"item_count": 0,
"flagged_count": 0,
"source_count": 0,
"deleted_at": "string",
"status_counts": {
"pending": 0,
"generated": 0,
"flagged": 0,
"approved": 0,
"rejected": 0,
"synced": 0
},
"store_connection_id": "string",
"store_connection_name": "string"
}

Playground​

Server
Authorization
Variables
Key
Value

Samples​


Permanently delete a project​

DELETE
/api/v1/projects/{project_id}/permanent

Permanently remove a soft-deleted project and all its associated data. This action cannot be undone.

Authorizations​

HTTPBearer
Type
HTTP (bearer)

Parameters​

Path Parameters

project_id*
Type
string
Required
Format
"uuid"

Responses​

Successful Response

Playground​

Server
Authorization
Variables
Key
Value

Samples​


Generate content for items​

POST
/api/v1/projects/{project_id}/generate

Generates AI content for all pending non-variant items in the project using the specified provider, model, and AI settings. Records token usage and deducts XCT balance.

Authorizations​

HTTPBearer
Type
HTTP (bearer)

Parameters​

Path Parameters

project_id*
Type
string
Required
Format
"uuid"

Request Body​

application/json
JSON
{
"content_type": "string",
"content_variant": "short",
"language": "en",
"tone": "professional",
"ai_provider": "anthropic",
"ai_model": "string",
"custom_instructions": "string",
"max_short_chars": 200,
"max_long_chars": 1000,
"translate_name": true,
"use_html": true,
"generate_short": true,
"generate_long": true,
"item_ids": [
"string"
]
}

Responses​

Successful Response

application/json
JSON
[
]

Playground​

Server
Authorization
Variables
Key
Value
Body

Samples​


Stream content generation progress​

POST
/api/v1/projects/{project_id}/generate/stream

Generates AI content for pending or selected items via SSE streaming, sending real-time progress events. Uses the specified provider, model, and AI settings.

Authorizations​

HTTPBearer
Type
HTTP (bearer)

Parameters​

Path Parameters

project_id*
Type
string
Required
Format
"uuid"

Request Body​

application/json
JSON
{
"content_type": "string",
"content_variant": "short",
"language": "en",
"tone": "professional",
"ai_provider": "anthropic",
"ai_model": "string",
"custom_instructions": "string",
"max_short_chars": 200,
"max_long_chars": 1000,
"translate_name": true,
"use_html": true,
"generate_short": true,
"generate_long": true,
"item_ids": [
"string"
]
}

Responses​

Successful Response

application/json
JSON
[
]

Playground​

Server
Authorization
Variables
Key
Value
Body

Samples​


Stream full regeneration progress​

POST
/api/v1/projects/{project_id}/regenerate/stream

Resets all items to pending and streams AI content regeneration progress via SSE using the specified provider, model, and AI settings.

Authorizations​

HTTPBearer
Type
HTTP (bearer)

Parameters​

Path Parameters

project_id*
Type
string
Required
Format
"uuid"

Request Body​

application/json
JSON
{
"content_type": "string",
"content_variant": "short",
"language": "en",
"tone": "professional",
"ai_provider": "anthropic",
"ai_model": "string",
"custom_instructions": "string",
"max_short_chars": 200,
"max_long_chars": 1000,
"translate_name": true,
"use_html": true,
"generate_short": true,
"generate_long": true,
"item_ids": [
"string"
]
}

Responses​

Successful Response

application/json
JSON
[
]

Playground​

Server
Authorization
Variables
Key
Value
Body

Samples​


Stream rejected items regeneration​

POST
/api/v1/projects/{project_id}/regenerate-rejected/stream

Resets only rejected items to pending and streams AI content regeneration progress via SSE using the specified provider, model, and AI settings.

Authorizations​

HTTPBearer
Type
HTTP (bearer)

Parameters​

Path Parameters

project_id*
Type
string
Required
Format
"uuid"

Request Body​

application/json
JSON
{
"content_type": "string",
"content_variant": "short",
"language": "en",
"tone": "professional",
"ai_provider": "anthropic",
"ai_model": "string",
"custom_instructions": "string",
"max_short_chars": 200,
"max_long_chars": 1000,
"translate_name": true,
"use_html": true,
"generate_short": true,
"generate_long": true,
"item_ids": [
"string"
]
}

Responses​

Successful Response

application/json
JSON
[
]

Playground​

Server
Authorization
Variables
Key
Value
Body

Samples​


Regenerate all project content​

POST
/api/v1/projects/{project_id}/regenerate

Resets all items to pending and regenerates AI content using the specified provider, model, and AI settings. Records token usage and deducts XCT balance.

Authorizations​

HTTPBearer
Type
HTTP (bearer)

Parameters​

Path Parameters

project_id*
Type
string
Required
Format
"uuid"

Request Body​

application/json
JSON
{
"content_type": "string",
"content_variant": "short",
"language": "en",
"tone": "professional",
"ai_provider": "anthropic",
"ai_model": "string",
"custom_instructions": "string",
"max_short_chars": 200,
"max_long_chars": 1000,
"translate_name": true,
"use_html": true,
"generate_short": true,
"generate_long": true,
"item_ids": [
"string"
]
}

Responses​

Successful Response

application/json
JSON
[
]

Playground​

Server
Authorization
Variables
Key
Value
Body

Samples​


Regenerate rejected items only​

POST
/api/v1/projects/{project_id}/regenerate-rejected

Resets only rejected items to pending and regenerates AI content using the specified provider, model, and AI settings. Records token usage and deducts XCT balance.

Authorizations​

HTTPBearer
Type
HTTP (bearer)

Parameters​

Path Parameters

project_id*
Type
string
Required
Format
"uuid"

Request Body​

application/json
JSON
{
"content_type": "string",
"content_variant": "short",
"language": "en",
"tone": "professional",
"ai_provider": "anthropic",
"ai_model": "string",
"custom_instructions": "string",
"max_short_chars": 200,
"max_long_chars": 1000,
"translate_name": true,
"use_html": true,
"generate_short": true,
"generate_long": true,
"item_ids": [
"string"
]
}

Responses​

Successful Response

application/json
JSON
[
]

Playground​

Server
Authorization
Variables
Key
Value
Body

Samples​


List project content items​

GET
/api/v1/projects/{project_id}/items

Returns all content items for the project, optionally filtered by status or data source.

Authorizations​

HTTPBearer
Type
HTTP (bearer)

Parameters​

Path Parameters

project_id*
Type
string
Required
Format
"uuid"

Query Parameters

status
Type
string
source_id
Type
string
Format
"uuid"

Responses​

Successful Response

application/json
JSON
[
{
"id": "string",
"external_id": "string",
"item_type": "string",
"source_data": {
},
"generated_content": {
},
"confidence_score": 0,
"status": "string",
"ai_model_used": "string",
"created_at": "string",
"data_source_id": "string",
"data_source_name": "string"
}
]

Playground​

Server
Authorization
Variables
Key
Value

Samples​


Batch update item statuses​

PATCH
/api/v1/projects/{project_id}/items/batch

Updates the status of multiple content items at once within the project.

Authorizations​

HTTPBearer
Type
HTTP (bearer)

Parameters​

Path Parameters

project_id*
Type
string
Required
Format
"uuid"

Request Body​

application/json
JSON
{
"item_ids": [
"string"
],
"status": "string"
}

Responses​

Successful Response

application/json
JSON
[
{
"id": "string",
"external_id": "string",
"item_type": "string",
"source_data": {
},
"generated_content": {
},
"confidence_score": 0,
"status": "string",
"ai_model_used": "string",
"created_at": "string",
"data_source_id": "string",
"data_source_name": "string"
}
]

Playground​

Server
Authorization
Variables
Key
Value
Body

Samples​


Update a content item​

PATCH
/api/v1/projects/{project_id}/items/{item_id}

Updates the generated content or status of a single content item.

Authorizations​

HTTPBearer
Type
HTTP (bearer)

Parameters​

Path Parameters

project_id*
Type
string
Required
Format
"uuid"
item_id*
Type
string
Required
Format
"uuid"

Request Body​

application/json
JSON
{
"generated_content": {
},
"status": "string"
}

Responses​

Successful Response

application/json
JSON
{
"id": "string",
"external_id": "string",
"item_type": "string",
"source_data": {
},
"generated_content": {
},
"confidence_score": 0,
"status": "string",
"ai_model_used": "string",
"created_at": "string",
"data_source_id": "string",
"data_source_name": "string"
}

Playground​

Server
Authorization
Variables
Key
Value
Body

Samples​


Regenerate a single item​

POST
/api/v1/projects/{project_id}/items/{item_id}/regenerate

Regenerates AI content for a single content item using the specified provider, model, and AI settings.

Authorizations​

HTTPBearer
Type
HTTP (bearer)

Parameters​

Path Parameters

project_id*
Type
string
Required
Format
"uuid"
item_id*
Type
string
Required
Format
"uuid"

Request Body​

application/json
JSON
{
"content_type": "string",
"content_variant": "short",
"language": "en",
"tone": "professional",
"ai_provider": "anthropic",
"ai_model": "string",
"custom_instructions": "string",
"max_short_chars": 200,
"max_long_chars": 1000,
"translate_name": true,
"use_html": true,
"generate_short": true,
"generate_long": true,
"item_ids": [
"string"
]
}

Responses​

Successful Response

application/json
JSON
{
"id": "string",
"external_id": "string",
"item_type": "string",
"source_data": {
},
"generated_content": {
},
"confidence_score": 0,
"status": "string",
"ai_model_used": "string",
"created_at": "string",
"data_source_id": "string",
"data_source_name": "string"
}

Playground​

Server
Authorization
Variables
Key
Value
Body

Samples​


Export project content CSV​

GET
/api/v1/projects/{project_id}/export

Exports generated content as a CSV file, with platform-specific formatting for Magento. Supports filtering by status, data source, and search query.

Authorizations​

HTTPBearer
Type
HTTP (bearer)

Parameters​

Path Parameters

project_id*
Type
string
Required
Format
"uuid"

Query Parameters

status_filter
Type
string
Default
"approved"
source_id
Type
string
Format
"uuid"
search
Type
string

Responses​

Successful Response

application/json
JSON
[
]

Playground​

Server
Authorization
Variables
Key
Value

Samples​


usage​

Usage records and consumption analytics


List usage records​

GET
/api/v1/usage

Returns AI usage records for the organization, optionally filtered by start and end date.

Authorizations​

HTTPBearer
Type
HTTP (bearer)

Parameters​

Query Parameters

start_date
Type
string
Format
"date-time"
end_date
Type
string
Format
"date-time"

Responses​

Successful Response

application/json
JSON
[
{
"id": "string",
"ai_provider": "string",
"ai_model": "string",
"content_type": "string",
"input_tokens": 0,
"output_tokens": 0,
"credits_used": 0,
"cost_estimate": 0,
"created_at": "string"
}
]

Playground​

Server
Authorization
Variables
Key
Value

Samples​


Get usage summary​

GET
/api/v1/usage/summary

Aggregates token usage and estimated cost over the specified number of days, broken down by AI provider and content type.

Authorizations​

HTTPBearer
Type
HTTP (bearer)

Parameters​

Query Parameters

days
Type
integer
Default
30

Responses​

Successful Response

application/json
JSON
{
"total_input_tokens": 0,
"total_output_tokens": 0,
"total_cost": 0,
"by_provider": {
},
"by_content_type": {
}
}

Playground​

Server
Authorization
Variables
Key
Value

Samples​


List API keys​

GET
/api/v1/api-keys

Returns all API keys for the organization, ordered by most recent first. Admin only.

Authorizations​

HTTPBearer
Type
HTTP (bearer)

Responses​

Successful Response

application/json
JSON
[
{
"id": "string",
"name": "string",
"is_active": true,
"last_used_at": "string",
"created_at": "string"
}
]

Playground​

Server
Authorization

Samples​


Create API key​

POST
/api/v1/api-keys

Generates a new API key for the organization. The raw key is returned only once in the response and cannot be retrieved again. Admin only.

Authorizations​

HTTPBearer
Type
HTTP (bearer)

Request Body​

application/json
JSON
{
"name": "string"
}

Responses​

Successful Response

application/json
JSON
{
"id": "string",
"name": "string",
"key": "string",
"created_at": "string"
}

Playground​

Server
Authorization
Body

Samples​


Delete API key​

DELETE
/api/v1/api-keys/{key_id}

Permanently deletes an API key, immediately revoking access for any client using it. Admin only.

Authorizations​

HTTPBearer
Type
HTTP (bearer)

Parameters​

Path Parameters

key_id*
Type
string
Required
Format
"uuid"

Responses​

Successful Response

Playground​

Server
Authorization
Variables
Key
Value

Samples​


Deactivate API key​

PATCH
/api/v1/api-keys/{key_id}/deactivate

Deactivates an API key without deleting it, disabling authentication for any client using it. Admin only.

Authorizations​

HTTPBearer
Type
HTTP (bearer)

Parameters​

Path Parameters

key_id*
Type
string
Required
Format
"uuid"

Responses​

Successful Response

application/json
JSON
{
"id": "string",
"name": "string",
"is_active": true,
"last_used_at": "string",
"created_at": "string"
}

Playground​

Server
Authorization
Variables
Key
Value

Samples​


List project data sources​

GET
/api/v1/projects/{project_id}/sources

Retrieves all data sources for the specified project, ordered by creation date descending, along with a total item count across all sources.

Authorizations​

HTTPBearer
Type
HTTP (bearer)

Parameters​

Path Parameters

project_id*
Type
string
Required
Format
"uuid"

Responses​

Successful Response

application/json
JSON
{
"sources": [
{
"id": "string",
"project_id": "string",
"type": "string",
"name": "string",
"config": {
},
"status": "string",
"item_count": 0,
"last_synced_at": "string",
"error_message": "string",
"created_at": "string"
}
],
"total_items": 0
}

Playground​

Server
Authorization
Variables
Key
Value

Samples​


Detect CSV column mappings​

POST
/api/v1/projects/{project_id}/sources/detect-columns

Analyzes CSV headers and sample data to auto-detect column mappings for the project's platform.

Authorizations​

HTTPBearer
Type
HTTP (bearer)

Parameters​

Path Parameters

project_id*
Type
string
Required
Format
"uuid"

Request Body​

multipart/form-data
object
Format"binary"

Responses​

Successful Response

application/json
JSON
[
]

Playground​

Server
Authorization
Variables
Key
Value
Body

Samples​


Upload file data source​

POST
/api/v1/projects/{project_id}/sources/file

Parses an uploaded file using the project's platform adapter, stores the original file and a snapshot in S3, and creates content items for each parsed product.

Authorizations​

HTTPBearer
Type
HTTP (bearer)

Parameters​

Path Parameters

project_id*
Type
string
Required
Format
"uuid"

Request Body​

multipart/form-data
object
Format"binary"
string |null

Responses​

Successful Response

application/json
JSON
{
"id": "string",
"project_id": "string",
"type": "string",
"name": "string",
"config": {
},
"status": "string",
"item_count": 0,
"last_synced_at": "string",
"error_message": "string",
"created_at": "string"
}

Playground​

Server
Authorization
Variables
Key
Value
Body

Samples​


Create manual data source​

POST
/api/v1/projects/{project_id}/sources/manual

Creates an empty manual-entry data source for the specified project, ready to have content items added to it individually.

Authorizations​

HTTPBearer
Type
HTTP (bearer)

Parameters​

Path Parameters

project_id*
Type
string
Required
Format
"uuid"

Request Body​

application/x-www-form-urlencoded
object
Default"Manual Entry"

Responses​

Successful Response

application/json
JSON
{
"id": "string",
"project_id": "string",
"type": "string",
"name": "string",
"config": {
},
"status": "string",
"item_count": 0,
"last_synced_at": "string",
"error_message": "string",
"created_at": "string"
}

Playground​

Server
Authorization
Variables
Key
Value
Body

Samples​


Delete a data source​

DELETE
/api/v1/projects/{project_id}/sources/{source_id}

Deletes the specified data source and all of its associated content items via cascade.

Authorizations​

HTTPBearer
Type
HTTP (bearer)

Parameters​

Path Parameters

project_id*
Type
string
Required
Format
"uuid"
source_id*
Type
string
Required
Format
"uuid"

Responses​

Successful Response

Playground​

Server
Authorization
Variables
Key
Value

Samples​


Export source as CSV​

GET
/api/v1/projects/{project_id}/sources/{source_id}/export

Generates a CSV export for a file-based data source by merging generated content back into the original file format using the project's platform adapter.

Authorizations​

HTTPBearer
Type
HTTP (bearer)

Parameters​

Path Parameters

project_id*
Type
string
Required
Format
"uuid"
source_id*
Type
string
Required
Format
"uuid"

Responses​

Successful Response

application/json
JSON
[
]

Playground​

Server
Authorization
Variables
Key
Value

Samples​


store-connections​


List store connections​

GET
/api/v1/store-connections

Returns all store connections belonging to the current user's organization, including the number of projects linked to each connection.

Authorizations​

HTTPBearer
Type
HTTP (bearer)

Responses​

Successful Response

application/json
JSON
[
{
"id": "string",
"name": "string",
"platform": "string",
"base_url": "string",
"status": "string",
"has_credentials": true,
"last_connected_at": "string",
"created_at": "string",
"updated_at": "string",
"project_count": 0
}
]

Playground​

Server
Authorization

Samples​


Create store connection​

POST
/api/v1/store-connections

Creates a new store connection for the organization. Accepts platform-specific credentials (e.g., access token for Magento/Shopify, consumer key/secret for WooCommerce).

Authorizations​

HTTPBearer
Type
HTTP (bearer)

Request Body​

application/json
JSON
{
"name": "string",
"platform": "string",
"base_url": "string",
"access_token": "string",
"consumer_key": "string",
"consumer_secret": "string"
}

Responses​

Successful Response

application/json
JSON
{
"id": "string",
"name": "string",
"platform": "string",
"base_url": "string",
"status": "string",
"has_credentials": true,
"last_connected_at": "string",
"created_at": "string",
"updated_at": "string",
"project_count": 0
}

Playground​

Server
Authorization
Body

Samples​


Get store connection​

GET
/api/v1/store-connections/{connection_id}

Retrieves a single store connection by ID, including the count of projects currently linked to it.

Authorizations​

HTTPBearer
Type
HTTP (bearer)

Parameters​

Path Parameters

connection_id*
Type
string
Required
Format
"uuid"

Responses​

Successful Response

application/json
JSON
{
"id": "string",
"name": "string",
"platform": "string",
"base_url": "string",
"status": "string",
"has_credentials": true,
"last_connected_at": "string",
"created_at": "string",
"updated_at": "string",
"project_count": 0
}

Playground​

Server
Authorization
Variables
Key
Value

Samples​


Delete store connection​

DELETE
/api/v1/store-connections/{connection_id}

Permanently deletes a store connection. Fails if any projects are still linked to it.

Authorizations​

HTTPBearer
Type
HTTP (bearer)

Parameters​

Path Parameters

connection_id*
Type
string
Required
Format
"uuid"

Responses​

Successful Response

Playground​

Server
Authorization
Variables
Key
Value

Samples​


Update store connection​

PATCH
/api/v1/store-connections/{connection_id}

Partially updates a store connection's name, URL, credentials, or status. Only provided fields are changed.

Authorizations​

HTTPBearer
Type
HTTP (bearer)

Parameters​

Path Parameters

connection_id*
Type
string
Required
Format
"uuid"

Request Body​

application/json
JSON
{
"name": "string",
"base_url": "string",
"access_token": "string",
"consumer_key": "string",
"consumer_secret": "string",
"status": "string"
}

Responses​

Successful Response

application/json
JSON
{
"id": "string",
"name": "string",
"platform": "string",
"base_url": "string",
"status": "string",
"has_credentials": true,
"last_connected_at": "string",
"created_at": "string",
"updated_at": "string",
"project_count": 0
}

Playground​

Server
Authorization
Variables
Key
Value
Body

Samples​


Test store connection​

POST
/api/v1/store-connections/{connection_id}/test

Tests connectivity to the external store by making a live API call. Updates the connection status to active on success or error on failure.

Authorizations​

HTTPBearer
Type
HTTP (bearer)

Parameters​

Path Parameters

connection_id*
Type
string
Required
Format
"uuid"

Responses​

Successful Response

application/json
JSON
{
"success": true,
"message": "string",
"store_name": "string"
}

Playground​

Server
Authorization
Variables
Key
Value

Samples​


sync​


Stream sync to store​

POST
/api/v1/projects/{project_id}/sync/stream

Pushes generated content to the external store via Server-Sent Events. The sync flow selects items by mode (pending, all, or selected), sends each update to the store API, records success/failure in sync history, and streams per-item progress events back to the client.

Authorizations​

HTTPBearer
Type
HTTP (bearer)

Parameters​

Path Parameters

project_id*
Type
string
Required
Format
"uuid"

Request Body​

application/json
JSON
{
"mode": "pending",
"item_ids": [
"string"
]
}

Responses​

Successful Response

application/json
JSON
[
]

Playground​

Server
Authorization
Variables
Key
Value
Body

Samples​


Sync single item​

POST
/api/v1/projects/{project_id}/sync/{item_id}

Pushes a single approved item's generated content to the external store. The sync flow updates the product via the store API, marks the item as synced, and records the result in sync history.

Authorizations​

HTTPBearer
Type
HTTP (bearer)

Parameters​

Path Parameters

project_id*
Type
string
Required
Format
"uuid"
item_id*
Type
string
Required
Format
"uuid"

Responses​

Successful Response

application/json
JSON
{
"success": true,
"message": "string",
"synced_at": "string"
}

Playground​

Server
Authorization
Variables
Key
Value

Samples​


Sync all approved items​

POST
/api/v1/projects/{project_id}/sync

Pushes all approved items' generated content to the external store in a single batch. The sync flow iterates over every approved item, updates each product via the store API, and returns a summary of successes and failures.

Authorizations​

HTTPBearer
Type
HTTP (bearer)

Parameters​

Path Parameters

project_id*
Type
string
Required
Format
"uuid"

Responses​

Successful Response

application/json
JSON
{
"synced_count": 0,
"failed_count": 0,
"failed_items": [
{
}
]
}

Playground​

Server
Authorization
Variables
Key
Value

Samples​


Get item sync history​

GET
/api/v1/projects/{project_id}/sync/{item_id}/history

Returns the chronological sync history for a specific content item, including timestamps, success/failure status, and error messages for each sync attempt.

Authorizations​

HTTPBearer
Type
HTTP (bearer)

Parameters​

Path Parameters

project_id*
Type
string
Required
Format
"uuid"
item_id*
Type
string
Required
Format
"uuid"

Responses​

Successful Response

application/json
JSON
{
"item_id": "string",
"item_external_id": "string",
"history": [
{
"id": "string",
"content_item_id": "string",
"store_connection_id": "string",
"store_connection_name": "string",
"synced_at": "string",
"success": true,
"error_message": "string"
}
]
}

Playground​

Server
Authorization
Variables
Key
Value

Samples​


jobs​


List project jobs​

GET
/api/v1/projects/{project_id}/jobs

Returns up to 50 most recent jobs for a project, optionally filtered by status.

Authorizations​

HTTPBearer
Type
HTTP (bearer)

Parameters​

Path Parameters

project_id*
Type
string
Required
Format
"uuid"

Query Parameters

status

Responses​

Successful Response

application/json
JSON
[
{
"id": "string",
"job_type": "string",
"status": "string",
"progress_current": 0,
"progress_total": 0,
"created_at": "string",
"started_at": "string",
"completed_at": "string",
"error": "string"
}
]

Playground​

Server
Authorization
Variables
Key
Value

Samples​


Create background job​

POST
/api/v1/projects/{project_id}/jobs

Queues a new background job (generation or sync) for a project. Validates XCT balance for generation jobs and store connection for sync jobs, and rejects the request if a conflicting job is already active.

Authorizations​

HTTPBearer
Type
HTTP (bearer)

Parameters​

Path Parameters

project_id*
Type
string
Required
Format
"uuid"

Request Body​

application/json
JSON
{
"job_type": "string",
"payload": {
}
}

Responses​

Successful Response

application/json
JSON
{
"job_id": "string",
"status": "string"
}

Playground​

Server
Authorization
Variables
Key
Value
Body

Samples​


Get job status​

GET
/api/v1/jobs/{job_id}

Returns the current status and progress of a background job. Used for polling job completion.

Authorizations​

HTTPBearer
Type
HTTP (bearer)

Parameters​

Path Parameters

job_id*
Type
string
Required
Format
"uuid"

Responses​

Successful Response

application/json
JSON
{
"id": "string",
"job_type": "string",
"status": "string",
"progress_current": 0,
"progress_total": 0,
"progress_detail": [
],
"result": {
},
"error": "string",
"created_at": "string",
"started_at": "string",
"completed_at": "string"
}

Playground​

Server
Authorization
Variables
Key
Value

Samples​


Cancel a job​

POST
/api/v1/jobs/{job_id}/cancel

Cancels a queued or running job. Jobs that have already completed or failed cannot be cancelled.

Authorizations​

HTTPBearer
Type
HTTP (bearer)

Parameters​

Path Parameters

job_id*
Type
string
Required
Format
"uuid"

Responses​

Successful Response

application/json
JSON
{
"id": "string",
"job_type": "string",
"status": "string",
"progress_current": 0,
"progress_total": 0,
"progress_detail": [
],
"result": {
},
"error": "string",
"created_at": "string",
"started_at": "string",
"completed_at": "string"
}

Playground​

Server
Authorization
Variables
Key
Value

Samples​


billing​


Get XCT balance​

GET
/api/v1/billing/balance

Returns the organization's current XCT balance broken down by subscription and top-up balances, along with the active subscription tier and overage settings.

Authorizations​

HTTPBearer
Type
HTTP (bearer)

Responses​

Successful Response

application/json
JSON
{
"subscription_balance": "string",
"topup_balance": "string",
"total_balance": "string",
"subscription_tier": "string",
"overage_enabled": true,
"token_rate_multiplier": "string"
}

Playground​

Server
Authorization

Samples​


List XCT transactions​

GET
/api/v1/billing/transactions

Returns a paginated list of all XCT token transactions for the organization, ordered by most recent first.

Authorizations​

HTTPBearer
Type
HTTP (bearer)

Parameters​

Query Parameters

page
Type
integer
Minimum
1
Default
1
page_size
Type
integer
Maximum
100
Minimum
1
Default
20

Responses​

Successful Response

application/json
JSON
{
"transactions": [
{
"id": "string",
"transaction_type": "string",
"amount": "string",
"balance_type": "string",
"description": "string",
"created_at": "string",
"created_by": "string"
}
],
"total": 0,
"page": 0,
"page_size": 0
}

Playground​

Server
Authorization
Variables
Key
Value

Samples​


Get billing usage summary​

GET
/api/v1/billing/usage-summary

Aggregates XCT token consumption for the specified period, grouped by model tier and AI provider.

Authorizations​

HTTPBearer
Type
HTTP (bearer)

Parameters​

Query Parameters

days
Type
integer
Maximum
365
Minimum
1
Default
30

Responses​

Successful Response

application/json
JSON
{
"period_start": "string",
"period_end": "string",
"total_xct_used": "string",
"by_tier": [
{
"tier": "string",
"request_count": 0,
"total_tokens": 0,
"xct_used": "string"
}
],
"by_provider": {
"additionalProperties": "string"
}
}

Playground​

Server
Authorization
Variables
Key
Value

Samples​


List model tier pricing​

GET
/api/v1/billing/model-tiers

Returns all available model tiers with their XCT pricing multipliers and the AI models assigned to each tier.

Authorizations​

HTTPBearer
Type
HTTP (bearer)

Responses​

Successful Response

application/json
JSON
{
"tiers": [
{
"tier": "string",
"multiplier": 0,
"models": {
"additionalProperties": [
]
}
}
]
}

Playground​

Server
Authorization

Samples​


Add XCT top-up​

POST
/api/v1/billing/topup

Adds a one-time XCT top-up to the organization's top-up balance. Top-up tokens do not expire on billing cycle reset. Admin only.

Authorizations​

HTTPBearer
Type
HTTP (bearer)

Request Body​

application/json
JSON
{
"amount": 0,
"description": "string"
}

Responses​

Successful Response

application/json
JSON
{
"id": "string",
"transaction_type": "string",
"amount": "string",
"balance_type": "string",
"description": "string",
"created_at": "string",
"created_by": "string"
}

Playground​

Server
Authorization
Body

Samples​


Change subscription tier​

PATCH
/api/v1/billing/subscription

Updates the organization's subscription tier and optionally allocates the new tier's monthly XCT tokens immediately. Admin only.

Authorizations​

HTTPBearer
Type
HTTP (bearer)

Request Body​

application/json
JSON
{
"tier": "string",
"allocate_immediately": false
}

Responses​

Successful Response

application/json
JSON
{
"subscription_balance": "string",
"topup_balance": "string",
"total_balance": "string",
"subscription_tier": "string",
"overage_enabled": true,
"token_rate_multiplier": "string"
}

Playground​

Server
Authorization
Body

Samples​


Reset billing cycle​

POST
/api/v1/billing/reset-cycle

Manually triggers a subscription billing cycle reset. Expires remaining subscription balance and allocates a fresh monthly XCT allotment. Admin only.

Authorizations​

HTTPBearer
Type
HTTP (bearer)

Responses​

Successful Response

application/json
JSON
{
"subscription_balance": "string",
"topup_balance": "string",
"total_balance": "string",
"subscription_tier": "string",
"overage_enabled": true,
"token_rate_multiplier": "string"
}

Playground​

Server
Authorization

Samples​


Update billing settings​

PATCH
/api/v1/billing/settings

Updates billing configuration such as overage enablement and the token rate multiplier for the organization. Admin only.

Authorizations​

HTTPBearer
Type
HTTP (bearer)

Request Body​

application/json
JSON
{
"overage_enabled": true,
"token_rate_multiplier": null
}

Responses​

Successful Response

application/json
JSON
{
"subscription_balance": "string",
"topup_balance": "string",
"total_balance": "string",
"subscription_tier": "string",
"overage_enabled": true,
"token_rate_multiplier": "string"
}

Playground​

Server
Authorization
Body

Samples​


Adjust XCT balance​

POST
/api/v1/billing/adjustment

Creates a manual credit or debit adjustment on the organization's subscription or top-up balance. Cannot adjust overage balance directly. Admin only.

Authorizations​

HTTPBearer
Type
HTTP (bearer)

Request Body​

application/json
JSON
{
"amount": 0,
"balance_type": "string",
"description": "string"
}

Responses​

Successful Response

application/json
JSON
{
"id": "string",
"transaction_type": "string",
"amount": "string",
"balance_type": "string",
"description": "string",
"created_at": "string",
"created_by": "string"
}

Playground​

Server
Authorization
Body

Samples​


invitations​


Validate invitation token​

GET
/api/v1/invitations/validate

Validates an invitation token and returns the invitation details. This is the first step in the invitation lifecycle when a user opens an invite link, before they accept.

Parameters​

Query Parameters

token*
Type
string
Required

Responses​

Successful Response

application/json
JSON
{
"email": "string",
"organization_name": "string",
"role": "string",
"is_valid": true
}

Playground​

Server
Variables
Key
Value

Samples​


Accept invitation​

POST
/api/v1/invitations/accept

Completes the invitation lifecycle by accepting a pending invitation. Creates a new user account in the organization and marks the invitation as accepted.

Request Body​

application/json
JSON
{
"token": "string",
"password": "string",
"first_name": "string",
"last_name": "string"
}

Responses​

Successful Response

application/json
JSON
[
]

Playground​

Server
Body

Samples​


List invitations​

GET
/api/v1/invitations

Returns all invitations for the organization across all lifecycle states (pending, accepted, revoked), ordered by most recent first. Admin only.

Authorizations​

HTTPBearer
Type
HTTP (bearer)

Responses​

Successful Response

application/json
JSON
[
{
"id": "string",
"email": "string",
"role": "string",
"status": "string",
"invited_by_email": "string",
"created_at": "string",
"expires_at": "string",
"accepted_at": "string"
}
]

Playground​

Server
Authorization

Samples​


Create invitation​

POST
/api/v1/invitations

Begins the invitation lifecycle by creating a new invitation and sending an email to the invitee. The invitation remains pending until it is accepted, revoked, or expires after 7 days.

Authorizations​

HTTPBearer
Type
HTTP (bearer)

Request Body​

application/json
JSON
{
"email": "string",
"role": "member"
}

Responses​

Successful Response

application/json
JSON
{
"id": "string",
"email": "string",
"role": "string",
"status": "string",
"invited_by_email": "string",
"created_at": "string",
"expires_at": "string",
"accepted_at": "string"
}

Playground​

Server
Authorization
Body

Samples​


Resend invitation email​

POST
/api/v1/invitations/{invitation_id}/resend

Generates a fresh token, extends the expiry, and resends the invitation email. Only pending invitations in the lifecycle can be resent. Admin only.

Authorizations​

HTTPBearer
Type
HTTP (bearer)

Parameters​

Path Parameters

invitation_id*
Type
string
Required
Format
"uuid"

Responses​

Successful Response

application/json
JSON
{
"id": "string",
"email": "string",
"role": "string",
"status": "string",
"invited_by_email": "string",
"created_at": "string",
"expires_at": "string",
"accepted_at": "string"
}

Playground​

Server
Authorization
Variables
Key
Value

Samples​


Revoke invitation​

POST
/api/v1/invitations/{invitation_id}/revoke

Terminates the invitation lifecycle by marking a pending invitation as revoked, preventing it from being accepted. Admin only.

Authorizations​

HTTPBearer
Type
HTTP (bearer)

Parameters​

Path Parameters

invitation_id*
Type
string
Required
Format
"uuid"

Responses​

Successful Response

application/json
JSON
{
"id": "string",
"email": "string",
"role": "string",
"status": "string",
"invited_by_email": "string",
"created_at": "string",
"expires_at": "string",
"accepted_at": "string"
}

Playground​

Server
Authorization
Variables
Key
Value

Samples​


Default​

Operations​


Health Check​

GET
/health

Responses​

Successful Response

application/json
JSON
[
]

Playground​

Samples​


Powered by VitePress OpenAPI