canonical: https://jentic.com/apis/trailbase.io/trailbase

# TrailBase API

TrailBase is a fast, single-executable Firebase alternative. Provides type-safe REST and realtime APIs for database records, authentication, OAuth, and file management, built on Rust/SQLite. The API exposes 36 endpoints secured with bearer authentication.

## For AI agents

Programmatically login with email and password, login with mfa totp code. Covers 36 operations with bearer authentication.

## Scope

Does not handle payments, communications, or crm - use for identity and authentication only.

## Capabilities

- Login with email and password
- Logout (POST)
- Register a new user
- Refresh authentication token
- Monitor TrailBase API operational status and events

## Use cases

### Identity and Authentication Operations

Use the TrailBase API to perform identity auth operations programmatically. The API provides 36 endpoints covering core functionality including login with email and password, login with mfa totp code, login with one-time password.

Example prompt: Call POST `/api/auth/v1/login` to login with email and password

### Automated Auth Management

Automate auth operations by combining multiple TrailBase API endpoints. Agents can login with mfa totp code and then login with one-time password in a single workflow.

Example prompt: Call POST `/api/auth/v1/login/mfa` to login with mfa totp code, then verify the result

### AI Agent Integration via Jentic

AI agents discover and call TrailBase API endpoints through Jentic without managing credentials directly. An agent searches for the required operation by intent, receives the matching endpoint schema, and executes the call with Jentic-managed authentication. This eliminates the need to read API documentation or handle bearer tokens manually.

Example prompt: Search Jentic for 'login with email and password', load the operation schema, and execute with Jentic-managed credentials

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | `/api/auth/v1/login` | Login with email and password |
| POST | `/api/auth/v1/login/mfa` | Login with MFA TOTP code |
| POST | `/api/auth/v1/login/otp` | Login with one-time password |
| POST | `/api/auth/v1/logout` | Logout (POST) |
| GET | `/api/auth/v1/logout` | Logout (GET) |
| POST | `/api/auth/v1/register` | Register a new user |
| POST | `/api/auth/v1/refresh` | Refresh authentication token |
| GET | `/api/auth/v1/status` | Get current auth status |

## Key resources

- **Auth** — Authentication endpoints
- **OAuth** — OAuth provider endpoints
- **Records** — Record CRUD and query endpoints

## Why Jentic

- **Setup:** Wiring the TrailBase API by hand means handling its JWT bearer auth and pointing at your own self-hosted host, since the server URL is a host you supply. Through Jentic you install once, import the TrailBase API from the API Directory, store the token once, and your agent calls it.
- **Permission scoping:** TrailBase auth targets travel in the request body rather than the URL path, so scope the agent to the operations it needs, such as checking login status or refreshing a token, and leave out operations like logout or register unless the workflow requires them. Every operation you allow is one you have chosen.
- **Credential handling:** Your TrailBase token is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'log in with email and password' or 'check auth status', and Jentic returns the matching TrailBase API operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **Auth0** — Alternative identity auth API
- **Okta** — Alternative identity auth API

## FAQ

### What authentication does the TrailBase API use?

The TrailBase API uses a Bearer token in the Authorization header. Through Jentic, these credentials are stored encrypted in your Jentic One instance and injected at execution time, so raw secrets never enter the agent context.

### Can I login with email and password with the TrailBase API?

Yes. Use the POST `/api/auth/v1/login` endpoint. The API returns structured JSON responses that agents can parse and act on directly.

### What are the rate limits for the TrailBase API?

Rate limits are not specified in the OpenAPI spec. Check the vendor documentation for current limits. Through Jentic, rate limiting is handled automatically with retry logic built into the execution layer.

### How do I login with email and password through Jentic?

Install the Jentic SDK with pip install jentic, authenticate through Jentic One, the self-hosted execution layer, then search for 'login with email and password'. Jentic returns the matching TrailBase API operation with its input schema. Load the schema and execute the call - credentials are injected automatically.

### How many endpoints does the TrailBase API have?

The TrailBase API exposes 36 endpoints covering auth, oauth, records operations.

### Can I limit what my agent is allowed to do with the TrailBase API?

Yes. Because you run Jentic One yourself, your own rules decide which TrailBase operations the agent can call and which stored credentials it may use. You can allow read-only actions such as checking auth status with GET `/api/auth/v1/status` or refreshing a token with POST `/api/auth/v1/refresh`, while leaving out operations like logout or register unless a workflow needs them. Every operation the agent can reach is one you have explicitly chosen to allow.
