Skip to main content
PATCH
/
public
/
v1
/
projects
/
{projectId}
/
sources
/
{sourceId}
Update a source
curl --request PATCH \
  --url https://your-synthbrew-server.com/api/public/v1/projects/{projectId}/sources/{sourceId} \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "name": "<string>",
  "description": "<string>",
  "schemaVersionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "config": {},
  "kind": "postgres",
  "seed": "<string>",
  "generatorConfig": {},
  "basePath": "<string>",
  "rateLimitRpm": 2,
  "corsOrigins": [
    "<string>"
  ],
  "requireAuth": true
}
'
{
  "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"
}

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

Patch mutable source settings. Omitted fields are unchanged.

name
string
description
string
schemaVersionId
string<uuid>

Switches the source to a different schema version.

config
object

Source config patch. Runtime target values should already be normalized for storage.

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

Set deterministic seed or null to clear.

generatorConfig
object

Generator override patch.

basePath
string
rateLimitRpm
integer

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

Required range: x >= 1
corsOrigins
string[]

Allowed CORS origins for runtime API requests.

requireAuth
boolean

Whether runtime endpoints require x-api-key authentication.

Response

Updated source

id
string<uuid>
slug
string
name
string
description
string | null
schemaVersionId
string<uuid>
config
object

Source configuration. For Supabase runtime targets, responses include runtimeTarget.connectionSecretId and never return plaintext runtimeTarget.connectionString.

kind
enum<string>
Available options:
postgres,
mysql
seed
string | null
generatorConfig
object
rateLimitRpm
integer
requireAuth
boolean
lastGenerationAt
string<date-time> | null
generationAudit
object
createdAt
string<date-time>
updatedAt
string<date-time> | null