Endpoints
The API has two endpoints: GET for reading data and POST for creating, updating, and deleting records.
GET/api/v1/data
Read records from any accessible table with pagination, search, and filtering.
Query Parameters
| Parameter | Required | Default | Description |
|---|---|---|---|
table | Yes | - | Table name (e.g., 'product', 'order', 'user') |
page | No | 1 | Page number |
pageSize | No | 20 | Records per page (max 100) |
search | No | '' | Search term |
ofield | No | 'updatedAt' | Sort field |
odir | No | 'desc' | Sort direction: 'asc' or 'desc' |
filters | No | - | JSON-encoded filter array |
category | No | - | Filter by category |
tags | No | - | Comma-separated tags |
Examples
All GET requests require the Authorization header:
Authorization: Bearer lbkey_GENERATED_KEYList records
https://www.linkbase.house/api/v1/data?table=order&page=1&pageSize=10
Get a single record by ID
https://www.linkbase.house/api/v1/data?table=order&id=YOUR_RECORD_IDSearch records
https://www.linkbase.house/api/v1/data?table=product&search=coffee&pageSize=5
Filter records
Pass a JSON array as the filters parameter. Each filter needs filterKey, filterOp, and filterValue.
https://www.linkbase.house/api/v1/data?table=product&filters=[{"filterKey":"status","filterOp":"EQUALS","filterValue":"live"}]Search orders by customer email
The search parameter matches against searchable fields, including nested ones like customer name and email on orders.
https://www.linkbase.house/api/v1/data?table=order&search=prospect@example.com&pageSize=5
Response 200
{
"data": [
{ "id": "abc123", "number": "ORD-001", "status": "completed", ... }
],
"meta": { "total": 42, "page": 1, "pageSize": 10, "totalPages": 5, "hasMore": true }
}POST/api/v1/data
Create, update, or delete records. The action field determines the operation.
Request Body
| Field | Type | Description |
|---|---|---|
tableName | string | Target table name |
action | string | create, update, or delete |
data | object | Record data. Include id for update/delete. |
Side Effects
Successful write operations trigger webhooks and cache invalidation by default. This is controlled by the
enableSideEffects setting on each API key. Disable it for bulk imports or migrations where you don't want webhook noise.Examples
All POST requests use the same URL with these headers:
POST https://www.linkbase.house/api/v1/data
Authorization: Bearer lbkey_GENERATED_KEY
Content-Type: application/jsonCreate a record
{
"tableName": "user",
"action": "create",
"data": { "name": "Jane Doe", "email": "jane@example.com" }
}Response 201
{
"data": { "id": "cuid123", "name": "Jane Doe", "email": "jane@example.com", ... }
}Update a record
{
"tableName": "user",
"action": "update",
"data": { "id": "YOUR_RECORD_ID", "accountBalance": 50.00 }
}Delete a record
{
"tableName": "user",
"action": "delete",
"data": { "id": "YOUR_RECORD_ID" }
}Response Format
Success (list)
{ "data": [...], "meta": { "total": 42, "page": 1, "pageSize": 20 } }Success (single)
{ "data": { ... } }Error
{ "error": { "code": "FORBIDDEN", "message": "No permission for table 'order' action 'delete'" } }