---
title: "Change a connected account's sharing scope"
method: PATCH
path: "/v1/integrations/accounts/{account_id}/visibility"
tags: ["integrations"]
---

# Change a connected account's sharing scope

`PATCH /v1/integrations/accounts/{account_id}/visibility`

## Request

- Base URL: `https://api.patricia.app` (the document declares no server; this is the origin it was published from)
- URL: `https://api.patricia.app/v1/integrations/accounts/{account_id}/visibility`
- Auth: HTTP bearer

Switches a connected account between PERSONAL (private to the person who connected it) and TEAM (usable by the whole company). Requires account-edit authority; the service enforces the per-account fence (only the owner can share their own account; a team account can only be made private when it has a single coherent owner) and never discloses another member's private account (a foreign/unknown id 404s). ``expected_current`` is a compare-and-set guard: a concurrent flip 409s.

## Path parameters

- `account_id` string, uuid, required

## Headers

- `X-Tenant-Id` string, nullable

## Request body

- VisibilityBody: Switch a connected account between PERSONAL (private) and TEAM (whole company). ``expected_current`` is a compare-and-set guard: the write only lands if the account is still at that scope, so a concurrent flip surfaces a 409 instead of silently clobbering.
  - `expected_current` 'team' | 'personal', required: Who, within a tenant, may use a connected account's tools. ``TEAM``: any actor in the tenant. ``PERSONAL``: only the actor who connected it. Designed to extend to a ``GROUP`` scope later (the Groups model is already on main).
  - `target` 'team' | 'personal', required: Who, within a tenant, may use a connected account's tools. ``TEAM``: any actor in the tenant. ``PERSONAL``: only the actor who connected it. Designed to extend to a ``GROUP`` scope later (the Groups model is already on main).

## Response `200`

Successful Response

- ConnectedAccountResponse
  - `id` string, uuid, required
  - `provider` string, required
  - `app_slug` string, nullable
  - `status_code` string, required
  - `visibility_code` 'team' | 'personal': Who, within a tenant, may use a connected account's tools. ``TEAM``: any actor in the tenant. ``PERSONAL``: only the actor who connected it. Designed to extend to a ``GROUP`` scope later (the Groups model is already on main).
  - `sync_enqueued` boolean, nullable

## Other responses

- `422`: Validation Error

---

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