API Documentation
Rindexa is a sub-millisecond, multi-tenant search engine built in Rust. Integrate it into your SaaS with a simple REST API. All requests use Content-Type: application/json.
Base URL
https://api.rindexa.com /signup No Auth Create Tenant
Create a new tenant account and receive an initial API key. This is your entry point to use Rindexa.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
tenant_id | string | Yes | Unique identifier (max 100 chars, alphanumeric, -, _) |
email | string | Yes | A valid email address |
password | string | Yes | Secure password (min 8 characters) |
marketing_consent | boolean | No | Opt-in for marketing emails (default: false) |
Responses
Response Example
{
"tenant_id": "myapp",
"email": "me@example.com",
"plan": "free",
"api_key": "rx_live_xxx",
"prefix": "rx_live_xxx"
} cURL Example
curl -X POST https://api.rindexa.com/signup \
-H "Content-Type: application/json" \
-d '{
"tenant_id": "myapp",
"email": "me@example.com",
"password": "securepassword123",
"marketing_consent": false
}' /auth/login No Auth Dashboard Login
Authenticate with email and password to receive a JWT token for accessing dashboard endpoints.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
email | string | Yes | Your registered email address |
password | string | Yes | Your account password |
Responses
Response Example
{
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
} cURL Example
curl -X POST https://api.rindexa.com/auth/login \
-H "Content-Type: application/json" \
-d '{
"email": "me@example.com",
"password": "securepassword123"
}' /tenants/me JWT
Get Tenant Stats
Retrieve detailed statistics for your tenant, including document count, search count, plan limits, and usage. Requires JWT authentication via Authorization: Bearer <jwt_token> header.
Responses
Response Example
{
"tenant_id": "myapp",
"plan": "free",
"document_count": 127,
"search_count": 3542,
"total_document_count": 342,
"document_limit": 1000,
"search_limit": 100000,
"created_at": "2026-01-15T10:30:00Z"
} cURL Example
curl https://api.rindexa.com/tenants/me \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." /documents Bearer
Add Document
Add a new document to the tenant's search index. If a document with the same id exists, it will be overwritten. Strict validation is applied — unknown fields result in a 400 error.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
title | string | Yes* | Document title. Required if body is empty. |
body | string | Yes* | Document body text. Required if title is empty. |
id | string | No | Unique ID. Auto-generated as UUID v4 if omitted. |
doc_type | string | No | Category (defaults to "generic"). Cannot be empty. |
search_text | string | No | Additional text indexed for search. |
tags | string[] | No | Array of tags for filtering. |
facets | object | No | Key-value string pairs for facet filtering. |
numeric | object | No | String keys with f64 float values for range filtering. |
flags | string[] | No | Boolean-like flags for the document. |
dates | object | No | Date strings for chronological filtering. |
payload | object | No | Arbitrary JSON payload returned as-is with search results. |
Responses
Response Example
{
"id": "doc1",
"tenant_id": "myapp",
"doc_type": "post",
"title": "Hello World",
"body": "This is my first post about Rust"
} cURL Example
curl -X POST https://api.rindexa.com/documents \
-H "Authorization: Bearer rx_live_xxx" \
-H "Content-Type: application/json" \
-d '{
"id": "doc1",
"doc_type": "post",
"title": "Hello World",
"body": "This is my first post about Rust",
"tags": ["rust", "tutorial"],
"numeric": {"views": 0.0},
"payload": {"author_id": 42}
}' /documents/bulk Bearer
Bulk Index Documents
Index multiple documents in a single request. Maximum 1,000 documents per batch. Each document follows the same schema as the single document endpoint. Validation occurs before any indexing to maintain consistency.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
documents | array | Yes | Array of document objects (max 1,000). Each follows the Add Document schema. |
Responses
Response Example
{
"indexed": 3,
"tenant_id": "myapp"
} cURL Example
curl -X POST https://api.rindexa.com/documents/bulk \
-H "Authorization: Bearer rx_live_xxx" \
-H "Content-Type: application/json" \
-d '{
"documents": [
{
"title": "First Document",
"body": "Content of first doc",
"tags": ["intro"]
},
{
"title": "Second Document",
"body": "Content of second doc",
"tags": ["tutorial"]
},
{
"title": "Third Document",
"body": "Content of third doc",
"tags": ["advanced"]
}
]
}' /documents/:id Bearer
Delete Document
Delete an existing document from the search index using its unique identifier.
Path Parameters
| Parameter | Type | Description |
|---|---|---|
:id | string | The unique document ID to delete |
Responses
cURL Example
curl -X DELETE https://api.rindexa.com/documents/doc1 \
-H "Authorization: Bearer rx_live_xxx" /search Bearer
Search Documents
Execute a sub-millisecond search query across your tenant's indexed documents.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
query | string | Yes | Full-text search query string |
doc_type | string | No | Filter by document type |
tags | string[] | No | Filter by exact tags |
facets | object | No | Filter by exact facet matches |
limit | int | No | Max results to return (default 10, max 100) |
offset | int | No | Pagination offset (default 0) |
Responses
Response Example
{
"results": [
{
"id": "doc1",
"tenant_id": "myapp",
"doc_type": "post",
"title": "Hello World",
"body": "This is my first post about Rust",
"search_text": null,
"tags": ["rust", "tutorial"],
"facets": null,
"numeric": {"views": 0.0},
"flags": null,
"dates": null,
"payload": {"author_id": 42}
}
],
"total_hits": 1
} cURL Example
curl -X POST https://api.rindexa.com/search \
-H "Authorization: Bearer rx_live_xxx" \
-H "Content-Type: application/json" \
-d '{
"query": "Rust",
"tags": ["tutorial"],
"limit": 10,
"offset": 0
}' /keys/rotate JWT
Rotate API Key
Rotate the API key for your tenant. The old key is invalidated immediately. Requires JWT authentication obtained from /auth/login. The tenant is automatically identified from the JWT token.
ℹ️ No Request Body Required
This endpoint doesn't require a request body. The tenant is automatically identified from the JWT token in the Authorization header.
Responses
Response Example
{
"tenant_id": "myapp",
"api_key": "rx_live_newkey...",
"prefix": "rx_live_newkey"
} cURL Example
curl -X POST https://api.rindexa.com/keys/rotate \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." \
-H "Content-Type: application/json" /health No Auth Health Check
Quick health check endpoint to monitor application uptime.
Responses
ok cURL Example
curl https://api.rindexa.com/health