Skip to main content

API reference

Complete API reference for Agentbot.

Base URL

Authentication

Agentbot supports multiple authentication methods depending on the endpoint.

Session authentication

Most web API endpoints use cookie-based session authentication via NextAuth. Sign in through the web application to obtain a session cookie.

API keys

You can generate API keys from the dashboard. Include your key in the Authorization header:
API keys use the sk_ prefix and are shown only once at creation time. See the keys API for details.

API key authentication (backend)

Backend endpoints such as /api/deployments and /api/openclaw/instances use a shared internal API key for authentication. Include the key as a bearer token:
See the auth API for details.

Data isolation

All authenticated API requests are scoped to the calling user’s data through row-level security (RLS) policies at the database level. You can only read and modify resources that belong to your account. See Security for the full list of protected tables and how isolation works.

Rate limits

The backend API enforces per-IP rate limits using standard RateLimit-* response headers. When a limit is exceeded, the API returns 429 Too Many Requests.

Backend API rate limits

Web API rate limits

Rate limit response headers

All rate-limited responses include standard headers:
Legacy X-RateLimit-* headers are not sent. Use the unprefixed RateLimit-* headers instead.

Request format

All POST and PUT requests that include a JSON body must set the Content-Type header to application/json. The backend API uses the Express JSON body parser, and requests without this header may result in an empty or undefined request body. Request bodies are limited to 1 MB. Requests exceeding this limit are rejected before reaching the endpoint handler.

Response format

Success

Some endpoints return domain-specific top-level keys (for example agents, keys, stats) instead of a generic data wrapper. Refer to each endpoint’s documentation for the exact response shape.

Error

HTTP status codes

Endpoint reference

SDK

Use the Agentbot SDK: