Complete REST API for Webenta Index. All endpoints require HTTPS.
https://index.webenta.sk/api/v1/api/v1/healthReturns a simple ok response. Use this to verify the API is reachable before making authenticated calls.
curl https://index.webenta.sk/api/v1/health{ "ok": true }/api/v1/auth/otp/requestSends a one-time password to the given email. Rate-limited to 10 requests per hour per IP and 3 per 15 minutes per email.
email string required Email address to send the OTP to.
curl https://index.webenta.sk/api/v1/auth/otp/request \
-X POST \
-H "Content-Type: application/json" \
-d '{"email":"you@example.com"}'{ "ok": true }/api/v1/auth/otp/verifyVerifies an OTP code. On success, sets a session cookie and returns ok.
email string required Email the OTP was sent to.
code string required The 6-digit OTP code.
curl https://index.webenta.sk/api/v1/auth/otp/verify \
-X POST \
-H "Content-Type: application/json" \
-d '{"email":"you@example.com","code":"123456"}'{ "ok": true }/api/v1/auth/logoutInvalidates the current session and clears the session cookie.
Authorization: Bearer YOUR_API_KEYcurl https://index.webenta.sk/api/v1/auth/logout \
-X POST \
-H "Authorization: Bearer YOUR_API_KEY"{ "ok": true }/api/v1/auth/google/startInitiates Google OAuth flow. Redirects the browser to Google's authorization page. Use from a browser, not from server-side code.
# Open in a browser:
# https://index.webenta.sk/api/v1/auth/google/start# 302 Redirect → https://accounts.google.com/o/oauth2/auth?.../api/v1/auth/google/callbackCompletes Google OAuth. Called automatically by Google after the user authorizes. On success, creates a session and redirects to /dashboard.
code string required Authorization code from Google.
state string required CSRF state token set during the start step.
# Handled automatically by the Google OAuth redirect# 302 Redirect → /dashboard/api/v1/meReturns the authenticated user's profile, active plan details, and current storage usage.
Authorization: Bearer YOUR_API_KEYcurl https://index.webenta.sk/api/v1/me \
-H "Authorization: Bearer YOUR_API_KEY"{
"id": "usr_01j9xyz",
"email": "you@example.com",
"name": "Ada Lovelace",
"planId": "pro",
"plan": {
"id": "pro",
"name": "Pro",
"maxProjects": 10,
"maxStorageBytes": "10737418240",
"maxApiKeysPerProject": 20
},
"planExpiresAt": null,
"usage": {
"totalBytes": "2148731",
"maxBytes": "10737418240"
}
}/api/v1/whoami-keyReturns the scope and project binding of the API key used in the request. Works only with an API key — session cookies are rejected.
Authorization: Bearer YOUR_API_KEYcurl https://index.webenta.sk/api/v1/whoami-key \
-H "Authorization: Bearer YOUR_API_KEY"{
"scope": "project",
"projectId": "proj_01j9abc",
"userId": "usr_01j9xyz"
}/api/v1/usageReturns API call counts broken down by success/failure over a time window.
Authorization: Bearer YOUR_API_KEYrange string optional default: 24hTime window.
60m24h7d30dprojectId string optional Filter to a specific project.
curl "https://index.webenta.sk/api/v1/usage?range=24h" \
-H "Authorization: Bearer YOUR_API_KEY"{
"buckets": [
{ "ts": "2026-06-25T00:00:00Z", "success": 142, "fail": 3 },
{ "ts": "2026-06-25T01:00:00Z", "success": 87, "fail": 1 }
]
}/api/v1/me/redeem-codeRedeems a promotional code that upgrades the account plan. Requires a web session.
code string required The promotion code to redeem.
curl https://index.webenta.sk/api/v1/me/redeem-code \
-X POST \
-H "Content-Type: application/json" \
-d '{"code":"PROMO-XXXX"}'{
"ok": true,
"planId": "pro",
"planExpiresAt": "2026-09-25T00:00:00Z"
}/api/v1/plansReturns all available subscription plans with their resource limits.
curl https://index.webenta.sk/api/v1/plans[
{
"id": "free",
"name": "Free",
"priceEurCents": 0,
"maxProjects": 1,
"maxStorageBytes": "1073741824",
"maxApiKeysPerProject": 3
},
{
"id": "pro",
"name": "Pro",
"priceEurCents": 900,
"maxProjects": 10,
"maxStorageBytes": "10737418240",
"maxApiKeysPerProject": 20
}
]/api/v1/projectsReturns all non-archived projects owned by the authenticated user.
Authorization: Bearer YOUR_API_KEYcurl https://index.webenta.sk/api/v1/projects \
-H "Authorization: Bearer YOUR_API_KEY"[
{
"id": "proj_01j9abc",
"name": "Fitness",
"slug": "fitness",
"createdAt": "2026-06-01T10:00:00Z"
}
]/api/v1/projectsCreates a new project with an isolated Postgres database. Requires a web session — project-scoped API keys cannot create projects.
name string required Display name for the project (1–64 characters).
curl https://index.webenta.sk/api/v1/projects \
-X POST \
-H "Content-Type: application/json" \
-d '{"name":"Fitness"}'{
"id": "proj_01j9abc",
"name": "Fitness",
"slug": "fitness"
}/api/v1/projects/{id}Returns project metadata including the internal database name and current storage usage in bytes.
Authorization: Bearer YOUR_API_KEYid string requiredProject ID.
curl https://index.webenta.sk/api/v1/projects/proj_01j9abc \
-H "Authorization: Bearer YOUR_API_KEY"{
"id": "proj_01j9abc",
"name": "Fitness",
"slug": "fitness",
"dbName": "idx_fitness_01j9abc",
"createdAt": "2026-06-01T10:00:00Z",
"bytes": "2048731"
}/api/v1/projects/{id}Permanently deletes a project and its Postgres database. This action cannot be undone. Requires a web session — API keys cannot delete projects.
id string requiredProject ID.
curl https://index.webenta.sk/api/v1/projects/proj_01j9abc \
-X DELETE{ "ok": true }/api/v1/projects/{id}/infoReturns extended project info including custom instructions, plan limits, and storage usage. The MCP server calls this endpoint on connect.
Authorization: Bearer YOUR_API_KEYid string requiredProject ID.
curl https://index.webenta.sk/api/v1/projects/proj_01j9abc/info \
-H "Authorization: Bearer YOUR_API_KEY"{
"id": "proj_01j9abc",
"name": "Fitness",
"instructions": "Track workouts using sets, reps and weight.",
"bytes": "2048731",
"plan": {
"id": "pro",
"name": "Pro",
"maxStorageBytes": "10737418240",
"maxRowsPerInsert": 500
},
"usage": {
"totalBytes": "2048731",
"maxBytes": "10737418240"
}
}/api/v1/projects/{id}/tablesReturns all tables in the project with their full column schemas.
Authorization: Bearer YOUR_API_KEYid string requiredProject ID.
curl https://index.webenta.sk/api/v1/projects/proj_01j9abc/tables \
-H "Authorization: Bearer YOUR_API_KEY"[
{
"name": "workouts",
"columns": [
{ "name": "id", "type": "number", "nullable": false },
{ "name": "exercise", "type": "text", "nullable": false },
{ "name": "sets", "type": "number", "nullable": true },
{ "name": "reps", "type": "number", "nullable": true },
{ "name": "weight_kg", "type": "number", "nullable": true },
{ "name": "logged_at", "type": "date", "nullable": false }
]
}
]/api/v1/projects/{id}/tablesCreates a new table with the given schema. An auto-increment `id` column is always added automatically — do not include it in columns.
Authorization: Bearer YOUR_API_KEYid string requiredProject ID.
name string required Table name. snake_case recommended.
columns ColumnDef[] required Array of column definitions. Each has: `name` (string), `type` (text|number|boolean|date|enum|json), `nullable` (boolean, default true), `enumValues` (string[], for enum type only).
curl https://index.webenta.sk/api/v1/projects/proj_01j9abc/tables \
-X POST \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "workouts",
"columns": [
{ "name": "exercise", "type": "text", "nullable": false },
{ "name": "sets", "type": "number", "nullable": true },
{ "name": "reps", "type": "number", "nullable": true },
{ "name": "logged_at", "type": "date", "nullable": false }
]
}'{ "ok": true, "name": "workouts" }/api/v1/projects/{id}/tables/{table}Permanently drops a table and all its rows. This action cannot be undone.
Authorization: Bearer YOUR_API_KEYid string requiredProject ID.
table string requiredTable name.
curl https://index.webenta.sk/api/v1/projects/proj_01j9abc/tables/workouts \
-X DELETE \
-H "Authorization: Bearer YOUR_API_KEY"{ "ok": true }/api/v1/projects/{id}/tables/{table}/columnsAdds a new column to an existing table. Existing rows will have NULL for the new column regardless of the nullable setting.
Authorization: Bearer YOUR_API_KEYid string requiredProject ID.
table string requiredTable name.
name string required Column name.
type string required Column type.
textnumberbooleandateenumjsonnullable boolean optional default: trueWhether the column allows NULL.
enumValues string[] optional Allowed values — required when type is "enum".
curl https://index.webenta.sk/api/v1/projects/proj_01j9abc/tables/workouts/columns \
-X POST \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"weight_kg","type":"number","nullable":true}'{ "ok": true }/api/v1/projects/{id}/tables/{table}/columns/{col}Renames a column. The rename is propagated to dashboard widget configs that reference this column.
Authorization: Bearer YOUR_API_KEYid string requiredProject ID.
table string requiredTable name.
col string requiredCurrent column name.
rename string required New column name.
curl https://index.webenta.sk/api/v1/projects/proj_01j9abc/tables/workouts/columns/weight_kg \
-X PATCH \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"rename":"weight"}'{ "ok": true }/api/v1/projects/{id}/tables/{table}/columns/{col}Drops a column from a table. All data in that column is permanently deleted.
Authorization: Bearer YOUR_API_KEYid string requiredProject ID.
table string requiredTable name.
col string requiredColumn name to drop.
curl https://index.webenta.sk/api/v1/projects/proj_01j9abc/tables/workouts/columns/weight_kg \
-X DELETE \
-H "Authorization: Bearer YOUR_API_KEY"{ "ok": true }/api/v1/projects/{id}/tables/{table}/rowsReturns rows from a table with optional filtering, ordering, and pagination.
Authorization: Bearer YOUR_API_KEYid string requiredProject ID.
table string requiredTable name.
filter JSON optional URL-encoded JSON filter. Supported operators per column: `eq`, `neq`, `gt`, `gte`, `lt`, `lte`, `like`, `in`. Example: `{"exercise":{"eq":"squat"}}`.
orderBy JSON optional URL-encoded JSON sort. Example: `{"logged_at":"desc"}`.
limit number optional default: 100Max rows to return.
offset number optional default: 0Rows to skip (for pagination).
curl "https://index.webenta.sk/api/v1/projects/proj_01j9abc/tables/workouts/rows?limit=10&orderBy=%7B%22logged_at%22%3A%22desc%22%7D" \
-H "Authorization: Bearer YOUR_API_KEY"{
"rows": [
{
"id": 42,
"exercise": "squat",
"sets": 4,
"reps": 8,
"weight_kg": 100,
"logged_at": "2026-06-25T07:30:00Z"
}
],
"total": 142
}/api/v1/projects/{id}/tables/{table}/rowsInserts one or more rows into a table. Pass either a `rows` array for batch insert, or a single `values` object for one row.
Authorization: Bearer YOUR_API_KEYid string requiredProject ID.
table string requiredTable name.
rows object[] optional Array of row objects (batch insert). Use either `rows` or `values`, not both.
values object optional Single row object. Use either `rows` or `values`, not both.
curl https://index.webenta.sk/api/v1/projects/proj_01j9abc/tables/workouts/rows \
-X POST \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"rows": [
{ "exercise": "squat", "sets": 4, "reps": 8, "weight_kg": 100, "logged_at": "2026-06-25T07:30:00Z" },
{ "exercise": "bench", "sets": 3, "reps": 10, "weight_kg": 80, "logged_at": "2026-06-25T07:45:00Z" }
]
}'{
"rows": [
{ "id": 42, "exercise": "squat", "sets": 4, "reps": 8, "weight_kg": 100, "logged_at": "2026-06-25T07:30:00Z" },
{ "id": 43, "exercise": "bench", "sets": 3, "reps": 10, "weight_kg": 80, "logged_at": "2026-06-25T07:45:00Z" }
]
}/api/v1/projects/{id}/tables/{table}/rows/{rowId}Partially updates a row by ID. Only the fields present in `values` are changed; all other fields remain as-is.
Authorization: Bearer YOUR_API_KEYid string requiredProject ID.
table string requiredTable name.
rowId number requiredRow ID (the auto-increment `id` field).
values object required Key-value pairs of fields to update.
curl https://index.webenta.sk/api/v1/projects/proj_01j9abc/tables/workouts/rows/42 \
-X PATCH \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"values":{"weight_kg":105}}'{
"id": 42,
"exercise": "squat",
"sets": 4,
"reps": 8,
"weight_kg": 105,
"logged_at": "2026-06-25T07:30:00Z"
}/api/v1/projects/{id}/tables/{table}/rows/{rowId}Permanently deletes a single row by its ID.
Authorization: Bearer YOUR_API_KEYid string requiredProject ID.
table string requiredTable name.
rowId number requiredRow ID.
curl https://index.webenta.sk/api/v1/projects/proj_01j9abc/tables/workouts/rows/42 \
-X DELETE \
-H "Authorization: Bearer YOUR_API_KEY"{ "ok": true }/api/v1/projects/{id}/query/aggregateRuns a GROUP BY aggregate query — count, sum, average, min, or max — with optional grouping and filtering. This is what dashboard widgets use under the hood.
Authorization: Bearer YOUR_API_KEYid string requiredProject ID.
table string required Table to query.
metrics MetricDef[] required Aggregate metrics. Each has `type` (count|sum|avg|min|max) and `column` (the column to aggregate).
groupBy string[] optional Columns to group results by.
filter object optional Filter object (same format as the row list filter query param).
curl https://index.webenta.sk/api/v1/projects/proj_01j9abc/query/aggregate \
-X POST \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"table": "workouts",
"metrics": [
{ "type": "sum", "column": "weight_kg" },
{ "type": "count", "column": "id" }
],
"groupBy": ["exercise"]
}'{
"rows": [
{ "exercise": "squat", "sum_weight_kg": 4200, "count_id": 42 },
{ "exercise": "bench", "sum_weight_kg": 2400, "count_id": 30 }
]
}/api/v1/projects/{id}/eventsOpens a Server-Sent Events stream that delivers real-time notifications whenever data in the project changes — rows inserted, tables created, etc. The dashboard uses this to refresh without polling.
Authorization: Bearer YOUR_API_KEYid string requiredProject ID.
curl https://index.webenta.sk/api/v1/projects/proj_01j9abc/events \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Accept: text/event-stream"data: {"kind":"hello","ts":1750844400000}
data: {"kind":"rows_inserted","table":"workouts","count":2}
data: {"kind":"heartbeat","ts":1750844425000}
data: {"kind":"table_created","table":"exercises"}/api/v1/projects/{id}/dashboardReturns the saved dashboard layout and variables for a project. Auto-creates an empty dashboard if none has been saved yet.
Authorization: Bearer YOUR_API_KEYid string requiredProject ID.
curl https://index.webenta.sk/api/v1/projects/proj_01j9abc/dashboard \
-H "Authorization: Bearer YOUR_API_KEY"{
"layout": [
{
"id": "widget_01",
"type": "bar",
"title": "Sets per exercise",
"config": { "table": "workouts", "x": "exercise", "y": "sets" },
"x": 0, "y": 0, "w": 6, "h": 4
}
],
"variables": [],
"updatedAt": "2026-06-25T08:00:00Z"
}/api/v1/projects/{id}/dashboardSaves the dashboard layout and optional variables. The entire layout is replaced on each save.
Authorization: Bearer YOUR_API_KEYid string requiredProject ID.
layout Widget[] required Array of widget definitions. Each widget has type, title, config, and grid position (x, y, w, h).
variables Variable[] optional Dashboard-level variable definitions for filtering widgets.
curl https://index.webenta.sk/api/v1/projects/proj_01j9abc/dashboard \
-X PUT \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"layout":[...],"variables":[]}'{
"layout": [...],
"variables": [],
"updatedAt": "2026-06-25T08:05:00Z"
}/api/v1/projects/{id}/instructionsReturns the custom agent instructions for a project. These are injected into the MCP system prompt on every connection.
Authorization: Bearer YOUR_API_KEYid string requiredProject ID.
curl https://index.webenta.sk/api/v1/projects/proj_01j9abc/instructions \
-H "Authorization: Bearer YOUR_API_KEY"{
"instructions": "Track workouts using sets, reps and weight. Always log the date."
}/api/v1/projects/{id}/instructionsReplaces the custom agent instructions for a project (max 64 KB). Pass an empty string to clear. Requires a web session.
id string requiredProject ID.
instructions string optional New instructions text. Empty string clears existing instructions.
curl https://index.webenta.sk/api/v1/projects/proj_01j9abc/instructions \
-X PUT \
-H "Content-Type: application/json" \
-d '{"instructions":"Track workouts using sets, reps and weight."}'{
"instructions": "Track workouts using sets, reps and weight."
}/api/v1/apikeysReturns all API keys owned by the authenticated user (both global and project-scoped). Requires a web session — API keys cannot list other keys.
curl https://index.webenta.sk/api/v1/apikeys[
{
"id": "key_01j9abc",
"name": "Claude.ai",
"projectId": null,
"scope": "global",
"createdAt": "2026-06-01T10:00:00Z"
},
{
"id": "key_01j9def",
"name": "Fitness agent",
"projectId": "proj_01j9abc",
"scope": "project",
"createdAt": "2026-06-02T10:00:00Z"
}
]/api/v1/apikeysCreates a new global API key that works across all projects. The key value is only returned once — store it immediately.
name string required Human-readable label for this key.
curl https://index.webenta.sk/api/v1/apikeys \
-X POST \
-H "Content-Type: application/json" \
-d '{"name":"Claude.ai"}'{
"id": "key_01j9abc",
"name": "Claude.ai",
"projectId": null,
"scope": "global",
"key": "wi_gbl_xxxxxxxxxxxxxxxxxxxx",
"createdAt": "2026-06-25T10:00:00Z"
}/api/v1/apikeys/{keyId}Permanently revokes an API key. Any agent using this key will immediately lose access.
keyId string requiredKey ID.
curl https://index.webenta.sk/api/v1/apikeys/key_01j9abc \
-X DELETE{ "ok": true }/api/v1/projects/{id}/apikeysReturns all API keys scoped to a specific project.
id string requiredProject ID.
curl https://index.webenta.sk/api/v1/projects/proj_01j9abc/apikeys[
{
"id": "key_01j9def",
"name": "Fitness agent",
"projectId": "proj_01j9abc",
"scope": "project",
"createdAt": "2026-06-02T10:00:00Z"
}
]/api/v1/projects/{id}/apikeysCreates a new API key scoped to a single project. The key value is only returned once.
id string requiredProject ID.
name string required Human-readable label for this key.
curl https://index.webenta.sk/api/v1/projects/proj_01j9abc/apikeys \
-X POST \
-H "Content-Type: application/json" \
-d '{"name":"Fitness agent"}'{
"id": "key_01j9def",
"name": "Fitness agent",
"projectId": "proj_01j9abc",
"scope": "project",
"key": "wi_prj_xxxxxxxxxxxxxxxxxxxx",
"createdAt": "2026-06-25T10:00:00Z"
}/api/v1/projects/{id}/apikeys/{keyId}Permanently revokes a project-scoped API key.
id string requiredProject ID.
keyId string requiredKey ID.
curl https://index.webenta.sk/api/v1/projects/proj_01j9abc/apikeys/key_01j9def \
-X DELETE{ "ok": true }/api/v1/projects/{id}/transferExports all tables as a ZIP archive containing one JSON file per table (up to 50 000 rows each).
Authorization: Bearer YOUR_API_KEYid string requiredProject ID.
curl https://index.webenta.sk/api/v1/projects/proj_01j9abc/transfer \
-H "Authorization: Bearer YOUR_API_KEY" \
-o project-export.zip# Binary ZIP download
# Contains: workouts.json, exercises.json, ...
# workouts.json:
[{"id":1,"exercise":"squat","sets":4,...}]/api/v1/projects/{id}/transferBulk-imports data into one or more tables with wipe or append mode and configurable conflict handling.
Authorization: Bearer YOUR_API_KEYid string requiredProject ID.
mode string required Import mode: `wipe` truncates the table first; `append` keeps existing rows.
wipeappendonConflict string required ID conflict strategy: `replace` overwrites, `skip` ignores, `newid` assigns a new ID.
replaceskipnewidtables TableImport[] required Array of table import specs. Each has `name`, `rows`, `columns`, and optionally `createTable` / `createTableColumns` to create the table if it does not exist.
curl https://index.webenta.sk/api/v1/projects/proj_01j9abc/transfer \
-X POST \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"mode": "append",
"onConflict": "skip",
"tables": [
{
"name": "workouts",
"rows": [{ "exercise": "squat", "sets": 4 }],
"columns": ["exercise", "sets"]
}
]
}'{
"tables": [
{ "name": "workouts", "imported": 1, "created": false }
]
}/api/v1/projects/{id}/tables/{table}/transferExports a single table as a JSON or CSV file (up to 50 000 rows).
Authorization: Bearer YOUR_API_KEYid string requiredProject ID.
table string requiredTable name.
format string optional default: jsonExport format.
jsoncsvcurl "https://index.webenta.sk/api/v1/projects/proj_01j9abc/tables/workouts/transfer?format=csv" \
-H "Authorization: Bearer YOUR_API_KEY" \
-o workouts.csv# JSON (default):
[{"id":1,"exercise":"squat","sets":4,"reps":8}]
# CSV (format=csv):
id,exercise,sets,reps,weight_kg,logged_at
1,squat,4,8,100,2026-06-25T07:30:00Z/api/v1/projects/{id}/tables/{table}/transferImports rows into a specific table with wipe or append mode and conflict handling.
Authorization: Bearer YOUR_API_KEYid string requiredProject ID.
table string requiredTable name.
rows object[] required Rows to import.
columns string[] required Column names present in each row object.
mode string required Import mode.
wipeappendonConflict string required Conflict strategy.
replaceskipnewidcurl https://index.webenta.sk/api/v1/projects/proj_01j9abc/tables/workouts/transfer \
-X POST \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"rows": [{ "exercise": "squat", "sets": 4 }],
"columns": ["exercise", "sets"],
"mode": "append",
"onConflict": "skip"
}'{ "imported": 1 }/api/v1/billing/checkoutCreates a Stripe checkout session for a paid plan upgrade. Returns a URL to redirect the user to.
planSlug string required The plan ID to subscribe to (e.g. "pro").
curl https://index.webenta.sk/api/v1/billing/checkout \
-X POST \
-H "Content-Type: application/json" \
-d '{"planSlug":"pro"}'{ "url": "https://checkout.stripe.com/pay/cs_..." }/api/v1/billing/portalCreates a Stripe billing portal session. Returns a URL for the user to manage their subscription, invoices, and payment method.
curl https://index.webenta.sk/api/v1/billing/portal \
-X POST{ "url": "https://billing.stripe.com/p/..." }