CommBridge

Authentication

Authenticate requests using API keys. Include your key in the Authorization header as a Bearer token.

Examples in:
POST/api/v1/auth/token

Exchange API key for a short-lived access token (1 hour TTL).

Request Body

{
  "api_key": "cb_live_abc123..."
}

Response

{
  "token": "eyJhbG...",
  "expires_in": 3600,
  "token_type": "Bearer"
}

Code Example (cURL)

curl -X POST "https://api.commbridge.com/api/v1/auth/token" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{  "api_key": "cb_live_abc123..."}'
GET/api/v1/auth/me

Get the authenticated user's profile and company information.

Response

{
  "id": "uuid",
  "email": "[email protected]",
  "company": {
    "id": "uuid",
    "name": "Acme Trading",
    "trust_tier": "gold",
    "trust_score": 85
  }
}

Code Example (cURL)

curl -X GET "https://api.commbridge.com/api/v1/auth/me" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json"

Rate Limiting

The CommBridge API uses token bucket rate limiting. When you exceed your rate limit, the API will return a 429 Too Many Requests response.

Free

100 requests/minute

Burst: 20 requests/second

Pro

1,000 requests/minute

Burst: 100 requests/second

Enterprise

10,000 requests/minute

Burst: 500 requests/second

Rate limit headers are included in every response: X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset

Error Codes

CodeStatusDescription
400Bad RequestInvalid request parameters or body
401UnauthorizedMissing or invalid API key / token
403ForbiddenInsufficient permissions for this action
404Not FoundRequested resource does not exist
409ConflictResource state conflict (e.g., duplicate)
422UnprocessableValidation error on request body
429Rate LimitedToo many requests, slow down
500Server ErrorInternal error, contact support