Skip to main content
POST
/
public
/
v1
/
projects
/
{projectId}
/
sources
/
{sourceId}
/
regenerate
curl --request POST \
  --url https://your-synthbrew-server.com/api/public/v1/projects/{projectId}/sources/{sourceId}/regenerate \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '{}'
{
  "source": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "slug": "<string>",
    "name": "<string>",
    "description": "<string>",
    "schemaVersionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "config": {},
    "kind": "postgres",
    "seed": "<string>",
    "generatorConfig": {},
    "rateLimitRpm": 123,
    "requireAuth": true,
    "lastGenerationAt": "2023-11-07T05:31:56Z",
    "generationAudit": {},
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z"
  },
  "generation": {},
  "generationJob": {
    "id": "<string>",
    "status": "<string>",
    "queueName": "<string>",
    "attemptsMade": 123,
    "finishedOn": "2023-11-07T05:31:56Z",
    "failedReason": "<string>",
    "result": {}
  },
  "autoProvisionedApiKey": {},
  "autoProvisionedReadOnlyDbAccess": {}
}

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.

sourceId
string<uuid>
required

Source UUID. For runtime endpoints this identifies the source backing the table; for public v1 it identifies the source resource inside the project.

Body

application/json

Optional overrides applied before triggering regeneration.

schemaVersionId
string<uuid>

Use a different schema version for the regeneration.

seed
string | null

Override deterministic seed for this run; null clears stored seed.

generatorConfig
object

Temporary or persisted generator overrides for this regeneration run.

Response

Regeneration started or completed

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

source
object
required
generation
object

Inline generation audit when execution happens synchronously.

generationJob
object

Queue job details when execution is asynchronous.

autoProvisionedApiKey
object
autoProvisionedReadOnlyDbAccess
object