Reference
API & CLI
Automate schema design from your own pipelines. Authenticate with a workspace token and everything the Studio does is available over HTTP.
Authentication
curl https://api.tablecraftai.com/v1/schemas \
-H "Authorization: Bearer $TABLECRAFT_TOKEN"REST endpoints
GET
/v1/schemasList every schema in the workspace.POST
/v1/schemasCreate a schema from tables or a prompt.GET
/v1/schemas/:idFetch a schema with tables, columns and relations.PATCH
/v1/schemas/:idUpdate tables, columns or the target dialect.POST
/v1/schemas/:id/exportRender SQL, Prisma, TypeScript, Python or DBML.POST
/v1/schemas/:id/diffDiff two versions and return migration files.DELETE
/v1/schemas/:idPermanently delete a schema.CLI commands
tablecraft loginAuthenticate the CLI against your workspace.
tablecraft init --template saasScaffold a new schema from a template.
tablecraft pull --schema billingDownload the latest schema definition.
tablecraft pushPublish local changes back to the workspace.
tablecraft export --format sqlGenerate code for your target dialect.
tablecraft checkFail CI when the schema has health issues.
Rate limits
Free workspaces get 60 requests per minute, Pro 600, and Enterprise limits are agreed per contract. Every response includes X-RateLimit-Remaining.