Skip to main content
POST
POST /bootstrap
Creates a project and loads its starting schema/data in one request. Use this when your backend wants to spin up a new ZangTable project from a template instead of making separate calls for project creation, table creation, indexes, seed records, and token creation.

Endpoint details

string
required
Bearer pat_... (Project API Token). The new project is created on the same ZangTable account as the Project API Token. Keep this token on your backend/server.
boolean
required
true for a successful response and false for an error response.
object | null
Endpoint-specific response data when ok is true; null on errors.
object | null
Error code and message when ok is false; null on success.
string
required
Request identifier you can use when troubleshooting a specific API call.

Authentication

Project API Token.

Parameters

Body fields:
  • project_slug (string, required): New project slug. Use lowercase letters, numbers, hyphens, or underscores.
  • project_name (string, required): Human-readable project name.
  • initial_project_user (object, required): Initial project user with username and password.
  • tables (array, optional): Tables to create. Each table may include table_name, display_name, columns, seed, and table-level indexes.
  • indexes (array, optional): Additional project-level indexes. Each index includes table_name, columns, optional index_name, and optional unique.
  • project_api_tokens (array, optional): Project API Tokens to mint for the new project. Each item includes account_user_id, optional token_name, and optional project_username.
Column fields:
  • column_name or name (string, required)
  • column_type or type (string, optional): INTEGER, REAL, TEXT, BLOB, or ANY. Defaults to TEXT.
  • is_primary or primary (boolean, optional)
  • is_unique or unique (boolean, optional)
  • is_nullable or nullable (boolean, optional)
  • default_value or default (scalar or null, optional)

Notes

  • The request creates one project on the same account as the Project API Token you use.
  • project_slug must be unique and cannot already have project storage.
  • Account plan project limits still apply.
  • Seed values must be scalar values or null.
  • Seed records may only reference columns declared for their table.
  • project_api_tokens.account_user_id must be an active user on the same ZangTable account.
  • The bootstrap endpoint currently creates tokens only for the initial_project_user.
  • Raw Project API Tokens are only returned in the creation response. Store them securely.

Request examples

Basic request:
Full request:

Response examples

Success:
Error or alternate response: