Studio
SQL console and table data browser/editor.
AuthorizationBearer <token>Org or project-scoped API key, format capy_live_...; Clerk session tokens also accepted.
projectID*stringProject id.
application/json- body
allow_unqualified_writes?booleanPermit statements the destructive-statement guard would otherwise refuse: an UPDATE or DELETE with no top-level WHERE (including one in a WITH clause), a MERGE that updates or deletes rows its join does not scope (ON TRUE, or WHEN NOT MATCHED BY SOURCE with no AND condition), and TRUNCATE. Defaults to false, so callers are guarded unless they opt out. Intended for an interactive console where a person has already expressed intent; automated and agent callers should leave it unset.
max_rows?integerRow cap for the result (default 200, max 1000).
query*stringSQL statement to execute.
read_only?booleanRun the statement inside a READ ONLY transaction so the server itself refuses every write (DML, DDL, TRUNCATE, SELECT INTO, sequence advancement) with SQLSTATE 25006, surfaced as a 400 carrying the refusal. Executor-proven, unlike client-side statement inspection. Defaults to false; agent callers exploring data should set it to true.
Query result.
application/json- response
result*curl -X POST 'https://capydb.dev/api/capydb/v1/projects/string/sql' \ -H 'Content-Type: application/json' \ -d '{ "query": "string"}'{ "result": { "columns": [ "string" ], "duration_ms": 0, "rows": [ {} ], "row_count": 0, "truncated": true }}AuthorizationBearer <token>Org or project-scoped API key, format capy_live_...; Clerk session tokens also accepted.
projectID*stringProject id.
Tables.
application/json- response
tables*array<>curl -X GET 'https://capydb.dev/api/capydb/v1/projects/string/tables'{ "tables": [ { "schema": "string", "table": "string", "type": "string" } ]}AuthorizationBearer <token>Org or project-scoped API key, format capy_live_...; Clerk session tokens also accepted.
projectID*stringProject id.
schema*stringDatabase schema name.
table*stringTable name.
limit?integerMaximum number of rows to return.
0 <= valueTable rows.
application/json- response
result*curl -X GET 'https://capydb.dev/api/capydb/v1/projects/string/tables/string/string/rows'{ "result": { "columns": [ "string" ], "rows": [ {} ] }}AuthorizationBearer <token>Org or project-scoped API key, format capy_live_...; Clerk session tokens also accepted.
projectID*stringProject id.
schema*stringDatabase schema name.
table*stringTable name.
application/json- body
primary_key?Addresses the row(s) for update/delete: column name to value.
values?Column values to insert or set.
Row inserted.
application/json- response
result*curl -X POST 'https://capydb.dev/api/capydb/v1/projects/string/tables/string/string/rows' \ -H 'Content-Type: application/json' \ -d '{}'{ "result": { "rows_affected": 0, "rows": [ {} ] }}AuthorizationBearer <token>Org or project-scoped API key, format capy_live_...; Clerk session tokens also accepted.
projectID*stringProject id.
schema*stringDatabase schema name.
table*stringTable name.
application/json- body
primary_key?Addresses the row(s) for update/delete: column name to value.
values?Column values to insert or set.
Rows updated.
application/json- response
result*curl -X PATCH 'https://capydb.dev/api/capydb/v1/projects/string/tables/string/string/rows' \ -H 'Content-Type: application/json' \ -d '{}'{ "result": { "rows_affected": 0, "rows": [ {} ] }}AuthorizationBearer <token>Org or project-scoped API key, format capy_live_...; Clerk session tokens also accepted.
projectID*stringProject id.
schema*stringDatabase schema name.
table*stringTable name.
application/json- body
primary_key?Addresses the row(s) for update/delete: column name to value.
values?Column values to insert or set.
Rows deleted.
application/json- response
result*curl -X DELETE 'https://capydb.dev/api/capydb/v1/projects/string/tables/string/string/rows' \ -H 'Content-Type: application/json' \ -d '{}'{ "result": { "rows_affected": 0, "rows": [ {} ] }}AuthorizationBearer <token>Org or project-scoped API key, format capy_live_...; Clerk session tokens also accepted.
projectID*stringProject id.
schema*stringDatabase schema name.
table*stringTable name.
Column metadata.
application/json- response
columns*array<>curl -X GET 'https://capydb.dev/api/capydb/v1/projects/string/tables/string/string/columns'{ "columns": [ { "data_type": "string", "default": "string", "is_nullable": true, "is_primary_key": true, "name": "string", "position": 0 } ]}AuthorizationBearer <token>Org or project-scoped API key, format capy_live_...; Clerk session tokens also accepted.
projectID*stringProject id.
limit?integerMaximum number of history entries to return (default 50).
0 <= value50SQL execution history.
application/json- response
history*array<>curl -X GET 'https://capydb.dev/api/capydb/v1/projects/string/sql/history'{ "history": [ { "actor_id": "string", "actor_kind": "string", "created_at": "2019-08-24T14:15:22Z", "duration_ms": 0, "error": "string", "id": "string", "organization_id": "string", "project_id": "string", "query": "string", "row_count": 0, "success": true } ]}AuthorizationBearer <token>Org or project-scoped API key, format capy_live_...; Clerk session tokens also accepted.
projectID*stringProject id.
Current AI query usage.
application/json- response
usage*curl -X GET 'https://capydb.dev/api/capydb/v1/projects/string/ai-usage'{ "usage": { "used": 0, "limit": 0, "remaining": 0, "soft_cap_reached": true, "period_start": "2019-08-24T14:15:22Z", "period_end": "2019-08-24T14:15:22Z" }}AuthorizationBearer <token>Org or project-scoped API key, format capy_live_...; Clerk session tokens also accepted.
projectID*stringProject id.
Updated AI query usage.
application/json- response
usage*curl -X POST 'https://capydb.dev/api/capydb/v1/projects/string/ai-usage'{ "usage": { "used": 0, "limit": 0, "remaining": 0, "soft_cap_reached": true, "period_start": "2019-08-24T14:15:22Z", "period_end": "2019-08-24T14:15:22Z" }}