Skip to main content
To securely access and interact with Sourcebot’s API, authentication is required. Users must generate an API Key, which will be used to authenticate requests.
If anonymous access is enabled, some endpoints will be accessible without a API key.

Creating an API key

Navigate to Settings → API Keys and click Create API Key. Copy the value - it is only shown once.
API Keys page in Sourcebot Settings

Using an API key

Pass your API key as a Bearer token in the Authorization header on every request.
Authorization: Bearer <your-api-key>
For example, to call the /api/search endpoint:
curl -X POST https://your-sourcebot-instance.com/api/search \
  -H "Authorization: Bearer <your-api-key>" \
  -H "Content-Type: application/json" \
  -d '{"query": "hello world", "matches": 10}'