Documentation

Authentication

Authenticate with the BotPhi API using API keys.


All API requests require authentication via an API key. You can create and manage API keys from the dashboard under Settings > API Keys.

Creating an API Key

  1. Navigate to Settings > API Keys in the dashboard
  2. Click "Create New Key"
  3. Give the key a descriptive name (e.g., "production-backend")
  4. Copy the key — it's only shown once

Using Your API Key

Pass your API key in the Authorization header with every request:

curl https://api.botphi.app/v1/bots \
  -H "Authorization: Bearer bp_live_your-api-key" \
  -H "Content-Type: application/json"
example.ts
const response = await fetch("https://api.botphi.app/v1/bots", {
  headers: {
    Authorization: `Bearer ${process.env.BOTPHI_API_KEY}`,
    "Content-Type": "application/json",
  },
});

Key Prefixes

  • bp_live_ — Production keys with full access
  • bp_test_ — Test keys that work only with sandbox bots

Never expose your API key in client-side code or public repositories. Use environment variables and server-side requests.