API Reference

The 8bit-ai REST API provides programmatic access to the entire platform — agents, conversations, messages, webhooks, billing, and organization management. All API endpoints return structured JSON responses.

app.8bit-ai.com
API Reference

Base URL

All API requests should be made to: https://api.8bit-ai.com/v1

API Overview

The API follows RESTful conventions with resource-oriented URLs. All requests must include a valid access token in the Authorization header. Responses include standard HTTP status codes and a consistent JSON envelope.

Response Envelope

All successful responses use a standard envelope with success anddata fields. Error responses include error with a code and message.

Example Request

Authentication

All API requests require authentication using a Bearer token in the Authorization header. Access tokens are obtained via the authentication endpoints.

Tokens are JWT-based with a 15-minute expiration. Use the refresh token endpoint to obtain a new access token without requiring the user to re-authenticate.

Token Security

Never expose access tokens in client-side code, URLs, or logs. Store tokens securely using environment variables or a secrets management service.

API Key Alternative

For server-to-server integrations, you can use API keys instead of user tokens. API keys are long-lived credentials that can be scoped to specific permissions.

Rate Limits

API requests are rate-limited per organization to ensure fair usage and platform stability. Rate limits vary by plan tier.

PlanRequests per MinuteBurst Limit
Starter60100
Pro6001,000
EnterpriseCustomCustom

Rate Limit Headers

Rate limit status is included in response headers:

HeaderDescription
X-RateLimit-LimitMaximum requests allowed per minute
X-RateLimit-RemainingRequests remaining in the current window
X-RateLimit-ResetUnix timestamp when the rate limit resets

Rate Limit Handling

When you exceed the rate limit, the API returns a 429 Too Many Requests response. Implement exponential backoff and respect the Retry-After header.

Error Codes

The API uses standard HTTP status codes and returns detailed error information in the response body.

StatusCodeDescription
400INVALID_REQUESTMalformed request body or missing required fields
401UNAUTHORIZEDMissing or invalid authentication token
403FORBIDDENInsufficient permissions for the requested action
404NOT_FOUNDThe requested resource does not exist
409CONFLICTResource conflict (e.g., duplicate name)
429RATE_LIMITEDToo many requests, rate limit exceeded
500INTERNAL_ERRORUnexpected server error. Contact support if persistent.

Error Response Format

Error responses always include a code and message. Some errors may include adetails object with additional context about the error.

Pagination

List endpoints use cursor-based pagination to efficiently navigate through large result sets. Pagination parameters are passed as query string parameters.

Pagination Parameters

ParameterTypeDescription
limitintegerNumber of results per page (default: 20, max: 100)
cursorstringCursor from the previous response for the next page
orderstringSort order: asc or desc (default: desc)

Paginated Response

Pagination Example

Explore more API documentation.