# Anyrow docs > Anyrow turns documents into rows of a table you define. These docs cover its guides and REST API. --- Source: https://anyrow.ai/docs # Introduction Anyrow reads documents (PDFs, images, spreadsheets, Word and PowerPoint files, plain text) and writes what they hold into tables you define. The REST API does what the app does: create tables, extract files into them, read and edit rows, export, and get told by webhook when an extraction finishes. > [!TIP] > New here? The [Quickstart](/docs/quickstart) creates a table and fills it from a file. ## How it fits together A **project** holds **tables**. A table's **columns** say what to extract and with what type. Each extraction is a **batch**: one or more files in, **rows** out, each row linked to the file it came from. You call the API with a project's API key. | Resource | What it is | | :-- | :-- | | [Tables](/docs/api/tables) | A schema: named, typed columns and how strictly to fill them | | [Columns](/docs/api/columns) | One field of a table: its name, type and extraction instruction | | [Rows](/docs/api/rows) | The extracted records, which you can also create and edit | | [Extract](/docs/api/extract) | Send a file or text; get rows back as JSON or a stream of events | | [Batches](/docs/api/batches) | One extraction run, its status and its downloads | | [Webhooks](/docs/api/webhooks) | Where Anyrow posts events when a batch finishes | ## Base URL ```text https://api.anyrow.ai ``` Every path starts with its version, `/v1`. The same API also answers at `https://anyrow.ai/api`. ## Next steps - [Quickstart](/docs/quickstart): Create a table and extract a file into it. - [Authentication](/docs/authentication): API keys, where they go, and what they can reach. - [Webhooks](/docs/webhooks): Get an event when a batch finishes, and verify it came from Anyrow. - [API reference](/docs/api): Every endpoint, its parameters, and samples. --- Source: https://anyrow.ai/docs/quickstart # Quickstart You need a project and one of its API keys. In the app, open the project, then **API keys**, and create a key. Keep it in an environment variable, with the project's id: ```bash export ANYROW_API_KEY="ak_..." export PROJECT_ID="proj_..." ``` ### 1. Create a table A table is the shape of what you want back: each column has an `id`, a `name` and a `type`. ```bash title="cURL" curl -X POST "https://api.anyrow.ai/v1/projects/$PROJECT_ID/tables" \ -H "Authorization: ApiKey $ANYROW_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "Invoices", "columns_json": [ { "id": "vendor", "name": "Vendor" }, { "id": "total", "name": "Total", "type": "currency" }, { "id": "due", "name": "Due date", "type": "date" } ] }' ``` ```ts title="Node.js" import { AnyrowSDK } from "@anyrow/sdk" const anyrow = new AnyrowSDK({ baseURL: "https://api.anyrow.ai", headers: { Authorization: `ApiKey ${process.env.ANYROW_API_KEY}` }, }) const { data: table, error } = await anyrow.table.create({ params: { project_id: process.env.PROJECT_ID! }, json: { name: "Invoices", columns_json: [ { id: "vendor", name: "Vendor" }, { id: "total", name: "Total", type: "currency" }, { id: "due", name: "Due date", type: "date" }, ], }, }) ``` ```python title="Python" import os, requests table = requests.post( f"https://api.anyrow.ai/v1/projects/{os.environ['PROJECT_ID']}/tables", headers={"Authorization": f"ApiKey {os.environ['ANYROW_API_KEY']}"}, json={ "name": "Invoices", "columns_json": [ {"id": "vendor", "name": "Vendor"}, {"id": "total", "name": "Total", "type": "currency"}, {"id": "due", "name": "Due date", "type": "date"}, ], }, ).json() ``` The response is the table, with its `id`. ### 2. Extract a file into it Send the file as multipart form data. The response describes the finished batch: its `batch_id`, `status`, how many rows it wrote (`total_rows`) and the extracted `result`. ```bash title="cURL" curl -X POST "https://api.anyrow.ai/v1/projects/$PROJECT_ID/tables/$TABLE_ID/extract" \ -H "Authorization: ApiKey $ANYROW_API_KEY" \ -F "file=@./invoice.pdf" ``` ```ts title="Node.js" import { openAsBlob } from "node:fs" const { data: batch } = await anyrow.extract.table.once({ params: { project_id: process.env.PROJECT_ID!, table_id: table.id }, form: { file: await openAsBlob("./invoice.pdf") }, }) ``` ```python title="Python" batch = requests.post( f"https://api.anyrow.ai/v1/projects/{os.environ['PROJECT_ID']}/tables/{table['id']}/extract", headers={"Authorization": f"ApiKey {os.environ['ANYROW_API_KEY']}"}, files={"file": open("./invoice.pdf", "rb")}, ).json() ``` > [!NOTE] > A long document takes a while. The streaming endpoint > ([`extract-stream`](/docs/api/extract/table-stream)) sends progress and rows as server-sent > events instead of one response at the end. ### 3. Read the rows Rows come back 20 per page by default; follow `nextCursor` for more (see [Pagination](/docs/pagination)). ```bash title="cURL" curl "https://api.anyrow.ai/v1/projects/$PROJECT_ID/tables/$TABLE_ID/rows?limit=50" \ -H "Authorization: ApiKey $ANYROW_API_KEY" ``` ```ts title="Node.js" const { data: page } = await anyrow.row.list({ params: { project_id: process.env.PROJECT_ID!, table_id: table.id }, search: { limit: 50 }, }) console.log(page.rows, page.hasMore, page.nextCursor) ``` ```python title="Python" page = requests.get( f"https://api.anyrow.ai/v1/projects/{os.environ['PROJECT_ID']}/tables/{table['id']}/rows", headers={"Authorization": f"ApiKey {os.environ['ANYROW_API_KEY']}"}, params={"limit": 50}, ).json() ``` ## What's next - [Get told when a batch finishes](/docs/webhooks): Webhooks post an event when an extraction completes or fails. - [Rows in the API reference](/docs/api/rows): Filter, aggregate, edit and bulk-write rows. --- Source: https://anyrow.ai/docs/authentication # Authentication Every request carries a project API key in the `Authorization` header, after the word `ApiKey`: ```http Authorization: ApiKey ak_... ``` Call the API from your server. A key acts as its project: never put it in a browser, a mobile app or a public repository. ## Create a key ### 1. Open the project's API keys In the app, open the project and choose **API keys**. ### 2. Create the key Name it after where it runs ("Invoice importer"), and choose its scopes. A key can also expire and accept requests only from the IP addresses you list. ### 3. Copy it once The full key is shown only when it's created; afterwards the app shows its first characters. Store it in your secrets manager or an environment variable. ## What a key can reach - **One project.** A key works only on paths of its own project: calling `/v1/projects/{project_id}/...` with another project's id returns `403 forbidden`. - **Its scopes.** Scopes grant reading or writing one kind of resource: | Scope | Allows | | :-- | :-- | | `tables:read`, `tables:write`, `tables:delete` | Reading, creating and editing, deleting tables | | `columns:write` | Adding, editing and reordering columns | | `rows:read`, `rows:write`, `rows:delete` | Reading, creating and editing, deleting rows | | `extract:write` | Running extractions and schema suggestions | | `export:read` | Exports and downloads | | `webhooks:manage` | Creating and managing webhooks | Each plan allows a number of keys per project: 2 on Free, 10 on Pro, 50 on Scale and 200 on Enterprise. ## Rotate a key Create the new key, deploy it, then revoke the old one in the app. Both work in between, so nothing fails while you switch. ## Errors | Status | Code | Meaning | | --: | :-- | :-- | | 401 | `unauthorized` | The header is missing or the key is wrong, expired or revoked | | 403 | `forbidden` | The key is for another project, lacks the scope, or the request comes from an IP the key doesn't allow | | 403 | `org_suspended` | The organization's payment failed; update it to restore access | | 429 | `too_many_requests` | Slow down: see [Rate limits](/docs/rate-limits) | > [!NOTE] > `Authorization: Bearer ...` is for the Anyrow app's own sessions and OAuth clients, not API > keys: a key sent as `Bearer` is rejected. --- Source: https://anyrow.ai/docs/errors # Errors A failed request returns a non-2xx status and a JSON body with the same shape everywhere: ```json { "success": false, "status": 400, "status_key": "bad_request", "error_key": "invalid_input", "message": "Name is required", "fields": { "name": [{ "path": "name", "error_key": "required", "message": "Name is required" }] }, "vars": {} } ``` | Field | What it holds | | :-- | :-- | | `status` | The HTTP status, repeated in the body | | `error_key` | A stable machine code: branch on this, never on `message` | | `message` | A sentence for people; it can change | | `fields` | For invalid input, each failing field's errors, keyed by its path | | `vars` | Values the error refers to, such as the plan whose limit you reached | ## What to do with each status | Status | Retry? | What to do | | --: | :-- | :-- | | 400, 422 | No | Fix the input; `fields` says which part is wrong | | 401 | No | Send a valid key: see [Authentication](/docs/authentication) | | 402 | No | The plan's limit is reached, or the feature isn't on the plan; `vars` names it | | 403 | No | The key can't reach this project or action | | 404 | No | The id is wrong, or the resource was deleted | | 409 | Re-read, then retry | Someone changed the resource first (`optimistic_lock_conflict`) or it already exists | | 413, 415 | No | The file is too large, or its type isn't supported | | 429 | Yes, after a wait | See [Rate limits](/docs/rate-limits) | | 500, 502, 503, 504 | Yes, with backoff | A failure on our side; retry with exponential backoff | Each endpoint's page lists the error codes it can return, and [the errors every endpoint shares](/docs/api/errors) are listed once. ```ts title="Node.js" const { data, error, status } = await anyrow.table.get({ params: { project_id: projectId, table_id: tableId }, }) if (error) { if (status === 404) return null throw new Error(`Anyrow ${status}: ${error.error_key}`) } ``` ```python title="Python" response = requests.get(url, headers=headers) if not response.ok: error = response.json() if response.status_code == 404: return None raise RuntimeError(f"Anyrow {error['status']}: {error['error_key']}") ``` --- Source: https://anyrow.ai/docs/pagination # Pagination Every list endpoint (tables, rows, batches, webhooks, deliveries) pages the same way. | Query parameter | What it does | | :-- | :-- | | `limit` | Items per page. Defaults to 20; each endpoint caps it (100 for rows) | | `cursor` | Continue after the previous page: pass its `nextCursor` | | `page` | A 1-based page number, for jumping. Ignored when `cursor` is set | The response holds the items under the resource's name (`rows`, `tables`, `batches`) and: | Field | What it holds | | :-- | :-- | | `hasMore` | Whether another page follows | | `nextCursor` | The cursor for the next page, or `null` on the last one | | `count` | How many items this page holds | | `limit`, `page` | The page size and number used | Prefer the cursor: it stays correct while rows are added, where page numbers shift. ## Read every row ```ts title="Node.js" const rows = [] let cursor: string | undefined do { const { data } = await anyrow.row.list({ params: { project_id: projectId, table_id: tableId }, search: { limit: 100, cursor }, }) rows.push(...data.rows) cursor = data.nextCursor ?? undefined } while (cursor) ``` ```python title="Python" rows, cursor = [], None while True: page = requests.get( f"https://api.anyrow.ai/v1/projects/{project_id}/tables/{table_id}/rows", headers=headers, params={"limit": 100, **({"cursor": cursor} if cursor else {})}, ).json() rows += page["rows"] cursor = page["nextCursor"] if not cursor: break ``` ```bash title="cURL" curl "https://api.anyrow.ai/v1/projects/$PROJECT_ID/tables/$TABLE_ID/rows?limit=100" \ -H "Authorization: ApiKey $ANYROW_API_KEY" # then add &cursor= from the response ``` > [!TIP] > To filter, search or sort rows, add the row list's `filter`, `q` and `order` parameters > (see [List rows](/docs/api/rows/list)), and send the same ones with each cursor. --- Source: https://anyrow.ai/docs/rate-limits # Rate limits API keys share limits per **organization**: every key of every project in it draws from the same pools. Each pool counts requests per minute. | Kind of request | Free | Pro | Scale | Enterprise | | :-- | --: | --: | --: | --: | | Standard: tables, columns, rows, batches, webhooks | 60 | 300 | 1,200 | 1,200 | | AI: extraction and schema suggestions | 10 | 30 | 100 | 200 | | Bulk row writes | 10 | 30 | 60 | 120 | | Downloads and exports | 10 | 30 | 60 | 120 | Which pool an endpoint draws from: - **AI**: [extract](/docs/api/extract), [extract into a table](/docs/api/extract/table-once), their streaming versions, and [suggest schema](/docs/api/schema). - **Bulk row writes**: [bulk create, update and delete rows](/docs/api/rows/bulk). - **Downloads**: [batch downloads](/docs/api/batches/download-csv), [table export](/docs/api/export/export) and [a row's source file](/docs/api/rows/source). - **Standard**: everything else. ## When you hit a limit The request fails with `429` and `error_key: "too_many_requests"`. Wait and retry with exponential backoff and jitter: ```ts title="Node.js" async function withRetry(call: () => Promise<{ data: T | null; status: number }>): Promise { for (let attempt = 0; ; attempt++) { const result = await call() if (result.status !== 429 || attempt === 5) return result.data const delay = Math.min(30_000, 500 * 2 ** attempt) * (0.5 + Math.random()) await new Promise((resolve) => setTimeout(resolve, delay)) } } ``` ```python title="Python" import random, time def with_retry(call): for attempt in range(6): response = call() if response.status_code != 429: return response time.sleep(min(30, 0.5 * 2**attempt) * (0.5 + random.random())) return response ``` > [!TIP] > Many writes at once? One [bulk request](/docs/api/rows/bulk) counts once against its pool, > however many rows it carries. Plans also cap totals per month (API requests, extraction credits, exported rows) and sizes (files per batch, file size, rows per table). Going past one returns `402` with the limit in `vars`; see [Pricing](https://anyrow.ai/pricing). --- Source: https://anyrow.ai/docs/webhooks # Webhooks Instead of polling a batch, register a webhook: when an extraction finishes, Anyrow posts an event to your HTTPS endpoint, signed with a secret only you and Anyrow know. Webhooks belong to an organization and need a plan that includes them. ## Events | Event | When | | :-- | :-- | | `batch.complete` | Every file in the batch was extracted | | `batch.partial` | Some files were extracted, some failed | | `batch.failed` | The batch produced no rows | | `ping` | You asked for a test delivery | The body is JSON: ```json { "api_version": "2026-03-01", "batch_id": "batch_01h5a3g8k9m2n4p6q8r0t2v4x6", "project_id": "proj_01h5a3g8k9m2n4p6q8r0t2v4x6", "status": "complete", "total_rows": 12, "duration_ms": 8421 } ``` ### 1. Register your endpoint The response carries the webhook's signing `secret` (`whsec_...`). Store it; it isn't shown again. ```bash title="cURL" curl -X POST "https://api.anyrow.ai/v1/organizations/$ORG_ID/webhooks" \ -H "Authorization: ApiKey $ANYROW_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "url": "https://example.com/hooks/anyrow", "events": ["batch.complete", "batch.failed"] }' ``` ```ts title="Node.js" const { data: webhook } = await anyrow.webhook.create({ params: { organization_id: orgId }, json: { url: "https://example.com/hooks/anyrow", events: ["batch.complete", "batch.failed"] }, }) // webhook.secret: store it now ``` ```python title="Python" webhook = requests.post( f"https://api.anyrow.ai/v1/organizations/{org_id}/webhooks", headers={"Authorization": f"ApiKey {os.environ['ANYROW_API_KEY']}"}, json={"url": "https://example.com/hooks/anyrow", "events": ["batch.complete", "batch.failed"]}, ).json() ``` ### 2. Verify each delivery Deliveries follow the [Standard Webhooks](https://www.standardwebhooks.com) spec. Three headers come with each one: | Header | Holds | | :-- | :-- | | `webhook-id` | The delivery's id, the same on every retry: use it to skip duplicates | | `webhook-timestamp` | When it was sent, in Unix seconds | | `webhook-signature` | `v1,`: an HMAC-SHA256 of `{id}.{timestamp}.{body}` | Compute the signature over the raw body with your secret (base64-decoded, without `whsec_`), compare it in constant time, and reject deliveries older than a few minutes. Any Standard Webhooks library does all of it: ```ts title="Node.js" import { Webhook } from "standardwebhooks" const webhook = new Webhook(process.env.ANYROW_WEBHOOK_SECRET!.replace(/^whsec_/, "")) export async function POST(request: Request) { const body = await request.text() const event = webhook.verify(body, Object.fromEntries(request.headers)) // throws if forged // handle event.batch_id, event.status ... return new Response(null, { status: 204 }) } ``` ```python title="Python" from standardwebhooks.webhooks import Webhook webhook = Webhook(os.environ["ANYROW_WEBHOOK_SECRET"].removeprefix("whsec_")) def handle(body: bytes, headers: dict) -> None: event = webhook.verify(body, headers) # raises if forged # handle event["batch_id"], event["status"] ... ``` ### 3. Answer fast Return a `2xx` within 30 seconds, and do slow work after answering. ## Retries A delivery that times out or gets a `5xx`, `408` or `429` is retried up to 6 times, after 1 second, 5 seconds, 30 seconds, 5 minutes, 30 minutes and 2 hours. A `Retry-After` header on your `429` or `503` is honored (up to a day). Any other `4xx` isn't retried. After 10 failed deliveries in a row the webhook is disabled and you get a notification. ## Test and rotate - [Send a test event](/docs/api/webhooks/test) to check your endpoint; it sends `ping`. - [Rotate the secret](/docs/api/webhooks/rotate-secret) if it leaks. For 24 hours after a rotation each delivery is signed with both secrets (two values in `webhook-signature`), so you can deploy the new one without dropping events. - [Deliveries](/docs/api/webhooks/deliveries) lists recent attempts, with the status and body your endpoint returned. --- Source: https://anyrow.ai/docs/sdks # SDKs and CLI Every client is generated from the same [OpenAPI document](/docs/openapi.json), so its methods follow the reference: an operation's id names its method (`table.create`, `row.list`, `extract.table.once`). Give each one your key as the `Authorization: ApiKey ` header. ## TypeScript Runs anywhere `fetch` does: Node, Bun, Deno, Cloudflare Workers and browsers. ```bash title="npm" npm install @anyrow/sdk ``` ```bash title="Bun" bun add @anyrow/sdk ``` ```bash title="Deno" deno add jsr:@anyrow/sdk ``` ```ts import { AnyrowSDK } from "@anyrow/sdk" const anyrow = new AnyrowSDK({ baseURL: "https://api.anyrow.ai", headers: { Authorization: `ApiKey ${process.env.ANYROW_API_KEY}` }, }) const { data, error, status } = await anyrow.row.list({ params: { project_id: "proj_...", table_id: "tbl_..." }, search: { limit: 50 }, }) ``` Calls return `{ data, error, status, response }`: `data` on success, `error` (the [error body](/docs/errors)) otherwise. Path parameters go in `params`, query parameters in `search`, JSON bodies in `json` and files in `form`. ## Python ```bash pip install anyrow ``` ```python from anyrow import AnyrowSDK client = AnyrowSDK( base_url="https://api.anyrow.ai", headers={"Authorization": f"ApiKey {os.environ['ANYROW_API_KEY']}"}, ) ``` ## Go ```bash go get github.com/anyrow/sdk-go ``` ## Rust ```bash cargo add anyrow ``` ## CLI ```bash go install github.com/anyrow/cli@latest ``` The CLI reads the key from `--api-key`, then `ANYROW_API_KEY`, then `~/.config/anyrow/config.toml`. ## Without an SDK The API is plain HTTPS and JSON: every page of the [API reference](/docs/api) has cURL, JavaScript and Python samples you can copy. --- Source: https://anyrow.ai/docs/build-with-ai # Build with AI Every page here is also Markdown, written for models as much as people. Point your coding assistant at it and it reads the same reference you do, without the page around it. ## Docs as Markdown - **Any page**: add `.md` to its URL ([`/docs/quickstart.md`](/docs/quickstart.md), [`/docs/api/rows/list.md`](/docs/api/rows/list.md)), or request it with `Accept: text/markdown`. - **The map**: [`/docs/llms.txt`](/docs/llms.txt) lists every page with a line on each. - **Everything at once**: [`/docs/llms-full.txt`](/docs/llms-full.txt) holds every guide and resource page in one file. - **The spec**: [`/docs/openapi.json`](/docs/openapi.json) (or [`.yaml`](/docs/openapi.yaml)) describes every endpoint. On any page, **Copy page** puts its Markdown on your clipboard, and its menu opens Claude or ChatGPT already reading it. ## Connect the docs to your editor The docs are also an [MCP](https://modelcontextprotocol.io) server at `https://anyrow.ai/docs/mcp`, so an assistant can search them and read any page or endpoint while it works. Tools: `search_docs`, `get_page`, `get_operation` and `list_pages`. ```bash title="Claude Code" claude mcp add --transport http anyrow-docs https://anyrow.ai/docs/mcp ``` ```json title="Cursor" { "mcpServers": { "anyrow-docs": { "url": "https://anyrow.ai/docs/mcp" } } } ``` ```json title="VS Code" { "servers": { "anyrow-docs": { "type": "http", "url": "https://anyrow.ai/docs/mcp" } } } ``` The **Copy page** menu on every page has the same command, and one-click links for Cursor and VS Code. ## Prompt your assistant ```text Read https://anyrow.ai/docs/llms.txt and the pages it links for what you need. Call the Anyrow API from server code with `Authorization: ApiKey ` from ANYROW_API_KEY, base URL https://api.anyrow.ai. Use @anyrow/sdk in TypeScript. ``` ## Let an agent call Anyrow The [OpenAPI document](/docs/openapi.json) works with any tool-calling framework: each operation becomes a tool with typed inputs. Give the agent a key with only the scopes it needs (see [Authentication](/docs/authentication)): a read-only agent needs `tables:read` and `rows:read`, nothing more. --- Source: https://anyrow.ai/docs/api # Anyrow API reference Base URL: `https://api.anyrow.ai` Authenticate with the `Authorization` header: `ApiKey {your_api_key}`. ## [Tables](https://anyrow.ai/docs/api/tables.md) A table is a schema: named, typed columns and how strictly to fill them. - [List tables](https://anyrow.ai/docs/api/tables/list.md): `GET /v1/projects/{project_id}/tables` - [Create table](https://anyrow.ai/docs/api/tables/create.md): `POST /v1/projects/{project_id}/tables` - [Get table](https://anyrow.ai/docs/api/tables/get.md): `GET /v1/projects/{project_id}/tables/{table_id}` - [Update table](https://anyrow.ai/docs/api/tables/update.md): `PATCH /v1/projects/{project_id}/tables/{table_id}` - [Delete table (soft, 72h grace)](https://anyrow.ai/docs/api/tables/delete.md): `DELETE /v1/projects/{project_id}/tables/{table_id}` - [Duplicate table structure](https://anyrow.ai/docs/api/tables/duplicate.md): `POST /v1/projects/{project_id}/tables/{table_id}/duplicate` - [Restore deleted table](https://anyrow.ai/docs/api/tables/restore.md): `POST /v1/projects/{project_id}/tables/{table_id}/restore` ## [Columns](https://anyrow.ai/docs/api/columns.md) A table's columns: what to extract, with which type and instruction. - [Add column](https://anyrow.ai/docs/api/columns/add.md): `POST /v1/projects/{project_id}/tables/{table_id}/columns` - [Reorder columns](https://anyrow.ai/docs/api/columns/reorder.md): `PUT /v1/projects/{project_id}/tables/{table_id}/columns/order` - [Update column](https://anyrow.ai/docs/api/columns/update.md): `PATCH /v1/projects/{project_id}/tables/{table_id}/columns/{col_id}` - [Remove column](https://anyrow.ai/docs/api/columns/remove.md): `DELETE /v1/projects/{project_id}/tables/{table_id}/columns/{col_id}` - [Get distinct column values](https://anyrow.ai/docs/api/columns/distinct.md): `GET /v1/projects/{project_id}/tables/{table_id}/columns/{col_id}/distinct` ## [Rows](https://anyrow.ai/docs/api/rows.md) The records in a table: list, filter, aggregate, create, edit and bulk-write them. - [List rows](https://anyrow.ai/docs/api/rows/list.md): `GET /v1/projects/{project_id}/tables/{table_id}/rows` - [Create row](https://anyrow.ai/docs/api/rows/create.md): `POST /v1/projects/{project_id}/tables/{table_id}/rows` - [Aggregate column values](https://anyrow.ai/docs/api/rows/aggregate.md): `GET /v1/projects/{project_id}/tables/{table_id}/rows/aggregate` - [Bulk create/update/delete rows](https://anyrow.ai/docs/api/rows/bulk.md): `POST /v1/projects/{project_id}/tables/{table_id}/rows/bulk` - [Get row](https://anyrow.ai/docs/api/rows/get.md): `GET /v1/projects/{project_id}/tables/{table_id}/rows/{row_id}` - [Update row](https://anyrow.ai/docs/api/rows/update.md): `PATCH /v1/projects/{project_id}/tables/{table_id}/rows/{row_id}` - [Delete row](https://anyrow.ai/docs/api/rows/delete.md): `DELETE /v1/projects/{project_id}/tables/{table_id}/rows/{row_id}` - [The source file behind a row: download it, or open a PDF or image inline](https://anyrow.ai/docs/api/rows/source.md): `GET /v1/projects/{project_id}/tables/{table_id}/rows/{row_id}/source` ## [Extract](https://anyrow.ai/docs/api/extract.md) Extract rows from a file or text, as one JSON response or a stream of server-sent events. - [Extract data from text or file (JSON response)](https://anyrow.ai/docs/api/extract/once.md): `POST /v1/projects/{project_id}/extract` - [Extract data from text or file (SSE stream)](https://anyrow.ai/docs/api/extract/stream.md): `POST /v1/projects/{project_id}/extract-stream` - [Extract into table (JSON response)](https://anyrow.ai/docs/api/extract/table-once.md): `POST /v1/projects/{project_id}/tables/{table_id}/extract` - [Extract into table (SSE stream)](https://anyrow.ai/docs/api/extract/table-stream.md): `POST /v1/projects/{project_id}/tables/{table_id}/extract-stream` ## [Batches](https://anyrow.ai/docs/api/batches.md) A batch is one extraction run over one or more files: its status, rows and downloads. - [List batches](https://anyrow.ai/docs/api/batches/list.md): `GET /v1/projects/{project_id}/batches` - [Get batch](https://anyrow.ai/docs/api/batches/get.md): `GET /v1/projects/{project_id}/batches/{batch_id}` - [Download batch CSV](https://anyrow.ai/docs/api/batches/download-csv.md): `GET /v1/projects/{project_id}/batches/{batch_id}/download/csv` - [Download batch JSON](https://anyrow.ai/docs/api/batches/download-json.md): `GET /v1/projects/{project_id}/batches/{batch_id}/download/json` - [Download batch XLSX](https://anyrow.ai/docs/api/batches/download-xlsx.md): `GET /v1/projects/{project_id}/batches/{batch_id}/download/xlsx` ## [Export](https://anyrow.ai/docs/api/export.md) Export a table's rows as a file, and check an export's status. - [Get export status](https://anyrow.ai/docs/api/export/get.md): `GET /v1/projects/{project_id}/exports/{export_id}` - [Export table rows](https://anyrow.ai/docs/api/export/export.md): `GET /v1/projects/{project_id}/tables/{table_id}/export` ## [Schema suggestions](https://anyrow.ai/docs/api/schema.md) Let Anyrow suggest a table's columns from a sample document. - [Suggest schema from text or file (multipart)](https://anyrow.ai/docs/api/schema/schema.md): `POST /v1/projects/{project_id}/suggest-schema` ## [Table Templates](https://anyrow.ai/docs/api/table-templates.md) Reusable table schemas: browse, preview and create tables from them. - [Browse table templates](https://anyrow.ai/docs/api/table-templates/project-list.md): `GET /v1/projects/{project_id}/table-templates` - [Preview table template](https://anyrow.ai/docs/api/table-templates/project-get.md): `GET /v1/projects/{project_id}/table-templates/{template_id}` - [Create table from template](https://anyrow.ai/docs/api/table-templates/use.md): `POST /v1/projects/{project_id}/table-templates/{template_id}/use` - [Create table template](https://anyrow.ai/docs/api/table-templates/create.md): `POST /v1/table-templates` - [List my table templates](https://anyrow.ai/docs/api/table-templates/list-mine.md): `GET /v1/table-templates/mine` - [Update table template](https://anyrow.ai/docs/api/table-templates/update.md): `PATCH /v1/table-templates/{template_id}` - [Delete table template](https://anyrow.ai/docs/api/table-templates/delete.md): `DELETE /v1/table-templates/{template_id}` ## [Webhooks](https://anyrow.ai/docs/api/webhooks.md) Endpoints Anyrow posts batch events to, signed with your secret. - [List webhooks](https://anyrow.ai/docs/api/webhooks/list.md): `GET /v1/organizations/{organization_id}/webhooks` - [Create webhook](https://anyrow.ai/docs/api/webhooks/create.md): `POST /v1/organizations/{organization_id}/webhooks` - [Get webhook](https://anyrow.ai/docs/api/webhooks/get.md): `GET /v1/organizations/{organization_id}/webhooks/{id}` - [Update webhook](https://anyrow.ai/docs/api/webhooks/update.md): `PATCH /v1/organizations/{organization_id}/webhooks/{id}` - [Delete webhook](https://anyrow.ai/docs/api/webhooks/delete.md): `DELETE /v1/organizations/{organization_id}/webhooks/{id}` - [List webhook deliveries](https://anyrow.ai/docs/api/webhooks/deliveries.md): `GET /v1/organizations/{organization_id}/webhooks/{id}/deliveries` - [Rotate webhook secret](https://anyrow.ai/docs/api/webhooks/rotate-secret.md): `POST /v1/organizations/{organization_id}/webhooks/{id}/rotate-secret` - [Send test webhook](https://anyrow.ai/docs/api/webhooks/test.md): `POST /v1/organizations/{organization_id}/webhooks/{id}/test` ## [Errors](https://anyrow.ai/docs/api/errors.md) --- Source: https://anyrow.ai/docs/api/errors # Errors Every endpoint can return these; each endpoint's page lists its own. | Status | Codes | Meaning | | --- | --- | --- | | 400 | `captcha_failed`, `captcha_required`, `invalid_input` | Bad request: the input is invalid. | | 401 | `impersonation_ended`, `unauthorized` | Unauthorized: the API key is missing or invalid. | | 402 | `api_request_limit_exceeded`, `feature_not_available` | Payment required: the plan's limit is reached or the feature isn't on it. | | 403 | `email_not_verified`, `forbidden`, `impersonation_forbidden`, `org_suspended` | Forbidden: the key can't access this resource. | | 408 | `request_timeout` | Request timeout. | | 413 | `content_too_large` | Content too large. | | 415 | `unsupported_media_type` | Unsupported media type. | | 422 | `unprocessable_entity` | Unprocessable: the input is valid but can't be applied. | | 429 | `too_many_requests` | Too many requests: slow down and retry later. | | 500 | `captcha_unavailable`, `internal_server_error` | Internal server error. | | 502 | `bad_gateway` | Bad gateway. | | 503 | `service_unavailable` | Service unavailable. | | 504 | `gateway_timeout` | Gateway timeout. | --- Source: https://anyrow.ai/docs/api/tables # Tables A table is a schema: named, typed columns and how strictly to fill them. - [List tables](https://anyrow.ai/docs/api/tables/list.md): `GET /v1/projects/{project_id}/tables` - [Create table](https://anyrow.ai/docs/api/tables/create.md): `POST /v1/projects/{project_id}/tables` - [Get table](https://anyrow.ai/docs/api/tables/get.md): `GET /v1/projects/{project_id}/tables/{table_id}` - [Update table](https://anyrow.ai/docs/api/tables/update.md): `PATCH /v1/projects/{project_id}/tables/{table_id}` - [Delete table (soft, 72h grace)](https://anyrow.ai/docs/api/tables/delete.md): `DELETE /v1/projects/{project_id}/tables/{table_id}` - [Duplicate table structure](https://anyrow.ai/docs/api/tables/duplicate.md): `POST /v1/projects/{project_id}/tables/{table_id}/duplicate` - [Restore deleted table](https://anyrow.ai/docs/api/tables/restore.md): `POST /v1/projects/{project_id}/tables/{table_id}/restore` ## The Table object - `created_at` (integer, required): At least 0. - `deleted_at` (integer, required, nullable): At least 0. - `updated_at` (integer, required): At least 0. - `id` (string, required): 1 to 48 characters. - `project_id` (string, required): 1 to 48 characters. - `name` (string, required): 1 to 128 characters. - `slug` (string, required): 1 to 50 characters. - `columns_json` (array of objects, required): 1 to 100 items. - `currency_code` (string, optional): Exactly 3 characters. - `default` (any, optional) - `description` (string, optional, nullable): Up to 256 characters. - `id` (string, required): 1 to 36 characters. - `instruction` (string, optional, nullable): Up to 512 characters. - `name` (string, required): 1 to 64 characters. Matches `^[\w\s.-]+$`. - `options` (array of strings, optional): Up to 500 items. - `required` (boolean, required): Defaults to `false`. - `searchable` (boolean, optional) - `type` (string, required): One of `array`, `boolean`, `currency`, `date`, `email`, `enum`, `multi_select`, `number`, `string`, `text`, `url`. Defaults to `string`. - `instruction` (string, required, nullable): Up to 512 characters. - `strictness` (string, required): One of `strict`, `balanced`, `flexible`. - `insert_mode` (string, required): One of `append`, `dedup`, `merge`, `replace`. - `merge_columns_json` (array of strings, required, nullable): At least 1 items. - `default_sort` (string, required, nullable) - `row_count` (integer, required): At least 0. - `usage_count` (integer, required): At least 0. - `data_version` (integer, required): At least 0. - `fts_version` (integer, required): At least 0. - `last_used_at` (integer, required, nullable): At least 0. ```json { "created_at": 1711468800000, "deleted_at": 1711468800000, "updated_at": 1711468800000, "id": "tbl_01h5a3g8k9m2n4p6q8r0t2v4x6", "project_id": "string", "name": "string", "slug": "string", "columns_json": [ { "currency_code": "string", "description": "string", "id": "string", "instruction": "string", "name": "string", "options": [ "string" ], "required": false, "searchable": true, "type": "string" } ], "instruction": "string", "strictness": "strict", "insert_mode": "append", "merge_columns_json": [ "string" ], "default_sort": "string", "row_count": 42, "usage_count": 42, "data_version": 42, "fts_version": 42, "last_used_at": 1711468800000 } ``` ## List tables `GET /v1/projects/{project_id}/tables` Authentication: `Authorization: ApiKey {your_api_key}`. ### Path parameters - `project_id` (string, required) ### Query parameters - `cursor` (string, optional): Opaque cursor for forward pagination. Pass the nextCursor from the previous response with the same order. Takes precedence over page when both are sent. - `page` (integer, optional): 1-based page number for offset pagination. Ignored when cursor is present. At least 1. - `order` (string, optional): Sort keys, comma-separated, each `field[.asc|.desc][.nullsfirst|.nullslast]`; at most 3. Sortable: created_at, name, row_count, last_used_at, updated_at. Default: created_at.desc. Nulls sort last ascending and first descending unless stated. Matches `^(?:created_at|name|row_count|last_used_at|updated_at)(?:\.(?:asc|desc))?(?:\.(?:nullsfirst|nullslast))?(?:,(?:created_at|name|row_count|last_used_at|updated_at)(?:\.(?:asc|desc))?(?:\.(?:nullsfirst|nullslast))?){0,2}$`. - `filter` (string, optional): Filter expression `field.op.value`; `,` joins conditions with AND; group with `or(...)` and `and(...)`. Fields: created_at (number: eq, ne, neq, gt, gte, lt, lte, in, nin, is); id (string: eq, ne, neq, like, ilike, in, nin, is); name (string: eq, ne, neq, like, ilike, in, nin, is); row_count (number: eq, ne, neq, gt, gte, lt, lte, in, nin, is); slug (string: eq, ne, neq, like, ilike, in, nin, is). `like` is case-sensitive and `ilike` ignores ASCII case; `*` is the wildcard. `in`/`nin` take `(a,b)`; `is` takes `null` or `notnull`. At most 20 conditions, 3 nested groups, 100 in/nin values. - `q` (string, optional): Free-text search over: name. Whitespace-separated terms must all match. Up to 200 characters. - `limit` (integer, optional): Maximum number of items per page. Defaults to 20, capped by the endpoint's maxLimit. Defaults to `20`. Between 1 and 100. ### Returns 200 `application/json`. - `count` (integer, required): At least 0. - `hasMore` (boolean, required) - `limit` (integer, required): At least 1. - `nextCursor` (string, required, nullable) - `page` (integer, required, nullable): At least 1. - `tables` (array of objects, required) - `created_at` (integer, required): At least 0. - `deleted_at` (integer, required, nullable): At least 0. - `updated_at` (integer, required): At least 0. - `id` (string, required): 1 to 48 characters. - `project_id` (string, required): 1 to 48 characters. - `name` (string, required): 1 to 128 characters. - `slug` (string, required): 1 to 50 characters. - `columns_json` (array of objects, required): 1 to 100 items. - `currency_code` (string, optional): Exactly 3 characters. - `default` (any, optional) - `description` (string, optional, nullable): Up to 256 characters. - `id` (string, required): 1 to 36 characters. - `instruction` (string, optional, nullable): Up to 512 characters. - `name` (string, required): 1 to 64 characters. Matches `^[\w\s.-]+$`. - `options` (array of strings, optional): Up to 500 items. - `required` (boolean, required): Defaults to `false`. - `searchable` (boolean, optional) - `type` (string, required): One of `array`, `boolean`, `currency`, `date`, `email`, `enum`, `multi_select`, `number`, `string`, `text`, `url`. Defaults to `string`. - `instruction` (string, required, nullable): Up to 512 characters. - `strictness` (string, required): One of `strict`, `balanced`, `flexible`. - `insert_mode` (string, required): One of `append`, `dedup`, `merge`, `replace`. - `merge_columns_json` (array of strings, required, nullable): At least 1 items. - `default_sort` (string, required, nullable) - `row_count` (integer, required): At least 0. - `usage_count` (integer, required): At least 0. - `data_version` (integer, required): At least 0. - `fts_version` (integer, required): At least 0. - `last_used_at` (integer, required, nullable): At least 0. ### Errors - 404: `not_found` Errors every endpoint can return: [Errors](https://anyrow.ai/docs/api/errors.md). ### Request ```ts title="Node.js" import { AnyrowSDK } from "@anyrow/sdk" const anyrow = new AnyrowSDK({ baseURL: "https://api.anyrow.ai", headers: { Authorization: `ApiKey ${process.env.ANYROW_API_KEY}` }, }) const { data, error } = await anyrow.table.list({ params: { project_id: "{project_id}" }, }) ``` ```bash title="cURL" curl 'https://api.anyrow.ai/v1/projects/{project_id}/tables' \ -H 'Authorization: ApiKey {your_api_key}' ``` ```js title="JavaScript" const response = await fetch("https://api.anyrow.ai/v1/projects/{project_id}/tables", { headers: { Authorization: "ApiKey {your_api_key}", }, }) const data = await response.json() ``` ```python title="Python" import requests response = requests.get( "https://api.anyrow.ai/v1/projects/{project_id}/tables", headers={ "Authorization": "ApiKey {your_api_key}", }, ) print(response.json()) ``` ### Response ```json title="200" { "count": 0, "hasMore": true, "limit": 1, "nextCursor": "string", "page": 1, "tables": [ { "created_at": 1711468800000, "deleted_at": 1711468800000, "updated_at": 1711468800000, "id": "tbl_01h5a3g8k9m2n4p6q8r0t2v4x6", "project_id": "string", "name": "string", "slug": "string", "columns_json": [ { "currency_code": "string", "description": "string", "id": "string", "instruction": "string", "name": "string", "options": [ "string" ], "required": false, "searchable": true, "type": "string" } ], "instruction": "string", "strictness": "strict", "insert_mode": "append", "merge_columns_json": [ "string" ], "default_sort": "string", "row_count": 42, "usage_count": 42, "data_version": 42, "fts_version": 42, "last_used_at": 1711468800000 } ] } ``` ## Create table `POST /v1/projects/{project_id}/tables` Authentication: `Authorization: ApiKey {your_api_key}`. ### Path parameters - `project_id` (string, required) ### Request body Content type: `application/json` (required). - `columns_json` (array of objects, required): 1 to 100 items. - `currency_code` (string, optional): Exactly 3 characters. - `default` (any, optional) - `description` (string, optional, nullable): Up to 256 characters. - `id` (string, required): 1 to 36 characters. - `instruction` (string, optional, nullable): Up to 512 characters. - `name` (string, required): 1 to 64 characters. Matches `^[\w\s.-]+$`. - `options` (array of strings, optional): Up to 500 items. - `required` (boolean, optional): Defaults to `false`. - `searchable` (boolean, optional) - `type` (string, optional): One of `array`, `boolean`, `currency`, `date`, `email`, `enum`, `multi_select`, `number`, `string`, `text`, `url`. Defaults to `string`. - `insert_mode` (string, optional): One of `append`, `dedup`, `merge`, `replace`. - `instruction` (string, optional, nullable): Up to 512 characters. - `merge_columns_json` (array of strings, optional, nullable): At least 1 items. - `name` (string, required): 1 to 128 characters. - `strictness` (string, optional): One of `strict`, `balanced`, `flexible`. ### Returns 201 `application/json`: created. - `created_at` (integer, required): At least 0. - `deleted_at` (integer, required, nullable): At least 0. - `updated_at` (integer, required): At least 0. - `id` (string, required): 1 to 48 characters. - `project_id` (string, required): 1 to 48 characters. - `name` (string, required): 1 to 128 characters. - `slug` (string, required): 1 to 50 characters. - `columns_json` (array of objects, required): 1 to 100 items. - `currency_code` (string, optional): Exactly 3 characters. - `default` (any, optional) - `description` (string, optional, nullable): Up to 256 characters. - `id` (string, required): 1 to 36 characters. - `instruction` (string, optional, nullable): Up to 512 characters. - `name` (string, required): 1 to 64 characters. Matches `^[\w\s.-]+$`. - `options` (array of strings, optional): Up to 500 items. - `required` (boolean, required): Defaults to `false`. - `searchable` (boolean, optional) - `type` (string, required): One of `array`, `boolean`, `currency`, `date`, `email`, `enum`, `multi_select`, `number`, `string`, `text`, `url`. Defaults to `string`. - `instruction` (string, required, nullable): Up to 512 characters. - `strictness` (string, required): One of `strict`, `balanced`, `flexible`. - `insert_mode` (string, required): One of `append`, `dedup`, `merge`, `replace`. - `merge_columns_json` (array of strings, required, nullable): At least 1 items. - `default_sort` (string, required, nullable) - `row_count` (integer, required): At least 0. - `usage_count` (integer, required): At least 0. - `data_version` (integer, required): At least 0. - `fts_version` (integer, required): At least 0. - `last_used_at` (integer, required, nullable): At least 0. ### Errors - 404: `not_found` Errors every endpoint can return: [Errors](https://anyrow.ai/docs/api/errors.md). ### Request ```ts title="Node.js" import { AnyrowSDK } from "@anyrow/sdk" const anyrow = new AnyrowSDK({ baseURL: "https://api.anyrow.ai", headers: { Authorization: `ApiKey ${process.env.ANYROW_API_KEY}` }, }) const { data, error } = await anyrow.table.create({ params: { project_id: "{project_id}" }, json: { columns_json: [ { currency_code: "string", description: "string", id: "string", instruction: "string", name: "string", options: [ "string" ], required: false, searchable: true, type: "string" } ], insert_mode: "append", instruction: "string", merge_columns_json: [ "string" ], name: "string", strictness: "strict" }, }) ``` ```bash title="cURL" curl -X POST 'https://api.anyrow.ai/v1/projects/{project_id}/tables' \ -H 'Authorization: ApiKey {your_api_key}' \ -H 'Content-Type: application/json' \ -d '{ "columns_json": [ { "currency_code": "string", "description": "string", "id": "string", "instruction": "string", "name": "string", "options": [ "string" ], "required": false, "searchable": true, "type": "string" } ], "insert_mode": "append", "instruction": "string", "merge_columns_json": [ "string" ], "name": "string", "strictness": "strict" }' ``` ```js title="JavaScript" const response = await fetch("https://api.anyrow.ai/v1/projects/{project_id}/tables", { method: "POST", headers: { Authorization: "ApiKey {your_api_key}", "Content-Type": "application/json", }, body: JSON.stringify({ "columns_json": [ { "currency_code": "string", "description": "string", "id": "string", "instruction": "string", "name": "string", "options": [ "string" ], "required": false, "searchable": true, "type": "string" } ], "insert_mode": "append", "instruction": "string", "merge_columns_json": [ "string" ], "name": "string", "strictness": "strict" }), }) const data = await response.json() ``` ```python title="Python" import requests response = requests.post( "https://api.anyrow.ai/v1/projects/{project_id}/tables", headers={ "Authorization": "ApiKey {your_api_key}", }, json={ "columns_json": [ { "currency_code": "string", "description": "string", "id": "string", "instruction": "string", "name": "string", "options": [ "string", ], "required": False, "searchable": True, "type": "string", }, ], "insert_mode": "append", "instruction": "string", "merge_columns_json": [ "string", ], "name": "string", "strictness": "strict", }, ) print(response.json()) ``` ### Response ```json title="201" { "created_at": 1711468800000, "deleted_at": 1711468800000, "updated_at": 1711468800000, "id": "tbl_01h5a3g8k9m2n4p6q8r0t2v4x6", "project_id": "string", "name": "string", "slug": "string", "columns_json": [ { "currency_code": "string", "description": "string", "id": "string", "instruction": "string", "name": "string", "options": [ "string" ], "required": false, "searchable": true, "type": "string" } ], "instruction": "string", "strictness": "strict", "insert_mode": "append", "merge_columns_json": [ "string" ], "default_sort": "string", "row_count": 42, "usage_count": 42, "data_version": 42, "fts_version": 42, "last_used_at": 1711468800000 } ``` ## Get table `GET /v1/projects/{project_id}/tables/{table_id}` Authentication: `Authorization: ApiKey {your_api_key}`. ### Path parameters - `project_id` (string, required) - `table_id` (string, required) ### Returns 200 `application/json`. - `created_at` (integer, required): At least 0. - `deleted_at` (integer, required, nullable): At least 0. - `updated_at` (integer, required): At least 0. - `id` (string, required): 1 to 48 characters. - `project_id` (string, required): 1 to 48 characters. - `name` (string, required): 1 to 128 characters. - `slug` (string, required): 1 to 50 characters. - `columns_json` (array of objects, required): 1 to 100 items. - `currency_code` (string, optional): Exactly 3 characters. - `default` (any, optional) - `description` (string, optional, nullable): Up to 256 characters. - `id` (string, required): 1 to 36 characters. - `instruction` (string, optional, nullable): Up to 512 characters. - `name` (string, required): 1 to 64 characters. Matches `^[\w\s.-]+$`. - `options` (array of strings, optional): Up to 500 items. - `required` (boolean, required): Defaults to `false`. - `searchable` (boolean, optional) - `type` (string, required): One of `array`, `boolean`, `currency`, `date`, `email`, `enum`, `multi_select`, `number`, `string`, `text`, `url`. Defaults to `string`. - `instruction` (string, required, nullable): Up to 512 characters. - `strictness` (string, required): One of `strict`, `balanced`, `flexible`. - `insert_mode` (string, required): One of `append`, `dedup`, `merge`, `replace`. - `merge_columns_json` (array of strings, required, nullable): At least 1 items. - `default_sort` (string, required, nullable) - `row_count` (integer, required): At least 0. - `usage_count` (integer, required): At least 0. - `data_version` (integer, required): At least 0. - `fts_version` (integer, required): At least 0. - `last_used_at` (integer, required, nullable): At least 0. ### Errors - 404: `not_found`, `table_not_found` Errors every endpoint can return: [Errors](https://anyrow.ai/docs/api/errors.md). ### Request ```ts title="Node.js" import { AnyrowSDK } from "@anyrow/sdk" const anyrow = new AnyrowSDK({ baseURL: "https://api.anyrow.ai", headers: { Authorization: `ApiKey ${process.env.ANYROW_API_KEY}` }, }) const { data, error } = await anyrow.table.get({ params: { project_id: "{project_id}", table_id: "{table_id}" }, }) ``` ```bash title="cURL" curl 'https://api.anyrow.ai/v1/projects/{project_id}/tables/{table_id}' \ -H 'Authorization: ApiKey {your_api_key}' ``` ```js title="JavaScript" const response = await fetch("https://api.anyrow.ai/v1/projects/{project_id}/tables/{table_id}", { headers: { Authorization: "ApiKey {your_api_key}", }, }) const data = await response.json() ``` ```python title="Python" import requests response = requests.get( "https://api.anyrow.ai/v1/projects/{project_id}/tables/{table_id}", headers={ "Authorization": "ApiKey {your_api_key}", }, ) print(response.json()) ``` ### Response ```json title="200" { "created_at": 1711468800000, "deleted_at": 1711468800000, "updated_at": 1711468800000, "id": "tbl_01h5a3g8k9m2n4p6q8r0t2v4x6", "project_id": "string", "name": "string", "slug": "string", "columns_json": [ { "currency_code": "string", "description": "string", "id": "string", "instruction": "string", "name": "string", "options": [ "string" ], "required": false, "searchable": true, "type": "string" } ], "instruction": "string", "strictness": "strict", "insert_mode": "append", "merge_columns_json": [ "string" ], "default_sort": "string", "row_count": 42, "usage_count": 42, "data_version": 42, "fts_version": 42, "last_used_at": 1711468800000 } ``` ## Update table `PATCH /v1/projects/{project_id}/tables/{table_id}` Authentication: `Authorization: ApiKey {your_api_key}`. ### Path parameters - `project_id` (string, required) - `table_id` (string, required) ### Request body Content type: `application/json` (required). - `default_sort` (string, optional, nullable): Up to 256 characters. - `insert_mode` (string, optional): One of `append`, `dedup`, `merge`, `replace`. - `instruction` (string, optional, nullable): Up to 512 characters. - `merge_columns_json` (array of strings, optional, nullable): At least 1 items. - `name` (string, optional): 1 to 128 characters. - `slug` (string, optional): 1 to 50 characters. - `strictness` (string, optional): One of `strict`, `balanced`, `flexible`. ### Returns 200 `application/json`. - `created_at` (integer, required): At least 0. - `deleted_at` (integer, required, nullable): At least 0. - `updated_at` (integer, required): At least 0. - `id` (string, required): 1 to 48 characters. - `project_id` (string, required): 1 to 48 characters. - `name` (string, required): 1 to 128 characters. - `slug` (string, required): 1 to 50 characters. - `columns_json` (array of objects, required): 1 to 100 items. - `currency_code` (string, optional): Exactly 3 characters. - `default` (any, optional) - `description` (string, optional, nullable): Up to 256 characters. - `id` (string, required): 1 to 36 characters. - `instruction` (string, optional, nullable): Up to 512 characters. - `name` (string, required): 1 to 64 characters. Matches `^[\w\s.-]+$`. - `options` (array of strings, optional): Up to 500 items. - `required` (boolean, required): Defaults to `false`. - `searchable` (boolean, optional) - `type` (string, required): One of `array`, `boolean`, `currency`, `date`, `email`, `enum`, `multi_select`, `number`, `string`, `text`, `url`. Defaults to `string`. - `instruction` (string, required, nullable): Up to 512 characters. - `strictness` (string, required): One of `strict`, `balanced`, `flexible`. - `insert_mode` (string, required): One of `append`, `dedup`, `merge`, `replace`. - `merge_columns_json` (array of strings, required, nullable): At least 1 items. - `default_sort` (string, required, nullable) - `row_count` (integer, required): At least 0. - `usage_count` (integer, required): At least 0. - `data_version` (integer, required): At least 0. - `fts_version` (integer, required): At least 0. - `last_used_at` (integer, required, nullable): At least 0. ### Errors - 404: `not_found`, `table_not_found` - 409: `table_project_id_duplicate` Errors every endpoint can return: [Errors](https://anyrow.ai/docs/api/errors.md). ### Request ```ts title="Node.js" import { AnyrowSDK } from "@anyrow/sdk" const anyrow = new AnyrowSDK({ baseURL: "https://api.anyrow.ai", headers: { Authorization: `ApiKey ${process.env.ANYROW_API_KEY}` }, }) const { data, error } = await anyrow.table.update({ params: { project_id: "{project_id}", table_id: "{table_id}" }, json: { default_sort: "string", insert_mode: "append", instruction: "string", merge_columns_json: [ "string" ], name: "string", slug: "string", strictness: "strict" }, }) ``` ```bash title="cURL" curl -X PATCH 'https://api.anyrow.ai/v1/projects/{project_id}/tables/{table_id}' \ -H 'Authorization: ApiKey {your_api_key}' \ -H 'Content-Type: application/json' \ -d '{ "default_sort": "string", "insert_mode": "append", "instruction": "string", "merge_columns_json": [ "string" ], "name": "string", "slug": "string", "strictness": "strict" }' ``` ```js title="JavaScript" const response = await fetch("https://api.anyrow.ai/v1/projects/{project_id}/tables/{table_id}", { method: "PATCH", headers: { Authorization: "ApiKey {your_api_key}", "Content-Type": "application/json", }, body: JSON.stringify({ "default_sort": "string", "insert_mode": "append", "instruction": "string", "merge_columns_json": [ "string" ], "name": "string", "slug": "string", "strictness": "strict" }), }) const data = await response.json() ``` ```python title="Python" import requests response = requests.patch( "https://api.anyrow.ai/v1/projects/{project_id}/tables/{table_id}", headers={ "Authorization": "ApiKey {your_api_key}", }, json={ "default_sort": "string", "insert_mode": "append", "instruction": "string", "merge_columns_json": [ "string", ], "name": "string", "slug": "string", "strictness": "strict", }, ) print(response.json()) ``` ### Response ```json title="200" { "created_at": 1711468800000, "deleted_at": 1711468800000, "updated_at": 1711468800000, "id": "tbl_01h5a3g8k9m2n4p6q8r0t2v4x6", "project_id": "string", "name": "string", "slug": "string", "columns_json": [ { "currency_code": "string", "description": "string", "id": "string", "instruction": "string", "name": "string", "options": [ "string" ], "required": false, "searchable": true, "type": "string" } ], "instruction": "string", "strictness": "strict", "insert_mode": "append", "merge_columns_json": [ "string" ], "default_sort": "string", "row_count": 42, "usage_count": 42, "data_version": 42, "fts_version": 42, "last_used_at": 1711468800000 } ``` ## Delete table (soft, 72h grace) `DELETE /v1/projects/{project_id}/tables/{table_id}` Authentication: `Authorization: ApiKey {your_api_key}`. ### Path parameters - `project_id` (string, required) - `table_id` (string, required) ### Returns 200 `application/json`. - `id` (string, required) ### Errors - 404: `not_found`, `table_not_found` Errors every endpoint can return: [Errors](https://anyrow.ai/docs/api/errors.md). ### Request ```ts title="Node.js" import { AnyrowSDK } from "@anyrow/sdk" const anyrow = new AnyrowSDK({ baseURL: "https://api.anyrow.ai", headers: { Authorization: `ApiKey ${process.env.ANYROW_API_KEY}` }, }) const { data, error } = await anyrow.table.delete({ params: { project_id: "{project_id}", table_id: "{table_id}" }, }) ``` ```bash title="cURL" curl -X DELETE 'https://api.anyrow.ai/v1/projects/{project_id}/tables/{table_id}' \ -H 'Authorization: ApiKey {your_api_key}' ``` ```js title="JavaScript" const response = await fetch("https://api.anyrow.ai/v1/projects/{project_id}/tables/{table_id}", { method: "DELETE", headers: { Authorization: "ApiKey {your_api_key}", }, }) const data = await response.json() ``` ```python title="Python" import requests response = requests.delete( "https://api.anyrow.ai/v1/projects/{project_id}/tables/{table_id}", headers={ "Authorization": "ApiKey {your_api_key}", }, ) print(response.json()) ``` ### Response ```json title="200" { "id": "string" } ``` ## Duplicate table structure `POST /v1/projects/{project_id}/tables/{table_id}/duplicate` Authentication: `Authorization: ApiKey {your_api_key}`. ### Path parameters - `project_id` (string, required) - `table_id` (string, required) ### Request body Content type: `application/json` (required). - `name` (string, required): 1 to 128 characters. - `slug` (string, required): 1 to 50 characters. ### Returns 201 `application/json`: created. - `created_at` (integer, required): At least 0. - `deleted_at` (integer, required, nullable): At least 0. - `updated_at` (integer, required): At least 0. - `id` (string, required): 1 to 48 characters. - `project_id` (string, required): 1 to 48 characters. - `name` (string, required): 1 to 128 characters. - `slug` (string, required): 1 to 50 characters. - `columns_json` (array of objects, required): 1 to 100 items. - `currency_code` (string, optional): Exactly 3 characters. - `default` (any, optional) - `description` (string, optional, nullable): Up to 256 characters. - `id` (string, required): 1 to 36 characters. - `instruction` (string, optional, nullable): Up to 512 characters. - `name` (string, required): 1 to 64 characters. Matches `^[\w\s.-]+$`. - `options` (array of strings, optional): Up to 500 items. - `required` (boolean, required): Defaults to `false`. - `searchable` (boolean, optional) - `type` (string, required): One of `array`, `boolean`, `currency`, `date`, `email`, `enum`, `multi_select`, `number`, `string`, `text`, `url`. Defaults to `string`. - `instruction` (string, required, nullable): Up to 512 characters. - `strictness` (string, required): One of `strict`, `balanced`, `flexible`. - `insert_mode` (string, required): One of `append`, `dedup`, `merge`, `replace`. - `merge_columns_json` (array of strings, required, nullable): At least 1 items. - `default_sort` (string, required, nullable) - `row_count` (integer, required): At least 0. - `usage_count` (integer, required): At least 0. - `data_version` (integer, required): At least 0. - `fts_version` (integer, required): At least 0. - `last_used_at` (integer, required, nullable): At least 0. ### Errors - 404: `not_found`, `table_not_found` - 409: `table_project_id_duplicate` Errors every endpoint can return: [Errors](https://anyrow.ai/docs/api/errors.md). ### Request ```ts title="Node.js" import { AnyrowSDK } from "@anyrow/sdk" const anyrow = new AnyrowSDK({ baseURL: "https://api.anyrow.ai", headers: { Authorization: `ApiKey ${process.env.ANYROW_API_KEY}` }, }) const { data, error } = await anyrow.table.duplicate({ params: { project_id: "{project_id}", table_id: "{table_id}" }, json: { name: "string", slug: "string" }, }) ``` ```bash title="cURL" curl -X POST 'https://api.anyrow.ai/v1/projects/{project_id}/tables/{table_id}/duplicate' \ -H 'Authorization: ApiKey {your_api_key}' \ -H 'Content-Type: application/json' \ -d '{ "name": "string", "slug": "string" }' ``` ```js title="JavaScript" const response = await fetch("https://api.anyrow.ai/v1/projects/{project_id}/tables/{table_id}/duplicate", { method: "POST", headers: { Authorization: "ApiKey {your_api_key}", "Content-Type": "application/json", }, body: JSON.stringify({ "name": "string", "slug": "string" }), }) const data = await response.json() ``` ```python title="Python" import requests response = requests.post( "https://api.anyrow.ai/v1/projects/{project_id}/tables/{table_id}/duplicate", headers={ "Authorization": "ApiKey {your_api_key}", }, json={ "name": "string", "slug": "string", }, ) print(response.json()) ``` ### Response ```json title="201" { "created_at": 1711468800000, "deleted_at": 1711468800000, "updated_at": 1711468800000, "id": "tbl_01h5a3g8k9m2n4p6q8r0t2v4x6", "project_id": "string", "name": "string", "slug": "string", "columns_json": [ { "currency_code": "string", "description": "string", "id": "string", "instruction": "string", "name": "string", "options": [ "string" ], "required": false, "searchable": true, "type": "string" } ], "instruction": "string", "strictness": "strict", "insert_mode": "append", "merge_columns_json": [ "string" ], "default_sort": "string", "row_count": 42, "usage_count": 42, "data_version": 42, "fts_version": 42, "last_used_at": 1711468800000 } ``` ## Restore deleted table `POST /v1/projects/{project_id}/tables/{table_id}/restore` Authentication: `Authorization: ApiKey {your_api_key}`. ### Path parameters - `project_id` (string, required) - `table_id` (string, required) ### Request body Content type: `application/json` (required). - `slug` (string, optional): 1 to 50 characters. ### Returns 200 `application/json`. - `created_at` (integer, required): At least 0. - `deleted_at` (integer, required, nullable): At least 0. - `updated_at` (integer, required): At least 0. - `id` (string, required): 1 to 48 characters. - `project_id` (string, required): 1 to 48 characters. - `name` (string, required): 1 to 128 characters. - `slug` (string, required): 1 to 50 characters. - `columns_json` (array of objects, required): 1 to 100 items. - `currency_code` (string, optional): Exactly 3 characters. - `default` (any, optional) - `description` (string, optional, nullable): Up to 256 characters. - `id` (string, required): 1 to 36 characters. - `instruction` (string, optional, nullable): Up to 512 characters. - `name` (string, required): 1 to 64 characters. Matches `^[\w\s.-]+$`. - `options` (array of strings, optional): Up to 500 items. - `required` (boolean, required): Defaults to `false`. - `searchable` (boolean, optional) - `type` (string, required): One of `array`, `boolean`, `currency`, `date`, `email`, `enum`, `multi_select`, `number`, `string`, `text`, `url`. Defaults to `string`. - `instruction` (string, required, nullable): Up to 512 characters. - `strictness` (string, required): One of `strict`, `balanced`, `flexible`. - `insert_mode` (string, required): One of `append`, `dedup`, `merge`, `replace`. - `merge_columns_json` (array of strings, required, nullable): At least 1 items. - `default_sort` (string, required, nullable) - `row_count` (integer, required): At least 0. - `usage_count` (integer, required): At least 0. - `data_version` (integer, required): At least 0. - `fts_version` (integer, required): At least 0. - `last_used_at` (integer, required, nullable): At least 0. ### Errors - 404: `not_found`, `table_not_found` - 409: `table_project_id_duplicate` Errors every endpoint can return: [Errors](https://anyrow.ai/docs/api/errors.md). ### Request ```ts title="Node.js" import { AnyrowSDK } from "@anyrow/sdk" const anyrow = new AnyrowSDK({ baseURL: "https://api.anyrow.ai", headers: { Authorization: `ApiKey ${process.env.ANYROW_API_KEY}` }, }) const { data, error } = await anyrow.table.restore({ params: { project_id: "{project_id}", table_id: "{table_id}" }, json: { slug: "string" }, }) ``` ```bash title="cURL" curl -X POST 'https://api.anyrow.ai/v1/projects/{project_id}/tables/{table_id}/restore' \ -H 'Authorization: ApiKey {your_api_key}' \ -H 'Content-Type: application/json' \ -d '{ "slug": "string" }' ``` ```js title="JavaScript" const response = await fetch("https://api.anyrow.ai/v1/projects/{project_id}/tables/{table_id}/restore", { method: "POST", headers: { Authorization: "ApiKey {your_api_key}", "Content-Type": "application/json", }, body: JSON.stringify({ "slug": "string" }), }) const data = await response.json() ``` ```python title="Python" import requests response = requests.post( "https://api.anyrow.ai/v1/projects/{project_id}/tables/{table_id}/restore", headers={ "Authorization": "ApiKey {your_api_key}", }, json={ "slug": "string", }, ) print(response.json()) ``` ### Response ```json title="200" { "created_at": 1711468800000, "deleted_at": 1711468800000, "updated_at": 1711468800000, "id": "tbl_01h5a3g8k9m2n4p6q8r0t2v4x6", "project_id": "string", "name": "string", "slug": "string", "columns_json": [ { "currency_code": "string", "description": "string", "id": "string", "instruction": "string", "name": "string", "options": [ "string" ], "required": false, "searchable": true, "type": "string" } ], "instruction": "string", "strictness": "strict", "insert_mode": "append", "merge_columns_json": [ "string" ], "default_sort": "string", "row_count": 42, "usage_count": 42, "data_version": 42, "fts_version": 42, "last_used_at": 1711468800000 } ``` --- Source: https://anyrow.ai/docs/api/columns # Columns A table's columns: what to extract, with which type and instruction. - [Add column](https://anyrow.ai/docs/api/columns/add.md): `POST /v1/projects/{project_id}/tables/{table_id}/columns` - [Reorder columns](https://anyrow.ai/docs/api/columns/reorder.md): `PUT /v1/projects/{project_id}/tables/{table_id}/columns/order` - [Update column](https://anyrow.ai/docs/api/columns/update.md): `PATCH /v1/projects/{project_id}/tables/{table_id}/columns/{col_id}` - [Remove column](https://anyrow.ai/docs/api/columns/remove.md): `DELETE /v1/projects/{project_id}/tables/{table_id}/columns/{col_id}` - [Get distinct column values](https://anyrow.ai/docs/api/columns/distinct.md): `GET /v1/projects/{project_id}/tables/{table_id}/columns/{col_id}/distinct` ## Add column `POST /v1/projects/{project_id}/tables/{table_id}/columns` Authentication: `Authorization: ApiKey {your_api_key}`. ### Path parameters - `project_id` (string, required) - `table_id` (string, required) ### Request body Content type: `application/json` (required). - `currency_code` (string, optional): Exactly 3 characters. - `description` (string, optional, nullable): Up to 256 characters. - `instruction` (string, optional, nullable): Up to 512 characters. - `name` (string, required): 1 to 64 characters. Matches `^[\w\s.-]+$`. - `options` (array of strings, optional): Up to 500 items. - `required` (boolean, optional): Defaults to `false`. - `type` (string, optional): One of `array`, `boolean`, `currency`, `date`, `email`, `enum`, `multi_select`, `number`, `string`, `text`, `url`. Defaults to `string`. ### Returns 200 `application/json`. - `created_at` (integer, required): At least 0. - `deleted_at` (integer, required, nullable): At least 0. - `updated_at` (integer, required): At least 0. - `id` (string, required): 1 to 48 characters. - `project_id` (string, required): 1 to 48 characters. - `name` (string, required): 1 to 128 characters. - `slug` (string, required): 1 to 50 characters. - `columns_json` (array of objects, required): 1 to 100 items. - `currency_code` (string, optional): Exactly 3 characters. - `default` (any, optional) - `description` (string, optional, nullable): Up to 256 characters. - `id` (string, required): 1 to 36 characters. - `instruction` (string, optional, nullable): Up to 512 characters. - `name` (string, required): 1 to 64 characters. Matches `^[\w\s.-]+$`. - `options` (array of strings, optional): Up to 500 items. - `required` (boolean, required): Defaults to `false`. - `searchable` (boolean, optional) - `type` (string, required): One of `array`, `boolean`, `currency`, `date`, `email`, `enum`, `multi_select`, `number`, `string`, `text`, `url`. Defaults to `string`. - `instruction` (string, required, nullable): Up to 512 characters. - `strictness` (string, required): One of `strict`, `balanced`, `flexible`. - `insert_mode` (string, required): One of `append`, `dedup`, `merge`, `replace`. - `merge_columns_json` (array of strings, required, nullable): At least 1 items. - `default_sort` (string, required, nullable) - `row_count` (integer, required): At least 0. - `usage_count` (integer, required): At least 0. - `data_version` (integer, required): At least 0. - `fts_version` (integer, required): At least 0. - `last_used_at` (integer, required, nullable): At least 0. ### Errors - 404: `not_found`, `table_not_found` - 409: `optimistic_lock_conflict` Errors every endpoint can return: [Errors](https://anyrow.ai/docs/api/errors.md). ### Request ```ts title="Node.js" import { AnyrowSDK } from "@anyrow/sdk" const anyrow = new AnyrowSDK({ baseURL: "https://api.anyrow.ai", headers: { Authorization: `ApiKey ${process.env.ANYROW_API_KEY}` }, }) const { data, error } = await anyrow.column.add({ params: { project_id: "{project_id}", table_id: "{table_id}" }, json: { currency_code: "string", description: "string", instruction: "string", name: "string", options: [ "string" ], required: false, type: "string" }, }) ``` ```bash title="cURL" curl -X POST 'https://api.anyrow.ai/v1/projects/{project_id}/tables/{table_id}/columns' \ -H 'Authorization: ApiKey {your_api_key}' \ -H 'Content-Type: application/json' \ -d '{ "currency_code": "string", "description": "string", "instruction": "string", "name": "string", "options": [ "string" ], "required": false, "type": "string" }' ``` ```js title="JavaScript" const response = await fetch("https://api.anyrow.ai/v1/projects/{project_id}/tables/{table_id}/columns", { method: "POST", headers: { Authorization: "ApiKey {your_api_key}", "Content-Type": "application/json", }, body: JSON.stringify({ "currency_code": "string", "description": "string", "instruction": "string", "name": "string", "options": [ "string" ], "required": false, "type": "string" }), }) const data = await response.json() ``` ```python title="Python" import requests response = requests.post( "https://api.anyrow.ai/v1/projects/{project_id}/tables/{table_id}/columns", headers={ "Authorization": "ApiKey {your_api_key}", }, json={ "currency_code": "string", "description": "string", "instruction": "string", "name": "string", "options": [ "string", ], "required": False, "type": "string", }, ) print(response.json()) ``` ### Response ```json title="200" { "created_at": 1711468800000, "deleted_at": 1711468800000, "updated_at": 1711468800000, "id": "tbl_01h5a3g8k9m2n4p6q8r0t2v4x6", "project_id": "string", "name": "string", "slug": "string", "columns_json": [ { "currency_code": "string", "description": "string", "id": "string", "instruction": "string", "name": "string", "options": [ "string" ], "required": false, "searchable": true, "type": "string" } ], "instruction": "string", "strictness": "strict", "insert_mode": "append", "merge_columns_json": [ "string" ], "default_sort": "string", "row_count": 42, "usage_count": 42, "data_version": 42, "fts_version": 42, "last_used_at": 1711468800000 } ``` ## Reorder columns `PUT /v1/projects/{project_id}/tables/{table_id}/columns/order` Authentication: `Authorization: ApiKey {your_api_key}`. ### Path parameters - `project_id` (string, required) - `table_id` (string, required) ### Request body Content type: `application/json` (required). - `order` (array of strings, required): At least 1 items. ### Returns 200 `application/json`. - `created_at` (integer, required): At least 0. - `deleted_at` (integer, required, nullable): At least 0. - `updated_at` (integer, required): At least 0. - `id` (string, required): 1 to 48 characters. - `project_id` (string, required): 1 to 48 characters. - `name` (string, required): 1 to 128 characters. - `slug` (string, required): 1 to 50 characters. - `columns_json` (array of objects, required): 1 to 100 items. - `currency_code` (string, optional): Exactly 3 characters. - `default` (any, optional) - `description` (string, optional, nullable): Up to 256 characters. - `id` (string, required): 1 to 36 characters. - `instruction` (string, optional, nullable): Up to 512 characters. - `name` (string, required): 1 to 64 characters. Matches `^[\w\s.-]+$`. - `options` (array of strings, optional): Up to 500 items. - `required` (boolean, required): Defaults to `false`. - `searchable` (boolean, optional) - `type` (string, required): One of `array`, `boolean`, `currency`, `date`, `email`, `enum`, `multi_select`, `number`, `string`, `text`, `url`. Defaults to `string`. - `instruction` (string, required, nullable): Up to 512 characters. - `strictness` (string, required): One of `strict`, `balanced`, `flexible`. - `insert_mode` (string, required): One of `append`, `dedup`, `merge`, `replace`. - `merge_columns_json` (array of strings, required, nullable): At least 1 items. - `default_sort` (string, required, nullable) - `row_count` (integer, required): At least 0. - `usage_count` (integer, required): At least 0. - `data_version` (integer, required): At least 0. - `fts_version` (integer, required): At least 0. - `last_used_at` (integer, required, nullable): At least 0. ### Errors - 404: `column_not_found`, `not_found`, `table_not_found` - 409: `optimistic_lock_conflict` Errors every endpoint can return: [Errors](https://anyrow.ai/docs/api/errors.md). ### Request ```ts title="Node.js" import { AnyrowSDK } from "@anyrow/sdk" const anyrow = new AnyrowSDK({ baseURL: "https://api.anyrow.ai", headers: { Authorization: `ApiKey ${process.env.ANYROW_API_KEY}` }, }) const { data, error } = await anyrow.column.reorder({ params: { project_id: "{project_id}", table_id: "{table_id}" }, json: { order: [ "string" ] }, }) ``` ```bash title="cURL" curl -X PUT 'https://api.anyrow.ai/v1/projects/{project_id}/tables/{table_id}/columns/order' \ -H 'Authorization: ApiKey {your_api_key}' \ -H 'Content-Type: application/json' \ -d '{ "order": [ "string" ] }' ``` ```js title="JavaScript" const response = await fetch("https://api.anyrow.ai/v1/projects/{project_id}/tables/{table_id}/columns/order", { method: "PUT", headers: { Authorization: "ApiKey {your_api_key}", "Content-Type": "application/json", }, body: JSON.stringify({ "order": [ "string" ] }), }) const data = await response.json() ``` ```python title="Python" import requests response = requests.put( "https://api.anyrow.ai/v1/projects/{project_id}/tables/{table_id}/columns/order", headers={ "Authorization": "ApiKey {your_api_key}", }, json={ "order": [ "string", ], }, ) print(response.json()) ``` ### Response ```json title="200" { "created_at": 1711468800000, "deleted_at": 1711468800000, "updated_at": 1711468800000, "id": "tbl_01h5a3g8k9m2n4p6q8r0t2v4x6", "project_id": "string", "name": "string", "slug": "string", "columns_json": [ { "currency_code": "string", "description": "string", "id": "string", "instruction": "string", "name": "string", "options": [ "string" ], "required": false, "searchable": true, "type": "string" } ], "instruction": "string", "strictness": "strict", "insert_mode": "append", "merge_columns_json": [ "string" ], "default_sort": "string", "row_count": 42, "usage_count": 42, "data_version": 42, "fts_version": 42, "last_used_at": 1711468800000 } ``` ## Update column `PATCH /v1/projects/{project_id}/tables/{table_id}/columns/{col_id}` Authentication: `Authorization: ApiKey {your_api_key}`. ### Path parameters - `project_id` (string, required) - `table_id` (string, required) - `col_id` (string, required) ### Request body Content type: `application/json` (required). - `description` (string, optional, nullable): Up to 256 characters. - `instruction` (string, optional, nullable): Up to 512 characters. - `name` (string, optional): 1 to 64 characters. Matches `^[\w\s.-]+$`. - `options` (array of strings, optional): Up to 500 items. - `required` (boolean, optional): Defaults to `false`. - `searchable` (boolean, optional) - `type` (string, optional): One of `array`, `boolean`, `currency`, `date`, `email`, `enum`, `multi_select`, `number`, `string`, `text`, `url`. Defaults to `string`. ### Returns 200 `application/json`. - `created_at` (integer, required): At least 0. - `deleted_at` (integer, required, nullable): At least 0. - `updated_at` (integer, required): At least 0. - `id` (string, required): 1 to 48 characters. - `project_id` (string, required): 1 to 48 characters. - `name` (string, required): 1 to 128 characters. - `slug` (string, required): 1 to 50 characters. - `columns_json` (array of objects, required): 1 to 100 items. - `currency_code` (string, optional): Exactly 3 characters. - `default` (any, optional) - `description` (string, optional, nullable): Up to 256 characters. - `id` (string, required): 1 to 36 characters. - `instruction` (string, optional, nullable): Up to 512 characters. - `name` (string, required): 1 to 64 characters. Matches `^[\w\s.-]+$`. - `options` (array of strings, optional): Up to 500 items. - `required` (boolean, required): Defaults to `false`. - `searchable` (boolean, optional) - `type` (string, required): One of `array`, `boolean`, `currency`, `date`, `email`, `enum`, `multi_select`, `number`, `string`, `text`, `url`. Defaults to `string`. - `instruction` (string, required, nullable): Up to 512 characters. - `strictness` (string, required): One of `strict`, `balanced`, `flexible`. - `insert_mode` (string, required): One of `append`, `dedup`, `merge`, `replace`. - `merge_columns_json` (array of strings, required, nullable): At least 1 items. - `default_sort` (string, required, nullable) - `row_count` (integer, required): At least 0. - `usage_count` (integer, required): At least 0. - `data_version` (integer, required): At least 0. - `fts_version` (integer, required): At least 0. - `last_used_at` (integer, required, nullable): At least 0. ### Errors - 404: `column_not_found`, `not_found`, `table_not_found` - 409: `optimistic_lock_conflict` Errors every endpoint can return: [Errors](https://anyrow.ai/docs/api/errors.md). ### Request ```ts title="Node.js" import { AnyrowSDK } from "@anyrow/sdk" const anyrow = new AnyrowSDK({ baseURL: "https://api.anyrow.ai", headers: { Authorization: `ApiKey ${process.env.ANYROW_API_KEY}` }, }) const { data, error } = await anyrow.column.update({ params: { project_id: "{project_id}", table_id: "{table_id}", col_id: "{col_id}" }, json: { description: "string", instruction: "string", name: "string", options: [ "string" ], required: false, searchable: true, type: "string" }, }) ``` ```bash title="cURL" curl -X PATCH 'https://api.anyrow.ai/v1/projects/{project_id}/tables/{table_id}/columns/{col_id}' \ -H 'Authorization: ApiKey {your_api_key}' \ -H 'Content-Type: application/json' \ -d '{ "description": "string", "instruction": "string", "name": "string", "options": [ "string" ], "required": false, "searchable": true, "type": "string" }' ``` ```js title="JavaScript" const response = await fetch("https://api.anyrow.ai/v1/projects/{project_id}/tables/{table_id}/columns/{col_id}", { method: "PATCH", headers: { Authorization: "ApiKey {your_api_key}", "Content-Type": "application/json", }, body: JSON.stringify({ "description": "string", "instruction": "string", "name": "string", "options": [ "string" ], "required": false, "searchable": true, "type": "string" }), }) const data = await response.json() ``` ```python title="Python" import requests response = requests.patch( "https://api.anyrow.ai/v1/projects/{project_id}/tables/{table_id}/columns/{col_id}", headers={ "Authorization": "ApiKey {your_api_key}", }, json={ "description": "string", "instruction": "string", "name": "string", "options": [ "string", ], "required": False, "searchable": True, "type": "string", }, ) print(response.json()) ``` ### Response ```json title="200" { "created_at": 1711468800000, "deleted_at": 1711468800000, "updated_at": 1711468800000, "id": "tbl_01h5a3g8k9m2n4p6q8r0t2v4x6", "project_id": "string", "name": "string", "slug": "string", "columns_json": [ { "currency_code": "string", "description": "string", "id": "string", "instruction": "string", "name": "string", "options": [ "string" ], "required": false, "searchable": true, "type": "string" } ], "instruction": "string", "strictness": "strict", "insert_mode": "append", "merge_columns_json": [ "string" ], "default_sort": "string", "row_count": 42, "usage_count": 42, "data_version": 42, "fts_version": 42, "last_used_at": 1711468800000 } ``` ## Remove column `DELETE /v1/projects/{project_id}/tables/{table_id}/columns/{col_id}` Authentication: `Authorization: ApiKey {your_api_key}`. ### Path parameters - `project_id` (string, required) - `table_id` (string, required) - `col_id` (string, required) ### Returns 200 `application/json`. - `created_at` (integer, required): At least 0. - `deleted_at` (integer, required, nullable): At least 0. - `updated_at` (integer, required): At least 0. - `id` (string, required): 1 to 48 characters. - `project_id` (string, required): 1 to 48 characters. - `name` (string, required): 1 to 128 characters. - `slug` (string, required): 1 to 50 characters. - `columns_json` (array of objects, required): 1 to 100 items. - `currency_code` (string, optional): Exactly 3 characters. - `default` (any, optional) - `description` (string, optional, nullable): Up to 256 characters. - `id` (string, required): 1 to 36 characters. - `instruction` (string, optional, nullable): Up to 512 characters. - `name` (string, required): 1 to 64 characters. Matches `^[\w\s.-]+$`. - `options` (array of strings, optional): Up to 500 items. - `required` (boolean, required): Defaults to `false`. - `searchable` (boolean, optional) - `type` (string, required): One of `array`, `boolean`, `currency`, `date`, `email`, `enum`, `multi_select`, `number`, `string`, `text`, `url`. Defaults to `string`. - `instruction` (string, required, nullable): Up to 512 characters. - `strictness` (string, required): One of `strict`, `balanced`, `flexible`. - `insert_mode` (string, required): One of `append`, `dedup`, `merge`, `replace`. - `merge_columns_json` (array of strings, required, nullable): At least 1 items. - `default_sort` (string, required, nullable) - `row_count` (integer, required): At least 0. - `usage_count` (integer, required): At least 0. - `data_version` (integer, required): At least 0. - `fts_version` (integer, required): At least 0. - `last_used_at` (integer, required, nullable): At least 0. ### Errors - 404: `column_not_found`, `not_found`, `table_not_found` - 409: `optimistic_lock_conflict` Errors every endpoint can return: [Errors](https://anyrow.ai/docs/api/errors.md). ### Request ```ts title="Node.js" import { AnyrowSDK } from "@anyrow/sdk" const anyrow = new AnyrowSDK({ baseURL: "https://api.anyrow.ai", headers: { Authorization: `ApiKey ${process.env.ANYROW_API_KEY}` }, }) const { data, error } = await anyrow.column.remove({ params: { project_id: "{project_id}", table_id: "{table_id}", col_id: "{col_id}" }, }) ``` ```bash title="cURL" curl -X DELETE 'https://api.anyrow.ai/v1/projects/{project_id}/tables/{table_id}/columns/{col_id}' \ -H 'Authorization: ApiKey {your_api_key}' ``` ```js title="JavaScript" const response = await fetch("https://api.anyrow.ai/v1/projects/{project_id}/tables/{table_id}/columns/{col_id}", { method: "DELETE", headers: { Authorization: "ApiKey {your_api_key}", }, }) const data = await response.json() ``` ```python title="Python" import requests response = requests.delete( "https://api.anyrow.ai/v1/projects/{project_id}/tables/{table_id}/columns/{col_id}", headers={ "Authorization": "ApiKey {your_api_key}", }, ) print(response.json()) ``` ### Response ```json title="200" { "created_at": 1711468800000, "deleted_at": 1711468800000, "updated_at": 1711468800000, "id": "tbl_01h5a3g8k9m2n4p6q8r0t2v4x6", "project_id": "string", "name": "string", "slug": "string", "columns_json": [ { "currency_code": "string", "description": "string", "id": "string", "instruction": "string", "name": "string", "options": [ "string" ], "required": false, "searchable": true, "type": "string" } ], "instruction": "string", "strictness": "strict", "insert_mode": "append", "merge_columns_json": [ "string" ], "default_sort": "string", "row_count": 42, "usage_count": 42, "data_version": 42, "fts_version": 42, "last_used_at": 1711468800000 } ``` ## Get distinct column values `GET /v1/projects/{project_id}/tables/{table_id}/columns/{col_id}/distinct` Authentication: `Authorization: ApiKey {your_api_key}`. ### Path parameters - `project_id` (string, required) - `table_id` (string, required) - `col_id` (string, required) ### Query parameters - `limit` (integer, optional): Defaults to `100`. Between 1 and 500. - `q` (string, optional): Up to 200 characters. ### Returns 200 `application/json`. - `values` (array of string | number, required) ### Errors - 404: `column_not_found`, `not_found`, `table_not_found` Errors every endpoint can return: [Errors](https://anyrow.ai/docs/api/errors.md). ### Request ```ts title="Node.js" import { AnyrowSDK } from "@anyrow/sdk" const anyrow = new AnyrowSDK({ baseURL: "https://api.anyrow.ai", headers: { Authorization: `ApiKey ${process.env.ANYROW_API_KEY}` }, }) const { data, error } = await anyrow.column.distinct({ params: { project_id: "{project_id}", table_id: "{table_id}", col_id: "{col_id}" }, }) ``` ```bash title="cURL" curl 'https://api.anyrow.ai/v1/projects/{project_id}/tables/{table_id}/columns/{col_id}/distinct' \ -H 'Authorization: ApiKey {your_api_key}' ``` ```js title="JavaScript" const response = await fetch("https://api.anyrow.ai/v1/projects/{project_id}/tables/{table_id}/columns/{col_id}/distinct", { headers: { Authorization: "ApiKey {your_api_key}", }, }) const data = await response.json() ``` ```python title="Python" import requests response = requests.get( "https://api.anyrow.ai/v1/projects/{project_id}/tables/{table_id}/columns/{col_id}/distinct", headers={ "Authorization": "ApiKey {your_api_key}", }, ) print(response.json()) ``` ### Response ```json title="200" { "values": [ "string" ] } ``` --- Source: https://anyrow.ai/docs/api/rows # Rows The records in a table: list, filter, aggregate, create, edit and bulk-write them. - [List rows](https://anyrow.ai/docs/api/rows/list.md): `GET /v1/projects/{project_id}/tables/{table_id}/rows` - [Create row](https://anyrow.ai/docs/api/rows/create.md): `POST /v1/projects/{project_id}/tables/{table_id}/rows` - [Aggregate column values](https://anyrow.ai/docs/api/rows/aggregate.md): `GET /v1/projects/{project_id}/tables/{table_id}/rows/aggregate` - [Bulk create/update/delete rows](https://anyrow.ai/docs/api/rows/bulk.md): `POST /v1/projects/{project_id}/tables/{table_id}/rows/bulk` - [Get row](https://anyrow.ai/docs/api/rows/get.md): `GET /v1/projects/{project_id}/tables/{table_id}/rows/{row_id}` - [Update row](https://anyrow.ai/docs/api/rows/update.md): `PATCH /v1/projects/{project_id}/tables/{table_id}/rows/{row_id}` - [Delete row](https://anyrow.ai/docs/api/rows/delete.md): `DELETE /v1/projects/{project_id}/tables/{table_id}/rows/{row_id}` - [The source file behind a row: download it, or open a PDF or image inline](https://anyrow.ai/docs/api/rows/source.md): `GET /v1/projects/{project_id}/tables/{table_id}/rows/{row_id}/source` ## List rows `GET /v1/projects/{project_id}/tables/{table_id}/rows` Authentication: `Authorization: ApiKey {your_api_key}`. ### Path parameters - `project_id` (string, required) - `table_id` (string, required) ### Query parameters - `cursor` (string, optional) - `filter` (string, optional) - `limit` (integer, optional): Defaults to `20`. Between 1 and 100. - `order` (string, optional) - `page` (integer, optional): At least 1. - `q` (string, optional): Up to 200 characters. ### Returns 200 `application/json`. - `count` (integer, required): At least 0. - `hasMore` (boolean, required) - `limit` (integer, required): At least 1. - `nextCursor` (string, required, nullable) - `page` (integer, required, nullable): At least 1. - `rows` (array of objects, required) ### Errors - 404: `not_found`, `table_not_found` Errors every endpoint can return: [Errors](https://anyrow.ai/docs/api/errors.md). ### Request ```ts title="Node.js" import { AnyrowSDK } from "@anyrow/sdk" const anyrow = new AnyrowSDK({ baseURL: "https://api.anyrow.ai", headers: { Authorization: `ApiKey ${process.env.ANYROW_API_KEY}` }, }) const { data, error } = await anyrow.row.list({ params: { project_id: "{project_id}", table_id: "{table_id}" }, }) ``` ```bash title="cURL" curl 'https://api.anyrow.ai/v1/projects/{project_id}/tables/{table_id}/rows' \ -H 'Authorization: ApiKey {your_api_key}' ``` ```js title="JavaScript" const response = await fetch("https://api.anyrow.ai/v1/projects/{project_id}/tables/{table_id}/rows", { headers: { Authorization: "ApiKey {your_api_key}", }, }) const data = await response.json() ``` ```python title="Python" import requests response = requests.get( "https://api.anyrow.ai/v1/projects/{project_id}/tables/{table_id}/rows", headers={ "Authorization": "ApiKey {your_api_key}", }, ) print(response.json()) ``` ### Response ```json title="200" { "count": 0, "hasMore": true, "limit": 1, "nextCursor": "string", "page": 1, "rows": [ {} ] } ``` ## Create row `POST /v1/projects/{project_id}/tables/{table_id}/rows` Authentication: `Authorization: ApiKey {your_api_key}`. ### Path parameters - `project_id` (string, required) - `table_id` (string, required) ### Request body Content type: `application/json` (required). A object. ### Returns 201 `application/json`: created. ### Errors - 404: `not_found`, `table_not_found` Errors every endpoint can return: [Errors](https://anyrow.ai/docs/api/errors.md). ### Request ```ts title="Node.js" import { AnyrowSDK } from "@anyrow/sdk" const anyrow = new AnyrowSDK({ baseURL: "https://api.anyrow.ai", headers: { Authorization: `ApiKey ${process.env.ANYROW_API_KEY}` }, }) const { data, error } = await anyrow.row.create({ params: { project_id: "{project_id}", table_id: "{table_id}" }, json: {}, }) ``` ```bash title="cURL" curl -X POST 'https://api.anyrow.ai/v1/projects/{project_id}/tables/{table_id}/rows' \ -H 'Authorization: ApiKey {your_api_key}' \ -H 'Content-Type: application/json' \ -d '{}' ``` ```js title="JavaScript" const response = await fetch("https://api.anyrow.ai/v1/projects/{project_id}/tables/{table_id}/rows", { method: "POST", headers: { Authorization: "ApiKey {your_api_key}", "Content-Type": "application/json", }, body: JSON.stringify({}), }) const data = await response.json() ``` ```python title="Python" import requests response = requests.post( "https://api.anyrow.ai/v1/projects/{project_id}/tables/{table_id}/rows", headers={ "Authorization": "ApiKey {your_api_key}", }, json={}, ) print(response.json()) ``` ### Response ```json title="201" {} ``` ## Aggregate column values `GET /v1/projects/{project_id}/tables/{table_id}/rows/aggregate` Authentication: `Authorization: ApiKey {your_api_key}`. ### Path parameters - `project_id` (string, required) - `table_id` (string, required) ### Query parameters - `aggs` (string, required) - `filter` (string, optional) ### Returns 200 `application/json`. ### Errors - 404: `not_found`, `table_not_found` Errors every endpoint can return: [Errors](https://anyrow.ai/docs/api/errors.md). ### Request ```ts title="Node.js" import { AnyrowSDK } from "@anyrow/sdk" const anyrow = new AnyrowSDK({ baseURL: "https://api.anyrow.ai", headers: { Authorization: `ApiKey ${process.env.ANYROW_API_KEY}` }, }) const { data, error } = await anyrow.row.aggregate({ params: { project_id: "{project_id}", table_id: "{table_id}" }, search: { aggs: "{aggs}" }, }) ``` ```bash title="cURL" curl 'https://api.anyrow.ai/v1/projects/{project_id}/tables/{table_id}/rows/aggregate?aggs=%7Baggs%7D' \ -H 'Authorization: ApiKey {your_api_key}' ``` ```js title="JavaScript" const response = await fetch("https://api.anyrow.ai/v1/projects/{project_id}/tables/{table_id}/rows/aggregate?aggs=%7Baggs%7D", { headers: { Authorization: "ApiKey {your_api_key}", }, }) const data = await response.json() ``` ```python title="Python" import requests response = requests.get( "https://api.anyrow.ai/v1/projects/{project_id}/tables/{table_id}/rows/aggregate?aggs=%7Baggs%7D", headers={ "Authorization": "ApiKey {your_api_key}", }, ) print(response.json()) ``` ### Response ```json title="200" { "key": 0 } ``` ## Bulk create/update/delete rows `POST /v1/projects/{project_id}/tables/{table_id}/rows/bulk` Authentication: `Authorization: ApiKey {your_api_key}`. ### Path parameters - `project_id` (string, required) - `table_id` (string, required) ### Request body Content type: `application/json` (required). - `creates` (array of objects, optional): Up to 1000 items. - `deletes` (array of strings, optional): Up to 1000 items. - `updates` (array of objects, optional): Up to 1000 items. - `data` (object, required) - `id` (string, required) ### Returns 200 `application/json`. - `created` (array of objects, optional) - `deleted` (array of strings, optional) - `updated` (array of objects, optional) ### Errors - 404: `not_found`, `table_not_found` Errors every endpoint can return: [Errors](https://anyrow.ai/docs/api/errors.md). ### Request ```ts title="Node.js" import { AnyrowSDK } from "@anyrow/sdk" const anyrow = new AnyrowSDK({ baseURL: "https://api.anyrow.ai", headers: { Authorization: `ApiKey ${process.env.ANYROW_API_KEY}` }, }) const { data, error } = await anyrow.row.bulk({ params: { project_id: "{project_id}", table_id: "{table_id}" }, json: { creates: [ {} ], deletes: [ "string" ], updates: [ { data: {}, id: "string" } ] }, }) ``` ```bash title="cURL" curl -X POST 'https://api.anyrow.ai/v1/projects/{project_id}/tables/{table_id}/rows/bulk' \ -H 'Authorization: ApiKey {your_api_key}' \ -H 'Content-Type: application/json' \ -d '{ "creates": [ {} ], "deletes": [ "string" ], "updates": [ { "data": {}, "id": "string" } ] }' ``` ```js title="JavaScript" const response = await fetch("https://api.anyrow.ai/v1/projects/{project_id}/tables/{table_id}/rows/bulk", { method: "POST", headers: { Authorization: "ApiKey {your_api_key}", "Content-Type": "application/json", }, body: JSON.stringify({ "creates": [ {} ], "deletes": [ "string" ], "updates": [ { "data": {}, "id": "string" } ] }), }) const data = await response.json() ``` ```python title="Python" import requests response = requests.post( "https://api.anyrow.ai/v1/projects/{project_id}/tables/{table_id}/rows/bulk", headers={ "Authorization": "ApiKey {your_api_key}", }, json={ "creates": [ {}, ], "deletes": [ "string", ], "updates": [ { "data": {}, "id": "string", }, ], }, ) print(response.json()) ``` ### Response ```json title="200" { "created": [ {} ], "deleted": [ "string" ], "updated": [ {} ] } ``` ## Get row `GET /v1/projects/{project_id}/tables/{table_id}/rows/{row_id}` Authentication: `Authorization: ApiKey {your_api_key}`. ### Path parameters - `project_id` (string, required) - `table_id` (string, required) - `row_id` (string, required) ### Returns 200 `application/json`. ### Errors - 404: `not_found`, `row_not_found`, `table_not_found` Errors every endpoint can return: [Errors](https://anyrow.ai/docs/api/errors.md). ### Request ```ts title="Node.js" import { AnyrowSDK } from "@anyrow/sdk" const anyrow = new AnyrowSDK({ baseURL: "https://api.anyrow.ai", headers: { Authorization: `ApiKey ${process.env.ANYROW_API_KEY}` }, }) const { data, error } = await anyrow.row.get({ params: { project_id: "{project_id}", table_id: "{table_id}", row_id: "{row_id}" }, }) ``` ```bash title="cURL" curl 'https://api.anyrow.ai/v1/projects/{project_id}/tables/{table_id}/rows/{row_id}' \ -H 'Authorization: ApiKey {your_api_key}' ``` ```js title="JavaScript" const response = await fetch("https://api.anyrow.ai/v1/projects/{project_id}/tables/{table_id}/rows/{row_id}", { headers: { Authorization: "ApiKey {your_api_key}", }, }) const data = await response.json() ``` ```python title="Python" import requests response = requests.get( "https://api.anyrow.ai/v1/projects/{project_id}/tables/{table_id}/rows/{row_id}", headers={ "Authorization": "ApiKey {your_api_key}", }, ) print(response.json()) ``` ### Response ```json title="200" {} ``` ## Update row `PATCH /v1/projects/{project_id}/tables/{table_id}/rows/{row_id}` Authentication: `Authorization: ApiKey {your_api_key}`. ### Path parameters - `project_id` (string, required) - `table_id` (string, required) - `row_id` (string, required) ### Request body Content type: `application/json` (required). A object. ### Returns 200 `application/json`. ### Errors - 404: `not_found`, `row_not_found`, `table_not_found` Errors every endpoint can return: [Errors](https://anyrow.ai/docs/api/errors.md). ### Request ```ts title="Node.js" import { AnyrowSDK } from "@anyrow/sdk" const anyrow = new AnyrowSDK({ baseURL: "https://api.anyrow.ai", headers: { Authorization: `ApiKey ${process.env.ANYROW_API_KEY}` }, }) const { data, error } = await anyrow.row.update({ params: { project_id: "{project_id}", table_id: "{table_id}", row_id: "{row_id}" }, json: {}, }) ``` ```bash title="cURL" curl -X PATCH 'https://api.anyrow.ai/v1/projects/{project_id}/tables/{table_id}/rows/{row_id}' \ -H 'Authorization: ApiKey {your_api_key}' \ -H 'Content-Type: application/json' \ -d '{}' ``` ```js title="JavaScript" const response = await fetch("https://api.anyrow.ai/v1/projects/{project_id}/tables/{table_id}/rows/{row_id}", { method: "PATCH", headers: { Authorization: "ApiKey {your_api_key}", "Content-Type": "application/json", }, body: JSON.stringify({}), }) const data = await response.json() ``` ```python title="Python" import requests response = requests.patch( "https://api.anyrow.ai/v1/projects/{project_id}/tables/{table_id}/rows/{row_id}", headers={ "Authorization": "ApiKey {your_api_key}", }, json={}, ) print(response.json()) ``` ### Response ```json title="200" {} ``` ## Delete row `DELETE /v1/projects/{project_id}/tables/{table_id}/rows/{row_id}` Authentication: `Authorization: ApiKey {your_api_key}`. ### Path parameters - `project_id` (string, required) - `table_id` (string, required) - `row_id` (string, required) ### Returns 200 `application/json`. - `id` (string, required) ### Errors - 404: `not_found`, `row_not_found`, `table_not_found` Errors every endpoint can return: [Errors](https://anyrow.ai/docs/api/errors.md). ### Request ```ts title="Node.js" import { AnyrowSDK } from "@anyrow/sdk" const anyrow = new AnyrowSDK({ baseURL: "https://api.anyrow.ai", headers: { Authorization: `ApiKey ${process.env.ANYROW_API_KEY}` }, }) const { data, error } = await anyrow.row.delete({ params: { project_id: "{project_id}", table_id: "{table_id}", row_id: "{row_id}" }, }) ``` ```bash title="cURL" curl -X DELETE 'https://api.anyrow.ai/v1/projects/{project_id}/tables/{table_id}/rows/{row_id}' \ -H 'Authorization: ApiKey {your_api_key}' ``` ```js title="JavaScript" const response = await fetch("https://api.anyrow.ai/v1/projects/{project_id}/tables/{table_id}/rows/{row_id}", { method: "DELETE", headers: { Authorization: "ApiKey {your_api_key}", }, }) const data = await response.json() ``` ```python title="Python" import requests response = requests.delete( "https://api.anyrow.ai/v1/projects/{project_id}/tables/{table_id}/rows/{row_id}", headers={ "Authorization": "ApiKey {your_api_key}", }, ) print(response.json()) ``` ### Response ```json title="200" { "id": "string" } ``` ## The source file behind a row: download it, or open a PDF or image inline `GET /v1/projects/{project_id}/tables/{table_id}/rows/{row_id}/source` Authentication: `Authorization: ApiKey {your_api_key}`. ### Path parameters - `project_id` (string, required) - `table_id` (string, required) - `row_id` (string, required) ### Query parameters - `disposition` (string, optional): One of `attachment`, `inline`. Defaults to `attachment`. ### Returns 200 `application/octet-stream`. ### Errors - 404: `not_found`, `row_not_found`, `row_source_not_found`, `table_not_found` Errors every endpoint can return: [Errors](https://anyrow.ai/docs/api/errors.md). ### Request ```ts title="Node.js" import { AnyrowSDK } from "@anyrow/sdk" const anyrow = new AnyrowSDK({ baseURL: "https://api.anyrow.ai", headers: { Authorization: `ApiKey ${process.env.ANYROW_API_KEY}` }, }) const { data, error } = await anyrow.row.source({ params: { project_id: "{project_id}", table_id: "{table_id}", row_id: "{row_id}" }, }) ``` ```bash title="cURL" curl 'https://api.anyrow.ai/v1/projects/{project_id}/tables/{table_id}/rows/{row_id}/source' \ -H 'Authorization: ApiKey {your_api_key}' ``` ```js title="JavaScript" const response = await fetch("https://api.anyrow.ai/v1/projects/{project_id}/tables/{table_id}/rows/{row_id}/source", { headers: { Authorization: "ApiKey {your_api_key}", }, }) const data = await response.text() ``` ```python title="Python" import requests response = requests.get( "https://api.anyrow.ai/v1/projects/{project_id}/tables/{table_id}/rows/{row_id}/source", headers={ "Authorization": "ApiKey {your_api_key}", }, ) print(response.text) ``` --- Source: https://anyrow.ai/docs/api/extract # Extract Extract rows from a file or text, as one JSON response or a stream of server-sent events. - [Extract data from text or file (JSON response)](https://anyrow.ai/docs/api/extract/once.md): `POST /v1/projects/{project_id}/extract` - [Extract data from text or file (SSE stream)](https://anyrow.ai/docs/api/extract/stream.md): `POST /v1/projects/{project_id}/extract-stream` - [Extract into table (JSON response)](https://anyrow.ai/docs/api/extract/table-once.md): `POST /v1/projects/{project_id}/tables/{table_id}/extract` - [Extract into table (SSE stream)](https://anyrow.ai/docs/api/extract/table-stream.md): `POST /v1/projects/{project_id}/tables/{table_id}/extract-stream` ## Extract data from text or file (JSON response) `POST /v1/projects/{project_id}/extract` Authentication: `Authorization: ApiKey {your_api_key}`. ### Path parameters - `project_id` (string, required) ### Request body Content type: `multipart/form-data` or `application/x-www-form-urlencoded` (required). - `columns` (string, optional) - `file` (string, optional) - `instruction` (string, optional): Up to 1000000 characters. - `schema` (string, optional) - `strictness` (string, optional): One of `strict`, `balanced`, `flexible`. - `text` (string, optional): Up to 1000000 characters. ### Returns 200 `application/json`. - `batch_id` (string, optional) - `confidence` (number, required, nullable) - `credits` (integer, required): At least 0. - `duration_ms` (number, required, nullable) - `fail_count` (number, required) - `file_type` (string, optional, nullable): One of `text_pdf`, `scanned`, `image`, `text`, `document`, `unknown`. - `files` (array of objects, required) - `confidence` (number, optional, nullable) - `error` (any, optional, nullable) - `file_name` (any, optional, nullable) - `rows` (number, optional, nullable) - `status` (string, optional) - `result` (object, optional) - `status` (string, required) - `success_count` (number, required) - `table_id` (string, required) - `total_rows` (number, required) ### Errors - 404: `not_found` Errors every endpoint can return: [Errors](https://anyrow.ai/docs/api/errors.md). ### Request ```ts title="Node.js" import { AnyrowSDK } from "@anyrow/sdk" const anyrow = new AnyrowSDK({ baseURL: "https://api.anyrow.ai", headers: { Authorization: `ApiKey ${process.env.ANYROW_API_KEY}` }, }) const { data, error } = await anyrow.extract.once({ params: { project_id: "{project_id}" }, form: { columns: "string", file: "", instruction: "string", schema: "string", strictness: "strict", text: "string" }, }) ``` ```bash title="cURL" curl -X POST 'https://api.anyrow.ai/v1/projects/{project_id}/extract' \ -H 'Authorization: ApiKey {your_api_key}' \ -F 'columns=string' \ -F 'file=@./document.pdf' \ -F 'instruction=string' \ -F 'schema=string' \ -F 'strictness=strict' \ -F 'text=string' ``` ```js title="JavaScript" import { openAsBlob } from "node:fs" const body = new FormData() body.append("columns", "string") body.append("file", await openAsBlob("./document.pdf")) body.append("instruction", "string") body.append("schema", "string") body.append("strictness", "strict") body.append("text", "string") const response = await fetch("https://api.anyrow.ai/v1/projects/{project_id}/extract", { method: "POST", headers: { Authorization: "ApiKey {your_api_key}", }, body, }) const data = await response.json() ``` ```python title="Python" import requests response = requests.post( "https://api.anyrow.ai/v1/projects/{project_id}/extract", headers={ "Authorization": "ApiKey {your_api_key}", }, data={ "columns": "string", "instruction": "string", "schema": "string", "strictness": "strict", "text": "string", }, files={"file": open("./document.pdf", "rb")}, ) print(response.json()) ``` ### Response ```json title="200" { "batch_id": "string", "confidence": 0, "credits": 0, "duration_ms": 0, "fail_count": 0, "file_type": "text_pdf", "files": [ { "confidence": 0, "error": null, "file_name": null, "rows": 0, "status": "string" } ], "result": {}, "status": "string", "success_count": 0, "table_id": "string", "total_rows": 0 } ``` ## Extract data from text or file (SSE stream) `POST /v1/projects/{project_id}/extract-stream` Authentication: `Authorization: ApiKey {your_api_key}`. ### Path parameters - `project_id` (string, required) ### Request body Content type: `multipart/form-data` or `application/x-www-form-urlencoded` (required). - `columns` (string, optional) - `file` (string, optional) - `instruction` (string, optional): Up to 1000000 characters. - `schema` (string, optional) - `strictness` (string, optional): One of `strict`, `balanced`, `flexible`. - `text` (string, optional): Up to 1000000 characters. ### Returns 200 `text/event-stream`. ### Errors - 404: `not_found` Errors every endpoint can return: [Errors](https://anyrow.ai/docs/api/errors.md). ### Request ```ts title="Node.js" import { AnyrowSDK } from "@anyrow/sdk" const anyrow = new AnyrowSDK({ baseURL: "https://api.anyrow.ai", headers: { Authorization: `ApiKey ${process.env.ANYROW_API_KEY}` }, }) const { data, error } = await anyrow.extract.stream({ params: { project_id: "{project_id}" }, form: { columns: "string", file: "", instruction: "string", schema: "string", strictness: "strict", text: "string" }, }) ``` ```bash title="cURL" curl -X POST 'https://api.anyrow.ai/v1/projects/{project_id}/extract-stream' \ -H 'Authorization: ApiKey {your_api_key}' \ -F 'columns=string' \ -F 'file=@./document.pdf' \ -F 'instruction=string' \ -F 'schema=string' \ -F 'strictness=strict' \ -F 'text=string' ``` ```js title="JavaScript" import { openAsBlob } from "node:fs" const body = new FormData() body.append("columns", "string") body.append("file", await openAsBlob("./document.pdf")) body.append("instruction", "string") body.append("schema", "string") body.append("strictness", "strict") body.append("text", "string") const response = await fetch("https://api.anyrow.ai/v1/projects/{project_id}/extract-stream", { method: "POST", headers: { Authorization: "ApiKey {your_api_key}", }, body, }) const data = await response.text() ``` ```python title="Python" import requests response = requests.post( "https://api.anyrow.ai/v1/projects/{project_id}/extract-stream", headers={ "Authorization": "ApiKey {your_api_key}", }, data={ "columns": "string", "instruction": "string", "schema": "string", "strictness": "strict", "text": "string", }, files={"file": open("./document.pdf", "rb")}, ) print(response.text) ``` ### Response ```text title="200" string ``` ## Extract into table (JSON response) `POST /v1/projects/{project_id}/tables/{table_id}/extract` Authentication: `Authorization: ApiKey {your_api_key}`. ### Path parameters - `project_id` (string, required) - `table_id` (string, required) ### Request body Content type: `multipart/form-data` or `application/x-www-form-urlencoded` (required). - `file` (string, optional) - `text` (string, optional): Up to 1000000 characters. ### Returns 200 `application/json`. - `batch_id` (string, optional) - `confidence` (number, required, nullable) - `credits` (integer, required): At least 0. - `duration_ms` (number, required, nullable) - `fail_count` (number, required) - `file_type` (string, optional, nullable): One of `text_pdf`, `scanned`, `image`, `text`, `document`, `unknown`. - `files` (array of objects, required) - `confidence` (number, optional, nullable) - `error` (any, optional, nullable) - `file_name` (any, optional, nullable) - `rows` (number, optional, nullable) - `status` (string, optional) - `result` (object, optional) - `status` (string, required) - `success_count` (number, required) - `table_id` (string, required) - `total_rows` (number, required) ### Errors - 404: `not_found`, `table_not_found` Errors every endpoint can return: [Errors](https://anyrow.ai/docs/api/errors.md). ### Request ```ts title="Node.js" import { AnyrowSDK } from "@anyrow/sdk" const anyrow = new AnyrowSDK({ baseURL: "https://api.anyrow.ai", headers: { Authorization: `ApiKey ${process.env.ANYROW_API_KEY}` }, }) const { data, error } = await anyrow.extract.table.once({ params: { project_id: "{project_id}", table_id: "{table_id}" }, form: { file: "", text: "string" }, }) ``` ```bash title="cURL" curl -X POST 'https://api.anyrow.ai/v1/projects/{project_id}/tables/{table_id}/extract' \ -H 'Authorization: ApiKey {your_api_key}' \ -F 'file=@./document.pdf' \ -F 'text=string' ``` ```js title="JavaScript" import { openAsBlob } from "node:fs" const body = new FormData() body.append("file", await openAsBlob("./document.pdf")) body.append("text", "string") const response = await fetch("https://api.anyrow.ai/v1/projects/{project_id}/tables/{table_id}/extract", { method: "POST", headers: { Authorization: "ApiKey {your_api_key}", }, body, }) const data = await response.json() ``` ```python title="Python" import requests response = requests.post( "https://api.anyrow.ai/v1/projects/{project_id}/tables/{table_id}/extract", headers={ "Authorization": "ApiKey {your_api_key}", }, data={ "text": "string", }, files={"file": open("./document.pdf", "rb")}, ) print(response.json()) ``` ### Response ```json title="200" { "batch_id": "string", "confidence": 0, "credits": 0, "duration_ms": 0, "fail_count": 0, "file_type": "text_pdf", "files": [ { "confidence": 0, "error": null, "file_name": null, "rows": 0, "status": "string" } ], "result": {}, "status": "string", "success_count": 0, "table_id": "string", "total_rows": 0 } ``` ## Extract into table (SSE stream) `POST /v1/projects/{project_id}/tables/{table_id}/extract-stream` Authentication: `Authorization: ApiKey {your_api_key}`. ### Path parameters - `project_id` (string, required) - `table_id` (string, required) ### Request body Content type: `multipart/form-data` or `application/x-www-form-urlencoded` (required). - `file` (string, optional) - `text` (string, optional): Up to 1000000 characters. ### Returns 200 `text/event-stream`. ### Errors - 404: `not_found`, `table_not_found` Errors every endpoint can return: [Errors](https://anyrow.ai/docs/api/errors.md). ### Request ```ts title="Node.js" import { AnyrowSDK } from "@anyrow/sdk" const anyrow = new AnyrowSDK({ baseURL: "https://api.anyrow.ai", headers: { Authorization: `ApiKey ${process.env.ANYROW_API_KEY}` }, }) const { data, error } = await anyrow.extract.table.stream({ params: { project_id: "{project_id}", table_id: "{table_id}" }, form: { file: "", text: "string" }, }) ``` ```bash title="cURL" curl -X POST 'https://api.anyrow.ai/v1/projects/{project_id}/tables/{table_id}/extract-stream' \ -H 'Authorization: ApiKey {your_api_key}' \ -F 'file=@./document.pdf' \ -F 'text=string' ``` ```js title="JavaScript" import { openAsBlob } from "node:fs" const body = new FormData() body.append("file", await openAsBlob("./document.pdf")) body.append("text", "string") const response = await fetch("https://api.anyrow.ai/v1/projects/{project_id}/tables/{table_id}/extract-stream", { method: "POST", headers: { Authorization: "ApiKey {your_api_key}", }, body, }) const data = await response.text() ``` ```python title="Python" import requests response = requests.post( "https://api.anyrow.ai/v1/projects/{project_id}/tables/{table_id}/extract-stream", headers={ "Authorization": "ApiKey {your_api_key}", }, data={ "text": "string", }, files={"file": open("./document.pdf", "rb")}, ) print(response.text) ``` ### Response ```text title="200" string ``` --- Source: https://anyrow.ai/docs/api/batches # Batches A batch is one extraction run over one or more files: its status, rows and downloads. - [List batches](https://anyrow.ai/docs/api/batches/list.md): `GET /v1/projects/{project_id}/batches` - [Get batch](https://anyrow.ai/docs/api/batches/get.md): `GET /v1/projects/{project_id}/batches/{batch_id}` - [Download batch CSV](https://anyrow.ai/docs/api/batches/download-csv.md): `GET /v1/projects/{project_id}/batches/{batch_id}/download/csv` - [Download batch JSON](https://anyrow.ai/docs/api/batches/download-json.md): `GET /v1/projects/{project_id}/batches/{batch_id}/download/json` - [Download batch XLSX](https://anyrow.ai/docs/api/batches/download-xlsx.md): `GET /v1/projects/{project_id}/batches/{batch_id}/download/xlsx` ## The Batch object - `created_at` (integer, required): At least 0. - `updated_at` (integer, required): At least 0. - `id` (string, required): 1 to 48 characters. - `project_id` (string, required): 1 to 48 characters. - `table_id` (string, required, nullable): 1 to 48 characters. - `actor_type` (string, required): One of `user`, `api_key`. - `actor_id` (string, required): Up to 36 characters. - `schema_json` (object, required) - `columns` (array of objects, required): 1 to 50 items. - `description` (string, optional, nullable): Up to 256 characters. - `instruction` (string, optional, nullable): Up to 512 characters. - `name` (string, required): 1 to 64 characters. Matches `^[\w\s.-]+$`. - `type` (string, required): One of `array`, `boolean`, `currency`, `date`, `email`, `enum`, `multi_select`, `number`, `string`, `text`, `url`. Defaults to `string`. - `instruction` (string, optional, nullable): Up to 512 characters. - `strictness` (string, required): One of `strict`, `balanced`, `flexible`. Defaults to `strict`. - `insert_mode` (string, required, nullable): One of `append`, `dedup`, `merge`, `replace`. - `status` (string, required): One of `uploading`, `processing`, `merging`, `complete`, `partial`, `failed`. - `file_count` (integer, required): At least 1. - `files_done` (integer, required): At least 0. - `current_file` (string, required, nullable): Up to 255 characters. - `csv_key` (string, required, nullable): Up to 512 characters. - `json_key` (string, required, nullable): Up to 512 characters. - `xlsx_key` (string, required, nullable): Up to 512 characters. - `total_rows` (integer, required, nullable): At least 0. - `confidence` (number, required, nullable) - `duration_ms` (integer, required, nullable): At least 0. - `error` (string, required, nullable): Up to 2048 characters. - `extractions` (array of objects, optional) - `created_at` (integer, required): At least 0. - `id` (string, required): 1 to 48 characters. - `batch_id` (string, required): 1 to 48 characters. - `table_id` (string, required, nullable): 1 to 48 characters. - `file_key` (string, required): Up to 512 characters. - `file_name` (string, required): Up to 255 characters. - `file_type` (string, required, nullable): One of `text_pdf`, `scanned`, `image`, `text`, `document`, `unknown`. - `file_checksum` (string, required, nullable): Up to 64 characters. - `status` (string, required): One of `pending`, `processing`, `complete`, `failed`. - `rows_key` (string, required, nullable): Up to 512 characters. - `row_count` (integer, required, nullable): At least 0. - `confidence` (number, required, nullable) - `error` (string, required, nullable): Up to 2048 characters. ```json { "created_at": 1711468800000, "updated_at": 1711468800000, "id": "batch_01h5a3g8k9m2n4p6q8r0t2v4x6", "project_id": "string", "table_id": "string", "actor_type": "user", "actor_id": "string", "schema_json": { "columns": [ { "description": "string", "instruction": "string", "name": "string", "type": "string" } ], "instruction": "string", "strictness": "strict" }, "insert_mode": "append", "status": "uploading", "file_count": 42, "files_done": 42, "current_file": "string", "csv_key": "string", "json_key": "string", "xlsx_key": "string", "total_rows": 42, "confidence": 0.5, "duration_ms": 42, "error": "string", "extractions": [ { "created_at": 1711468800000, "id": "extr_01h5a3g8k9m2n4p6q8r0t2v4x6", "batch_id": "string", "table_id": "string", "file_key": "string", "file_name": "string", "file_type": "text_pdf", "file_checksum": "string", "status": "pending", "rows_key": "string", "row_count": 42, "confidence": 0.5, "error": "string" } ] } ``` ## List batches `GET /v1/projects/{project_id}/batches` Authentication: `Authorization: ApiKey {your_api_key}`. ### Path parameters - `project_id` (string, required) ### Query parameters - `cursor` (string, optional): Opaque cursor for forward pagination. Pass the nextCursor from the previous response with the same order. Takes precedence over page when both are sent. - `page` (integer, optional): 1-based page number for offset pagination. Ignored when cursor is present. At least 1. - `order` (string, optional): Sort keys, comma-separated, each `field[.asc|.desc][.nullsfirst|.nullslast]`; at most 3. Sortable: created_at, status, total_rows. Default: created_at.desc. Nulls sort last ascending and first descending unless stated. Matches `^(?:created_at|status|total_rows)(?:\.(?:asc|desc))?(?:\.(?:nullsfirst|nullslast))?(?:,(?:created_at|status|total_rows)(?:\.(?:asc|desc))?(?:\.(?:nullsfirst|nullslast))?){0,2}$`. - `limit` (integer, optional): Maximum number of items per page. Defaults to 20, capped by the endpoint's maxLimit. Defaults to `20`. Between 1 and 100. - `status` (string, optional): One of `uploading`, `processing`, `merging`, `complete`, `partial`, `failed`. ### Returns 200 `application/json`. - `count` (integer, required): At least 0. - `hasMore` (boolean, required) - `limit` (integer, required): At least 1. - `nextCursor` (string, required, nullable) - `page` (integer, required, nullable): At least 1. - `batches` (array of objects, required) - `created_at` (integer, required): At least 0. - `updated_at` (integer, required): At least 0. - `id` (string, required): 1 to 48 characters. - `project_id` (string, required): 1 to 48 characters. - `table_id` (string, required, nullable): 1 to 48 characters. - `actor_type` (string, required): One of `user`, `api_key`. - `actor_id` (string, required): Up to 36 characters. - `schema_json` (object, required) - `columns` (array of objects, required): 1 to 50 items. - `description` (string, optional, nullable): Up to 256 characters. - `instruction` (string, optional, nullable): Up to 512 characters. - `name` (string, required): 1 to 64 characters. Matches `^[\w\s.-]+$`. - `type` (string, required): One of `array`, `boolean`, `currency`, `date`, `email`, `enum`, `multi_select`, `number`, `string`, `text`, `url`. Defaults to `string`. - `instruction` (string, optional, nullable): Up to 512 characters. - `strictness` (string, required): One of `strict`, `balanced`, `flexible`. Defaults to `strict`. - `insert_mode` (string, required, nullable): One of `append`, `dedup`, `merge`, `replace`. - `status` (string, required): One of `uploading`, `processing`, `merging`, `complete`, `partial`, `failed`. - `file_count` (integer, required): At least 1. - `files_done` (integer, required): At least 0. - `current_file` (string, required, nullable): Up to 255 characters. - `csv_key` (string, required, nullable): Up to 512 characters. - `json_key` (string, required, nullable): Up to 512 characters. - `xlsx_key` (string, required, nullable): Up to 512 characters. - `total_rows` (integer, required, nullable): At least 0. - `confidence` (number, required, nullable) - `duration_ms` (integer, required, nullable): At least 0. - `error` (string, required, nullable): Up to 2048 characters. ### Errors - 404: `not_found` Errors every endpoint can return: [Errors](https://anyrow.ai/docs/api/errors.md). ### Request ```ts title="Node.js" import { AnyrowSDK } from "@anyrow/sdk" const anyrow = new AnyrowSDK({ baseURL: "https://api.anyrow.ai", headers: { Authorization: `ApiKey ${process.env.ANYROW_API_KEY}` }, }) const { data, error } = await anyrow.batch.list({ params: { project_id: "{project_id}" }, }) ``` ```bash title="cURL" curl 'https://api.anyrow.ai/v1/projects/{project_id}/batches' \ -H 'Authorization: ApiKey {your_api_key}' ``` ```js title="JavaScript" const response = await fetch("https://api.anyrow.ai/v1/projects/{project_id}/batches", { headers: { Authorization: "ApiKey {your_api_key}", }, }) const data = await response.json() ``` ```python title="Python" import requests response = requests.get( "https://api.anyrow.ai/v1/projects/{project_id}/batches", headers={ "Authorization": "ApiKey {your_api_key}", }, ) print(response.json()) ``` ### Response ```json title="200" { "count": 0, "hasMore": true, "limit": 1, "nextCursor": "string", "page": 1, "batches": [ { "created_at": 1711468800000, "updated_at": 1711468800000, "id": "batch_01h5a3g8k9m2n4p6q8r0t2v4x6", "project_id": "string", "table_id": "string", "actor_type": "user", "actor_id": "string", "schema_json": { "columns": [ { "description": "string", "instruction": "string", "name": "string", "type": "string" } ], "instruction": "string", "strictness": "strict" }, "insert_mode": "append", "status": "uploading", "file_count": 42, "files_done": 42, "current_file": "string", "csv_key": "string", "json_key": "string", "xlsx_key": "string", "total_rows": 42, "confidence": 0.5, "duration_ms": 42, "error": "string" } ] } ``` ## Get batch `GET /v1/projects/{project_id}/batches/{batch_id}` Authentication: `Authorization: ApiKey {your_api_key}`. ### Path parameters - `project_id` (string, required) - `batch_id` (string, required) ### Returns 200 `application/json`. - `created_at` (integer, required): At least 0. - `updated_at` (integer, required): At least 0. - `id` (string, required): 1 to 48 characters. - `project_id` (string, required): 1 to 48 characters. - `table_id` (string, required, nullable): 1 to 48 characters. - `actor_type` (string, required): One of `user`, `api_key`. - `actor_id` (string, required): Up to 36 characters. - `schema_json` (object, required) - `columns` (array of objects, required): 1 to 50 items. - `description` (string, optional, nullable): Up to 256 characters. - `instruction` (string, optional, nullable): Up to 512 characters. - `name` (string, required): 1 to 64 characters. Matches `^[\w\s.-]+$`. - `type` (string, required): One of `array`, `boolean`, `currency`, `date`, `email`, `enum`, `multi_select`, `number`, `string`, `text`, `url`. Defaults to `string`. - `instruction` (string, optional, nullable): Up to 512 characters. - `strictness` (string, required): One of `strict`, `balanced`, `flexible`. Defaults to `strict`. - `insert_mode` (string, required, nullable): One of `append`, `dedup`, `merge`, `replace`. - `status` (string, required): One of `uploading`, `processing`, `merging`, `complete`, `partial`, `failed`. - `file_count` (integer, required): At least 1. - `files_done` (integer, required): At least 0. - `current_file` (string, required, nullable): Up to 255 characters. - `csv_key` (string, required, nullable): Up to 512 characters. - `json_key` (string, required, nullable): Up to 512 characters. - `xlsx_key` (string, required, nullable): Up to 512 characters. - `total_rows` (integer, required, nullable): At least 0. - `confidence` (number, required, nullable) - `duration_ms` (integer, required, nullable): At least 0. - `error` (string, required, nullable): Up to 2048 characters. - `extractions` (array of objects, optional) - `created_at` (integer, required): At least 0. - `id` (string, required): 1 to 48 characters. - `batch_id` (string, required): 1 to 48 characters. - `table_id` (string, required, nullable): 1 to 48 characters. - `file_key` (string, required): Up to 512 characters. - `file_name` (string, required): Up to 255 characters. - `file_type` (string, required, nullable): One of `text_pdf`, `scanned`, `image`, `text`, `document`, `unknown`. - `file_checksum` (string, required, nullable): Up to 64 characters. - `status` (string, required): One of `pending`, `processing`, `complete`, `failed`. - `rows_key` (string, required, nullable): Up to 512 characters. - `row_count` (integer, required, nullable): At least 0. - `confidence` (number, required, nullable) - `error` (string, required, nullable): Up to 2048 characters. ### Errors - 404: `batch_not_found`, `not_found` Errors every endpoint can return: [Errors](https://anyrow.ai/docs/api/errors.md). ### Request ```ts title="Node.js" import { AnyrowSDK } from "@anyrow/sdk" const anyrow = new AnyrowSDK({ baseURL: "https://api.anyrow.ai", headers: { Authorization: `ApiKey ${process.env.ANYROW_API_KEY}` }, }) const { data, error } = await anyrow.batch.get({ params: { project_id: "{project_id}", batch_id: "{batch_id}" }, }) ``` ```bash title="cURL" curl 'https://api.anyrow.ai/v1/projects/{project_id}/batches/{batch_id}' \ -H 'Authorization: ApiKey {your_api_key}' ``` ```js title="JavaScript" const response = await fetch("https://api.anyrow.ai/v1/projects/{project_id}/batches/{batch_id}", { headers: { Authorization: "ApiKey {your_api_key}", }, }) const data = await response.json() ``` ```python title="Python" import requests response = requests.get( "https://api.anyrow.ai/v1/projects/{project_id}/batches/{batch_id}", headers={ "Authorization": "ApiKey {your_api_key}", }, ) print(response.json()) ``` ### Response ```json title="200" { "created_at": 1711468800000, "updated_at": 1711468800000, "id": "batch_01h5a3g8k9m2n4p6q8r0t2v4x6", "project_id": "string", "table_id": "string", "actor_type": "user", "actor_id": "string", "schema_json": { "columns": [ { "description": "string", "instruction": "string", "name": "string", "type": "string" } ], "instruction": "string", "strictness": "strict" }, "insert_mode": "append", "status": "uploading", "file_count": 42, "files_done": 42, "current_file": "string", "csv_key": "string", "json_key": "string", "xlsx_key": "string", "total_rows": 42, "confidence": 0.5, "duration_ms": 42, "error": "string", "extractions": [ { "created_at": 1711468800000, "id": "extr_01h5a3g8k9m2n4p6q8r0t2v4x6", "batch_id": "string", "table_id": "string", "file_key": "string", "file_name": "string", "file_type": "text_pdf", "file_checksum": "string", "status": "pending", "rows_key": "string", "row_count": 42, "confidence": 0.5, "error": "string" } ] } ``` ## Download batch CSV `GET /v1/projects/{project_id}/batches/{batch_id}/download/csv` Authentication: `Authorization: ApiKey {your_api_key}`. ### Path parameters - `project_id` (string, required) - `batch_id` (string, required) ### Returns No response body; the request succeeds or returns an error. ### Errors - 404: `batch_not_found`, `not_found` Errors every endpoint can return: [Errors](https://anyrow.ai/docs/api/errors.md). ### Request ```ts title="Node.js" import { AnyrowSDK } from "@anyrow/sdk" const anyrow = new AnyrowSDK({ baseURL: "https://api.anyrow.ai", headers: { Authorization: `ApiKey ${process.env.ANYROW_API_KEY}` }, }) const { data, error } = await anyrow.batch.download.csv({ params: { project_id: "{project_id}", batch_id: "{batch_id}" }, }) ``` ```bash title="cURL" curl 'https://api.anyrow.ai/v1/projects/{project_id}/batches/{batch_id}/download/csv' \ -H 'Authorization: ApiKey {your_api_key}' ``` ```js title="JavaScript" const response = await fetch("https://api.anyrow.ai/v1/projects/{project_id}/batches/{batch_id}/download/csv", { headers: { Authorization: "ApiKey {your_api_key}", }, }) const data = await response.json() ``` ```python title="Python" import requests response = requests.get( "https://api.anyrow.ai/v1/projects/{project_id}/batches/{batch_id}/download/csv", headers={ "Authorization": "ApiKey {your_api_key}", }, ) print(response.json()) ``` ## Download batch JSON `GET /v1/projects/{project_id}/batches/{batch_id}/download/json` Authentication: `Authorization: ApiKey {your_api_key}`. ### Path parameters - `project_id` (string, required) - `batch_id` (string, required) ### Returns No response body; the request succeeds or returns an error. ### Errors - 404: `batch_not_found`, `not_found` Errors every endpoint can return: [Errors](https://anyrow.ai/docs/api/errors.md). ### Request ```ts title="Node.js" import { AnyrowSDK } from "@anyrow/sdk" const anyrow = new AnyrowSDK({ baseURL: "https://api.anyrow.ai", headers: { Authorization: `ApiKey ${process.env.ANYROW_API_KEY}` }, }) const { data, error } = await anyrow.batch.download.json({ params: { project_id: "{project_id}", batch_id: "{batch_id}" }, }) ``` ```bash title="cURL" curl 'https://api.anyrow.ai/v1/projects/{project_id}/batches/{batch_id}/download/json' \ -H 'Authorization: ApiKey {your_api_key}' ``` ```js title="JavaScript" const response = await fetch("https://api.anyrow.ai/v1/projects/{project_id}/batches/{batch_id}/download/json", { headers: { Authorization: "ApiKey {your_api_key}", }, }) const data = await response.json() ``` ```python title="Python" import requests response = requests.get( "https://api.anyrow.ai/v1/projects/{project_id}/batches/{batch_id}/download/json", headers={ "Authorization": "ApiKey {your_api_key}", }, ) print(response.json()) ``` ## Download batch XLSX `GET /v1/projects/{project_id}/batches/{batch_id}/download/xlsx` Authentication: `Authorization: ApiKey {your_api_key}`. ### Path parameters - `project_id` (string, required) - `batch_id` (string, required) ### Returns No response body; the request succeeds or returns an error. ### Errors - 404: `batch_not_found`, `not_found` Errors every endpoint can return: [Errors](https://anyrow.ai/docs/api/errors.md). ### Request ```ts title="Node.js" import { AnyrowSDK } from "@anyrow/sdk" const anyrow = new AnyrowSDK({ baseURL: "https://api.anyrow.ai", headers: { Authorization: `ApiKey ${process.env.ANYROW_API_KEY}` }, }) const { data, error } = await anyrow.batch.download.xlsx({ params: { project_id: "{project_id}", batch_id: "{batch_id}" }, }) ``` ```bash title="cURL" curl 'https://api.anyrow.ai/v1/projects/{project_id}/batches/{batch_id}/download/xlsx' \ -H 'Authorization: ApiKey {your_api_key}' ``` ```js title="JavaScript" const response = await fetch("https://api.anyrow.ai/v1/projects/{project_id}/batches/{batch_id}/download/xlsx", { headers: { Authorization: "ApiKey {your_api_key}", }, }) const data = await response.json() ``` ```python title="Python" import requests response = requests.get( "https://api.anyrow.ai/v1/projects/{project_id}/batches/{batch_id}/download/xlsx", headers={ "Authorization": "ApiKey {your_api_key}", }, ) print(response.json()) ``` --- Source: https://anyrow.ai/docs/api/export # Export Export a table's rows as a file, and check an export's status. - [Get export status](https://anyrow.ai/docs/api/export/get.md): `GET /v1/projects/{project_id}/exports/{export_id}` - [Export table rows](https://anyrow.ai/docs/api/export/export.md): `GET /v1/projects/{project_id}/tables/{table_id}/export` ## The Export object - `created_at` (integer, required): At least 0. - `updated_at` (integer, required): At least 0. - `id` (string, required): 1 to 48 characters. - `project_id` (string, required): 1 to 48 characters. - `table_id` (string, required, nullable): 1 to 48 characters. - `actor_id` (string, required): Up to 36 characters. - `checksum` (string, required): Up to 64 characters. - `status` (string, required): One of `processing`, `complete`, `failed`. - `filter_json` (string, required, nullable): Up to 4096 characters. - `row_count` (integer, required, nullable): At least 0. - `json_key` (string, required, nullable): Up to 512 characters. - `csv_key` (string, required, nullable): Up to 512 characters. - `xlsx_key` (string, required, nullable): Up to 512 characters. - `error` (string, required, nullable): Up to 2048 characters. - `expires_at` (integer, required, nullable): At least 0. ```json { "created_at": 1711468800000, "updated_at": 1711468800000, "id": "exprt_01h5a3g8k9m2n4p6q8r0t2v4x6", "project_id": "string", "table_id": "string", "actor_id": "string", "checksum": "string", "status": "processing", "filter_json": "string", "row_count": 42, "json_key": "string", "csv_key": "string", "xlsx_key": "string", "error": "string", "expires_at": 1711468800000 } ``` ## Get export status `GET /v1/projects/{project_id}/exports/{export_id}` Authentication: `Authorization: ApiKey {your_api_key}`. ### Path parameters - `project_id` (string, required) - `export_id` (string, required) ### Returns 200 `application/json`. - `created_at` (integer, required): At least 0. - `updated_at` (integer, required): At least 0. - `id` (string, required): 1 to 48 characters. - `project_id` (string, required): 1 to 48 characters. - `table_id` (string, required, nullable): 1 to 48 characters. - `actor_id` (string, required): Up to 36 characters. - `checksum` (string, required): Up to 64 characters. - `status` (string, required): One of `processing`, `complete`, `failed`. - `filter_json` (string, required, nullable): Up to 4096 characters. - `row_count` (integer, required, nullable): At least 0. - `json_key` (string, required, nullable): Up to 512 characters. - `csv_key` (string, required, nullable): Up to 512 characters. - `xlsx_key` (string, required, nullable): Up to 512 characters. - `error` (string, required, nullable): Up to 2048 characters. - `expires_at` (integer, required, nullable): At least 0. ### Errors - 404: `export_not_found`, `not_found` Errors every endpoint can return: [Errors](https://anyrow.ai/docs/api/errors.md). ### Request ```ts title="Node.js" import { AnyrowSDK } from "@anyrow/sdk" const anyrow = new AnyrowSDK({ baseURL: "https://api.anyrow.ai", headers: { Authorization: `ApiKey ${process.env.ANYROW_API_KEY}` }, }) const { data, error } = await anyrow.export.get({ params: { project_id: "{project_id}", export_id: "{export_id}" }, }) ``` ```bash title="cURL" curl 'https://api.anyrow.ai/v1/projects/{project_id}/exports/{export_id}' \ -H 'Authorization: ApiKey {your_api_key}' ``` ```js title="JavaScript" const response = await fetch("https://api.anyrow.ai/v1/projects/{project_id}/exports/{export_id}", { headers: { Authorization: "ApiKey {your_api_key}", }, }) const data = await response.json() ``` ```python title="Python" import requests response = requests.get( "https://api.anyrow.ai/v1/projects/{project_id}/exports/{export_id}", headers={ "Authorization": "ApiKey {your_api_key}", }, ) print(response.json()) ``` ### Response ```json title="200" { "created_at": 1711468800000, "updated_at": 1711468800000, "id": "exprt_01h5a3g8k9m2n4p6q8r0t2v4x6", "project_id": "string", "table_id": "string", "actor_id": "string", "checksum": "string", "status": "processing", "filter_json": "string", "row_count": 42, "json_key": "string", "csv_key": "string", "xlsx_key": "string", "error": "string", "expires_at": 1711468800000 } ``` ## Export table rows `GET /v1/projects/{project_id}/tables/{table_id}/export` Authentication: `Authorization: ApiKey {your_api_key}`. ### Path parameters - `project_id` (string, required) - `table_id` (string, required) ### Query parameters - `filter` (string, optional) - `format` (string, required): One of `csv`, `json`, `xlsx`. - `order` (string, optional) - `schema` (string, optional): One of `true`, `false`. - `search` (string, optional) - `since` (string, optional) ### Returns 200 `application/json`. - `id` (string, required) - `status` (string, required): Always `processing`. ### Errors - 404: `not_found`, `table_not_found` Errors every endpoint can return: [Errors](https://anyrow.ai/docs/api/errors.md). ### Request ```ts title="Node.js" import { AnyrowSDK } from "@anyrow/sdk" const anyrow = new AnyrowSDK({ baseURL: "https://api.anyrow.ai", headers: { Authorization: `ApiKey ${process.env.ANYROW_API_KEY}` }, }) const { data, error } = await anyrow.table.export({ params: { project_id: "{project_id}", table_id: "{table_id}" }, search: { format: "csv" }, }) ``` ```bash title="cURL" curl 'https://api.anyrow.ai/v1/projects/{project_id}/tables/{table_id}/export?format=csv' \ -H 'Authorization: ApiKey {your_api_key}' ``` ```js title="JavaScript" const response = await fetch("https://api.anyrow.ai/v1/projects/{project_id}/tables/{table_id}/export?format=csv", { headers: { Authorization: "ApiKey {your_api_key}", }, }) const data = await response.json() ``` ```python title="Python" import requests response = requests.get( "https://api.anyrow.ai/v1/projects/{project_id}/tables/{table_id}/export?format=csv", headers={ "Authorization": "ApiKey {your_api_key}", }, ) print(response.json()) ``` ### Response ```json title="200" { "id": "string", "status": "processing" } ``` --- Source: https://anyrow.ai/docs/api/schema # Schema suggestions Let Anyrow suggest a table's columns from a sample document. - [Suggest schema from text or file (multipart)](https://anyrow.ai/docs/api/schema/schema.md): `POST /v1/projects/{project_id}/suggest-schema` ## Suggest schema from text or file (multipart) `POST /v1/projects/{project_id}/suggest-schema` Authentication: `Authorization: ApiKey {your_api_key}`. ### Path parameters - `project_id` (string, required) ### Request body Content type: `multipart/form-data` or `application/x-www-form-urlencoded` (required). - `file` (string, optional) - `text` (string, optional): Up to 1000000 characters. ### Returns 200 `application/json`. - `columns` (array of objects, required) - `description` (string, optional) - `name` (string, required) - `type` (string, required) - `confidence` (number, required) - `instruction` (string, optional) ### Errors - 404: `not_found` Errors every endpoint can return: [Errors](https://anyrow.ai/docs/api/errors.md). ### Request ```ts title="Node.js" import { AnyrowSDK } from "@anyrow/sdk" const anyrow = new AnyrowSDK({ baseURL: "https://api.anyrow.ai", headers: { Authorization: `ApiKey ${process.env.ANYROW_API_KEY}` }, }) const { data, error } = await anyrow.suggest.schema({ params: { project_id: "{project_id}" }, form: { file: "", text: "string" }, }) ``` ```bash title="cURL" curl -X POST 'https://api.anyrow.ai/v1/projects/{project_id}/suggest-schema' \ -H 'Authorization: ApiKey {your_api_key}' \ -F 'file=@./document.pdf' \ -F 'text=string' ``` ```js title="JavaScript" import { openAsBlob } from "node:fs" const body = new FormData() body.append("file", await openAsBlob("./document.pdf")) body.append("text", "string") const response = await fetch("https://api.anyrow.ai/v1/projects/{project_id}/suggest-schema", { method: "POST", headers: { Authorization: "ApiKey {your_api_key}", }, body, }) const data = await response.json() ``` ```python title="Python" import requests response = requests.post( "https://api.anyrow.ai/v1/projects/{project_id}/suggest-schema", headers={ "Authorization": "ApiKey {your_api_key}", }, data={ "text": "string", }, files={"file": open("./document.pdf", "rb")}, ) print(response.json()) ``` ### Response ```json title="200" { "columns": [ { "description": "string", "name": "string", "type": "string" } ], "confidence": 0, "instruction": "string" } ``` --- Source: https://anyrow.ai/docs/api/table-templates # Table Templates Reusable table schemas: browse, preview and create tables from them. - [Browse table templates](https://anyrow.ai/docs/api/table-templates/project-list.md): `GET /v1/projects/{project_id}/table-templates` - [Preview table template](https://anyrow.ai/docs/api/table-templates/project-get.md): `GET /v1/projects/{project_id}/table-templates/{template_id}` - [Create table from template](https://anyrow.ai/docs/api/table-templates/use.md): `POST /v1/projects/{project_id}/table-templates/{template_id}/use` - [Create table template](https://anyrow.ai/docs/api/table-templates/create.md): `POST /v1/table-templates` - [List my table templates](https://anyrow.ai/docs/api/table-templates/list-mine.md): `GET /v1/table-templates/mine` - [Update table template](https://anyrow.ai/docs/api/table-templates/update.md): `PATCH /v1/table-templates/{template_id}` - [Delete table template](https://anyrow.ai/docs/api/table-templates/delete.md): `DELETE /v1/table-templates/{template_id}` ## The Table Template object - `created_at` (integer, required): At least 0. - `updated_at` (integer, required): At least 0. - `id` (string, required): 1 to 48 characters. - `category` (string, required): Up to 64 characters. - `columns_json` (array of objects, required): 1 to 100 items. - `currency_code` (string, optional): Exactly 3 characters. - `default` (any, optional) - `description` (string, optional, nullable): Up to 256 characters. - `id` (string, required): 1 to 36 characters. - `instruction` (string, optional, nullable): Up to 512 characters. - `name` (string, required): 1 to 64 characters. Matches `^[\w\s.-]+$`. - `options` (array of strings, optional): Up to 500 items. - `required` (boolean, required): Defaults to `false`. - `searchable` (boolean, optional) - `type` (string, required): One of `array`, `boolean`, `currency`, `date`, `email`, `enum`, `multi_select`, `number`, `string`, `text`, `url`. Defaults to `string`. - `creator_display_name` (string, required, nullable): Up to 101 characters. - `creator_user_id` (string, required, nullable): Up to 48 characters. - `description` (string, required, nullable): Up to 512 characters. - `insert_mode` (string, required): One of `append`, `dedup`, `merge`, `replace`. - `instruction` (string, required, nullable): Up to 512 characters. - `merge_columns_json` (array of strings, required, nullable): At least 1 items. - `name` (string, required): Up to 128 characters. - `strictness` (string, required): One of `strict`, `balanced`, `flexible`. - `usage_count` (integer, required): At least 0. ```json { "created_at": 1711468800000, "updated_at": 1711468800000, "id": "ttmpl_01h5a3g8k9m2n4p6q8r0t2v4x6", "category": "string", "columns_json": [ { "currency_code": "string", "description": "string", "id": "string", "instruction": "string", "name": "string", "options": [ "string" ], "required": false, "searchable": true, "type": "string" } ], "creator_display_name": "string", "creator_user_id": "string", "description": "string", "insert_mode": "append", "instruction": "string", "merge_columns_json": [ "string" ], "name": "string", "strictness": "strict", "usage_count": 42 } ``` ## Browse table templates `GET /v1/projects/{project_id}/table-templates` Authentication: `Authorization: ApiKey {your_api_key}`. ### Path parameters - `project_id` (string, required) ### Query parameters - `cursor` (string, optional): Opaque cursor for forward pagination. Pass the nextCursor from the previous response with the same order. Takes precedence over page when both are sent. - `page` (integer, optional): 1-based page number for offset pagination. Ignored when cursor is present. At least 1. - `order` (string, optional): Sort keys, comma-separated, each `field[.asc|.desc][.nullsfirst|.nullslast]`; at most 3. Sortable: category, created_at, name, updated_at, usage_count. Default: category.desc. Nulls sort last ascending and first descending unless stated. Matches `^(?:category|created_at|name|updated_at|usage_count)(?:\.(?:asc|desc))?(?:\.(?:nullsfirst|nullslast))?(?:,(?:category|created_at|name|updated_at|usage_count)(?:\.(?:asc|desc))?(?:\.(?:nullsfirst|nullslast))?){0,2}$`. - `filter` (string, optional): Filter expression `field.op.value`; `,` joins conditions with AND; group with `or(...)` and `and(...)`. Fields: category (enum: eq, ne, neq, in, nin, is); created_at (number: eq, ne, neq, gt, gte, lt, lte, in, nin, is); id (string: eq, ne, neq, like, ilike, in, nin, is); name (string: eq, ne, neq, like, ilike, in, nin, is). `like` is case-sensitive and `ilike` ignores ASCII case; `*` is the wildcard. `in`/`nin` take `(a,b)`; `is` takes `null` or `notnull`. At most 20 conditions, 3 nested groups, 100 in/nin values. - `q` (string, optional): Free-text search over: name, description, creator_display_name. Whitespace-separated terms must all match. Up to 200 characters. - `limit` (integer, optional): Maximum number of items per page. Defaults to 20, capped by the endpoint's maxLimit. Defaults to `20`. Between 1 and 100. ### Returns 200 `application/json`. - `count` (integer, required): At least 0. - `hasMore` (boolean, required) - `limit` (integer, required): At least 1. - `nextCursor` (string, required, nullable) - `page` (integer, required, nullable): At least 1. - `templates` (array of objects, required) - `created_at` (integer, required): At least 0. - `updated_at` (integer, required): At least 0. - `id` (string, required): 1 to 48 characters. - `category` (string, required): Up to 64 characters. - `columns_json` (array of objects, required): 1 to 100 items. - `currency_code` (string, optional): Exactly 3 characters. - `default` (any, optional) - `description` (string, optional, nullable): Up to 256 characters. - `id` (string, required): 1 to 36 characters. - `instruction` (string, optional, nullable): Up to 512 characters. - `name` (string, required): 1 to 64 characters. Matches `^[\w\s.-]+$`. - `options` (array of strings, optional): Up to 500 items. - `required` (boolean, required): Defaults to `false`. - `searchable` (boolean, optional) - `type` (string, required): One of `array`, `boolean`, `currency`, `date`, `email`, `enum`, `multi_select`, `number`, `string`, `text`, `url`. Defaults to `string`. - `creator_display_name` (string, required, nullable): Up to 101 characters. - `creator_user_id` (string, required, nullable): Up to 48 characters. - `description` (string, required, nullable): Up to 512 characters. - `insert_mode` (string, required): One of `append`, `dedup`, `merge`, `replace`. - `instruction` (string, required, nullable): Up to 512 characters. - `merge_columns_json` (array of strings, required, nullable): At least 1 items. - `name` (string, required): Up to 128 characters. - `strictness` (string, required): One of `strict`, `balanced`, `flexible`. - `usage_count` (integer, required): At least 0. ### Errors - 404: `not_found` Errors every endpoint can return: [Errors](https://anyrow.ai/docs/api/errors.md). ### Request ```ts title="Node.js" import { AnyrowSDK } from "@anyrow/sdk" const anyrow = new AnyrowSDK({ baseURL: "https://api.anyrow.ai", headers: { Authorization: `ApiKey ${process.env.ANYROW_API_KEY}` }, }) const { data, error } = await anyrow.tableTemplate.projectList({ params: { project_id: "{project_id}" }, }) ``` ```bash title="cURL" curl 'https://api.anyrow.ai/v1/projects/{project_id}/table-templates' \ -H 'Authorization: ApiKey {your_api_key}' ``` ```js title="JavaScript" const response = await fetch("https://api.anyrow.ai/v1/projects/{project_id}/table-templates", { headers: { Authorization: "ApiKey {your_api_key}", }, }) const data = await response.json() ``` ```python title="Python" import requests response = requests.get( "https://api.anyrow.ai/v1/projects/{project_id}/table-templates", headers={ "Authorization": "ApiKey {your_api_key}", }, ) print(response.json()) ``` ### Response ```json title="200" { "count": 0, "hasMore": true, "limit": 1, "nextCursor": "string", "page": 1, "templates": [ { "created_at": 1711468800000, "updated_at": 1711468800000, "id": "ttmpl_01h5a3g8k9m2n4p6q8r0t2v4x6", "category": "string", "columns_json": [ { "currency_code": "string", "description": "string", "id": "string", "instruction": "string", "name": "string", "options": [ "string" ], "required": false, "searchable": true, "type": "string" } ], "creator_display_name": "string", "creator_user_id": "string", "description": "string", "insert_mode": "append", "instruction": "string", "merge_columns_json": [ "string" ], "name": "string", "strictness": "strict", "usage_count": 42 } ] } ``` ## Preview table template `GET /v1/projects/{project_id}/table-templates/{template_id}` Authentication: `Authorization: ApiKey {your_api_key}`. ### Path parameters - `project_id` (string, required) - `template_id` (string, required) ### Returns 200 `application/json`. - `created_at` (integer, required): At least 0. - `updated_at` (integer, required): At least 0. - `id` (string, required): 1 to 48 characters. - `category` (string, required): Up to 64 characters. - `columns_json` (array of objects, required): 1 to 100 items. - `currency_code` (string, optional): Exactly 3 characters. - `default` (any, optional) - `description` (string, optional, nullable): Up to 256 characters. - `id` (string, required): 1 to 36 characters. - `instruction` (string, optional, nullable): Up to 512 characters. - `name` (string, required): 1 to 64 characters. Matches `^[\w\s.-]+$`. - `options` (array of strings, optional): Up to 500 items. - `required` (boolean, required): Defaults to `false`. - `searchable` (boolean, optional) - `type` (string, required): One of `array`, `boolean`, `currency`, `date`, `email`, `enum`, `multi_select`, `number`, `string`, `text`, `url`. Defaults to `string`. - `creator_display_name` (string, required, nullable): Up to 101 characters. - `creator_user_id` (string, required, nullable): Up to 48 characters. - `description` (string, required, nullable): Up to 512 characters. - `insert_mode` (string, required): One of `append`, `dedup`, `merge`, `replace`. - `instruction` (string, required, nullable): Up to 512 characters. - `merge_columns_json` (array of strings, required, nullable): At least 1 items. - `name` (string, required): Up to 128 characters. - `strictness` (string, required): One of `strict`, `balanced`, `flexible`. - `usage_count` (integer, required): At least 0. ### Errors - 404: `not_found`, `table_not_found` Errors every endpoint can return: [Errors](https://anyrow.ai/docs/api/errors.md). ### Request ```ts title="Node.js" import { AnyrowSDK } from "@anyrow/sdk" const anyrow = new AnyrowSDK({ baseURL: "https://api.anyrow.ai", headers: { Authorization: `ApiKey ${process.env.ANYROW_API_KEY}` }, }) const { data, error } = await anyrow.tableTemplate.projectGet({ params: { project_id: "{project_id}", template_id: "{template_id}" }, }) ``` ```bash title="cURL" curl 'https://api.anyrow.ai/v1/projects/{project_id}/table-templates/{template_id}' \ -H 'Authorization: ApiKey {your_api_key}' ``` ```js title="JavaScript" const response = await fetch("https://api.anyrow.ai/v1/projects/{project_id}/table-templates/{template_id}", { headers: { Authorization: "ApiKey {your_api_key}", }, }) const data = await response.json() ``` ```python title="Python" import requests response = requests.get( "https://api.anyrow.ai/v1/projects/{project_id}/table-templates/{template_id}", headers={ "Authorization": "ApiKey {your_api_key}", }, ) print(response.json()) ``` ### Response ```json title="200" { "created_at": 1711468800000, "updated_at": 1711468800000, "id": "ttmpl_01h5a3g8k9m2n4p6q8r0t2v4x6", "category": "string", "columns_json": [ { "currency_code": "string", "description": "string", "id": "string", "instruction": "string", "name": "string", "options": [ "string" ], "required": false, "searchable": true, "type": "string" } ], "creator_display_name": "string", "creator_user_id": "string", "description": "string", "insert_mode": "append", "instruction": "string", "merge_columns_json": [ "string" ], "name": "string", "strictness": "strict", "usage_count": 42 } ``` ## Create table from template `POST /v1/projects/{project_id}/table-templates/{template_id}/use` Authentication: `Authorization: ApiKey {your_api_key}`. ### Path parameters - `project_id` (string, required) - `template_id` (string, required) ### Request body Content type: `application/json` (required). - `name` (string, required): 1 to 128 characters. - `slug` (string, optional): 1 to 50 characters. ### Returns 201 `application/json`: created. - `created_at` (integer, required): At least 0. - `deleted_at` (integer, required, nullable): At least 0. - `updated_at` (integer, required): At least 0. - `id` (string, required): 1 to 48 characters. - `project_id` (string, required): 1 to 48 characters. - `name` (string, required): 1 to 128 characters. - `slug` (string, required): 1 to 50 characters. - `columns_json` (array of objects, required): 1 to 100 items. - `currency_code` (string, optional): Exactly 3 characters. - `default` (any, optional) - `description` (string, optional, nullable): Up to 256 characters. - `id` (string, required): 1 to 36 characters. - `instruction` (string, optional, nullable): Up to 512 characters. - `name` (string, required): 1 to 64 characters. Matches `^[\w\s.-]+$`. - `options` (array of strings, optional): Up to 500 items. - `required` (boolean, required): Defaults to `false`. - `searchable` (boolean, optional) - `type` (string, required): One of `array`, `boolean`, `currency`, `date`, `email`, `enum`, `multi_select`, `number`, `string`, `text`, `url`. Defaults to `string`. - `instruction` (string, required, nullable): Up to 512 characters. - `strictness` (string, required): One of `strict`, `balanced`, `flexible`. - `insert_mode` (string, required): One of `append`, `dedup`, `merge`, `replace`. - `merge_columns_json` (array of strings, required, nullable): At least 1 items. - `default_sort` (string, required, nullable) - `row_count` (integer, required): At least 0. - `usage_count` (integer, required): At least 0. - `data_version` (integer, required): At least 0. - `fts_version` (integer, required): At least 0. - `last_used_at` (integer, required, nullable): At least 0. ### Errors - 404: `not_found`, `table_not_found` - 409: `table_project_id_duplicate` Errors every endpoint can return: [Errors](https://anyrow.ai/docs/api/errors.md). ### Request ```ts title="Node.js" import { AnyrowSDK } from "@anyrow/sdk" const anyrow = new AnyrowSDK({ baseURL: "https://api.anyrow.ai", headers: { Authorization: `ApiKey ${process.env.ANYROW_API_KEY}` }, }) const { data, error } = await anyrow.tableTemplate.use({ params: { project_id: "{project_id}", template_id: "{template_id}" }, json: { name: "string", slug: "string" }, }) ``` ```bash title="cURL" curl -X POST 'https://api.anyrow.ai/v1/projects/{project_id}/table-templates/{template_id}/use' \ -H 'Authorization: ApiKey {your_api_key}' \ -H 'Content-Type: application/json' \ -d '{ "name": "string", "slug": "string" }' ``` ```js title="JavaScript" const response = await fetch("https://api.anyrow.ai/v1/projects/{project_id}/table-templates/{template_id}/use", { method: "POST", headers: { Authorization: "ApiKey {your_api_key}", "Content-Type": "application/json", }, body: JSON.stringify({ "name": "string", "slug": "string" }), }) const data = await response.json() ``` ```python title="Python" import requests response = requests.post( "https://api.anyrow.ai/v1/projects/{project_id}/table-templates/{template_id}/use", headers={ "Authorization": "ApiKey {your_api_key}", }, json={ "name": "string", "slug": "string", }, ) print(response.json()) ``` ### Response ```json title="201" { "created_at": 1711468800000, "deleted_at": 1711468800000, "updated_at": 1711468800000, "id": "tbl_01h5a3g8k9m2n4p6q8r0t2v4x6", "project_id": "string", "name": "string", "slug": "string", "columns_json": [ { "currency_code": "string", "description": "string", "id": "string", "instruction": "string", "name": "string", "options": [ "string" ], "required": false, "searchable": true, "type": "string" } ], "instruction": "string", "strictness": "strict", "insert_mode": "append", "merge_columns_json": [ "string" ], "default_sort": "string", "row_count": 42, "usage_count": 42, "data_version": 42, "fts_version": 42, "last_used_at": 1711468800000 } ``` ## Create table template `POST /v1/table-templates` Authentication: `Authorization: ApiKey {your_api_key}`. ### Request body Content type: `application/json` (required). - `category` (string, required): 1 to 64 characters. - `columns_json` (array of objects, required): 1 to 100 items. - `currency_code` (string, optional): Exactly 3 characters. - `default` (any, optional) - `description` (string, optional, nullable): Up to 256 characters. - `id` (string, required): 1 to 36 characters. - `instruction` (string, optional, nullable): Up to 512 characters. - `name` (string, required): 1 to 64 characters. Matches `^[\w\s.-]+$`. - `options` (array of strings, optional): Up to 500 items. - `required` (boolean, optional): Defaults to `false`. - `searchable` (boolean, optional) - `type` (string, optional): One of `array`, `boolean`, `currency`, `date`, `email`, `enum`, `multi_select`, `number`, `string`, `text`, `url`. Defaults to `string`. - `description` (string, optional, nullable): Up to 512 characters. - `insert_mode` (string, optional): One of `append`, `dedup`, `merge`, `replace`. - `instruction` (string, optional, nullable): Up to 512 characters. - `merge_columns_json` (array of strings, optional, nullable): At least 1 items. - `name` (string, required): 1 to 128 characters. - `strictness` (string, optional): One of `strict`, `balanced`, `flexible`. ### Returns 201 `application/json`: created. - `created_at` (integer, required): At least 0. - `updated_at` (integer, required): At least 0. - `id` (string, required): 1 to 48 characters. - `category` (string, required): Up to 64 characters. - `columns_json` (array of objects, required): 1 to 100 items. - `currency_code` (string, optional): Exactly 3 characters. - `default` (any, optional) - `description` (string, optional, nullable): Up to 256 characters. - `id` (string, required): 1 to 36 characters. - `instruction` (string, optional, nullable): Up to 512 characters. - `name` (string, required): 1 to 64 characters. Matches `^[\w\s.-]+$`. - `options` (array of strings, optional): Up to 500 items. - `required` (boolean, required): Defaults to `false`. - `searchable` (boolean, optional) - `type` (string, required): One of `array`, `boolean`, `currency`, `date`, `email`, `enum`, `multi_select`, `number`, `string`, `text`, `url`. Defaults to `string`. - `creator_display_name` (string, required, nullable): Up to 101 characters. - `creator_user_id` (string, required, nullable): Up to 48 characters. - `description` (string, required, nullable): Up to 512 characters. - `insert_mode` (string, required): One of `append`, `dedup`, `merge`, `replace`. - `instruction` (string, required, nullable): Up to 512 characters. - `merge_columns_json` (array of strings, required, nullable): At least 1 items. - `name` (string, required): Up to 128 characters. - `strictness` (string, required): One of `strict`, `balanced`, `flexible`. - `usage_count` (integer, required): At least 0. ### Errors - 404: `not_found` Errors every endpoint can return: [Errors](https://anyrow.ai/docs/api/errors.md). ### Request ```ts title="Node.js" import { AnyrowSDK } from "@anyrow/sdk" const anyrow = new AnyrowSDK({ baseURL: "https://api.anyrow.ai", headers: { Authorization: `ApiKey ${process.env.ANYROW_API_KEY}` }, }) const { data, error } = await anyrow.tableTemplate.create({ json: { category: "string", columns_json: [ { currency_code: "string", description: "string", id: "string", instruction: "string", name: "string", options: [ "string" ], required: false, searchable: true, type: "string" } ], description: "string", insert_mode: "append", instruction: "string", merge_columns_json: [ "string" ], name: "string", strictness: "strict" }, }) ``` ```bash title="cURL" curl -X POST 'https://api.anyrow.ai/v1/table-templates' \ -H 'Authorization: ApiKey {your_api_key}' \ -H 'Content-Type: application/json' \ -d '{ "category": "string", "columns_json": [ { "currency_code": "string", "description": "string", "id": "string", "instruction": "string", "name": "string", "options": [ "string" ], "required": false, "searchable": true, "type": "string" } ], "description": "string", "insert_mode": "append", "instruction": "string", "merge_columns_json": [ "string" ], "name": "string", "strictness": "strict" }' ``` ```js title="JavaScript" const response = await fetch("https://api.anyrow.ai/v1/table-templates", { method: "POST", headers: { Authorization: "ApiKey {your_api_key}", "Content-Type": "application/json", }, body: JSON.stringify({ "category": "string", "columns_json": [ { "currency_code": "string", "description": "string", "id": "string", "instruction": "string", "name": "string", "options": [ "string" ], "required": false, "searchable": true, "type": "string" } ], "description": "string", "insert_mode": "append", "instruction": "string", "merge_columns_json": [ "string" ], "name": "string", "strictness": "strict" }), }) const data = await response.json() ``` ```python title="Python" import requests response = requests.post( "https://api.anyrow.ai/v1/table-templates", headers={ "Authorization": "ApiKey {your_api_key}", }, json={ "category": "string", "columns_json": [ { "currency_code": "string", "description": "string", "id": "string", "instruction": "string", "name": "string", "options": [ "string", ], "required": False, "searchable": True, "type": "string", }, ], "description": "string", "insert_mode": "append", "instruction": "string", "merge_columns_json": [ "string", ], "name": "string", "strictness": "strict", }, ) print(response.json()) ``` ### Response ```json title="201" { "created_at": 1711468800000, "updated_at": 1711468800000, "id": "ttmpl_01h5a3g8k9m2n4p6q8r0t2v4x6", "category": "string", "columns_json": [ { "currency_code": "string", "description": "string", "id": "string", "instruction": "string", "name": "string", "options": [ "string" ], "required": false, "searchable": true, "type": "string" } ], "creator_display_name": "string", "creator_user_id": "string", "description": "string", "insert_mode": "append", "instruction": "string", "merge_columns_json": [ "string" ], "name": "string", "strictness": "strict", "usage_count": 42 } ``` ## List my table templates `GET /v1/table-templates/mine` Authentication: `Authorization: ApiKey {your_api_key}`. ### Query parameters - `cursor` (string, optional): Opaque cursor for forward pagination. Pass the nextCursor from the previous response with the same order. Takes precedence over page when both are sent. - `page` (integer, optional): 1-based page number for offset pagination. Ignored when cursor is present. At least 1. - `order` (string, optional): Sort keys, comma-separated, each `field[.asc|.desc][.nullsfirst|.nullslast]`; at most 3. Sortable: category, created_at, name, updated_at, usage_count. Default: category.desc. Nulls sort last ascending and first descending unless stated. Matches `^(?:category|created_at|name|updated_at|usage_count)(?:\.(?:asc|desc))?(?:\.(?:nullsfirst|nullslast))?(?:,(?:category|created_at|name|updated_at|usage_count)(?:\.(?:asc|desc))?(?:\.(?:nullsfirst|nullslast))?){0,2}$`. - `filter` (string, optional): Filter expression `field.op.value`; `,` joins conditions with AND; group with `or(...)` and `and(...)`. Fields: category (enum: eq, ne, neq, in, nin, is); created_at (number: eq, ne, neq, gt, gte, lt, lte, in, nin, is); id (string: eq, ne, neq, like, ilike, in, nin, is); name (string: eq, ne, neq, like, ilike, in, nin, is). `like` is case-sensitive and `ilike` ignores ASCII case; `*` is the wildcard. `in`/`nin` take `(a,b)`; `is` takes `null` or `notnull`. At most 20 conditions, 3 nested groups, 100 in/nin values. - `q` (string, optional): Free-text search over: name, description, creator_display_name. Whitespace-separated terms must all match. Up to 200 characters. - `select` (string, optional): PostgREST-style sparse fieldset. Scalars comma-separated; relations embedded as name(fields); wildcard * selects all scalars. Docs: https://docs.postgrest.org/en/stable/references/api/resource_embedding.html Up to 500 characters. - `limit` (integer, optional): Maximum number of items per page. Defaults to 20, capped by the endpoint's maxLimit. Defaults to `20`. Between 1 and 100. ### Returns 200 `application/json`. - `count` (integer, required): At least 0. - `hasMore` (boolean, required) - `limit` (integer, required): At least 1. - `nextCursor` (string, required, nullable) - `page` (integer, required, nullable): At least 1. - `templates` (array of objects, required) - `created_at` (integer, required): At least 0. - `updated_at` (integer, required): At least 0. - `id` (string, required): 1 to 48 characters. - `category` (string, required): Up to 64 characters. - `columns_json` (array of objects, required): 1 to 100 items. - `currency_code` (string, optional): Exactly 3 characters. - `default` (any, optional) - `description` (string, optional, nullable): Up to 256 characters. - `id` (string, required): 1 to 36 characters. - `instruction` (string, optional, nullable): Up to 512 characters. - `name` (string, required): 1 to 64 characters. Matches `^[\w\s.-]+$`. - `options` (array of strings, optional): Up to 500 items. - `required` (boolean, required): Defaults to `false`. - `searchable` (boolean, optional) - `type` (string, required): One of `array`, `boolean`, `currency`, `date`, `email`, `enum`, `multi_select`, `number`, `string`, `text`, `url`. Defaults to `string`. - `creator_display_name` (string, required, nullable): Up to 101 characters. - `creator_user_id` (string, required, nullable): Up to 48 characters. - `description` (string, required, nullable): Up to 512 characters. - `insert_mode` (string, required): One of `append`, `dedup`, `merge`, `replace`. - `instruction` (string, required, nullable): Up to 512 characters. - `merge_columns_json` (array of strings, required, nullable): At least 1 items. - `name` (string, required): Up to 128 characters. - `strictness` (string, required): One of `strict`, `balanced`, `flexible`. - `usage_count` (integer, required): At least 0. ### Errors - 404: `not_found` Errors every endpoint can return: [Errors](https://anyrow.ai/docs/api/errors.md). ### Request ```ts title="Node.js" import { AnyrowSDK } from "@anyrow/sdk" const anyrow = new AnyrowSDK({ baseURL: "https://api.anyrow.ai", headers: { Authorization: `ApiKey ${process.env.ANYROW_API_KEY}` }, }) const { data, error } = await anyrow.tableTemplate.listMine({}) ``` ```bash title="cURL" curl 'https://api.anyrow.ai/v1/table-templates/mine' \ -H 'Authorization: ApiKey {your_api_key}' ``` ```js title="JavaScript" const response = await fetch("https://api.anyrow.ai/v1/table-templates/mine", { headers: { Authorization: "ApiKey {your_api_key}", }, }) const data = await response.json() ``` ```python title="Python" import requests response = requests.get( "https://api.anyrow.ai/v1/table-templates/mine", headers={ "Authorization": "ApiKey {your_api_key}", }, ) print(response.json()) ``` ### Response ```json title="200" { "count": 0, "hasMore": true, "limit": 1, "nextCursor": "string", "page": 1, "templates": [ { "created_at": 1711468800000, "updated_at": 1711468800000, "id": "ttmpl_01h5a3g8k9m2n4p6q8r0t2v4x6", "category": "string", "columns_json": [ { "currency_code": "string", "description": "string", "id": "string", "instruction": "string", "name": "string", "options": [ "string" ], "required": false, "searchable": true, "type": "string" } ], "creator_display_name": "string", "creator_user_id": "string", "description": "string", "insert_mode": "append", "instruction": "string", "merge_columns_json": [ "string" ], "name": "string", "strictness": "strict", "usage_count": 42 } ] } ``` ## Update table template `PATCH /v1/table-templates/{template_id}` Authentication: `Authorization: ApiKey {your_api_key}`. ### Path parameters - `template_id` (string, required) ### Request body Content type: `application/json` (required). - `category` (string, optional): Up to 64 characters. - `columns_json` (array of objects, optional): 1 to 100 items. - `currency_code` (string, optional): Exactly 3 characters. - `default` (any, optional) - `description` (string, optional, nullable): Up to 256 characters. - `id` (string, required): 1 to 36 characters. - `instruction` (string, optional, nullable): Up to 512 characters. - `name` (string, required): 1 to 64 characters. Matches `^[\w\s.-]+$`. - `options` (array of strings, optional): Up to 500 items. - `required` (boolean, optional): Defaults to `false`. - `searchable` (boolean, optional) - `type` (string, optional): One of `array`, `boolean`, `currency`, `date`, `email`, `enum`, `multi_select`, `number`, `string`, `text`, `url`. Defaults to `string`. - `description` (string, optional, nullable): Up to 512 characters. - `insert_mode` (string, optional): One of `append`, `dedup`, `merge`, `replace`. - `instruction` (string, optional, nullable): Up to 512 characters. - `merge_columns_json` (array of strings, optional, nullable): At least 1 items. - `name` (string, optional): Up to 128 characters. - `strictness` (string, optional): One of `strict`, `balanced`, `flexible`. ### Returns 200 `application/json`. - `created_at` (integer, required): At least 0. - `updated_at` (integer, required): At least 0. - `id` (string, required): 1 to 48 characters. - `category` (string, required): Up to 64 characters. - `columns_json` (array of objects, required): 1 to 100 items. - `currency_code` (string, optional): Exactly 3 characters. - `default` (any, optional) - `description` (string, optional, nullable): Up to 256 characters. - `id` (string, required): 1 to 36 characters. - `instruction` (string, optional, nullable): Up to 512 characters. - `name` (string, required): 1 to 64 characters. Matches `^[\w\s.-]+$`. - `options` (array of strings, optional): Up to 500 items. - `required` (boolean, required): Defaults to `false`. - `searchable` (boolean, optional) - `type` (string, required): One of `array`, `boolean`, `currency`, `date`, `email`, `enum`, `multi_select`, `number`, `string`, `text`, `url`. Defaults to `string`. - `creator_display_name` (string, required, nullable): Up to 101 characters. - `creator_user_id` (string, required, nullable): Up to 48 characters. - `description` (string, required, nullable): Up to 512 characters. - `insert_mode` (string, required): One of `append`, `dedup`, `merge`, `replace`. - `instruction` (string, required, nullable): Up to 512 characters. - `merge_columns_json` (array of strings, required, nullable): At least 1 items. - `name` (string, required): Up to 128 characters. - `strictness` (string, required): One of `strict`, `balanced`, `flexible`. - `usage_count` (integer, required): At least 0. ### Errors - 403: `email_not_verified`, `forbidden`, `impersonation_forbidden`, `org_suspended`, `table_template_forbidden` - 404: `not_found`, `table_template_not_found` Errors every endpoint can return: [Errors](https://anyrow.ai/docs/api/errors.md). ### Request ```ts title="Node.js" import { AnyrowSDK } from "@anyrow/sdk" const anyrow = new AnyrowSDK({ baseURL: "https://api.anyrow.ai", headers: { Authorization: `ApiKey ${process.env.ANYROW_API_KEY}` }, }) const { data, error } = await anyrow.tableTemplate.update({ params: { template_id: "{template_id}" }, json: { category: "string", columns_json: [ { currency_code: "string", description: "string", id: "string", instruction: "string", name: "string", options: [ "string" ], required: false, searchable: true, type: "string" } ], description: "string", insert_mode: "append", instruction: "string", merge_columns_json: [ "string" ], name: "string", strictness: "strict" }, }) ``` ```bash title="cURL" curl -X PATCH 'https://api.anyrow.ai/v1/table-templates/{template_id}' \ -H 'Authorization: ApiKey {your_api_key}' \ -H 'Content-Type: application/json' \ -d '{ "category": "string", "columns_json": [ { "currency_code": "string", "description": "string", "id": "string", "instruction": "string", "name": "string", "options": [ "string" ], "required": false, "searchable": true, "type": "string" } ], "description": "string", "insert_mode": "append", "instruction": "string", "merge_columns_json": [ "string" ], "name": "string", "strictness": "strict" }' ``` ```js title="JavaScript" const response = await fetch("https://api.anyrow.ai/v1/table-templates/{template_id}", { method: "PATCH", headers: { Authorization: "ApiKey {your_api_key}", "Content-Type": "application/json", }, body: JSON.stringify({ "category": "string", "columns_json": [ { "currency_code": "string", "description": "string", "id": "string", "instruction": "string", "name": "string", "options": [ "string" ], "required": false, "searchable": true, "type": "string" } ], "description": "string", "insert_mode": "append", "instruction": "string", "merge_columns_json": [ "string" ], "name": "string", "strictness": "strict" }), }) const data = await response.json() ``` ```python title="Python" import requests response = requests.patch( "https://api.anyrow.ai/v1/table-templates/{template_id}", headers={ "Authorization": "ApiKey {your_api_key}", }, json={ "category": "string", "columns_json": [ { "currency_code": "string", "description": "string", "id": "string", "instruction": "string", "name": "string", "options": [ "string", ], "required": False, "searchable": True, "type": "string", }, ], "description": "string", "insert_mode": "append", "instruction": "string", "merge_columns_json": [ "string", ], "name": "string", "strictness": "strict", }, ) print(response.json()) ``` ### Response ```json title="200" { "created_at": 1711468800000, "updated_at": 1711468800000, "id": "ttmpl_01h5a3g8k9m2n4p6q8r0t2v4x6", "category": "string", "columns_json": [ { "currency_code": "string", "description": "string", "id": "string", "instruction": "string", "name": "string", "options": [ "string" ], "required": false, "searchable": true, "type": "string" } ], "creator_display_name": "string", "creator_user_id": "string", "description": "string", "insert_mode": "append", "instruction": "string", "merge_columns_json": [ "string" ], "name": "string", "strictness": "strict", "usage_count": 42 } ``` ## Delete table template `DELETE /v1/table-templates/{template_id}` Authentication: `Authorization: ApiKey {your_api_key}`. ### Path parameters - `template_id` (string, required) ### Returns 200 `application/json`. - `id` (string, required) ### Errors - 403: `email_not_verified`, `forbidden`, `impersonation_forbidden`, `org_suspended`, `table_template_forbidden` - 404: `not_found`, `table_template_not_found` Errors every endpoint can return: [Errors](https://anyrow.ai/docs/api/errors.md). ### Request ```ts title="Node.js" import { AnyrowSDK } from "@anyrow/sdk" const anyrow = new AnyrowSDK({ baseURL: "https://api.anyrow.ai", headers: { Authorization: `ApiKey ${process.env.ANYROW_API_KEY}` }, }) const { data, error } = await anyrow.tableTemplate.delete({ params: { template_id: "{template_id}" }, }) ``` ```bash title="cURL" curl -X DELETE 'https://api.anyrow.ai/v1/table-templates/{template_id}' \ -H 'Authorization: ApiKey {your_api_key}' ``` ```js title="JavaScript" const response = await fetch("https://api.anyrow.ai/v1/table-templates/{template_id}", { method: "DELETE", headers: { Authorization: "ApiKey {your_api_key}", }, }) const data = await response.json() ``` ```python title="Python" import requests response = requests.delete( "https://api.anyrow.ai/v1/table-templates/{template_id}", headers={ "Authorization": "ApiKey {your_api_key}", }, ) print(response.json()) ``` ### Response ```json title="200" { "id": "string" } ``` --- Source: https://anyrow.ai/docs/api/webhooks # Webhooks Endpoints Anyrow posts batch events to, signed with your secret. - [List webhooks](https://anyrow.ai/docs/api/webhooks/list.md): `GET /v1/organizations/{organization_id}/webhooks` - [Create webhook](https://anyrow.ai/docs/api/webhooks/create.md): `POST /v1/organizations/{organization_id}/webhooks` - [Get webhook](https://anyrow.ai/docs/api/webhooks/get.md): `GET /v1/organizations/{organization_id}/webhooks/{id}` - [Update webhook](https://anyrow.ai/docs/api/webhooks/update.md): `PATCH /v1/organizations/{organization_id}/webhooks/{id}` - [Delete webhook](https://anyrow.ai/docs/api/webhooks/delete.md): `DELETE /v1/organizations/{organization_id}/webhooks/{id}` - [List webhook deliveries](https://anyrow.ai/docs/api/webhooks/deliveries.md): `GET /v1/organizations/{organization_id}/webhooks/{id}/deliveries` - [Rotate webhook secret](https://anyrow.ai/docs/api/webhooks/rotate-secret.md): `POST /v1/organizations/{organization_id}/webhooks/{id}/rotate-secret` - [Send test webhook](https://anyrow.ai/docs/api/webhooks/test.md): `POST /v1/organizations/{organization_id}/webhooks/{id}/test` ## The Webhook object - `created_at` (integer, required): At least 0. - `updated_at` (integer, required): At least 0. - `id` (string, required): 1 to 48 characters. - `name` (string, required, nullable): Up to 64 characters. - `organization_id` (string, required): 1 to 48 characters. - `url` (string, required): Up to 2048 characters. - `secret_rotated_at` (integer, required, nullable): At least 0. - `active` (boolean, required) - `failure_count` (integer, required): At least 0. - `last_triggered_at` (integer, required, nullable): At least 0. - `events` (array of strings, required): At least 1 items. ```json { "created_at": 1711468800000, "updated_at": 1711468800000, "id": "whook_01h5a3g8k9m2n4p6q8r0t2v4x6", "name": "string", "organization_id": "string", "url": "https://example.com", "secret_rotated_at": 1711468800000, "active": true, "failure_count": 42, "last_triggered_at": 1711468800000, "events": [ "batch.complete" ] } ``` ## List webhooks `GET /v1/organizations/{organization_id}/webhooks` Authentication: `Authorization: ApiKey {your_api_key}`. ### Path parameters - `organization_id` (string, required) ### Query parameters - `cursor` (string, optional): Opaque cursor for forward pagination. Pass the nextCursor from the previous response with the same order. Takes precedence over page when both are sent. - `page` (integer, optional): 1-based page number for offset pagination. Ignored when cursor is present. At least 1. - `order` (string, optional): Sort keys, comma-separated, each `field[.asc|.desc][.nullsfirst|.nullslast]`; at most 3. Sortable: created_at, active. Default: created_at.desc. Nulls sort last ascending and first descending unless stated. Matches `^(?:created_at|active)(?:\.(?:asc|desc))?(?:\.(?:nullsfirst|nullslast))?(?:,(?:created_at|active)(?:\.(?:asc|desc))?(?:\.(?:nullsfirst|nullslast))?){0,2}$`. - `filter` (string, optional): Filter expression `field.op.value`; `,` joins conditions with AND; group with `or(...)` and `and(...)`. Fields: active (boolean: eq, ne, neq, is); created_at (number: eq, ne, neq, gt, gte, lt, lte, in, nin, is); id (string: eq, ne, neq, like, ilike, in, nin, is); name (string: eq, ne, neq, like, ilike, in, nin, is). `like` is case-sensitive and `ilike` ignores ASCII case; `*` is the wildcard. `in`/`nin` take `(a,b)`; `is` takes `null` or `notnull`. At most 20 conditions, 3 nested groups, 100 in/nin values. - `q` (string, optional): Free-text search over: name, url. Whitespace-separated terms must all match. Up to 200 characters. - `limit` (integer, optional): Maximum number of items per page. Defaults to 20, capped by the endpoint's maxLimit. Defaults to `20`. Between 1 and 100. ### Returns 200 `application/json`. - `count` (integer, required): At least 0. - `hasMore` (boolean, required) - `limit` (integer, required): At least 1. - `nextCursor` (string, required, nullable) - `page` (integer, required, nullable): At least 1. - `webhooks` (array of objects, required) - `created_at` (integer, required): At least 0. - `updated_at` (integer, required): At least 0. - `id` (string, required): 1 to 48 characters. - `name` (string, required, nullable): Up to 64 characters. - `organization_id` (string, required): 1 to 48 characters. - `url` (string, required): Up to 2048 characters. - `secret_rotated_at` (integer, required, nullable): At least 0. - `active` (boolean, required) - `failure_count` (integer, required): At least 0. - `last_triggered_at` (integer, required, nullable): At least 0. - `events` (array of strings, required): At least 1 items. ### Errors - 404: `not_found` Errors every endpoint can return: [Errors](https://anyrow.ai/docs/api/errors.md). ### Request ```ts title="Node.js" import { AnyrowSDK } from "@anyrow/sdk" const anyrow = new AnyrowSDK({ baseURL: "https://api.anyrow.ai", headers: { Authorization: `ApiKey ${process.env.ANYROW_API_KEY}` }, }) const { data, error } = await anyrow.webhook.list({ params: { organization_id: "{organization_id}" }, }) ``` ```bash title="cURL" curl 'https://api.anyrow.ai/v1/organizations/{organization_id}/webhooks' \ -H 'Authorization: ApiKey {your_api_key}' ``` ```js title="JavaScript" const response = await fetch("https://api.anyrow.ai/v1/organizations/{organization_id}/webhooks", { headers: { Authorization: "ApiKey {your_api_key}", }, }) const data = await response.json() ``` ```python title="Python" import requests response = requests.get( "https://api.anyrow.ai/v1/organizations/{organization_id}/webhooks", headers={ "Authorization": "ApiKey {your_api_key}", }, ) print(response.json()) ``` ### Response ```json title="200" { "count": 0, "hasMore": true, "limit": 1, "nextCursor": "string", "page": 1, "webhooks": [ { "created_at": 1711468800000, "updated_at": 1711468800000, "id": "whook_01h5a3g8k9m2n4p6q8r0t2v4x6", "name": "string", "organization_id": "string", "url": "https://example.com", "secret_rotated_at": 1711468800000, "active": true, "failure_count": 42, "last_triggered_at": 1711468800000, "events": [ "batch.complete" ] } ] } ``` ## Create webhook `POST /v1/organizations/{organization_id}/webhooks` Authentication: `Authorization: ApiKey {your_api_key}`. ### Path parameters - `organization_id` (string, required) ### Request body Content type: `application/json` (required). - `events` (array of strings, required): At least 1 items. - `name` (string, optional): Up to 64 characters. - `url` (string, required): Up to 2048 characters. Matches `^https:\/\/.*`. ### Returns 201 `application/json`: created. - `created_at` (integer, required): At least 0. - `updated_at` (integer, required): At least 0. - `id` (string, required): 1 to 48 characters. - `name` (string, required, nullable): Up to 64 characters. - `organization_id` (string, required): 1 to 48 characters. - `url` (string, required): Up to 2048 characters. - `secret_rotated_at` (integer, required, nullable): At least 0. - `active` (boolean, required) - `failure_count` (integer, required): At least 0. - `last_triggered_at` (integer, required, nullable): At least 0. - `events` (array of strings, required): At least 1 items. - `secret` (string, required) ### Errors - 404: `not_found` Errors every endpoint can return: [Errors](https://anyrow.ai/docs/api/errors.md). ### Request ```ts title="Node.js" import { AnyrowSDK } from "@anyrow/sdk" const anyrow = new AnyrowSDK({ baseURL: "https://api.anyrow.ai", headers: { Authorization: `ApiKey ${process.env.ANYROW_API_KEY}` }, }) const { data, error } = await anyrow.webhook.create({ params: { organization_id: "{organization_id}" }, json: { events: [ "batch.complete" ], name: "string", url: "https://example.com" }, }) ``` ```bash title="cURL" curl -X POST 'https://api.anyrow.ai/v1/organizations/{organization_id}/webhooks' \ -H 'Authorization: ApiKey {your_api_key}' \ -H 'Content-Type: application/json' \ -d '{ "events": [ "batch.complete" ], "name": "string", "url": "https://example.com" }' ``` ```js title="JavaScript" const response = await fetch("https://api.anyrow.ai/v1/organizations/{organization_id}/webhooks", { method: "POST", headers: { Authorization: "ApiKey {your_api_key}", "Content-Type": "application/json", }, body: JSON.stringify({ "events": [ "batch.complete" ], "name": "string", "url": "https://example.com" }), }) const data = await response.json() ``` ```python title="Python" import requests response = requests.post( "https://api.anyrow.ai/v1/organizations/{organization_id}/webhooks", headers={ "Authorization": "ApiKey {your_api_key}", }, json={ "events": [ "batch.complete", ], "name": "string", "url": "https://example.com", }, ) print(response.json()) ``` ### Response ```json title="201" { "created_at": 1711468800000, "updated_at": 1711468800000, "id": "whook_01h5a3g8k9m2n4p6q8r0t2v4x6", "name": "string", "organization_id": "string", "url": "https://example.com", "secret_rotated_at": 1711468800000, "active": true, "failure_count": 42, "last_triggered_at": 1711468800000, "events": [ "batch.complete" ], "secret": "string" } ``` ## Get webhook `GET /v1/organizations/{organization_id}/webhooks/{id}` Authentication: `Authorization: ApiKey {your_api_key}`. ### Path parameters - `organization_id` (string, required) - `id` (string, required) ### Returns 200 `application/json`. - `created_at` (integer, required): At least 0. - `updated_at` (integer, required): At least 0. - `id` (string, required): 1 to 48 characters. - `name` (string, required, nullable): Up to 64 characters. - `organization_id` (string, required): 1 to 48 characters. - `url` (string, required): Up to 2048 characters. - `secret_rotated_at` (integer, required, nullable): At least 0. - `active` (boolean, required) - `failure_count` (integer, required): At least 0. - `last_triggered_at` (integer, required, nullable): At least 0. - `events` (array of strings, required): At least 1 items. ### Errors - 404: `not_found`, `webhook_not_found` Errors every endpoint can return: [Errors](https://anyrow.ai/docs/api/errors.md). ### Request ```ts title="Node.js" import { AnyrowSDK } from "@anyrow/sdk" const anyrow = new AnyrowSDK({ baseURL: "https://api.anyrow.ai", headers: { Authorization: `ApiKey ${process.env.ANYROW_API_KEY}` }, }) const { data, error } = await anyrow.webhook.get({ params: { organization_id: "{organization_id}", id: "{id}" }, }) ``` ```bash title="cURL" curl 'https://api.anyrow.ai/v1/organizations/{organization_id}/webhooks/{id}' \ -H 'Authorization: ApiKey {your_api_key}' ``` ```js title="JavaScript" const response = await fetch("https://api.anyrow.ai/v1/organizations/{organization_id}/webhooks/{id}", { headers: { Authorization: "ApiKey {your_api_key}", }, }) const data = await response.json() ``` ```python title="Python" import requests response = requests.get( "https://api.anyrow.ai/v1/organizations/{organization_id}/webhooks/{id}", headers={ "Authorization": "ApiKey {your_api_key}", }, ) print(response.json()) ``` ### Response ```json title="200" { "created_at": 1711468800000, "updated_at": 1711468800000, "id": "whook_01h5a3g8k9m2n4p6q8r0t2v4x6", "name": "string", "organization_id": "string", "url": "https://example.com", "secret_rotated_at": 1711468800000, "active": true, "failure_count": 42, "last_triggered_at": 1711468800000, "events": [ "batch.complete" ] } ``` ## Update webhook `PATCH /v1/organizations/{organization_id}/webhooks/{id}` Authentication: `Authorization: ApiKey {your_api_key}`. ### Path parameters - `organization_id` (string, required) - `id` (string, required) ### Request body Content type: `application/json` (required). - `active` (boolean, optional) - `events` (array of strings, optional): At least 1 items. - `name` (string, optional): Up to 64 characters. - `url` (string, optional): Up to 2048 characters. Matches `^https:\/\/.*`. ### Returns 200 `application/json`. - `created_at` (integer, required): At least 0. - `updated_at` (integer, required): At least 0. - `id` (string, required): 1 to 48 characters. - `name` (string, required, nullable): Up to 64 characters. - `organization_id` (string, required): 1 to 48 characters. - `url` (string, required): Up to 2048 characters. - `secret_rotated_at` (integer, required, nullable): At least 0. - `active` (boolean, required) - `failure_count` (integer, required): At least 0. - `last_triggered_at` (integer, required, nullable): At least 0. - `events` (array of strings, required): At least 1 items. ### Errors - 404: `not_found`, `webhook_not_found` Errors every endpoint can return: [Errors](https://anyrow.ai/docs/api/errors.md). ### Request ```ts title="Node.js" import { AnyrowSDK } from "@anyrow/sdk" const anyrow = new AnyrowSDK({ baseURL: "https://api.anyrow.ai", headers: { Authorization: `ApiKey ${process.env.ANYROW_API_KEY}` }, }) const { data, error } = await anyrow.webhook.update({ params: { organization_id: "{organization_id}", id: "{id}" }, json: { active: true, events: [ "batch.complete" ], name: "string", url: "https://example.com" }, }) ``` ```bash title="cURL" curl -X PATCH 'https://api.anyrow.ai/v1/organizations/{organization_id}/webhooks/{id}' \ -H 'Authorization: ApiKey {your_api_key}' \ -H 'Content-Type: application/json' \ -d '{ "active": true, "events": [ "batch.complete" ], "name": "string", "url": "https://example.com" }' ``` ```js title="JavaScript" const response = await fetch("https://api.anyrow.ai/v1/organizations/{organization_id}/webhooks/{id}", { method: "PATCH", headers: { Authorization: "ApiKey {your_api_key}", "Content-Type": "application/json", }, body: JSON.stringify({ "active": true, "events": [ "batch.complete" ], "name": "string", "url": "https://example.com" }), }) const data = await response.json() ``` ```python title="Python" import requests response = requests.patch( "https://api.anyrow.ai/v1/organizations/{organization_id}/webhooks/{id}", headers={ "Authorization": "ApiKey {your_api_key}", }, json={ "active": True, "events": [ "batch.complete", ], "name": "string", "url": "https://example.com", }, ) print(response.json()) ``` ### Response ```json title="200" { "created_at": 1711468800000, "updated_at": 1711468800000, "id": "whook_01h5a3g8k9m2n4p6q8r0t2v4x6", "name": "string", "organization_id": "string", "url": "https://example.com", "secret_rotated_at": 1711468800000, "active": true, "failure_count": 42, "last_triggered_at": 1711468800000, "events": [ "batch.complete" ] } ``` ## Delete webhook `DELETE /v1/organizations/{organization_id}/webhooks/{id}` Authentication: `Authorization: ApiKey {your_api_key}`. ### Path parameters - `organization_id` (string, required) - `id` (string, required) ### Returns 200 `application/json`. - `id` (string, required) ### Errors - 404: `not_found`, `webhook_not_found` Errors every endpoint can return: [Errors](https://anyrow.ai/docs/api/errors.md). ### Request ```ts title="Node.js" import { AnyrowSDK } from "@anyrow/sdk" const anyrow = new AnyrowSDK({ baseURL: "https://api.anyrow.ai", headers: { Authorization: `ApiKey ${process.env.ANYROW_API_KEY}` }, }) const { data, error } = await anyrow.webhook.delete({ params: { organization_id: "{organization_id}", id: "{id}" }, }) ``` ```bash title="cURL" curl -X DELETE 'https://api.anyrow.ai/v1/organizations/{organization_id}/webhooks/{id}' \ -H 'Authorization: ApiKey {your_api_key}' ``` ```js title="JavaScript" const response = await fetch("https://api.anyrow.ai/v1/organizations/{organization_id}/webhooks/{id}", { method: "DELETE", headers: { Authorization: "ApiKey {your_api_key}", }, }) const data = await response.json() ``` ```python title="Python" import requests response = requests.delete( "https://api.anyrow.ai/v1/organizations/{organization_id}/webhooks/{id}", headers={ "Authorization": "ApiKey {your_api_key}", }, ) print(response.json()) ``` ### Response ```json title="200" { "id": "string" } ``` ## List webhook deliveries `GET /v1/organizations/{organization_id}/webhooks/{id}/deliveries` Authentication: `Authorization: ApiKey {your_api_key}`. ### Path parameters - `organization_id` (string, required) - `id` (string, required) ### Query parameters - `cursor` (string, optional): Opaque cursor for forward pagination. Pass the nextCursor from the previous response with the same order. Takes precedence over page when both are sent. - `page` (integer, optional): 1-based page number for offset pagination. Ignored when cursor is present. At least 1. - `order` (string, optional): Sort keys, comma-separated, each `field[.asc|.desc][.nullsfirst|.nullslast]`; at most 3. Sortable: created_at, status. Default: created_at.desc. Nulls sort last ascending and first descending unless stated. Matches `^(?:created_at|status)(?:\.(?:asc|desc))?(?:\.(?:nullsfirst|nullslast))?(?:,(?:created_at|status)(?:\.(?:asc|desc))?(?:\.(?:nullsfirst|nullslast))?){0,2}$`. - `limit` (integer, optional): Maximum number of items per page. Defaults to 20, capped by the endpoint's maxLimit. Defaults to `20`. Between 1 and 100. - `event` (string, optional): One of `batch.complete`, `batch.failed`, `batch.partial`, `ping`. - `status` (string, optional): One of `pending`, `success`, `failed`. ### Returns 200 `application/json`. - `count` (integer, required): At least 0. - `hasMore` (boolean, required) - `limit` (integer, required): At least 1. - `nextCursor` (string, required, nullable) - `page` (integer, required, nullable): At least 1. - `deliveries` (array of objects, required) - `created_at` (integer, required): At least 0. - `id` (string, required): 1 to 48 characters. - `webhook_id` (string, required): 1 to 48 characters. - `event` (string, required): One of `batch.complete`, `batch.failed`, `batch.partial`, `ping`. - `payload_json` (string, required): Up to 65536 characters. - `status` (string, required): One of `pending`, `success`, `failed`. - `http_status` (integer, required, nullable): At least 0. - `response_body` (string, required, nullable): Up to 4096 characters. - `attempt` (integer, required): At least 1. - `next_retry_at` (integer, required, nullable): At least 0. - `delivered_at` (integer, required, nullable): At least 0. ### Errors - 404: `not_found`, `webhook_not_found` Errors every endpoint can return: [Errors](https://anyrow.ai/docs/api/errors.md). ### Request ```ts title="Node.js" import { AnyrowSDK } from "@anyrow/sdk" const anyrow = new AnyrowSDK({ baseURL: "https://api.anyrow.ai", headers: { Authorization: `ApiKey ${process.env.ANYROW_API_KEY}` }, }) const { data, error } = await anyrow.webhook.deliveries({ params: { organization_id: "{organization_id}", id: "{id}" }, }) ``` ```bash title="cURL" curl 'https://api.anyrow.ai/v1/organizations/{organization_id}/webhooks/{id}/deliveries' \ -H 'Authorization: ApiKey {your_api_key}' ``` ```js title="JavaScript" const response = await fetch("https://api.anyrow.ai/v1/organizations/{organization_id}/webhooks/{id}/deliveries", { headers: { Authorization: "ApiKey {your_api_key}", }, }) const data = await response.json() ``` ```python title="Python" import requests response = requests.get( "https://api.anyrow.ai/v1/organizations/{organization_id}/webhooks/{id}/deliveries", headers={ "Authorization": "ApiKey {your_api_key}", }, ) print(response.json()) ``` ### Response ```json title="200" { "count": 0, "hasMore": true, "limit": 1, "nextCursor": "string", "page": 1, "deliveries": [ { "created_at": 1711468800000, "id": "whdlv_01h5a3g8k9m2n4p6q8r0t2v4x6", "webhook_id": "string", "event": "batch.complete", "payload_json": "string", "status": "pending", "http_status": 42, "response_body": "string", "attempt": 42, "next_retry_at": 1711468800000, "delivered_at": 1711468800000 } ] } ``` ## Rotate webhook secret `POST /v1/organizations/{organization_id}/webhooks/{id}/rotate-secret` Authentication: `Authorization: ApiKey {your_api_key}`. ### Path parameters - `organization_id` (string, required) - `id` (string, required) ### Returns 200 `application/json`. - `created_at` (integer, required): At least 0. - `updated_at` (integer, required): At least 0. - `id` (string, required): 1 to 48 characters. - `name` (string, required, nullable): Up to 64 characters. - `organization_id` (string, required): 1 to 48 characters. - `url` (string, required): Up to 2048 characters. - `secret_rotated_at` (integer, required, nullable): At least 0. - `active` (boolean, required) - `failure_count` (integer, required): At least 0. - `last_triggered_at` (integer, required, nullable): At least 0. - `events` (array of strings, required): At least 1 items. - `secret` (string, required) ### Errors - 404: `not_found`, `webhook_not_found` Errors every endpoint can return: [Errors](https://anyrow.ai/docs/api/errors.md). ### Request ```ts title="Node.js" import { AnyrowSDK } from "@anyrow/sdk" const anyrow = new AnyrowSDK({ baseURL: "https://api.anyrow.ai", headers: { Authorization: `ApiKey ${process.env.ANYROW_API_KEY}` }, }) const { data, error } = await anyrow.webhook.rotateSecret({ params: { organization_id: "{organization_id}", id: "{id}" }, }) ``` ```bash title="cURL" curl -X POST 'https://api.anyrow.ai/v1/organizations/{organization_id}/webhooks/{id}/rotate-secret' \ -H 'Authorization: ApiKey {your_api_key}' ``` ```js title="JavaScript" const response = await fetch("https://api.anyrow.ai/v1/organizations/{organization_id}/webhooks/{id}/rotate-secret", { method: "POST", headers: { Authorization: "ApiKey {your_api_key}", }, }) const data = await response.json() ``` ```python title="Python" import requests response = requests.post( "https://api.anyrow.ai/v1/organizations/{organization_id}/webhooks/{id}/rotate-secret", headers={ "Authorization": "ApiKey {your_api_key}", }, ) print(response.json()) ``` ### Response ```json title="200" { "created_at": 1711468800000, "updated_at": 1711468800000, "id": "whook_01h5a3g8k9m2n4p6q8r0t2v4x6", "name": "string", "organization_id": "string", "url": "https://example.com", "secret_rotated_at": 1711468800000, "active": true, "failure_count": 42, "last_triggered_at": 1711468800000, "events": [ "batch.complete" ], "secret": "string" } ``` ## Send test webhook `POST /v1/organizations/{organization_id}/webhooks/{id}/test` Authentication: `Authorization: ApiKey {your_api_key}`. ### Path parameters - `organization_id` (string, required) - `id` (string, required) ### Returns 200 `application/json`. - `http_status` (number, required, nullable) - `response_body` (string, required, nullable): Up to 1024 characters. - `status` (string, required): One of `error`, `success`, `timeout`. ### Errors - 404: `not_found`, `webhook_not_found` Errors every endpoint can return: [Errors](https://anyrow.ai/docs/api/errors.md). ### Request ```ts title="Node.js" import { AnyrowSDK } from "@anyrow/sdk" const anyrow = new AnyrowSDK({ baseURL: "https://api.anyrow.ai", headers: { Authorization: `ApiKey ${process.env.ANYROW_API_KEY}` }, }) const { data, error } = await anyrow.webhook.test({ params: { organization_id: "{organization_id}", id: "{id}" }, }) ``` ```bash title="cURL" curl -X POST 'https://api.anyrow.ai/v1/organizations/{organization_id}/webhooks/{id}/test' \ -H 'Authorization: ApiKey {your_api_key}' ``` ```js title="JavaScript" const response = await fetch("https://api.anyrow.ai/v1/organizations/{organization_id}/webhooks/{id}/test", { method: "POST", headers: { Authorization: "ApiKey {your_api_key}", }, }) const data = await response.json() ``` ```python title="Python" import requests response = requests.post( "https://api.anyrow.ai/v1/organizations/{organization_id}/webhooks/{id}/test", headers={ "Authorization": "ApiKey {your_api_key}", }, ) print(response.json()) ``` ### Response ```json title="200" { "http_status": 0, "response_body": "string", "status": "error" } ```