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 theAuthorization header:
sk_ prefix and are shown only once at creation time. See the keys API for details.
JWT authentication (backend API)
Backend API endpoints use JWT bearer tokens for authentication. Include the token in theAuthorization header:
userId, email, and role. Tokens expire after 7 days. See the auth API for token generation 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
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.