Skip to main content

API v1 Reference

Complete reference for all Axie Studio API v1 endpoints. All endpoints are versioned under /api/v1/ to ensure stability and backward compatibility.

API Versioning

All Axie Studio APIs use v1 versioning. All endpoints are prefixed with /api/v1/ to ensure stability and future compatibility.

Base URL

https://public.axiestudio.se/api/v1

Or for custom domains:

https://your-domain.com/api/v1

Authentication

Most endpoints require authentication using one of these methods:

  1. Clerk Authentication (Dashboard/Web): Bearer token from Clerk session
  2. API Keys (Programmatic): Bearer token with axie_ prefix
Authorization: Bearer your_token_here

📚 Chat & Messaging

Send Chat Message

Send a message to a chat interface and receive an AI response.

POST /api/v1/chat/{slug}

Authentication: API Key (Bearer token)

Request Body:

{
"message": "Your question here",
"sessionId": "optional-session-id"
}

Response:

{
"success": true,
"message": "AI response text",
"sources": [...],
"usage": {...},
"sessionId": "session-id",
"toolCalls": [...],
"formConfig": {...}
}

Get Chat Message History

Retrieve conversation history for a session.

GET /api/v1/chat-messages/history?sessionId={sessionId}

Authentication: Clerk or API Key


Create Chat Message

Create a new chat message.

POST /api/v1/chat-messages

Authentication: Clerk


🔑 API Key Management

List API Keys

Get all API keys for the authenticated user.

GET /api/v1/api-keys

Authentication: Clerk


Create API Key

Generate a new API key.

POST /api/v1/api-keys

Authentication: Clerk

Request Body:

{
"name": "My API Key",
"chatInterfaceId": "interface-id"
}

Get API Key

Get details for a specific API key.

GET /api/v1/api-keys/{id}

Authentication: Clerk


Update API Key

Update an API key (e.g., change name, deactivate).

PATCH /api/v1/api-keys/{id}

Authentication: Clerk


Delete API Key

Delete an API key permanently.

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

Authentication: Clerk


📖 Knowledge Base

List Knowledge Base Configs

Get all knowledge base configurations.

GET /api/v1/knowledge-base/configs

Authentication: Clerk


Create Knowledge Base Config

Create a new knowledge base configuration.

POST /api/v1/knowledge-base/configs

Authentication: Clerk


Get Knowledge Base Config

Get details for a specific knowledge base.

GET /api/v1/knowledge-base/configs/{id}

Authentication: Clerk


Update Knowledge Base Config

Update knowledge base settings.

PATCH /api/v1/knowledge-base/configs/{id}

Authentication: Clerk


Delete Knowledge Base Config

Delete a knowledge base configuration.

DELETE /api/v1/knowledge-base/configs/{id}

Authentication: Clerk


List Documents

Get all documents in a knowledge base.

GET /api/v1/knowledge-base/documents?configId={configId}

Authentication: Clerk


Upload Document

Upload a new document to a knowledge base.

POST /api/v1/knowledge-base/documents

Authentication: Clerk

Request: Multipart form data

  • file: The document file (PDF, DOCX, TXT, MD)
  • configId: Knowledge base configuration ID

Delete Document

Delete a document from a knowledge base.

DELETE /api/v1/knowledge-base/documents/{id}

Authentication: Clerk


Bulk Delete Documents

Delete multiple documents at once.

POST /api/v1/knowledge-base/documents/bulk-delete

Authentication: Clerk

Request Body:

{
"documentIds": ["id1", "id2", "id3"]
}

Query Knowledge Base

Query a knowledge base and get AI-powered answers.

POST /api/v1/knowledge-base/query

Authentication: Clerk

Request Body:

{
"query": "Your question",
"configId": "knowledge-base-id"
}

Stream Query Knowledge Base

Query a knowledge base with streaming response.

POST /api/v1/knowledge-base/query/stream

Authentication: Clerk

Request Body:

{
"query": "Your question",
"configId": "knowledge-base-id"
}

Response: Server-Sent Events (SSE) stream


List Collections

Get all vector collections for knowledge bases.

GET /api/v1/knowledge-base/collections

Authentication: Clerk


Get Knowledge Base Tools

Get tools configured for a knowledge base.

GET /api/v1/knowledge-base/configs/{id}/tools

Authentication: Clerk


Update Knowledge Base Tools

Update tools for a knowledge base.

PATCH /api/v1/knowledge-base/configs/{id}/tools

Authentication: Clerk


Knowledge Base Health Check

Check the health status of knowledge base services.

GET /api/v1/knowledge-base/health

Authentication: Clerk


Test Reducto API

Test Reducto API key configuration.

POST /api/v1/knowledge-base/test-reducto

Authentication: Clerk


Get Memori Config

Get Memori configuration for a knowledge base.

GET /api/v1/knowledge-base/configs/{id}/memori

Authentication: Clerk


🌐 Domain Management

List Domains

Get all domains for the authenticated user.

GET /api/v1/domains

Authentication: Clerk


Create Domain

Add a new custom domain.

POST /api/v1/domains

Authentication: Clerk


Get Domain

Get details for a specific domain.

GET /api/v1/domains/{id}

Authentication: Clerk


Update Domain

Update domain settings.

PATCH /api/v1/domains/{id}

Authentication: Clerk


Delete Domain

Remove a domain.

DELETE /api/v1/domains/{id}

Authentication: Clerk


Verify Domain

Verify domain ownership via DNS.

POST /api/v1/domains/{id}/verify

Authentication: Clerk


Check DNS Records

Check DNS configuration for a domain.

GET /api/v1/domains/{id}/check-dns

Authentication: Clerk


Get Verification Records

Get DNS records needed for domain verification.

GET /api/v1/domains/{id}/verification-records

Authentication: Clerk


Activate Domain

Activate a verified domain.

POST /api/v1/domains/{id}/activate

Authentication: Clerk


Deactivate Domain

Deactivate a domain.

POST /api/v1/domains/{id}/deactivate

Authentication: Clerk


Get SSL Status

Check SSL certificate status for a domain.

GET /api/v1/domains/{id}/ssl-status

Authentication: Clerk


Check Reserved Domain

Check if a domain is reserved or available.

GET /api/v1/domains/check-reserved?domain={domain}

Authentication: Public (no auth required)


Get Public Domain Info

Get public information about a domain.

GET /api/v1/domains/route-public?domain={domain}

Authentication: Public (no auth required)


Sync Domains

Synchronize domain configurations.

POST /api/v1/domains/sync

Authentication: Clerk


Get Domain Routing

Get domain routing configuration.

GET /api/v1/domains-routing

Authentication: Clerk


💬 Chat Interfaces

Get Chat Interface

Get details for a specific chat interface.

GET /api/v1/chat-interfaces/{id}

Authentication: Clerk


Update Chat Interface

Update chat interface settings.

PATCH /api/v1/chat-interfaces/{id}

Authentication: Clerk


Delete Chat Interface

Delete a chat interface.

DELETE /api/v1/chat-interfaces/{id}

Authentication: Clerk


🏢 Enterprise Features

List Webhooks

Get all webhooks for an enterprise.

GET /api/v1/enterprise/webhooks

Authentication: Clerk (Enterprise only)


Create Webhook

Create a new webhook.

POST /api/v1/enterprise/webhooks

Authentication: Clerk (Enterprise only)

Request Body:

{
"url": "https://your-endpoint.com/webhook",
"events": ["event1", "event2"],
"secret": "optional-secret",
"enabled": true
}

Get Webhook

Get details for a specific webhook.

GET /api/v1/enterprise/webhooks/{webhookId}

Authentication: Clerk (Enterprise only)


Update Webhook

Update webhook settings.

PATCH /api/v1/enterprise/webhooks/{webhookId}

Authentication: Clerk (Enterprise only)


Delete Webhook

Delete a webhook.

DELETE /api/v1/enterprise/webhooks/{webhookId}

Authentication: Clerk (Enterprise only)


Get Webhook Deliveries

Get delivery history for a webhook.

GET /api/v1/enterprise/webhooks/{webhookId}/deliveries

Authentication: Clerk (Enterprise only)


Replay Webhook

Replay a failed webhook delivery.

POST /api/v1/enterprise/webhooks/{webhookId}/replay

Authentication: Clerk (Enterprise only)


Test Webhook

Test a webhook configuration.

POST /api/v1/enterprise/webhooks/{webhookId}/test

Authentication: Clerk (Enterprise only)

Response:

{
"success": true,
"message": "Test webhook sent successfully",
"deliveryId": "del_abc123"
}

Validate Webhook Endpoint

Validate that a webhook endpoint is accessible and responding correctly.

POST /api/v1/enterprise/webhooks/{webhookId}/validate

Authentication: Clerk (Enterprise only)

Request Body:

{
"url": "https://your-endpoint.com/webhook"
}

Response:

{
"success": true,
"valid": true,
"message": "Endpoint is accessible and responding correctly"
}

Rotate Webhook Secret

Generate a new secret for a webhook (for security).

POST /api/v1/enterprise/webhooks/{webhookId}/rotate-secret

Authentication: Clerk (Enterprise only)

Response:

{
"success": true,
"secret": "new_secret_here",
"message": "Webhook secret rotated successfully"
}

Note: The secret is shown only once. Save it immediately!


💳 Billing & Subscriptions

Get User Subscription

Get subscription details for the authenticated user.

GET /api/v1/user/subscription

Authentication: Clerk


Create Stripe Checkout

Create a Stripe checkout session.

POST /api/v1/stripe/checkout

Authentication: Clerk


Create Stripe Portal

Create a Stripe customer portal session.

POST /api/v1/stripe/portal

Authentication: Clerk


Validate Coupon

Validate a Stripe coupon code.

POST /api/v1/stripe/validate-coupon

Authentication: Clerk


Stripe Webhook

Handle Stripe webhook events.

POST /api/v1/stripe/webhook

Authentication: Stripe signature verification


📅 Bookings

List Bookings

Get all bookings.

GET /api/v1/bookings

Authentication: Clerk


Create Booking

Create a new booking.

POST /api/v1/bookings

Authentication: Clerk


Get Available Slots

Get available booking time slots.

GET /api/v1/bookings/available-slots

Authentication: Clerk


Create Manual Booking

Create a booking manually (admin).

POST /api/v1/bookings/manual

Authentication: Clerk


Cancel Booking

Cancel a booking.

POST /api/v1/bookings/{id}/cancel

Authentication: Clerk


🔧 Tools & Integrations

Get Composio Tools

Get available Composio tools.

GET /api/v1/composio/tools

Authentication: Clerk


Get Composio Config

Get Composio configuration.

GET /api/v1/composio/config

Authentication: Clerk


Connect Composio

Connect a Composio account.

POST /api/v1/composio/connect

Authentication: Clerk


Get Composio Status

Get Composio service status.

GET /api/v1/composio/status

Authentication: Clerk


List Composio Accounts

Get all connected Composio accounts.

GET /api/v1/composio/accounts

Authentication: Clerk


Get Composio Account

Get details for a specific Composio account.

GET /api/v1/composio/accounts/{accountId}

Authentication: Clerk


Activate Composio Account

Activate a Composio account.

POST /api/v1/composio/accounts/{accountId}/activate

Authentication: Clerk


Disable Composio Account

Disable a Composio account.

POST /api/v1/composio/accounts/{accountId}/disable

Authentication: Clerk


Get Composio Auth Configs

Get Composio authentication configurations.

GET /api/v1/composio/auth-configs

Authentication: Clerk


Debug Composio Accounts

Debug Composio account connections.

GET /api/v1/composio/debug-accounts

Authentication: Clerk


📊 Dashboard & Analytics

Get Dashboard Data

Get comprehensive dashboard data.

GET /api/v1/dashboard

Authentication: Clerk


Get Monitoring Data

Get system monitoring data.

GET /api/v1/monitoring

Authentication: Clerk


🎓 User Management

Mark Tour Completed

Mark onboarding tour as completed.

POST /api/v1/user/tour-completed

Authentication: Clerk


🌍 Localization

Get Translations

Get translations for a specific locale.

GET /api/v1/translations/{locale}

Authentication: Public (no auth required)


🎫 Support

Contact Support

Submit a support contact form.

POST /api/v1/support/contact

Authentication: Public (no auth required)


List Support Tickets

Get all support tickets.

GET /api/v1/support/tickets

Authentication: Clerk


Get Support Ticket

Get details for a specific ticket.

GET /api/v1/support/tickets/{ticketId}

Authentication: Clerk


Update Support Ticket

Update a support ticket.

PATCH /api/v1/support/tickets/{ticketId}

Authentication: Clerk


⚙️ Admin (Internal)

Admin Only

These endpoints are for internal admin use only and require special permissions.

Admin Status

Get admin system status.

GET /api/v1/admin/status

Authentication: Admin only


List Admin Domains

Get all domains (admin view).

GET /api/v1/admin/domains

Authentication: Admin only


List Enterprises

Get all enterprises (admin view).

GET /api/v1/admin/enterprises

Authentication: Admin only


List Coupons

Get all coupons (admin view).

GET /api/v1/admin/coupons

Authentication: Admin only


Get Coupon

Get details for a specific coupon.

GET /api/v1/admin/coupons/{couponId}

Authentication: Admin only


Get Coupon Promotion Codes

Get promotion codes for a coupon.

GET /api/v1/admin/coupons/{couponId}/promotion-codes

Authentication: Admin only


Get Rate Limits

Get rate limit configuration.

GET /api/v1/admin/rate-limits

Authentication: Admin only


Get Security Monitoring

Get security monitoring data.

GET /api/v1/admin/security-monitoring

Authentication: Admin only


Fix Domain Redirect

Fix domain redirect issues (admin tool).

POST /api/v1/admin/fix-domain-redirect

Authentication: Admin only


Update Domains TXT

Update TXT records for domains (admin tool).

POST /api/v1/admin/update-domains-txt

Authentication: Admin only


Update Domains CNAME

Update CNAME records for domains (admin tool).

POST /api/v1/admin/update-domains-cname

Authentication: Admin only


Update Domains Both

Update both TXT and CNAME records (admin tool).

POST /api/v1/admin/update-domains-both

Authentication: Admin only


🔍 Cache Management

Save TanStack Query Cache

Save TanStack Query cache data.

POST /api/v1/cache/tanstack-query/save

Authentication: Clerk


Restore TanStack Query Cache

Restore TanStack Query cache data.

POST /api/v1/cache/tanstack-query/restore

Authentication: Clerk


Remove TanStack Query Cache

Remove TanStack Query cache data.

POST /api/v1/cache/tanstack-query/remove

Authentication: Clerk


🏥 Health & Status

Vercel Health Check

Health check endpoint for Vercel.

GET /api/v1/health/vercel

Authentication: Public (no auth required)


🐛 Debug & Testing

Debug Chat Interfaces

Debug chat interface configurations.

GET /api/v1/debug/chat-interfaces

Authentication: Clerk


Sentry Example API

Example endpoint for Sentry error tracking.

GET /api/v1/sentry-example-api

Authentication: Public (no auth required)


Stripe Webhook Test

Test Stripe webhook integration.

POST /api/v1/stripe/webhook-test

Authentication: Clerk


⏰ Cron Jobs

Trial Expiration

Handle trial expiration (cron job).

POST /api/v1/cron/trial-expiration

Authentication: Internal (cron secret)


📝 Response Format

Success Response

All successful API responses follow this format:

{
"success": true,
"data": {
// Response data here
},
"version": "v1"
}

Error Response

All error responses follow this format:

{
"success": false,
"error": {
"message": "Error message",
"code": "ERROR_CODE",
"details": "Additional error details"
}
}

🔢 HTTP Status Codes

CodeMeaningDescription
200OKRequest successful
201CreatedResource created successfully
400Bad RequestInvalid request parameters
401UnauthorizedAuthentication required or invalid
403ForbiddenInsufficient permissions
404Not FoundResource not found
409ConflictResource conflict (e.g., duplicate)
413Payload Too LargeRequest body too large
429Too Many RequestsRate limit exceeded
500Internal Server ErrorServer error
503Service UnavailableService temporarily unavailable

⚡ Rate Limits

Rate limits are applied per endpoint and user:

  • Chat endpoints: 60 requests/minute
  • Knowledge Base queries: 60 requests/minute
  • Document uploads: 10 requests/minute
  • Other endpoints: 100 requests/minute

Rate limit headers are included in responses:

X-RateLimit-Limit: 100
X-RateLimit-Remaining: 95
X-RateLimit-Reset: 1732294800

🔐 Security

API Key Format

API keys start with the prefix axie_:

axie_1234567890abcdef...

Authentication Headers

Always include the Authorization header:

Authorization: Bearer axie_your_key_here

HTTPS Only

All API endpoints require HTTPS. HTTP requests will be rejected.



Last Updated: 2025-01-27
API Version: v1.0.0
Base URL: https://public.axiestudio.se/api/v1