Skip to content

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

ParameterRequiredDefaultDescription
tableYes-Table name (e.g., 'product', 'order', 'user')
pageNo1Page number
pageSizeNo20Records per page (max 100)
searchNo''Search term
ofieldNo'updatedAt'Sort field
odirNo'desc'Sort direction: 'asc' or 'desc'
filtersNo-JSON-encoded filter array
categoryNo-Filter by category
tagsNo-Comma-separated tags

Examples

All GET requests require the Authorization header:

Authorization: Bearer lbkey_GENERATED_KEY

List 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_ID

Search 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

FieldTypeDescription
tableNamestringTarget table name
actionstringcreate, update, or delete
dataobjectRecord 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/json

Create 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'" } }