---
title: "Update a connected account"
method: PATCH
path: "/api/v3/connected_accounts/{nanoid}"
tags: ["Connected Accounts", "Account Management"]
---

# Update a connected account

`PATCH /api/v3/connected_accounts/{nanoid}`

Update a connected account. Supports updating the alias and/or credentials. Only specified fields will be updated. Set a credential field to null to remove it. Alias must be unique within the same project, entity, and toolkit scope.

## Path parameters

- `nanoid` string, connectedAccountId, required

## Request body

- PatchConnectedAccountBody
  - `alias` string — A human-readable alias for this connected account. Pass an empty string to clear the alias. Must be unique per entity and toolkit within the project.
  - `connection` object
    - `state` object, required
      - `authScheme` 'BEARER_TOKEN' | 'API_KEY' | 'BASIC' | 'BASIC_WITH_JWT' | 'GOOGLE_SERVICE_ACCOUNT' | 'SERVICE_ACCOUNT', required — The auth scheme of the connected account. Must match the connection's actual auth scheme.
      - `val` object, required — Credential fields to update. Only provided fields are changed — omitted fields are preserved. Set a field to null to remove it.
        - `token` string, nullable
        - `generic_api_key` string, nullable
        - `api_key` string, nullable
        - `bearer_token` string, nullable
        - `basic_encoded` string, nullable
        - `generic_token` string, nullable
        - `api_key_prefix` string, nullable
        - `generic_secret` string, nullable
        - `generic_id` string, nullable
        - `user_agent` string, nullable
        - `username` string, nullable
        - `password` string, nullable
        - `credentials_json` string, nullable
        - `application_id` string, nullable
        - `installation_id` string, nullable
        - `private_key` string, nullable
  - `experimental` object — Experimental features - not stable, may be modified or removed in future versions.
    - `acl_config_for_shared` object — Access control for SHARED connections. Resolution rule (only fires when caller != creator): user in not_allowed_user_ids → DENY; allow_all_users=true → ALLOW; user in allowed_user_ids → ALLOW; else DENY. Default state (omitted or {}) is deny-by-default — only the creator can use.
      - `allow_all_users` boolean — Wildcard "any user_id in the project" allow toggle. Only valid on SHARED connections.
      - `allowed_user_ids` string[] — Explicit allow list of user_ids who can use this SHARED connection.
      - `not_allowed_user_ids` string[] — Explicit deny list. Wins on conflict with allow_all_users and allowed_user_ids.

## Response `200`

Successfully updated connected account

- object
  - `success` boolean, required — Whether the update was successful
  - `id` string, connectedAccountId, required — The unique identifier of the updated connected account
  - `status` string, required — The current status of the connected account after the update (ACTIVE, EXPIRED, INACTIVE, etc.)

## Other responses

- `400` — Bad request - Invalid nanoid or invalid credential values
- `401` — Unauthorized - Authentication failed
- `403` — Forbidden - Insufficient permissions to update this connected account
- `404` — Not found - Connected account does not exist or was deleted
- `409` — Conflict - Duplicate alias, or a concurrent write holds the connection lease; retry the request
- `500` — Internal server error - Failed to update connected account

---

[API](https://skmtc.net/composiohq/apis/composio-platform-api.md) · [All operations](https://skmtc.net/composiohq/apis/composio-platform-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/composiohq/composio-platform-api/versions/df7478fc8f3b/schema)
