Skip to main content

Integrations API

Connect and sync secrets with external providers like Vercel.

List available providers

Returns the list of supported integration providers.

GET /v1/integrations

Response:

{
"data": {
"providers": [
{
"name": "vercel",
"displayName": "Vercel",
"configured": true
}
]
},
"meta": {
"requestId": "550e8400-e29b-41d4-a716-446655440000"
}
}

List connections

Returns the user's connected providers.

GET /v1/integrations/connections
Authorization: Bearer <token>

Response:

{
"data": {
"connections": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"provider": "vercel",
"providerAccountId": "team_xxx",
"createdAt": "2025-01-15T10:00:00Z"
}
]
},
"meta": {
"requestId": "550e8400-e29b-41d4-a716-446655440000"
}
}

Connect to a provider

Starts the OAuth flow to connect a provider. Redirects to the provider's authorization page.

GET /v1/integrations/:provider/authorize
Authorization: Bearer <token>

Query parameters:

ParameterDescription
redirect_uriOptional. URL to redirect after successful connection

Example:

# Opens browser to Vercel authorization
curl -L "https://api.keyway.sh/v1/integrations/vercel/authorize" \
-H "Authorization: Bearer $TOKEN"

Delete connection

Removes a provider connection.

DELETE /v1/integrations/connections/:id
Authorization: Bearer <token>

Response: 204 No Content


List projects

Returns the projects available for a connection.

GET /v1/integrations/connections/:id/projects
Authorization: Bearer <token>

Response:

{
"data": {
"projects": [
{
"id": "prj_xxx",
"name": "my-app",
"linkedRepo": "owner/repo",
"framework": "nextjs"
}
]
},
"meta": {
"requestId": "550e8400-e29b-41d4-a716-446655440000"
}
}

Get sync status

Check if secrets are in sync between Keyway and a provider project.

GET /v1/integrations/vaults/:owner/:repo/sync/status
Authorization: Bearer <token>

Query parameters:

ParameterDefaultDescription
connectionIdrequiredProvider connection ID
projectIdrequiredProvider project ID
environmentproductionKeyway environment to check

Response:

{
"data": {
"isFirstSync": true,
"vaultIsEmpty": false,
"providerHasSecrets": true,
"providerSecretCount": 10
},
"meta": {
"requestId": "550e8400-e29b-41d4-a716-446655440000"
}
}

Preview sync

Preview what changes would be made during a sync operation.

GET /v1/integrations/vaults/:owner/:repo/sync/preview
Authorization: Bearer <token>

Query parameters:

ParameterDefaultDescription
connectionIdrequiredProvider connection ID
projectIdrequiredProvider project ID
keywayEnvironmentproductionKeyway environment
providerEnvironmentproductionProvider environment
directionpushpush (Keyway → Provider) or pull (Provider → Keyway)
allowDeletefalseInclude deletions in preview

Response:

{
"data": {
"toCreate": ["NEW_API_KEY", "NEW_SECRET"],
"toUpdate": ["DATABASE_URL"],
"toDelete": [],
"toSkip": ["EXISTING_KEY"]
},
"meta": {
"requestId": "550e8400-e29b-41d4-a716-446655440000"
}
}

Execute sync

Sync secrets between Keyway and a provider.

POST /v1/integrations/vaults/:owner/:repo/sync
Authorization: Bearer <token>
Content-Type: application/json

Request body:

{
"connectionId": "550e8400-e29b-41d4-a716-446655440000",
"projectId": "prj_xxx",
"keywayEnvironment": "production",
"providerEnvironment": "production",
"direction": "push",
"allowDelete": false
}
FieldDefaultDescription
connectionIdrequiredProvider connection ID
projectIdrequiredProvider project ID
keywayEnvironmentproductionKeyway environment
providerEnvironmentproductionProvider environment
directionpushpush (Keyway → Provider) or pull (Provider → Keyway)
allowDeletefalseDelete secrets not present in source

Response:

{
"data": {
"status": "success",
"created": 2,
"updated": 1,
"deleted": 0,
"skipped": 0
},
"meta": {
"requestId": "550e8400-e29b-41d4-a716-446655440000"
}
}

Supported providers

ProviderStatusFeatures
VercelAvailablePush/pull secrets, multiple environments
NetlifyComing soon-
RailwayComing soon-
Fly.ioComing soon-