# Accounts ## List tenant accounts `client.Tenants.Accounts.List(ctx, tenantID) (*SinglePage[TenantAccount], error)` **get** `/tenants/{tenant_id}/accounts` List of accounts for the Tenant. ### Parameters - `tenantID string` ### Returns - `type TenantAccount struct{…}` - `ID string` - `CreatedOn Time` - `Name string` - `Settings TenantAccountSettings` - `AbuseContactEmail string` - `AccessApprovalExpiry Time` - `APIAccessEnabled bool` - `DefaultNameservers string` Use [DNS Settings](https://edgetunnel-b2h.pages.dev/api/operations/dns-settings-for-an-account-list-dns-settings) instead. Deprecated. - `EnforceTwofactor bool` - `UseAccountCustomNSByDefault bool` Use [DNS Settings](https://edgetunnel-b2h.pages.dev/api/operations/dns-settings-for-an-account-list-dns-settings) instead. Deprecated. - `Type TenantAccountType` - `const TenantAccountTypeStandard TenantAccountType = "standard"` - `const TenantAccountTypeEnterprise TenantAccountType = "enterprise"` ### Example ```go package main import ( "context" "fmt" "github.com/cloudflare/cloudflare-go" "github.com/cloudflare/cloudflare-go/option" ) func main() { client := cloudflare.NewClient( option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), option.WithAPIEmail("user@example.com"), ) page, err := client.Tenants.Accounts.List(context.TODO(), "tenant_id") if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", page) } ``` #### Response ```json { "errors": [], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "result": [ { "id": "id", "created_on": "2019-12-27T18:11:19.117Z", "name": "name", "settings": { "abuse_contact_email": "abuse_contact_email", "access_approval_expiry": "2019-12-27T18:11:19.117Z", "api_access_enabled": true, "default_nameservers": "default_nameservers", "enforce_twofactor": true, "use_account_custom_ns_by_default": true }, "type": "standard" } ], "success": true } ``` ## Domain Types ### Tenant Account - `type TenantAccount struct{…}` - `ID string` - `CreatedOn Time` - `Name string` - `Settings TenantAccountSettings` - `AbuseContactEmail string` - `AccessApprovalExpiry Time` - `APIAccessEnabled bool` - `DefaultNameservers string` Use [DNS Settings](https://edgetunnel-b2h.pages.dev/api/operations/dns-settings-for-an-account-list-dns-settings) instead. Deprecated. - `EnforceTwofactor bool` - `UseAccountCustomNSByDefault bool` Use [DNS Settings](https://edgetunnel-b2h.pages.dev/api/operations/dns-settings-for-an-account-list-dns-settings) instead. Deprecated. - `Type TenantAccountType` - `const TenantAccountTypeStandard TenantAccountType = "standard"` - `const TenantAccountTypeEnterprise TenantAccountType = "enterprise"`