Skip to main content

REST API

Erdo’s REST API lets you integrate your data platform into any application. Query datasets, write data, manage conversations, create automations, and more — all via standard HTTP requests. Base URL: https://api.erdo.ai OpenAPI spec: the API Reference section in the sidebar is generated from the full machine-readable OpenAPI spec — every /v1 endpoint with its request and response schemas. Point a code generator or a coding agent at the spec to build a typed client. Authentication: All requests require a Bearer token in the Authorization header.

Getting an API Key

Click your profile in the bottom-left corner of Erdo and go to API Keys. Create a new key and copy the token — it’s shown only once. An API key is an account-level credential: it acts as you, and works in any organization you’re a member of. The organization stored on the key is only its default org — the one used when a request doesn’t name one. It is not a hard scope. To act in a specific organization, send the X-Organization-ID header with the org’s id or slug. The backend validates on every request that you’re a member of that org, so a key can never reach an org you don’t belong to:
Manage keys from the CLI too: erdo token create --name ci, erdo token list, erdo token revoke <id>. Set a command’s org with erdo --org acme <command> or change the active default with erdo org use acme.

Scoped Tokens

For building apps where your end-users interact with Erdo, use scoped tokens to restrict access to specific datasets and threads.

API Surface

API keys and scoped tokens work on the documented API surface: every /v1 endpoint, the /mcp endpoint, and the endpoints used by the published SDKs (scoped-token minting, thread messaging, agent invocation, dataset reads). Requests to any other path return 403 permission_denied — other routes are internal to the Erdo app and not a stable contract to build against. If you need a capability that isn’t on /v1 yet, tell us rather than coupling to an internal route.

Datasets

List Datasets

Returns all datasets in your organization.

Create Dataset

Create a new empty dataset. Uses your organization’s default storage backend. After creation, use Write Rows to add data.

Upload a File as a Dataset

Upload a file and create a dataset from it in one call. The file’s schema is extracted before the response returns, so the dataset is immediately queryable. Prefer this over Create Dataset + Write Rows when your data already exists as a file.
ready reports whether schema extraction succeeded; when false, the file stored but is not yet queryable (a warning explains why).

Delete Dataset

Permanently delete a dataset and all its data. Requires admin permission on the dataset.

Search Datasets

Search datasets by name.

Get Dataset Schema

Get detailed schema for a dataset including column names, types, statistics, and sample data. Call this before writing data to understand the column structure.

Query Dataset (SQL)

Run a SQL query against a dataset. The SQL dialect depends on the storage backend (PostgreSQL, ClickHouse, or DuckDB for file datasets).
For file datasets (CSV/Excel), the table name is always data. For database datasets, use the actual table name from the schema.

Query Dataset (Natural Language)

Query a dataset using natural language. Erdo generates and executes the correct SQL for you.

Fetch Dataset Contents

Fetch raw contents of a dataset without writing SQL.

Get Dataset Context

Get detailed context for multiple datasets at once — schemas, column types, statistics, and sample data.

Writing Data

Write data into your datasets from any application. Rows are written to whatever storage backend the dataset uses (Postgres, ClickHouse, or CSV file storage).

Write Rows

Write or upsert rows to a dataset. Append rows (no key column):
Upsert rows (with key column):
Storage-specific behavior:

Delete Rows

Delete rows from a dataset. Works for both file (CSV) and database-backed datasets.

Update Schema

Update a dataset’s schema: add, remove, rename columns, or change column types. Operations are applied atomically — if any fails, none are applied. Supported for CSV file datasets only. After changes, column analysis is automatically refreshed. Each operation object:

Ask Questions

Ask a Data Question

Ask a natural language question about your data. Invokes an AI agent that analyzes datasets, writes code, and returns a text answer.
Can take 30 seconds to 2 minutes for complex questions.

Integrations

Connect third-party apps and data sources so Erdo can use them — in agent runs, data questions, and datasets. Credential-based integrations (databases, API keys, service accounts) connect in a single call. OAuth-based integrations return a connect_url for the user to authorize in a browser; polling the status endpoint completes the connection.

List Integrations

Returns the integrations connected in your organization.

Search Connectable Apps

Search apps that can be connected: native integrations (databases, warehouses, APIs) and thousands of SaaS apps. The auth_types field tells you how connection works — database, api_key, service_account, and basic connect directly with credentials, while OAuth-based apps go through a browser authorization step.

Connect an Integration

Connecting a database — created, verified, and activated in one call:
Connecting an OAuth app — the response carries a connect_url to open in a browser. Pass return_url when you embed the flow in your own product so the user’s browser lands back on your page (not Erdo’s) after authorizing:
If verification fails for a credential-based app (wrong password, unreachable host), the call returns an error and nothing is left behind — fix the credentials and retry.

Check Connection Status

Reports whether an app is connected. For browser-authorized apps this also completes any connection the user finished since the connect call — poll it after the user opens the connect_url.

Discover Tables

Discover what a connected database integration exposes. :integration is the app key (e.g. postgres) or, when several instances of the same app are connected, the integration id. Without schema_name it lists the selectable schemas (all SQL databases and warehouses). With schema_name it lists that schema’s tables with columns, types, and row estimates — supported for SQL databases (Postgres, MySQL, and compatible); warehouses (BigQuery, Snowflake, ClickHouse) list schemas but not per-table columns here.

Create a Dataset from an Integration

Create a dataset backed by a connected database integration, making its data queryable in Erdo without copying it — queries run live against the source. Pick schemas with Discover Tables first; integrations that expose schemas require a selection (some allow only one). Apps that expose no schemas and no queryable data — Slack, Stripe, GitHub and the like — are rejected. Table and column discovery runs in the background after creation and the dataset schema appears within seconds, after which Query Dataset works against the returned slug.

Threads & Conversations

List Threads

Get Thread Messages

Get all messages from a conversation thread.

Create Thread

Send Message

Send a message to a thread and get an AI-generated response.
Can take 30 seconds to 2 minutes.

Memories & Skills

Memories store reusable knowledge and instructions that Erdo’s AI uses in future conversations.

Create Memory

Search Memories

List Memories

Delete Memory

Soft delete — can be recovered.

Artifacts

Artifacts are AI-generated outputs from agent runs — insights, metrics, alerts, and tables.

List Artifacts

Get Artifact


Screenshots

Capture a public web page to a PNG and get a signed, time-limited download URL. Only works on URLs reachable without login (a marketing site, a published Erdo page at https://pages.erdo.ai/p/{id}, etc.).
Response: signed_url, bucket_key, media_type, width, height, expires_at.

Pages

Deploy authenticated, data-wired HTML apps to Erdo over HTTP — the same surface as the erdo_deploy_page MCP tools, for CI and scripts. See the Build Apps on Erdo guide for the page runtime, the window.erdo client, and the read/write model.

Deploy Page

Returns the page id, editor url, optional public_url, and structured validation results. A deploy with validation errors still saves — fix them and iterate.

Update Page

Provided fields are merged — send only js to fix a script without resending html/css. Omit any field to keep its current value. dataset_slugs replaces the current grants; public toggles visibility. Returns fresh validation results.

Validate Page

Dry-run validation without deploying: HTML structure, JS/JSX syntax and runtime smoke checks, window.erdo usage, and dataset-slug references. Accepts html (required), css, js, runtime, and dataset_slugs.

Automations (Heartbeats)

Heartbeats are recurring agents that analyze your data on a schedule.

List Heartbeats

Create Heartbeat

Run Heartbeat

Trigger a heartbeat immediately, outside its schedule.

List Heartbeat Executions


Rendering

Render Chart

Render a data visualization. Supports bar, line, pie, histogram, and scatter charts. See MCP docs for full schema.

Render Table

Render a data table. See MCP docs for full schema.