> For a complete page index, fetch https://docs.synthflow.ai/llms.txt. For full documentation content, fetch https://docs.synthflow.ai/llms-full.txt.

# List subaccounts

GET https://api.synthflow.ai/v2/subaccounts/



Reference: https://docs.synthflow.ai/api-reference/platform-api/subaccounts/list-subaccounts

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Servers

- `https://api.synthflow.ai/v2` (Global, default)
- `https://api.us.synthflow.ai/v2` (United States)
- `https://api.eu.synthflow.ai/v2` (European Union)

## Response

### 200

200

- `status` (string, optional)
- `response` (SubaccountsGetResponsesContentApplicationJsonSchemaResponse, optional)

## Errors

### 400 Bad Request Error

400

### 401 Unauthorized Error

Missing or invalid API credentials.

- `detail` (ApiErrorDetail, optional)

### 500 Internal Server Error

The request could not be completed. Read `detail.description` for the reason, then retry the same request.

- `detail` (ApiErrorDetail, optional)

### 502 Bad Gateway Error

The upstream service returned a body this API could not read. Retry the same request.

- `detail` (ApiErrorDetail, optional)

## Types

### SubaccountsGetResponsesContentApplicationJsonSchemaResponse

- `subaccounts` (list of SubaccountsGetResponsesContentApplicationJsonSchemaResponseSubaccountsItems, optional)

### ApiErrorDetail

- `status` (string, optional)
- `description` (string, optional) — Human-readable reason for the failure.
- `timestamp` (datetime, optional) — When the error was produced (ISO 8601).
- `request_id` (string, optional) — Quote this when contacting support.
- `category` (string, optional)

### SubaccountsGetResponsesContentApplicationJsonSchemaResponseSubaccountsItems

- `subaccount_id` (string, optional) — Subaccount ID.
- `agency_id` (string, optional)
- `name` (string, optional)
- `pricing_tiers` (list of SubaccountsGetResponsesContentApplicationJsonSchemaResponseSubaccountsItemsPricingTiersItems, optional)
- `permissions` (SubaccountsGetResponsesContentApplicationJsonSchemaResponseSubaccountsItemsPermissions, optional)
- `subscription` (SubaccountsGetResponsesContentApplicationJsonSchemaResponseSubaccountsItemsSubscription, optional)
- `minutes_used` (integer, optional, default: 0)
- `max_minutes` (integer, optional, nullable) — The maximum number of minutes allocated to this subaccount. Null if no limit is set.
- `members` (list of SubaccountsGetResponsesContentApplicationJsonSchemaResponseSubaccountsItemsMembersItems, optional)

### SubaccountsGetResponsesContentApplicationJsonSchemaResponseSubaccountsItemsPricingTiersItems

- `pricing_tier_id` (string, optional)

### SubaccountsGetResponsesContentApplicationJsonSchemaResponseSubaccountsItemsPermissions

- `assistants` (boolean, optional) — Whether this subaccount can create and manage agents.
- `knowledge_base` (boolean, optional) — Whether this subaccount can access and manage knowledge bases.
- `actions` (boolean, optional) — Whether this subaccount can create and manage actions.
- `workflows` (boolean, optional) — Whether this subaccount can create and manage workflows.
- `contacts` (boolean, optional) — Whether this subaccount can create and manage contacts.
- `phone_numbers` (boolean, optional) — Whether this subaccount can acquire and manage phone numbers.
- `inbound` (boolean, optional) — Whether this subaccount can create and manage inbound voice agents.
- `outbound` (boolean, optional) — Whether this subaccount can create and manage outbound voice agents.
- `widget` (boolean, optional) — Whether this subaccount can create and manage web widget agents.
- `chat` (boolean, optional) — Whether this subaccount can create and manage chat agents.
- `logs` (boolean, optional) — Whether this subaccount can access call, chat, API, and webhook logs.
- `simulations` (boolean, optional) — Whether this subaccount can access call simulations and evaluations.
- `analytics` (boolean, optional) — Whether this subaccount can view the analytics dashboard.

### SubaccountsGetResponsesContentApplicationJsonSchemaResponseSubaccountsItemsSubscription

- `stripe_subscription_id` (string, optional)
- `synthflow_price_id` (string, optional)

### SubaccountsGetResponsesContentApplicationJsonSchemaResponseSubaccountsItemsMembersItems

- `email` (string, optional)
- `status` (string, optional)

## Examples

**Response**

```json
{
  "status": "success",
  "response": {
    "subaccounts": [
      {
        "subaccount_id": "1728287773458x334812156080545700",
        "agency_id": "1721115013679x608763653458583300",
        "name": "test",
        "pricing_tiers": [
          {
            "pricing_tier_id": "1721203336678x111804323287269380"
          },
          {
            "pricing_tier_id": "1721203417893x337445735370850300"
          }
        ],
        "permissions": {
          "assistants": true,
          "knowledge_base": true,
          "actions": true,
          "workflows": true,
          "contacts": true,
          "phone_numbers": true,
          "inbound": true,
          "outbound": true,
          "widget": true,
          "chat": true,
          "logs": true,
          "simulations": true,
          "analytics": true
        },
        "subscription": {
          "stripe_subscription_id": "",
          "synthflow_price_id": ""
        },
        "minutes_used": 50,
        "max_minutes": 10,
        "members": [
          {
            "email": "test@test.ai",
            "status": "accepted"
          },
          {
            "email": "test2@test.ai",
            "status": "accepted"
          }
        ]
      }
    ]
  }
}
```

**SDK Code**

```python list-subaccounts_example
import requests

url = "https://api.synthflow.ai/v2/subaccounts/"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```go list-subaccounts_example
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.synthflow.ai/v2/subaccounts/"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby list-subaccounts_example
require 'uri'
require 'net/http'

url = URI("https://api.synthflow.ai/v2/subaccounts/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java list-subaccounts_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.synthflow.ai/v2/subaccounts/")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```csharp list-subaccounts_example
using RestSharp;

var client = new RestClient("https://api.synthflow.ai/v2/subaccounts/");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift list-subaccounts_example
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.synthflow.ai/v2/subaccounts/")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```