Skip to main content
Bota provides separate test and live environments to help you develop and test your integration safely.

Environments

EnvironmentBase URLAPI Key PrefixPurpose
Livehttps://api.bota.dev/v1sk_live_Production data and billing
Testhttps://api.sandbox.bota.dev/v1sk_test_Development and testing
Test mode data is completely isolated from live mode. EndUsers, devices, and recordings created in test mode do not exist in live mode and vice versa.

API Keys

Each project has separate API keys for test and live environments:
# Test mode
curl https://api.sandbox.bota.dev/v1/end-users \
  -H "Authorization: Bearer sk_test_abc123..."

# Live mode
curl https://api.bota.dev/v1/end-users \
  -H "Authorization: Bearer sk_live_xyz789..."

Key Types by Environment

Key TypeTest ModeLive Mode
Secret keysk_test_*sk_live_*
Restricted keyrk_test_*rk_live_*
Device tokendtok_test_*dtok_live_*
Upload tokenup_test_*up_live_*

Test Mode Behavior

What’s the Same

  • All API endpoints work identically
  • Request/response formats are identical
  • Rate limits apply (but are more lenient)
  • Webhooks are delivered normally
  • Error codes and messages match production

What’s Different

FeatureTest ModeLive Mode
Data persistenceCleared periodicallyPermanent
TranscriptionSimulated (instant)Real ASR processing
BillingNot chargedUsage is metered
Rate limits1000 req/sec100 req/sec
WebhooksDelivered normallyDelivered normally
Device tokensValid indefinitelyExpire per policy
Test mode transcriptions return simulated results instantly. This is useful for testing your integration flow without waiting for real processing.

Simulated Responses

Transcription

Test mode transcriptions complete immediately with simulated content:
{
  "id": "txn_test_abc123",
  "recording_id": "rec_test_xyz789",
  "status": "completed",
  "text": "[Test mode] This is a simulated transcription for testing purposes.",
  "segments": [
    {
      "start": 0.0,
      "end": 5.0,
      "text": "[Test mode] This is a simulated transcription for testing purposes.",
      "speaker": "SPEAKER_00"
    }
  ],
  "duration_seconds": 5.0,
  "created_at": "2025-01-15T10:00:00Z"
}

Summary

Test mode summaries are also simulated:
{
  "id": "sum_test_abc123",
  "transcription_id": "txn_test_xyz789",
  "status": "completed",
  "text": "[Test mode] This is a simulated summary for testing purposes.",
  "created_at": "2025-01-15T10:00:00Z"
}

Testing Webhooks

Webhooks in test mode work exactly like production. Events are delivered to your configured endpoints with valid signatures.

Testing Locally

Use a tunneling service like ngrok to receive webhooks during local development:
# Start ngrok tunnel
ngrok http 3000

# Use the ngrok URL when creating webhook endpoints
curl -X POST https://api.sandbox.bota.dev/v1/webhooks \
  -H "Authorization: Bearer sk_test_..." \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://abc123.ngrok.io/webhooks/bota",
    "events": ["transcription.completed"]
  }'

Test Event Triggers

You can trigger test webhook events manually:
# Create a recording (triggers recording.created)
curl -X POST https://api.sandbox.bota.dev/v1/recordings \
  -H "Authorization: Bearer sk_test_..." \
  -H "Content-Type: application/json" \
  -d '{
    "end_user_id": "eu_test_abc123",
    "device_id": "dev_test_xyz789"
  }'

# Trigger transcription (completes instantly, triggers transcription.completed)
curl -X POST https://api.sandbox.bota.dev/v1/transcriptions \
  -H "Authorization: Bearer sk_test_..." \
  -H "Content-Type: application/json" \
  -d '{
    "recording_id": "rec_test_abc123"
  }'

Going Live Checklist

Before switching from test mode to production:
1

Update API keys

Replace sk_test_* keys with sk_live_* keys in your production environment
2

Update base URL

Change from api.sandbox.bota.dev to api.bota.dev
3

Verify webhook endpoints

Ensure your production webhook URLs are configured and accessible
4

Test with real devices

Verify BLE pairing and upload flows work with actual hardware
5

Monitor initial requests

Watch for errors in your first production API calls

Environment Variables

We recommend using environment variables to manage your API configuration:
BOTA_API_KEY=sk_test_abc123...
BOTA_API_URL=https://api.sandbox.bota.dev/v1
BOTA_WEBHOOK_SECRET=whsec_test_xyz789...
// Your code uses the same logic regardless of environment
const bota = new BotaClient({
  apiKey: process.env.BOTA_API_KEY,
  baseUrl: process.env.BOTA_API_URL,
});

Data Cleanup

Test mode data may be cleared periodically. Do not rely on test mode for persistent storage. If you need to manually clean up test data:
# Delete all test recordings for a user
curl -X DELETE https://api.sandbox.bota.dev/v1/end-users/eu_test_abc123 \
  -H "Authorization: Bearer sk_test_..."
Deleting an EndUser also deletes all associated recordings, transcriptions, and summaries.