---
title: "Replace an integration connection's credential, or rename it, in place"
method: PATCH
path: "/integrations/connections/{id}"
tags: ["Integrations"]
---

# Replace an integration connection's credential, or rename it, in place

`PATCH /integrations/connections/{id}`

## Request

- Base URL: `https://api.atako.ai`
- URL: `https://api.atako.ai/integrations/connections/{id}`
- Auth: HTTP bearer

Send `{displayName}` alone to rename (unique per provider within the visibility, else 409 name_taken). A company connection is managed by an admin, a personal one by its creator only (403 forbidden otherwise). The connection keeps its id, so every per-agent grant pointing at it survives — which is the point: DELETE destroys the connection and its secret, so disconnect/reconnect hands back a new id and strips every agent of its tools. `config` is re-validated against the connector's anchored patterns; omit it to keep the stored one. The connection goes back to `active`. Never returns credential material.

## Path parameters

- `id` string, required

## Request body

- object
  - `displayName` string: Rename only (no `secret`).
  - `secret` string: The new credential. Write-only — never read back.
  - `config` object, nullable

## Response `200`

- IntegrationConnection: Never includes credential material.
  - `id` string, uuid, required
  - `companyId` string, uuid, nullable
  - `providerKey` string, required
  - `displayName` string, required
  - `authType` 'api_key' | 'oauth2' | 'mcp' | 'internal', required
  - `visibility` 'company' | 'personal': 'company' = shared with the whole company, managed by its admins; 'personal' = visible to, managed and grantable (to their own agents) by its creator only. Another member's personal connections are never returned.
  - `isMine` boolean: Created by the caller.
  - `actions` object[]: List endpoint, custom MCP connections only (providerKey 'mcp', no catalog entry): the active tools, catalog-shaped.
    - `key` string
    - `scope` 'read' | 'write'
    - `description` string
  - `mcp` object: List endpoint, custom MCP connections only.
    - `host` string, nullable
    - `slug` string, nullable
    - `lastSyncedAt` string, nullable
    - `toolCount` integer
    - `enabledCount` integer
    - `pendingReview` integer
  - `status` 'active' | 'error' | 'revoked', required
  - `externalLabel` string, nullable
  - `config` object, nullable
  - `scopes` string[]
  - `lastUsedAt` string, date-time, nullable
  - `createdBy` string, uuid
  - `createdAt` string, date-time, required

## Other responses

- `400`: secret_required / invalid_credentials (a `secretInPath` key containing `/`, `?`, `#` or whitespace, or a `tokenExchange` key the provider refused to exchange for an access token) / config_invalid (with the offending `field`) / config_host_not_public (a `publicHost` config field that does not resolve to public addresses only, with the offending `field`) / not_connectable (internal connector) / oauth_required (oauth2 without apiKeyAlt — renew through the provider) / connection_revoked (reconnect instead)
- `401`: Missing, malformed, or invalid bearer token / API key, or revoked session (SESSION_REVOKED).
- `403`: forbidden — a personal connection is managed by its creator only, a company one by an admin
- `404`: Not found, or the caller is not authorized to access this resource.
- `409`: provider_coming_soon — the provider is not open to clients yet (catalog `availability` is `coming_soon`: not functionally validated, admin status, or OAuth app not provisioned); a `message` explains it. Use POST /integrations/{key}/interest ("Notify me") instead.
- `422`: invalid_credentials — the provider did not answer the credential probe with a 2xx; the old credential stays in place. `probeStatus` carries its HTTP status
- `502`: provider_unavailable — the credential probe got no verdict (provider 5xx or 429, network error, timeout); the old credential stays in place, retry

---

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