Skip to content
Start here

Organizations

User API tokens can list and create Organizations, but reading, updating, or deleting an Organization requires a Global API key and your registered email address. The cloudflare_organization Terraform resource therefore requires a Global API key for its full lifecycle.

See Organizations authentication limitations for credential compatibility by operation. Each endpoint’s Security section lists its supported authentication methods, with Accepted Permissions where applicable.

List organizations the user has access to
client.Organizations.List(ctx, query) (*SinglePage[Organization], error)
GET/organizations
Get organization
client.Organizations.Get(ctx, organizationID) (*Organization, error)
GET/organizations/{organization_id}
Create organization
client.Organizations.New(ctx, body) (*Organization, error)
POST/organizations
Update organization
client.Organizations.Update(ctx, organizationID, body) (*Organization, error)
PUT/organizations/{organization_id}
Delete organization
client.Organizations.Delete(ctx, organizationID) (*OrganizationDeleteResponse, error)
DELETE/organizations/{organization_id}
ModelsExpand Collapse
type Organization struct{…}

References an Organization in the Cloudflare data model.

ID string
CreateTime Time
formatdate-time
Meta OrganizationMeta
AreChildAccountsAccessibleByOrgMembers boolOptional
HierarchyTags []stringOptional

Ordered chain of organization tags from the root organization down to (and including) this organization itself. Root organizations return a single-element array containing their own tag; sub-organizations return [rootTag, ...intermediateTags, parentTag, selfTag]. Useful for constructing authorization scopes that need to cover every ancestor in the hierarchy.

ManagedBy stringOptional
TenantFlags OrganizationMetaTenantFlagsOptional

Enable features for Organizations.

AccountCreation string
AccountCreationAppliesTenantDefaults string
AccountDeletion string
AccountMigration string
AccountMobility string
EnterpriseCapability string
MemberManagement string
SubOrgCreation string
TenantType stringOptional
Name string
Parent OrganizationParentOptional
ID string
Name string
Profile AccountProfileOptional

OrganizationsOrganization Accounts

List organization accounts
client.Organizations.OrganizationAccounts.Get(ctx, organizationID, params) (*[]OrganizationAccountGetResponse, error)
GET/organizations/{organization_id}/accounts
ModelsExpand Collapse
type OrganizationAccounts struct{…}
ID string

Identifier

maxLength32
minLength32
Name string

Account name

Type OrganizationAccountsType
One of the following:
const OrganizationAccountsTypeStandard OrganizationAccountsType = "standard"
const OrganizationAccountsTypeEnterprise OrganizationAccountsType = "enterprise"
CreatedOn TimeOptional

Timestamp for the creation of the account

formatdate-time
LegacyFlags OrganizationAccountsLegacyFlagsOptional

Legacy account flags.

EnterpriseZoneQuota OrganizationAccountsLegacyFlagsEnterpriseZoneQuotaOptional

Enterprise zone quota for standard and enterprise accounts. Accounts without a quota have a maximum of 0.

Available int64Optional

Number of additional Enterprise zones available. Returns 0 if the quota is not allocated or is exhausted.

Current int64Optional

Current number of Enterprise zones.

Maximum int64Optional

Maximum number of Enterprise zones allowed.

ManagedBy OrganizationAccountsManagedByOptional

Parent container details

ParentOrgID stringOptional

ID of the parent Organization, if one exists

maxLength32
ParentOrgName stringOptional

Name of the parent Organization, if one exists

RootOrgID stringOptional

ID of the root Organization, if one exists

maxLength32
ShouldDisplayParentOrgs boolOptional

Indicates whether the parent Organization hierarchy should be displayed

Settings OrganizationAccountsSettingsOptional

Account settings

AbuseContactEmail stringOptional

Sets an abuse contact email to notify for abuse reports.

EnforceTwofactor boolOptional

Indicates whether membership in this account requires that Two-Factor Authentication is enabled

OrganizationsOrganization Profile

Get organization profile
client.Organizations.OrganizationProfile.Get(ctx, organizationID) (*AccountProfile, error)
GET/organizations/{organization_id}/profile
Modify organization profile.
client.Organizations.OrganizationProfile.Update(ctx, organizationID, body) error
PUT/organizations/{organization_id}/profile
ModelsExpand Collapse
type OrganizationProfile struct{…}
BusinessAddress string
BusinessEmail string
BusinessName string
BusinessPhone string
ExternalMetadata string

OrganizationsMembers

List organization members
client.Organizations.Members.List(ctx, organizationID, query) (*SinglePage[OrganizationMember], error)
GET/organizations/{organization_id}/members
Get organization member
client.Organizations.Members.Get(ctx, organizationID, memberID) (*OrganizationMember, error)
GET/organizations/{organization_id}/members/{member_id}
Create organization member
client.Organizations.Members.New(ctx, organizationID, body) (*OrganizationMember, error)
POST/organizations/{organization_id}/members
Delete organization member
client.Organizations.Members.Delete(ctx, organizationID, memberID) (*MemberDeleteResponse, error)
DELETE/organizations/{organization_id}/members/{member_id}
ModelsExpand Collapse
type OrganizationMember struct{…}
ID string

Organization Member ID

CreateTime Time
formatdate-time
Meta map[string, unknown]
Status OrganizationMemberStatus
One of the following:
const OrganizationMemberStatusActive OrganizationMemberStatus = "active"
const OrganizationMemberStatusPending OrganizationMemberStatus = "pending"
const OrganizationMemberStatusRejected OrganizationMemberStatus = "rejected"
const OrganizationMemberStatusCanceled OrganizationMemberStatus = "canceled"
UpdateTime Time
formatdate-time
User OrganizationMemberUser
ID string
Email string
Name string
TwoFactorAuthenticationEnabled bool
Policies []OrganizationMemberPolicyOptional

Direct policies of the membership. Present only for DSR members enrolled in Organization Roles.

Roles []OrganizationMemberPoliciesRole
ID string
Scopes []OrganizationMemberPoliciesScope
Key string

An Organization (com.cloudflare.api.tenant.unit.<tag>) or Account (com.cloudflare.api.account.<tag>) key.

SubsetOf []unknownOptional

The route Organization for Account scopes. Optional in requests and always returned for Account scopes.

ID stringOptional

Omit to create a policy. An unchanged policy keeps its ID; a changed policy is replaced under a new ID.

OrganizationsLogs

OrganizationsLogsAudit

Get organization audit logs (Version 2)
client.Organizations.Logs.Audit.List(ctx, organizationID, query) (*CursorPaginationAfter[LogAuditListResponse], error)
GET/organizations/{organization_id}/logs/audit
Get resource change history from an organization audit log entry (Version 2)
client.Organizations.Logs.Audit.History(ctx, organizationID, id, query) (*[]LogAuditHistoryResponse, error)
GET/organizations/{organization_id}/logs/audit/{id}/history

OrganizationsBilling

OrganizationsBillingUsage

Get Organization Usage (Version 2, Alpha, Restricted)
client.Organizations.Billing.Usage.Get(ctx, organizationID, query) (*[]BillingUsageGetResponse, error)
GET/organizations/{organization_id}/billable/usage