CapyDB/ docs
ReferenceAPI

Integrations

Vercel, Netlify and Cloudflare deployment integrations, auth-provider user sync (Clerk, Auth0, Better Auth), and their inbound webhooks.

GET
/v1/projects/{projectID}/integrations

Authorization

headerAuthorizationBearer <token>

Org or project-scoped API key, format capy_live_...; Clerk session tokens also accepted.

Path Parameters

projectID*string

Project id.

Response Body

Integrations.

application/json
  1. response
integrations*array<>
curl -X GET 'https://capydb.dev/api/capydb/v1/projects/string/integrations'
{  "integrations": [    {      "config": null,      "created_at": "2019-08-24T14:15:22Z",      "external_id": "string",      "has_credentials": true,      "id": "string",      "organization_id": "string",      "project_id": "string",      "provider": "auth0",      "state": "active",      "updated_at": "2019-08-24T14:15:22Z"    }  ]}
DELETE
/v1/projects/{projectID}/integrations/{provider}

Authorization

headerAuthorizationBearer <token>

Org or project-scoped API key, format capy_live_...; Clerk session tokens also accepted.

Path Parameters

projectID*string

Project id.

provider*string

Integration provider (e.g. vercel, netlify, clerk).

Response Body

Integration deleted.

application/json
  1. response
deleted*boolean
curl -X DELETE 'https://capydb.dev/api/capydb/v1/projects/string/integrations/string'
{  "deleted": true}
PUT
/v1/projects/{projectID}/integrations/{provider}

Authorization

headerAuthorizationBearer <token>

Org or project-scoped API key, format capy_live_...; Clerk session tokens also accepted.

Path Parameters

projectID*string

Project id.

provider*string

Integration provider (e.g. vercel, netlify, clerk).

Request Body

application/json
  1. body
config?unknown

Provider-specific JSON configuration.

external_id?string
state?string
Value in"active""disabled"
credentials?

Provider secrets for integrations without a dedicated connect endpoint (auth0, better_auth) or to rotate Clerk secrets. Stored encrypted and never returned; omitting it keeps previously stored credentials.

Response Body

Integration upserted.

application/json
  1. response
integration*
curl -X PUT 'https://capydb.dev/api/capydb/v1/projects/string/integrations/string' \  -H 'Content-Type: application/json' \  -d '{}'
{  "integration": {    "config": null,    "created_at": "2019-08-24T14:15:22Z",    "external_id": "string",    "has_credentials": true,    "id": "string",    "organization_id": "string",    "project_id": "string",    "provider": "auth0",    "state": "active",    "updated_at": "2019-08-24T14:15:22Z"  }}
POST
/v1/projects/{projectID}/integrations/{provider}/sync

Authorization

headerAuthorizationBearer <token>

Org or project-scoped API key, format capy_live_...; Clerk session tokens also accepted.

Path Parameters

projectID*string

Project id.

provider*string

Integration provider (e.g. vercel, netlify, clerk).

Response Body

Env sync queued.

application/json
  1. response
job*
curl -X POST 'https://capydb.dev/api/capydb/v1/projects/string/integrations/string/sync'
{  "job": {    "attempts": 0,    "claimed_at": "2019-08-24T14:15:22Z",    "claimed_by": "string",    "host_id": "string",    "instance_id": "string",    "completed_at": "2019-08-24T14:15:22Z",    "created_at": "2019-08-24T14:15:22Z",    "error": "string",    "id": "string",    "last_exit_code": 0,    "last_stderr": "string",    "last_stdout": "string",    "locked_resource": "string",    "max_attempts": 0,    "organization_id": "string",    "preview_database_id": "string",    "project_id": "string",    "result": null,    "retry_classification": "string",    "started_at": "2019-08-24T14:15:22Z",    "state": "pending",    "type": "project.apply_plan",    "updated_at": "2019-08-24T14:15:22Z"  }}

Connect Vercel

POST
/v1/projects/{projectID}/integrations/vercel/connect

Authorization

headerAuthorizationBearer <token>

Org or project-scoped API key, format capy_live_...; Clerk session tokens also accepted.

Path Parameters

projectID*string

Project id.

Request Body

application/json
  1. body
vercel_project_id*string

Vercel project to bind ("prj_..." id or project name).

team_id?string
token*string

Vercel API token. Stored encrypted; never returned.

preview_branches?boolean

Enable preview-database-per-branch via deploy webhooks.

Response Body

Integration connected; env sync runs asynchronously via the returned job.

application/json
  1. response
integration*
job*
curl -X POST 'https://capydb.dev/api/capydb/v1/projects/string/integrations/vercel/connect' \  -H 'Content-Type: application/json' \  -d '{  "vercel_project_id": "string",  "token": "string"}'
{  "integration": {    "config": null,    "created_at": "2019-08-24T14:15:22Z",    "external_id": "string",    "has_credentials": true,    "id": "string",    "organization_id": "string",    "project_id": "string",    "provider": "auth0",    "state": "active",    "updated_at": "2019-08-24T14:15:22Z"  },  "job": {    "attempts": 0,    "claimed_at": "2019-08-24T14:15:22Z",    "claimed_by": "string",    "host_id": "string",    "instance_id": "string",    "completed_at": "2019-08-24T14:15:22Z",    "created_at": "2019-08-24T14:15:22Z",    "error": "string",    "id": "string",    "last_exit_code": 0,    "last_stderr": "string",    "last_stdout": "string",    "locked_resource": "string",    "max_attempts": 0,    "organization_id": "string",    "preview_database_id": "string",    "project_id": "string",    "result": null,    "retry_classification": "string",    "started_at": "2019-08-24T14:15:22Z",    "state": "pending",    "type": "project.apply_plan",    "updated_at": "2019-08-24T14:15:22Z"  }}

Connect Netlify

POST
/v1/projects/{projectID}/integrations/netlify/connect

Authorization

headerAuthorizationBearer <token>

Org or project-scoped API key, format capy_live_...; Clerk session tokens also accepted.

Path Parameters

projectID*string

Project id.

Request Body

application/json
  1. body
site_id*string
token*string

Netlify personal access token. Stored encrypted; never returned.

preview_branches?boolean

Enable preview-database-per-branch via deploy hooks.

Response Body

Integration connected; env sync runs asynchronously via the returned job.

application/json
  1. response
integration*
job*
curl -X POST 'https://capydb.dev/api/capydb/v1/projects/string/integrations/netlify/connect' \  -H 'Content-Type: application/json' \  -d '{  "site_id": "string",  "token": "string"}'
{  "integration": {    "config": null,    "created_at": "2019-08-24T14:15:22Z",    "external_id": "string",    "has_credentials": true,    "id": "string",    "organization_id": "string",    "project_id": "string",    "provider": "auth0",    "state": "active",    "updated_at": "2019-08-24T14:15:22Z"  },  "job": {    "attempts": 0,    "claimed_at": "2019-08-24T14:15:22Z",    "claimed_by": "string",    "host_id": "string",    "instance_id": "string",    "completed_at": "2019-08-24T14:15:22Z",    "created_at": "2019-08-24T14:15:22Z",    "error": "string",    "id": "string",    "last_exit_code": 0,    "last_stderr": "string",    "last_stdout": "string",    "locked_resource": "string",    "max_attempts": 0,    "organization_id": "string",    "preview_database_id": "string",    "project_id": "string",    "result": null,    "retry_classification": "string",    "started_at": "2019-08-24T14:15:22Z",    "state": "pending",    "type": "project.apply_plan",    "updated_at": "2019-08-24T14:15:22Z"  }}

Connect Cloudflare

POST
/v1/projects/{projectID}/integrations/cloudflare/connect

Authorization

headerAuthorizationBearer <token>

Org or project-scoped API key, format capy_live_...; Clerk session tokens also accepted.

Path Parameters

projectID*string

Project id.

Request Body

application/json
  1. body
account_id*string

Cloudflare account id that owns the Worker or Pages project.

api_token*string

Cloudflare API token with Workers Scripts:Edit (or Pages:Edit) and Hyperdrive:Edit on that account. Stored encrypted; never returned.

target?string

Which Cloudflare compute product to bind.

Default"workers"
Value in"workers""pages"
worker_name?string

Worker script name. Required when target is workers.

pages_project?string

Pages project name. Required when target is pages.

hyperdrive?boolean

Create a Hyperdrive configuration in front of the cell and bind it as HYPERDRIVE.

Defaulttrue
deploy_binding?boolean

Attach the Hyperdrive binding to the Worker, which creates and deploys a new Worker version. Turn off to add the binding to wrangler.jsonc yourself. Ignored for Pages, whose bindings apply on the next deploy.

Defaulttrue

Response Body

Integration connected; the Hyperdrive configuration and env sync run asynchronously via the returned job.

application/json
  1. response
integration*
job*
curl -X POST 'https://capydb.dev/api/capydb/v1/projects/string/integrations/cloudflare/connect' \  -H 'Content-Type: application/json' \  -d '{  "account_id": "string",  "api_token": "string"}'
{  "integration": {    "config": null,    "created_at": "2019-08-24T14:15:22Z",    "external_id": "string",    "has_credentials": true,    "id": "string",    "organization_id": "string",    "project_id": "string",    "provider": "auth0",    "state": "active",    "updated_at": "2019-08-24T14:15:22Z"  },  "job": {    "attempts": 0,    "claimed_at": "2019-08-24T14:15:22Z",    "claimed_by": "string",    "host_id": "string",    "instance_id": "string",    "completed_at": "2019-08-24T14:15:22Z",    "created_at": "2019-08-24T14:15:22Z",    "error": "string",    "id": "string",    "last_exit_code": 0,    "last_stderr": "string",    "last_stdout": "string",    "locked_resource": "string",    "max_attempts": 0,    "organization_id": "string",    "preview_database_id": "string",    "project_id": "string",    "result": null,    "retry_classification": "string",    "started_at": "2019-08-24T14:15:22Z",    "state": "pending",    "type": "project.apply_plan",    "updated_at": "2019-08-24T14:15:22Z"  }}

Connect Clerk

POST
/v1/projects/{projectID}/integrations/clerk/connect

Authorization

headerAuthorizationBearer <token>

Org or project-scoped API key, format capy_live_...; Clerk session tokens also accepted.

Path Parameters

projectID*string

Project id.

Request Body

application/json
  1. body
secret_key*string

Clerk secret key. Stored encrypted; never returned.

webhook_signing_secret?string

Svix signing secret of the Clerk webhook endpoint pointing at CapyDB's receiver. Optional: without it the sync is backfill-only.

Response Body

Integration connected; user backfill runs asynchronously via the returned job.

application/json
  1. response
integration*
job*
curl -X POST 'https://capydb.dev/api/capydb/v1/projects/string/integrations/clerk/connect' \  -H 'Content-Type: application/json' \  -d '{  "secret_key": "string"}'
{  "integration": {    "config": null,    "created_at": "2019-08-24T14:15:22Z",    "external_id": "string",    "has_credentials": true,    "id": "string",    "organization_id": "string",    "project_id": "string",    "provider": "auth0",    "state": "active",    "updated_at": "2019-08-24T14:15:22Z"  },  "job": {    "attempts": 0,    "claimed_at": "2019-08-24T14:15:22Z",    "claimed_by": "string",    "host_id": "string",    "instance_id": "string",    "completed_at": "2019-08-24T14:15:22Z",    "created_at": "2019-08-24T14:15:22Z",    "error": "string",    "id": "string",    "last_exit_code": 0,    "last_stderr": "string",    "last_stdout": "string",    "locked_resource": "string",    "max_attempts": 0,    "organization_id": "string",    "preview_database_id": "string",    "project_id": "string",    "result": null,    "retry_classification": "string",    "started_at": "2019-08-24T14:15:22Z",    "state": "pending",    "type": "project.apply_plan",    "updated_at": "2019-08-24T14:15:22Z"  }}

Vercel inbound webhook

POST
/v1/integrations/vercel/webhook/{projectID}

Path Parameters

projectID*string

Project id.

Request Body

application/json
  1. body

Raw Vercel webhook event payload.

Response Body

Event accepted.

application/json
  1. response
received*boolean
curl -X POST 'https://capydb.dev/api/capydb/v1/integrations/vercel/webhook/string' \  -H 'Content-Type: application/json' \  -d '{}'
{  "received": true}

Netlify inbound webhook

POST
/v1/integrations/netlify/webhook/{projectID}

Path Parameters

projectID*string

Project id.

Request Body

application/json
  1. body

Raw Netlify deploy event payload.

Response Body

Event accepted.

application/json
  1. response
received*boolean
curl -X POST 'https://capydb.dev/api/capydb/v1/integrations/netlify/webhook/string' \  -H 'Content-Type: application/json' \  -d '{}'
{  "received": true}

Clerk inbound webhook

POST
/v1/integrations/clerk/webhook/{projectID}

Path Parameters

projectID*string

Project id.

Request Body

application/json
  1. body

Raw Clerk (svix) webhook event payload.

Response Body

Event accepted.

application/json
  1. response
received*boolean
curl -X POST 'https://capydb.dev/api/capydb/v1/integrations/clerk/webhook/string' \  -H 'Content-Type: application/json' \  -d '{}'
{  "received": true}

Auth0 inbound webhook

POST
/v1/integrations/auth0/webhook/{projectID}

Path Parameters

projectID*string

Project id.

Request Body

application/json
  1. body

Raw Auth0 webhook event payload.

Response Body

Event accepted.

application/json
  1. response
received*boolean
curl -X POST 'https://capydb.dev/api/capydb/v1/integrations/auth0/webhook/string' \  -H 'Content-Type: application/json' \  -d '{}'
{  "received": true}
POST
/v1/integrations/better-auth/webhook/{projectID}

Path Parameters

projectID*string

Project id.

Request Body

application/json
  1. body

Raw Better Auth webhook event payload.

Response Body

Event accepted.

application/json
  1. response
received*boolean
curl -X POST 'https://capydb.dev/api/capydb/v1/integrations/better-auth/webhook/string' \  -H 'Content-Type: application/json' \  -d '{}'
{  "received": true}
GET
/v1/integrations/{provider}/oauth/start

Authorization

headerAuthorizationBearer <token>

Org or project-scoped API key, format capy_live_...; Clerk session tokens also accepted.

Path Parameters

provider*string

Integration provider (e.g. vercel, netlify, clerk).

Query Parameters

project_id*string

The CapyDB project to bind the OAuth state to.

Response Body

Authorization URL.

application/json
  1. response
authorize_url*string

The provider's authorization URL to open in a browser.

Formaturi
curl -X GET 'https://capydb.dev/api/capydb/v1/integrations/string/oauth/start?project_id=string'
{  "authorize_url": "http://example.com"}
GET
/v1/integrations/{provider}/oauth/callback

Path Parameters

provider*string

Integration provider (e.g. vercel, netlify, clerk).

Query Parameters

code*string

OAuth authorization code from the provider.

state*string

Signed OAuth state issued by the start endpoint.

Response Body

Redirect to the dashboard integrations page with the provider access token in the URL fragment.

curl -X GET 'https://capydb.dev/api/capydb/v1/integrations/string/oauth/callback?code=string&state=string'
Empty