---
title: "Update connection"
method: PATCH
path: "/api/v1/connections/{id}"
tags: ["Connections"]
---

# Update connection

`PATCH /api/v1/connections/{id}`

Update connection settings including base role, environment user attributes, and credentials.

Credential fields:
- `passwordUnencrypted`: Update password (all dialects) or service account JSON (BigQuery)
- `privateKey`: Add/rotate RSA keypair for Snowflake keypair authentication

Note: Credentials are encrypted at rest and never returned in API responses.

## Path parameters

- `id` string, uuid, required — Connection ID

## Request body

- object — Request body for updating connection attributes and credentials. At least one field must be provided.
  - `baseRole` string — Default role to assign to this connection
  - `environmentUserAttribute` object, nullable — User attribute settings for connection environments
    - `attributeName` string, required — Name of the user attribute for environment selection
    - `defaultValues` string[], nullable, required — Default values for the user attribute
  - `passwordUnencrypted` string — New password or service account key. For BigQuery, this must be the JSON service account key file content.
  - `privateKey` string — RSA private key for keypair authentication (Snowflake only). Must be PEM-encoded PKCS#8 format, minimum 2048-bit.

## Response `200`

Connection updated successfully

- object — Update connection response
  - `message` string, required — Status message describing what was updated
  - `success` boolean, required — Whether the operation succeeded

## Other responses

- `400` — Invalid request body - at least one field must be provided
- `401` — Authentication required
- `403` — Permission denied - connection admin role required
- `404` — Connection not found

---

[API](https://skmtc.dev/omniapp/apis/omni-api.md) · [All operations](https://skmtc.dev/omniapp/apis/omni-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/omniapp/omni-api/revisions/c5d16d10108e/schema)
