# List profile accounts

> The same list, scoped by path instead of query.

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

`GET https://app.tryadeli.com/api/v1/profiles/{profileId}/accounts`

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

The same `accounts` aggregate as [List accounts](https://www.tryadeli.com/docs/api/accounts/list-accounts),
scoped by path instead of query. Takes no filters. Useful when your code already
has the profile id in hand.

**Path parameters**

| Name        | Type   | Required | Description                                                                      |
| ----------- | ------ | -------- | -------------------------------------------------------------------------------- |
| `profileId` | `uuid` | Yes      | A profile in your organization. Any other value returns 404 profile\_not\_found. |

**Errors** — `401 unauthorized`, `400 invalid_request`, `404 profile_not_found`,
`502 database_error`.

## Request examples

**cURL**

```bash
curl --fail-with-body "https://app.tryadeli.com/api/v1/profiles/00000000-0000-4000-8000-000000000001/accounts" \
  -H "Authorization: Bearer $ADELI_API_KEY"
```

**JavaScript**

```javascript
const response = await fetch("https://app.tryadeli.com/api/v1/profiles/00000000-0000-4000-8000-000000000001/accounts", {
  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/profiles/00000000-0000-4000-8000-000000000001/accounts",
    headers={"Authorization": f"Bearer {os.environ['ADELI_API_KEY']}"},
)
print(response.json())
```

## Responses

### 200

```json
{
  "status": "complete",
  "accounts": [
    {
      "id": "00000000-0000-0000-0000-000000000000",
      "accountId": "00000000-0000-0000-0000-000000000000",
      "profileId": "00000000-0000-4000-8000-000000000001",
      "platform": "instagram",
      "providerId": "17841400000000000",
      "displayName": "@adeli",
      "displayIdentifier": "adeli",
      "authMethod": "instagram_login",
      "connectionStatus": "connected"
    }
  ],
  "errors": []
}
```

### 404

```json
{
  "error": {
    "code": "profile_not_found",
    "message": "Profile not found"
  }
}
```
