Getting Started with Bobsled AI API v1
Welcome to the Bobsled AI API! This guide covers authentication, making requests, and core concepts.
Base URL
https://{tenant}.bobsled.ai/api/v1
Replace {tenant} with your organization's subdomain (e.g., acme.bobsled.ai).
Authentication
The Bobsled AI API uses Clerk for authentication. All API requests require a valid session token.
Obtaining a Token
- Web Application: Tokens are automatically managed when using the Bobsled AI web interface
- Programmatic Access: Use Clerk's authentication methods to obtain a session token
Making Authenticated Requests
Include the session token in the Authorization header:
curl -X GET "https://{tenant}.bobsled.ai/api/v1/accounts" \
-H "Authorization: Bearer {session_token}" \
-H "Content-Type: application/json"Response Format
All responses follow a consistent format:
Success Response
{
"ok": true,
"data": { ... }
}Error Response
{
"ok": false,
"error": {
"code": "NOT_FOUND",
"message": "Workspace not found.",
"statusCode": 404
}
}Core Resources
Hierarchy
Account
└── Workspace
├── Semantic Models (data schema definitions)
├── Verified Queries (question → SQL mappings)
├── System Prompts (AI behavior configuration)
├── Data Assets (connected data sources)
├── Front Page Configs (chat UI customization)
└── Users (workspace access)
Key Endpoints
| Resource | Endpoint |
|---|---|
| Accounts | GET /accounts |
| Workspaces | GET /accounts/{accountId}/workspaces |
| Semantic Models | GET /accounts/{accountId}/workspaces/{workspaceId}/semantic-models |
| Verified Queries | GET /accounts/{accountId}/workspaces/{workspaceId}/verified-queries |
| Data Assets | GET /accounts/{accountId}/workspaces/{workspaceId}/data-assets |
Authorization
Access is controlled by account-scoped roles:
- Account Admin: Full access to all workspaces within an account
- Global Admin: Full access to all accounts and workspaces
Users can only access resources within accounts where they have an assigned role.
Quick Start Example
1. List Your Accounts
curl -X GET "https://{tenant}.bobsled.ai/api/v1/accounts" \
-H "Authorization: Bearer {token}"2. List Workspaces in an Account
curl -X GET "https://{tenant}.bobsled.ai/api/v1/accounts/{accountId}/workspaces" \
-H "Authorization: Bearer {token}"3. Get Semantic Model for a Workspace
curl -X GET "https://{tenant}.bobsled.ai/api/v1/accounts/{accountId}/workspaces/{workspaceId}/semantic-models" \
-H "Authorization: Bearer {token}"Error Codes
| Code | Status | Description |
|---|---|---|
UNAUTHORIZED | 401 | Authentication required |
FORBIDDEN | 403 | Insufficient permissions |
NOT_FOUND | 404 | Resource not found |
BAD_REQUEST | 400 | Invalid request |
VALIDATION_ERROR | 400 | Request validation failed |
CONFLICT | 409 | Resource conflict |
RATE_LIMIT_EXCEEDED | 429 | Too many requests |
INTERNAL_SERVER_ERROR | 500 | Server error |
Pagination
List endpoints support pagination via query parameters:
| Parameter | Type | Default | Max | Description |
|---|---|---|---|---|
limit | number | 50 | 100 | Items per page |
offset | number | 0 | - | Number of items to skip |
curl "https://{tenant}.bobsled.ai/api/v1/accounts/{accountId}/workspaces?limit=10&offset=20"Next Steps
- Explore the API Reference for detailed endpoint documentation