# List ad accounts

> Every ad account the Facebook connection can reach.

Canonical: <https://www.tryadeli.com/docs/api/ads/list-ad-accounts>

`GET https://app.tryadeli.com/api/v1/ads/accounts`

Authorization: `Bearer <API key>` — see [Authentication](https://www.tryadeli.com/docs/authentication)

Every ad account the connection can reach, both directly assigned and owned by
a Business portfolio the authorizing person administers. `businessId` is `null`
for a directly-assigned account.

The list is reused for up to 15 minutes; `fetchedAt` is when the oldest part
of it was read from Meta. Pass `refresh=true` after granting access to a new ad account to see it
immediately. Other endpoints re-list on their own when given an ad account id
the stored list does not contain.

**Query parameters**

| Name        | Type      | Required | Description                                                                                     |
| ----------- | --------- | -------- | ----------------------------------------------------------------------------------------------- |
| `accountId` | `uuid`    |          | A connected Facebook account. Defaults to the profile's.                                        |
| `profileId` | `uuid`    |          | Required unless you pass accountId, which names its profile. If you pass both, they must agree. |
| `refresh`   | `boolean` |          | true to ask Meta again instead of using the stored list.                                        |

## Request examples

**cURL**

```bash
curl --fail-with-body "https://app.tryadeli.com/api/v1/ads/accounts?accountId=00000000-0000-0000-0000-000000000000&refresh=true" \
  -H "Authorization: Bearer $ADELI_API_KEY"
```

**JavaScript**

```javascript
const response = await fetch("https://app.tryadeli.com/api/v1/ads/accounts?accountId=00000000-0000-0000-0000-000000000000&refresh=true", {
  headers: {
    Authorization: `Bearer ${process.env.ADELI_API_KEY}`,
  },
});
console.log(await response.json());
```

**Python**

```python
import os

import requests

response = requests.get(
    "https://app.tryadeli.com/api/v1/ads/accounts",
    headers={"Authorization": f"Bearer {os.environ['ADELI_API_KEY']}"},
    params={
        "accountId": "00000000-0000-0000-0000-000000000000",
        "refresh": True,
    },
)
print(response.json())
```

## Responses

### 200

```json
{
  "platform": "facebook",
  "accountId": "00000000-0000-0000-0000-000000000000",
  "profileId": "00000000-0000-4000-8000-000000000002",
  "adAccounts": [
    {
      "id": "act_1234567890",
      "accountId": "1234567890",
      "name": "Client A — Ads",
      "currency": "USD",
      "timezoneName": "America/New_York",
      "accountStatus": 1,
      "minDailyBudget": 100,
      "businessId": "1122334455",
      "businessName": "Client A"
    },
    {
      "id": "act_9876543210",
      "accountId": "9876543210",
      "name": "Personal ad account",
      "currency": "USD",
      "timezoneName": "America/Los_Angeles",
      "accountStatus": 1,
      "minDailyBudget": 100,
      "businessId": null,
      "businessName": null
    }
  ],
  "fetchedAt": "2026-10-09T16:00:00.000Z"
}
```

### 403

```json
{
  "error": {
    "code": "ads_permission_required",
    "message": "This connection has not granted the Facebook ads permissions",
    "details": { "missingScopes": ["ads_read", "ads_management"] }
  }
}
```
