| Base URL | https://api.bitscale.ai/api/v1 |
| Authentication | X-API-KEY: <your-api-key> |
| Content-Type | application/json |
Enterprise Only — BitScale APIs is an Enterprise feature. Your workspace plan must be upgraded before any of these endpoints will respond successfully.
Table of Contents
- Overview
- Authentication
- Rate Limits
- Error Format
- Endpoints
- 5.1 GET /workspace — Get Workspace Details
- 5.2 GET /grids — List Grids in Workspace
- 5.3 GET /grids/:gridId — Get Grid Details
- 5.4 GET /grids/:gridId/curl — Get Grid Curl Command
- 5.5 POST /grids/:gridId/run — Run a Grid
- 5.6 GET /run/status/:requestId — Get Run Status
- 5.7 POST /api-key/rotate — Rotate API Key
- Sync vs Async Modes
- Error Code Reference
1. Overview
The BitScale External API lets you programmatically query workspace and grid metadata, trigger grid runs, poll for results, and manage your workspace API key. It is designed for use with MCP integrations, CI/CD pipelines, and any external system that needs to interact with BitScale grids automatically.Endpoints at a Glance
| Method | Path | Description |
|---|---|---|
GET | /workspace | Get workspace details (plan, credits, members) |
GET | /grids | List all grids in the workspace (paginated) |
GET | /grids/:gridId | Get full metadata for a specific grid |
GET | /grids/:gridId/curl | Get a ready-to-use curl command and API contract for running a grid |
POST | /grids/:gridId/run | Trigger a grid run (sync or async) |
GET | /run/status/:requestId | Poll run status and retrieve outputs |
POST | /api-key/rotate | Generate a new workspace API key |
2. Authentication
All requests must include a workspace-level API key in theX-API-KEY header. The key uniquely identifies your workspace — no separate workspace ID header is required.
Request Header
| Header | Value |
|---|---|
X-API-KEY | Your workspace API key (required) |
Example
Obtaining Your API Key
- Log into your BitScale workspace.
- Navigate to Settings → Accounts → API Keys.
- Copy the displayed workspace API key.
- To generate a new key, use
POST /api/v1/api-key/rotateor rotate it from the dashboard.
⚠ Important — Your API key identifies your entire workspace. Keep it secret and never expose it in client-side code or public repositories. If compromised, rotate it immediately.
Authentication Errors
| HTTP | Code | Description |
|---|---|---|
401 | INVALID_API_KEY | Missing X-API-KEY header, or the key is invalid / expired. |
3. Rate Limits
The BitScale External API enforces a default rate limit of 5 requests per second per workspace. Rate limiting is applied globally across all endpoints — including read-only endpoints likeGET /workspace and GET /grids.
| Limit | Default | Scope |
|---|---|---|
| Requests/sec | 5 | Per workspace |
429 Too Many Requests response. If your integration requires a higher (or lower) limit, reach out to your account manager or contact support at team@bitscale.ai to have it adjusted.
ℹ Note — Rate limits apply across all endpoints within a workspace. Polling GET /run/status/:requestId counts toward your limit, so poll at a reasonable interval (every 2–5 seconds) rather than as fast as possible.
Rate Limit Response Headers
Every API response includes the following headers so you can track your usage:| Header | Description |
|---|---|
X-RateLimit-Limit | Maximum number of requests allowed per second for your workspace. |
X-RateLimit-Remaining | Number of requests remaining in the current 1-second window. |
Retry-After | Seconds to wait before retrying. Present only on 429 responses (1). |
Example — Rate Limit Exceeded
4. Error Format
When a request fails, the API returns a JSON object with a top-levelerror key containing a machine-readable code and a human-readable message.
Example — Missing API Key
5. Endpoints
5.1 Get Workspace Details
X-API-KEY, including plan information, credit balances, and member counts.
Request
No request body or path parameters required. The workspace is identified from theX-API-KEY header.
Response — 200 OK
Response Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique workspace identifier. |
name | string | Display name of the workspace. |
created_at | string | ISO 8601 timestamp of workspace creation. |
created_by | object | Details of the user who created the workspace. |
plan.name | string | Current plan name (e.g. "Enterprise"). |
plan.credits_included | integer | Credits included in the current billing cycle. |
plan.billing_interval | string | "monthly", "yearly", or "quarterly". |
plan.next_billing_date | string | ISO 8601 timestamp of the next billing date. null if not applicable. |
plan.price | number | Plan price. null if not applicable. |
plan.currency | string | Currency code (e.g. "USD"). null if not applicable. |
credits.total | integer | Total credits available (plan + rollover + topup). |
credits.used | integer | Credits consumed in the current period. |
credits.remaining | integer | Credits still available. |
credits.plan_credits | integer | Credits from the base plan. |
credits.rollover | integer | Rollover credits carried over from the previous period. |
credits.topup | integer | Credits added via top-up purchases. |
people_company_searches.limit | integer | Monthly limit for People/Company search enrichments. |
people_company_searches.used | integer | Searches used in the current month. |
people_company_searches.remaining | integer | Searches remaining this month. |
people_company_searches.next_renewal_date | string | ISO 8601 date when the monthly search limit resets. |
members.total | integer | Total number of workspace members. |
members.owners | integer | Number of members with the Owner role. |
members.admins | integer | Number of members with the Admin role. |
members.editors | integer | Number of members with the Editor role. |
Response Status Codes
| HTTP | Code | Description |
|---|---|---|
200 | — | Workspace details returned successfully. |
401 | INVALID_API_KEY | X-API-KEY header is missing or invalid. |
404 | WORKSPACE_NOT_FOUND | Workspace not found for the provided API key. |
429 | RATE_LIMIT_EXCEEDED | Too many requests. Default limit is 5 req/sec. |
5.2 List Grids in Workspace
X-API-KEY, along with their column definitions (runnable columns only). Supports filtering by name.
Query Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
search | string | No | — | Filter grids by name (case-insensitive substring match). |
page | integer | No | 1 | Page number (1-based). |
limit | integer | No | 20 | Number of results per page. Maximum 100. |
Example Request
Response — 200 OK
Response Fields
| Field | Type | Description |
|---|---|---|
grids | array | List of grid objects for the current page. |
total | integer | Total number of grids matching the query. |
page | integer | Current page number. |
limit | integer | Number of results per page. |
total_pages | integer | Total number of pages. |
Grid Object Fields
| Field | Type | Description |
|---|---|---|
id | string | UUID of the grid. |
name | string | Display name of the grid. |
description | string | Grid description. May be empty. |
row_count | integer | Number of rows currently in the grid. |
column_count | integer | Total number of columns. |
created_at | string | ISO 8601 creation timestamp. |
updated_at | string | ISO 8601 last-updated timestamp. |
columns | array | Runnable columns only (type: enrichment, formula, or merge). See below. |
Column Object Fields (columns array)
| Field | Type | Description |
|---|---|---|
id | string | Column key used as the identifier when triggering runs. |
name | string | Human-readable display name of the column. |
type | string | Column type: "enrichment", "formula", or "merge". |
dependencies | string[] | Array of column key IDs that this column depends on. Empty array if no dependencies. |
Response Status Codes
| HTTP | Code | Description |
|---|---|---|
200 | — | Grid list returned successfully. |
401 | INVALID_API_KEY | X-API-KEY header is missing or invalid. |
429 | RATE_LIMIT_EXCEEDED | Too many requests. Default limit is 5 req/sec. |
500 | INTERNAL_ERROR | Unexpected server error. |
5.3 Get Grid Details
Path Parameters
| Parameter | Description |
|---|---|
gridId | UUID of the grid. Found in the grid URL: app.bitscale.ai/grid/{gridId} |
Example Request
Response — 200 OK
Response Fields
| Field | Type | Description |
|---|---|---|
id | string | UUID of the grid. |
name | string | Display name of the grid. |
description | string | Grid description. May be empty. |
row_count | integer | Number of rows in the grid. |
created_at | string | ISO 8601 creation timestamp. |
updated_at | string | ISO 8601 last-updated timestamp. |
settings | object | Grid-level settings (see below). |
columns | array | All column definitions (see below). |
sources | array | Data sources attached to the grid (see below). |
Settings Object
| Field | Type | Description |
|---|---|---|
auto_run | boolean | Whether new rows trigger automatic enrichment. |
auto_dedupe | boolean | Whether duplicate rows are automatically removed. |
visibility | string | Grid visibility: "workspace" or "private". |
dedupe_column_id | string | Column key used for deduplication. Present only when auto_dedupe is true. |
Column Object
| Field | Type | Description |
|---|---|---|
id | string | Column key identifier. |
name | string | Human-readable display name. |
type | string | Column type: "text", "enrichment", "formula", or "merge". |
Source Object
| Field | Type | Description |
|---|---|---|
id | string | UUID of the data source. |
display_name | string | Display name of the source. |
type | string | Source type (e.g. "api", "csv", etc.). |
is_scheduled | boolean | Whether the source runs on a schedule. |
status | string | Current source status (e.g. "active", "paused"). |
last_run_at | string | ISO 8601 timestamp of last run. null if never run. |
next_run_at | string | ISO 8601 timestamp of next scheduled run. null if not scheduled. |
schedule | object | Schedule details. Present only when is_scheduled is true (see below). |
Schedule Object (when is_scheduled: true)
| Field | Type | Description |
|---|---|---|
cron_schedule | string | Cron expression for the schedule. |
next_run_at | string | ISO 8601 timestamp of the next scheduled run. |
Response Status Codes
| HTTP | Code | Description |
|---|---|---|
200 | — | Grid details returned successfully. |
401 | INVALID_API_KEY | X-API-KEY header is missing or invalid. |
403 | GRID_NOT_FOUND | Grid exists but does not belong to your workspace. |
404 | GRID_NOT_FOUND | No grid found for the provided gridId. |
429 | RATE_LIMIT_EXCEEDED | Too many requests. Default limit is 5 req/sec. |
500 | INTERNAL_ERROR | Unexpected server error. |
5.4 Get Grid Curl Command
💡 Tip for AI agents — Call this endpoint first to discover the exact input fields needed for a grid, then usePOST /grids/:gridId/runwith the returnedrequest_body.inputsshape.
Path Parameters
| Parameter | Description |
|---|---|
gridId | UUID of the grid. Found in the grid URL: app.bitscale.ai/grid/{gridId} |
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
output_columns | string | No | Comma-separated list of column key IDs to include in the run. When provided, required inputs are derived only from the dependencies of the specified columns. When omitted, inputs are derived from all runnable columns in the grid. |
Example Request — All Columns
Example Request — Specific Output Columns
Response — 200 OK
Response Fields
| Field | Type | Description |
|---|---|---|
grid_id | string | UUID of the grid. |
grid_name | string | Display name of the grid. |
run_url | string | Full URL for the POST /run endpoint for this grid. |
method | string | HTTP method to use — always "POST". |
headers | object | Required request headers. Replace YOUR_WORKSPACE_API_KEY with your actual key. |
request_body | object | The full request body to send to the run endpoint. The inputs keys are derived from the grid’s column dependencies. |
output_columns | array | Details of the output columns explicitly requested via output_columns. Omitted if no output_columns param was given. |
curl | string | A ready-to-use shell curl command. Replace YOUR_WORKSPACE_API_KEY before executing. |
request_body Object
| Field | Type | Description |
|---|---|---|
mode | string | Always "sync" in the generated contract. Change to "async" for long-running grids if needed. |
inputs | object | Key-value map of required input fields with placeholder "value" strings. Replace with real data. |
output_columns | string[] | Column key IDs to return. Present only when output_columns was specified in the query param. |
output_columns Array Item
| Field | Type | Description |
|---|---|---|
id | string | Column key ID. |
name | string | Human-readable display name. |
type | string | Column type: "enrichment", "formula", or "merge". |
Response Status Codes
| HTTP | Code | Description |
|---|---|---|
200 | — | Curl command and API contract returned successfully. |
400 | MISSING_SOURCE | Grid has no BitScale API source. Add one in grid settings first. |
400 | INVALID_OUTPUT_COLUMN | One of the specified output_columns keys does not exist in the grid. |
401 | INVALID_API_KEY | X-API-KEY header is missing or invalid. |
403 | GRID_NOT_FOUND | Grid exists but does not belong to your workspace. |
404 | GRID_NOT_FOUND | No grid found for the provided gridId. |
429 | RATE_LIMIT_EXCEEDED | Too many requests. Default limit is 5 req/sec. |
5.5 Run a Grid
sync(default) — waits up to 120 seconds for completion and returns outputs directly. If still processing at the deadline, returns arequest_idto poll.async— returns arequest_idimmediately. PollGET /run/status/:requestIdfor results.
💡 Get your curl instantly — Use GET /grids/:gridId/curl to retrieve a pre-built curl command and the exact input fields required for any grid. You can also open any grid in app.bitscale.ai, click on the Data source column, select the BitScale API source, and find a ready-to-use curl command pre-filled with your grid ID, API key, and input fields. Use the output column toggles to include or exclude specific columns — the curl updates live to reflect your selection.
Path Parameters
| Parameter | Description |
|---|---|
gridId | UUID of the grid to run. Found in the grid URL: app.bitscale.ai/grid/{gridId} |
Request Headers
| Header | Value |
|---|---|
X-API-KEY | Your workspace API key (required) |
Content-Type | application/json (required) |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
mode | string | No | "sync" or "async". Defaults to "sync" if omitted. |
inputs | object | Yes | Key-value map of column keys (e.g. "company_name") to their input values. Use the column key shown in the API Datasource panel — not a UUID. |
output_columns | string[] | No | Array of column UUID keys to include in the response. If omitted, all enriched columns are returned. |
source_id | string | No | UUID of the BitScale API source on the grid. If omitted, the first available source is used automatically. |
webhook_url | string | No | (async only) HTTPS callback URL for when the run completes. Reserved for future use. |
Example — Sync Mode
Example — Async Mode
Responses
200 OK — Sync Completed (run finished within 120 seconds)request_id for results)
Output Object Shape
Each key inoutputs is a column UUID. The value is an object with:
| Field | Description |
|---|---|
value | The enriched output (string, number, array, or object depending on column type) |
name | Human-readable display name of the column as set in the grid |
Response Status Codes
| HTTP | Code | Description |
|---|---|---|
200 | — | Request accepted. Check status field in body. |
400 | MISSING_REQUIRED_FIELD | inputs is missing or request body is malformed JSON. |
400 | MISSING_SOURCE | Grid has no BitScale API source. Add one in grid settings. |
400 | INVALID_SOURCE | The source_id provided does not exist for this grid. |
400 | INVALID_REQUEST | mode is not "sync" or "async". |
401 | INVALID_API_KEY | X-API-KEY header is missing or invalid. |
403 | FEATURE_DISABLED | BitScale APIs not enabled on your plan. Upgrade to Enterprise. |
403 | GRID_NOT_FOUND | Grid exists but does not belong to your workspace. |
404 | GRID_NOT_FOUND | No grid found for the provided gridId. |
429 | RATE_LIMIT_EXCEEDED | Too many requests. Default limit is 5 req/sec per workspace. |
500 | RUN_FAILED | Row run encountered an error. Check message for details. |
500 | INTERNAL_ERROR | Unexpected server error. Contact support if this persists. |
5.6 Get Run Status
request_id. Call this after receiving a request_id from POST /grids/:gridId/run — either in async mode or when sync mode times out.
ℹ Note — Poll every 2–5 seconds untilstatusis"completed"or"failed". Avoid polling more frequently as requests count toward your rate limit.
Path Parameters
| Parameter | Description |
|---|---|
requestId | UUID returned as request_id from POST /grids/:gridId/run |
Example Request
Responses
200 OK — Still RunningResponse Fields
| Field | Type | Description |
|---|---|---|
mode | string | "sync" or "async" — matches the mode used when the run was started. |
status | string | "running", "completed", or "failed". |
grid_id | string | UUID of the grid that was run. |
outputs | object | Present only when status is "completed". Same shape as POST run outputs. |
Response Status Codes
| HTTP | Code | Description |
|---|---|---|
200 | — | Status returned successfully. Check status field. |
401 | INVALID_API_KEY | X-API-KEY header is missing or invalid. |
404 | REQUEST_NOT_FOUND | No run request found for requestId, or it belongs to a different workspace. |
429 | RATE_LIMIT_EXCEEDED | Too many requests. Default limit is 5 req/sec per workspace. |
500 | RUN_FAILED | The run encountered an error. Message contains details. |
5.7 Rotate API Key
⚠ Important — This action is irreversible. The moment this endpoint responds successfully, the key used to call it stops working. Update all integrations with the new key immediately.
Request
No request body is required. The workspace is identified from theX-API-KEY header.
Response — 200 OK
Response Fields
| Field | Description |
|---|---|
api_key | The newly generated workspace API key. Replace your old key with this value immediately. |
Response Status Codes
| HTTP | Code | Description |
|---|---|---|
200 | — | New API key generated. Old key is now invalid. |
401 | INVALID_API_KEY | X-API-KEY header is missing or invalid. |
500 | ROTATE_FAILED | Key rotation failed. Retry or contact support. |
6. Sync vs Async Modes
When callingPOST /grids/:gridId/run, you choose how to handle the response using the mode field.
Sync Mode (default)
Setmode: "sync" or omit the field entirely.
- Server waits up to 120 seconds for the run to complete.
- On success: outputs are returned inline in the response.
- On timeout: a
request_idis returned; pollGET /run/status/:requestId. - Best for: fast grids, interactive use cases, MCP tool integrations.
Async Mode
Setmode: "async".
- Server returns a
request_idimmediately (no waiting). - Poll
GET /run/status/:requestIdevery 2–5 seconds for results. - Suitable for long-running grids (> 120 seconds).
- Best for: pipelines, batch jobs, background processing.
Sync Flow
Async Flow
7. Error Code Reference
| Code | HTTP | Description |
|---|---|---|
INVALID_API_KEY | 401 | The X-API-KEY header is missing, empty, or does not match any workspace. |
MISSING_REQUIRED_FIELD | 400 | A required field is absent — most commonly inputs was not provided or JSON is malformed. |
INVALID_REQUEST | 400 | A field value is invalid — e.g. mode is neither "sync" nor "async". |
MISSING_SOURCE | 400 | The grid has no BitScale API source configured. Add one in grid settings. |
INVALID_SOURCE | 400 | The source_id provided does not match any BitScale API source on this grid. |
MISSING_SOURCE_COLUMN | 400 | The grid has no source (DataSource) column — unexpected grid configuration error. |
INVALID_INPUTS | 400 | The inputs object could not be serialized. Ensure all values are JSON-serializable. |
INVALID_OUTPUT_COLUMN | 400 | One of the output_columns keys specified in GET /grids/:gridId/curl does not exist in the grid. |
GRID_NOT_FOUND | 404 | No grid exists for the given gridId, or it belongs to a different workspace. |
WORKSPACE_NOT_FOUND | 404 | No workspace found for the provided API key. |
REQUEST_NOT_FOUND | 404 | No run request found for the given requestId, or it belongs to a different workspace. |
FEATURE_DISABLED | 403 | BitScale APIs is an Enterprise-only feature. Upgrade your workspace plan. |
RATE_LIMIT_EXCEEDED | 429 | Too many requests. Default is 5 req/sec per workspace. Contact team@bitscale.ai or your account manager to adjust. |
RUN_FAILED | 500 | The row run failed during execution. Check the error message for details. |
ROTATE_FAILED | 500 | API key rotation failed unexpectedly. Retry or contact BitScale support. |
INTERNAL_ERROR | 500 | An unexpected server error occurred. Contact support if this persists. |
© BitScale · api.bitscale.ai