---
title: "Update Existing Connection"
method: PATCH
path: "/connections/{connection_id}"
tags: ["connections"]
---

# Update Existing Connection

`PATCH /connections/{connection_id}`

## Request

- Base URL: `https://api.myaltimate.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.myaltimate.com/connections/{connection_id}`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer

Update the caller's connection with optional revalidation

## Path parameters

- `connection_id` integer, required

## Request body

- ConnectionUpdate
  - `name` string, nullable
  - `integration_id` string, nullable
  - `config` object, nullable
  - `preserve_secret_fields` string[]

## Response `200`

Successful Response

- ConnectionInDB
  - `name` string, required
  - `integration_id` string, required
  - `config` object, required
  - `id` integer, required
  - `user_id` integer, required
  - `is_valid` boolean, required
  - `last_validated_at` string, date-time, nullable
  - `created_at` string, date-time, required
  - `updated_at` string, date-time, nullable
  - `privacy` 'private' | 'public' | 'restricted': Sharing modes for a workspace. Deliberately local rather than adding a member to the shared ``PrivacySetting``, which is imported by five resources (datamates, knowledge bases, notebooks, query bookmarks, custom skills). ``restricted`` is meaningless for the other four, and widening the shared enum would make it a legal value there. The two overlapping values keep identical strings, so rows written before this existed, and every cross-file read that compares against ``PrivacySetting.PUBLIC.value``, still work. Reviewers found this argument was made and then broken in the same diff: four ``CustomSkill`` schemas were swapped to this enum, which made ``restricted`` a legal value for a resource with no grant table behind it — ``_visible_to`` (``crud/custom_skills.py``) matches owner-or-public only, and ``custom_skills.privacy`` has no CHECK, so such a skill would persist and be permanently invisible to everyone but its creator. Custom skills are back on ``PrivacySetting``; keep them there until they implement sharing.
  - `is_owner` boolean
  - `unreadable_secret_fields` string[]
  - `owner` ConnectionOwner
    - `id` integer, required
    - `name` string, required
  - `shares` ConnectionShares
    - `user_ids` integer[], required
    - `team_ids` integer[], required

## Other responses

- `400`: Integration can't change
- `404`: Connection not found
- `409`: Stored secret changed
- `422`: Validation Error

## Changes

- **2026-10-27** `883849803623`: 9 info
  - added the new optional request property `preserve_secret_fields`
  - added the non-success response with the status `400`
  - added the non-success response with the status `404`
  - added the non-success response with the status `409`
  - …5 more

[Operation history](https://skmtc.dev/myaltimate/apis/myaltimate-api/changes/connections/:connection_id/patch.md)

---

[API](https://skmtc.dev/myaltimate/apis/myaltimate-api.md) - [All operations](https://skmtc.dev/myaltimate/apis/myaltimate-api/llms.txt) - [OpenAPI document](https://skmtc.dev/myaltimate/apis/myaltimate-api/revisions/727657ce54e9?raw)
