---
title: "Update a connection"
method: PATCH
path: "/v3/connections/{connectionId}"
tags: ["Resources"]
---

# Update a connection

`PATCH /v3/connections/{connectionId}`

Updates a connection. You can't change `provider_id` or the authentication
method. Secrets can be omitted to keep the stored values.

## Path parameters

- `connectionId` string, uuid, required

## Request body

- object
  - `privacy` 'private' | 'shared'
  - `sharingScope` 'organization' | 'specific' — Required when `privacy` is `shared`, and must be omitted otherwise.
  - `groupIds` string[] — Required when `privacy` is `shared`.
  - `config` object

## Response `200`

The updated connection.

- Connection — A data warehouse connection. Credentials are never returned — secret fields are stripped from `config`.
  - `id` string, uuid
  - `name` string
  - `provider_id` string
  - `user_id` string
  - `account_id` string
  - `privacy` 'private' | 'shared'
  - `config` object
  - `created_at` string, date-time
  - `updated_at` string, date-time

## Other responses

- `400` — The request is malformed or a parameter failed validation.
- `401` — The token is missing, malformed or expired.
- `403` — The token doesn't grant access to this resource.
- `404` — The resource doesn't exist.

---

[API](https://skmtc.net/gitbookio/apis/carto-api.md) · [All operations](https://skmtc.net/gitbookio/apis/carto-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/gitbookio/carto-api/revisions/019f79ecdd6c/schema)
