---
title: "Choose which Meta ad accounts Patricia may use"
method: PATCH
path: "/v1/integrations/accounts/{account_id}/meta-ads/enabled-ad-accounts"
tags: ["integrations"]
---

# Choose which Meta ad accounts Patricia may use

`PATCH /v1/integrations/accounts/{account_id}/meta-ads/enabled-ad-accounts`

## 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}/meta-ads/enabled-ad-accounts`
- Auth: HTTP bearer

Sets the whole enabled set for a Meta Ads connection. Every discovered active ad account is switched on at connect, so this is how a person switches one off: an agency connection can reach a former client's account, and taking it out of range should not mean disconnecting the integration. An id this connection never discovered, or one Meta reports as anything but active, is refused rather than stored. An empty list is refused. Tenant- AND owner-scoped: a foreign, unknown, non-Meta or not-visible account id 404s.

## Path parameters

- `account_id` string, uuid, required

## Headers

- `X-Tenant-Id` string, nullable

## Request body

- MetaEnabledAdAccountsBody: Choose which of a Meta connection's discovered ad accounts Patricia may use. The whole set travels on every write rather than one id at a time, so the request states the intended end state instead of a delta whose meaning depends on what the server already held.
  - `enabled_ad_account_ids` string[]

## Response `200`

Successful Response

- MetaAdAccountsResponse: Every ad account a Meta connection discovered, which are switched on, and the default.
  - `ad_accounts` MetaAdAccountSummary[]
    - `id` string, required
    - `account_id` string, required
    - `name` string, required
    - `account_status` integer, required
    - `status_label` string, required
    - `currency` string, required
    - `business_name` string, nullable
    - `user_tasks` string[]
    - `can_write` boolean
    - `is_active` boolean
    - `enabled` boolean
  - `selected_ad_account_id` string, nullable
  - `enabled_ad_account_ids` string[]

## 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)
