Skip to article
Browse documentation

Developers

REST API

Use scoped bearer credentials with FrostTable's versioned API.

Base URL and API reference

The hosted FrostTable REST API is served from https://frosttable.com, under /api/v1. For a self-hosted or local deployment, use that deployment's origin instead. The versioned API reference is the OpenAPI file.

Bearer credentials

Create a workspace-scoped API key in FrostTable and grant only the scopes and table access the integration needs. Send it in the Authorization: Bearer header on supported API routes; API keys cannot replace browser sessions for account or organization management. The generated key is shown once; store it securely and rotate or revoke it if it may have been exposed. Browser requests use a server-managed session cookie, and state-changing browser requests also require a CSRF token.

Example request

Replace the origin, workspace ID, and token placeholders with values from your deployment. This request lists tables only if the credential has an applicable read scope and workspace access.

curl --request GET \
  --url "https://YOUR_FROSTTABLE_HOST/api/v1/workspaces/WORKSPACE_ID/databases" \
  --header "Authorization: Bearer YOUR_SCOPED_API_KEY" \
  --header "Accept: application/json"

Request records

The versioned API exposes record-list operations under table routes. Response and pagination fields are defined by the API schema and may include a cursor for the next page. Use the same scoped bearer header and only query tables allowed by the key.

curl --get "https://YOUR_FROSTTABLE_HOST/api/v1/tables/TABLE_ID/records" \
  --header "Authorization: Bearer YOUR_SCOPED_API_KEY" \
  --header "Accept: application/json"

Published query endpoints

See SQL endpoints for the publishing and management walkthrough.

Save a read-only query in the SQL editor, then open SQL endpoints → New endpoint, select the saved query, check its full result and publish to serve its stored result as JSON at a stable URL. The query runs only when you publish or refresh; reading the endpoint does not run it. Editors, admins and owners can publish. A published result is limited to 10,000 rows and 10 MB by default and is never truncated.

Each endpoint has its own read keys. A key reads that endpoint only, and workspace API keys cannot read it. Send the key in the Authorization header, never in the URL. Anyone with a key can read every published row.

export FROSTTABLE_ENDPOINT_KEY='paste-your-endpoint-key-here'

curl -sS -H "Authorization: Bearer $FROSTTABLE_ENDPOINT_KEY" \
  "https://YOUR_FROSTTABLE_HOST/api/v1/published/ENDPOINT_ID?limit=100"

The response contains rows (JSON objects), refreshed_at (UTC time the producing query started), result_version, row_count, columns and next_cursor. limit is 1 to 1,000. Pass next_cursor as cursor to read the next page of the same version. After a refresh, a cursor keeps working for 15 minutes; after that, or after a republish, it returns 410 with code CURSOR_EXPIRED and you start again without it. A disabled endpoint returns 410 with ENDPOINT_DISABLED; a revoked or wrong key returns 401.

Refresh reruns the published SQL at the same URL. Configure automatic refresh on the SQL endpoints page; each scheduled refresh uses the same organization compute credits and quota as a manual query. If it fails, readers keep getting the previous result. Changing a saved query does not change an endpoint until you republish, and changes to output column names or types must be confirmed.

Rate limits, errors, and quotas

API keys have rate limiting and responses expose limit, remaining, and reset headers. Authorization failures return 401 or 403; rate-limited requests return 429 and may include Retry-After. Plan storage and compute limits are separate from API request rate limits. Exact configured limits can vary by deployment.

Consult the OpenAPI file and the troubleshooting guide. Do not paste credentials into support requests or public issue trackers.

Webhook event reference

For outgoing webhooks, FrostTable is the sender: it makes an HTTP POST to your public HTTPS URL. There are two ways to set one up, both limited to workspace owners and admins. They send different payloads and retry differently.

Automation rule webhooks

Created under Automations with the action Send a signed webhook. A rule can watch a field change and add conditions. The Automations and email guide covers setup, triggers, testing and history. See the example request.

  • record.created: a record is created.
  • record.field_changed: a watched field changes to any new value, a specific value or empty.
  • job.succeeded and job.failed: an import or connector dataset sync ends. A "finishes" rule sends whichever applies.

Record rules do not run for rows loaded by imports or connector syncs. The body has version ("1"), id, type, occurredAt, workspaceId, ruleId, test, source, data and link. For record events, source has tableId, recordId and operationId; data.fields holds only the watched, condition and included fields, and a field change adds data.change with field, before and after. For job events, source identifies the job (jobId, jobKind and, when known, table, connection and dataset), and data can hold outcome, label, dataset, row counts, errorSummary, startedAt and finishedAt. Fields with no value are omitted from job events.

Any 2xx response is success. Timeouts, connection errors and HTTP 408, 425, 429 and 5xx are retried with exponential backoff, by default up to 8 attempts; other responses are not retried automatically. Failed or cancelled deliveries can be retried from Delivery history.

Webhook subscriptions

Created under API, MCP & webhooks → Webhooks. In Add endpoint or Edit endpoint, use the Events checklist to choose event types and, optionally, tables. Subscriptions have no field conditions. Record events are sent only after the write is committed. Event types:

  • Records: record.created, record.updated, record.deleted
  • Tables and schema: table.created, table.updated, table.deleted, schema.changed
  • Imports: import.started, import.completed, import.failed
  • Collaboration: comment.created, comment.updated, comment.deleted, assignment.changed, notification.created

The body has id, type, occurredAt, workspaceId, tableId, recordId, operationId, commitState and data. The contents of data depend on the event. For record events it includes recordId, operationType, source and the written values in data.data, with earlier values in data.before when available. The top-level recordId is null when the record ID is not a UUID, so read data.recordId.

Any 2xx response is success. HTTP 410 ends the delivery; other failed responses, timeouts and connection errors are retried with exponential backoff, by default up to 8 attempts (configurable from 1 to 20). A destination FrostTable rejects as unsafe is not retried. Succeeded or dead deliveries can be redelivered from the delivery log.

Headers and signatures

Both kinds send X-FrostTable-Event, X-FrostTable-Event-Id, X-FrostTable-Delivery and X-FrostTable-Signature. The signature is t=<unix seconds>,v1=<hex>, where v1 is the HMAC-SHA256 of <t>.<raw body> using your signing secret. An automation rule's request can carry more than one v1 for 24 hours after its secret is rotated; accept any match. Reject old timestamps and deduplicate on X-FrostTable-Delivery, because delivery is at least once.

Table optimization

These endpoints need the schema:read scope to read and schema:write to change anything. Paths below …/optimization follow /api/v1/tables/{tableId}.

  • GET /optimization: status, layout, backup status, recommendations and the active job. GET /optimization/partitioning returns partitioning in detail.
  • POST /optimization/analyze with {"sample": false}. Sampling uses compute credits.
  • PUT /optimization/layout with partitionFields and/or sortFields. A partition field is {"column","transform","width"}.
  • POST /optimization/estimate, then POST /optimization/operations with {"operation","confirmedCredits"}. Without a sufficient confirmedCredits the response is 409 CONFIRMATION_REQUIRED with the estimate.
  • POST /optimization/recommendations/{id}/apply and /dismiss; GET /optimization/jobs; POST /optimization/jobs/{jobId}/cancel; PUT /optimization/policy.
  • GET /api/v1/workspaces/{workspaceId}/optimization, with PUT …/optimization/policy and POST …/optimization/recommendations/apply.

Common refusals: PLAN_UPGRADE_REQUIRED, BACKUP_REQUIRED, CONFIRMATION_REQUIRED, BUDGET_EXCEEDED, INSUFFICIENT_COMPUTE_CREDITS, STORAGE_QUOTA_EXCEEDED, TABLE_BUSY. The older PUT /api/v1/tables/{tableId}/partitioning endpoint now applies the same plan and nightly backup rules when it adds or changes partitioning.