CapyDB Docs
ReferenceAPI

Integrations

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

GET
/v1/projects/{projectID}/integrations

Authorization

AuthorizationBearer <token>

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

In: header

Path Parameters

projectID*string

Project id.

Response Body

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/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": "string",      "state": "string",      "updated_at": "2019-08-24T14:15:22Z"    }  ]}
{  "error": "string"}
{  "error": "string"}
{  "error": "string"}
DELETE
/v1/projects/{projectID}/integrations/{provider}

Authorization

AuthorizationBearer <token>

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

In: header

Path Parameters

projectID*string

Project id.

provider*string

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

Response Body

application/json

application/json

application/json

application/json

curl -X DELETE "https://example.com/v1/projects/string/integrations/string"
{  "deleted": true}
{  "error": "string"}
{  "error": "string"}
{  "error": "string"}
PUT
/v1/projects/{projectID}/integrations/{provider}

Authorization

AuthorizationBearer <token>

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

In: header

Path Parameters

projectID*string

Project id.

provider*string

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

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X PUT "https://example.com/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": "string",    "state": "string",    "updated_at": "2019-08-24T14:15:22Z"  }}
{  "error": "string"}
{  "error": "string"}
{  "error": "string"}
{  "error": "string"}
POST
/v1/projects/{projectID}/integrations/vercel/connect

Authorization

AuthorizationBearer <token>

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

In: header

Path Parameters

projectID*string

Project id.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/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": "string",    "state": "string",    "updated_at": "2019-08-24T14:15:22Z"  },  "job": {    "attempts": 0,    "claimed_at": "2019-08-24T14:15:22Z",    "claimed_by": "string",    "cluster_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",    "retry_classification": "string",    "started_at": "2019-08-24T14:15:22Z",    "state": "pending",    "type": "string",    "updated_at": "2019-08-24T14:15:22Z"  }}
{  "error": "string"}
{  "error": "string"}
{  "error": "string"}
{  "error": "string"}
POST
/v1/projects/{projectID}/integrations/netlify/connect

Authorization

AuthorizationBearer <token>

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

In: header

Path Parameters

projectID*string

Project id.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/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": "string",    "state": "string",    "updated_at": "2019-08-24T14:15:22Z"  },  "job": {    "attempts": 0,    "claimed_at": "2019-08-24T14:15:22Z",    "claimed_by": "string",    "cluster_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",    "retry_classification": "string",    "started_at": "2019-08-24T14:15:22Z",    "state": "pending",    "type": "string",    "updated_at": "2019-08-24T14:15:22Z"  }}
{  "error": "string"}
{  "error": "string"}
{  "error": "string"}
{  "error": "string"}
POST
/v1/projects/{projectID}/integrations/clerk/connect

Authorization

AuthorizationBearer <token>

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

In: header

Path Parameters

projectID*string

Project id.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/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": "string",    "state": "string",    "updated_at": "2019-08-24T14:15:22Z"  },  "job": {    "attempts": 0,    "claimed_at": "2019-08-24T14:15:22Z",    "claimed_by": "string",    "cluster_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",    "retry_classification": "string",    "started_at": "2019-08-24T14:15:22Z",    "state": "pending",    "type": "string",    "updated_at": "2019-08-24T14:15:22Z"  }}
{  "error": "string"}
{  "error": "string"}
{  "error": "string"}
{  "error": "string"}
POST
/v1/integrations/vercel/webhook/{projectID}/{token}

Path Parameters

projectID*string

Project id.

token*string

Per-integration inbound webhook token.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Raw Vercel webhook event payload.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/integrations/vercel/webhook/string/string" \  -H "Content-Type: application/json" \  -d '{}'
{  "received": true}
{  "error": "string"}
{  "error": "string"}
{  "error": "string"}
POST
/v1/integrations/netlify/webhook/{projectID}/{token}

Path Parameters

projectID*string

Project id.

token*string

Per-integration inbound webhook token.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Raw Netlify deploy event payload.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/integrations/netlify/webhook/string/string" \  -H "Content-Type: application/json" \  -d '{}'
{  "received": true}
{  "error": "string"}
{  "error": "string"}
{  "error": "string"}
POST
/v1/integrations/clerk/webhook/{projectID}

Path Parameters

projectID*string

Project id.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Raw Clerk (svix) webhook event payload.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/integrations/clerk/webhook/string" \  -H "Content-Type: application/json" \  -d '{}'
{  "received": true}
{  "error": "string"}
{  "error": "string"}
{  "error": "string"}
POST
/v1/integrations/auth0/webhook/{projectID}

Path Parameters

projectID*string

Project id.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Raw Auth0 webhook event payload.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/integrations/auth0/webhook/string" \  -H "Content-Type: application/json" \  -d '{}'
{  "received": true}
{  "error": "string"}
{  "error": "string"}
{  "error": "string"}
POST
/v1/integrations/better-auth/webhook/{projectID}

Path Parameters

projectID*string

Project id.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Raw Better Auth webhook event payload.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/integrations/better-auth/webhook/string" \  -H "Content-Type: application/json" \  -d '{}'
{  "received": true}
{  "error": "string"}
{  "error": "string"}
{  "error": "string"}
GET
/v1/integrations/{provider}/oauth/start

Authorization

AuthorizationBearer <token>

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

In: header

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

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/v1/integrations/string/oauth/start?project_id=string"
{  "authorize_url": "http://example.com"}
{  "error": "string"}
{  "error": "string"}
{  "error": "string"}
{  "error": "string"}
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

application/json

application/json

curl -X GET "https://example.com/v1/integrations/string/oauth/callback?code=string&state=string"
Empty
{  "error": "string"}
{  "error": "string"}