Skip to main content

API Key Authentication

All API requests must include an API key in the x-api-key header.
curl -X GET "https://api.bitbybit.studio/customer/open/v1/customers" \
  -H "x-api-key: bbb_live_abc123..."

Creating an API Key

  1. Log in to your bitbybit dashboard
  2. Navigate to Settings > Developer
  3. Click Create API Key
  4. Give it a name and select the scopes (permissions) it needs
  5. Click Create and copy the key immediately
The raw API key is only shown once at creation time. Store it securely — you won’t be able to retrieve it again.

Key Format

EnvironmentPrefixExample
Productionbbb_live_bbb_live_a1b2c3d4e5f6...
Testbbb_test_bbb_test_a1b2c3d4e5f6...

Scopes

API keys are scoped to specific resources and actions. Available scopes:
ResourceActionsDescription
customersREAD, WRITE, DELETEManage customer records
ordersREAD, WRITEManage orders
productsREAD, WRITE, DELETEManage product catalog
messagesREAD, WRITESend and retrieve WhatsApp messages
A key with READ access to customers can list and get customers, but cannot create or update them.

Key Rotation

To rotate an API key without downtime:
  1. Go to Settings > Developer
  2. Click the menu on your active key and select Rotate
  3. A new key is created and the old key gets a 24-hour grace period
  4. Update your application with the new key
  5. The old key automatically stops working after the grace period

Error Responses

StatusCodeDescription
401MISSING_API_KEYNo x-api-key header provided
401INVALID_API_KEYKey is invalid, revoked, or expired
403INSUFFICIENT_SCOPEKey doesn’t have the required scope