Skip to main content
POST

Authorizations

x-api-key
string
header
required

Team API key created under /api/api-keys. Prefix: sb_api_.

Path Parameters

projectId
string<uuid>
required

Project UUID in the team associated with the API key.

Body

application/json

Create a source from a schema version. Use config.runtimeTarget for provider-specific runtime settings.

name
string
required
schemaVersionId
string<uuid>
required
description
string
config
object

Source configuration payload.

kind
enum<string>
default:postgres
Available options:
postgres,
mysql
seed
string

Optional deterministic seed used by generators.

generatorConfig
object

Generation overrides (for example generationDefaults rowCount/locale/timezone and per-entity row counts).

basePath
string

Optional custom runtime base path for this source.

rateLimitRpm
integer
default:100

Runtime API per-source rate limit (requests per minute).

Required range: x >= 1
corsOrigins
string[]

Allowed CORS origins for runtime API requests.

requireAuth
boolean
default:true

Whether runtime endpoints require x-api-key authentication.

populate
boolean
default:true

If true, triggers an initial populate generation after source creation.

Response

Source created

Create-source response. Generation fields depend on inline vs queue execution mode.

source
object
required
generation
object | null

Inline generation audit when execution happens synchronously.

generationJob
object

Queue job details when execution is asynchronous.

autoProvisionedApiKey
object | null
autoProvisionedReadOnlyDbAccess
object | null