BotDeck
Developer

API Documentation

Integrate BotDeck into your applications with our REST API

Authentication

All API requests require a Bearer token in the Authorization header:

Authorization: Bearer bdk_YOUR_API_KEY
Permissions
Scopes available for API keys
bots:readList and view your bots
bots:writeCreate and update bots
bots:chatSend messages to bots and compare
conversations:readList and view conversations
prompts:readList prompt templates
prompts:writeCreate and update prompts
deckflows:readList your deckflows
deckflows:executeExecute deckflows
analytics:readView usage and analytics
webhooks:readList and manage webhooks
webhooks:writeCreate and update webhooks
Endpoints
Base URL:https://www.botdeck.ai
GET/api/v1/bots
List all your bots
Required permission:bots:read

cURL Example

curl -H "Authorization: Bearer bdk_YOUR_API_KEY" \
  https://www.botdeck.ai/api/v1/bots

Response Example

{
  "data": [
    {
      "id": 1,
      "name": "My Bot",
      "model": "gpt-4o",
      "provider": "openai",
      "category": "general"
    }
  ]
}
Rate Limits
API rate limits per key

100

Requests / minute

10,000

Requests / day

5 MB

Max request body

Error Codes
Common HTTP status codes returned by the API
200OKRequest succeeded
400Bad RequestInvalid or missing parameters
401UnauthorizedMissing or invalid API key
403ForbiddenInsufficient permissions for this endpoint
404Not FoundResource not found or not owned by you
429Too Many RequestsRate limit exceeded
500Internal ErrorServer error, please retry
SDK & Language Examples
Quick integration snippets for popular languages
// Install: npm install botdeck-sdk
import BotDeck from 'botdeck-sdk';

const client = new BotDeck({ apiKey: 'bdk_YOUR_API_KEY' });

// List your bots
const bots = await client.bots.list();
console.log(bots);

// Chat with a bot
const response = await client.bots.chat(1, {
  message: 'Hello, how are you?'
});
console.log(response.content);

// Compare bots
const comparison = await client.bots.compare({
  botIds: [1, 2, 3],
  prompt: 'Explain quantum computing'
});
comparison.results.forEach(r => {
  console.log(r.botName, r.response);
});
Quickstart Guide
Get up and running in under 5 minutes
1

Create an API Key

Go to API Keys in the sidebar and generate a new key with the permissions you need.

2

Create a Bot

Use the Bot Builder or the POST /api/v1/bots endpoint to create your first bot with a system prompt.

3

Send a Message

Use POST /api/v1/bots/:id/chat to send a message and receive an AI response.

4

Build a Deckflow

Chain multiple bots together using Deckflows for complex multi-step workflows.

5

Monitor Usage

Track your token usage and costs with the GET /api/v1/usage endpoint.

Webhooks
Receive real-time notifications for events in your account

Configure webhooks to receive HTTP POST callbacks when events occur. Available events:

bot.messageNew message sent or received
bot.createdA new bot was created
conversation.createdA new conversation started
conversation.archivedA conversation was archived
deckflow.completedA deckflow run finished
deckflow.failedA deckflow run failed
subscription.updatedSubscription plan changed
usage.thresholdUsage threshold reached
// Webhook payload example
{
  "event": "bot.message",
  "timestamp": "2026-03-13T10:00:00Z",
  "data": {
    "botId": 1,
    "conversationId": 42,
    "message": {
      "role": "assistant",
      "content": "Here is your response..."
    }
  }
}