Accounts

Accounts

Methods

list(, ): <>
get/accounts

List all accounts you have ownership or verified access to.

get(, ):
get/accounts/{account_id}

Get information about a specific account that you are a member of.

Security
API Email + API Key

The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.

Example: X-Auth-Email: user@example.com

The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.

Example: X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194

Accepted Permissions (at least one required)

Trust and Safety Write Trust and Safety Read DNS View Write DNS View Read SCIM Provisioning Load Balancers Account Write Load Balancers Account Read Zero Trust: PII Read DDoS Botnet Feed Write DDoS Botnet Feed Read Workers R2 Storage Write Workers R2 Storage Read DDoS Protection Write DDoS Protection Read Workers Tail Read Workers KV Storage Write Workers KV Storage Read Workers Scripts Write Workers Scripts Read Load Balancing: Monitors and Pools Write Load Balancing: Monitors and Pools Read Account Firewall Access Rules Write Account Firewall Access Rules Read DNS Firewall Write DNS Firewall Read Billing Write Billing Read Account Settings Write Account Settings Read

Parameters
account_id: string
(maxLength: 32, minLength: 32)

Account identifier tag.

Returns
id: string
(maxLength: 32, minLength: 32)

Identifier

name: string
(maxLength: 100)

Account name

type: "standard" | "enterprise"
created_on?: string
(format: date-time)

Timestamp for the creation of the account

managed_by?:

Parent container details

settings?:

Account settings

Request example
200Example
create(, ):
post/accounts

Create an account (only available for tenant admins at this time)

update(, ):
put/accounts/{account_id}

Update an existing account.

delete(, ): | null
delete/accounts/{account_id}

Delete a specific account (only available for tenant admins at this time). This is a permanent operation that will delete any zones or other resources under the account

Domain types

Account{…}

Accounts.Logs

Accounts.Logs.Audit

Methods

list(, ): <>
get/accounts/{account_id}/logs/audit

Gets a list of audit logs for an account.

This is the beta release of Audit Logs Version 2. Since this is a beta version, there may be gaps or missing entries in the available audit logs. Be aware of the following limitations.

  • Audit logs are available only for the past 30 days.
  • Error handling is not yet implemented.

Accounts

Members

Accounts.Members

Methods

list(, ): <>
get/accounts/{account_id}/members

List all members of an account.

get(, , ):
get/accounts/{account_id}/members/{member_id}

Get information about a specific member of an account.

create(, ):
post/accounts/{account_id}/members

Add a user to the list of members for this account.

update(, , ):
put/accounts/{account_id}/members/{member_id}

Modify an account member.

delete(, , ): | null
delete/accounts/{account_id}/members/{member_id}

Remove a member from an account.

Domain types

Status = "member" | "invited"

Whether the user is a member of the organization or has an invitation pending.

Accounts.Roles

Methods

list(, ): <>
get/accounts/{account_id}/roles

Get all available roles for an account.

get(, , ):
get/accounts/{account_id}/roles/{role_id}

Get information about a specific role for an account.

Accounts

Subscriptions

Accounts.Subscriptions

Methods

get(, ): <>
get/accounts/{account_id}/subscriptions

Lists all of an account's subscriptions.

create(, ):
post/accounts/{account_id}/subscriptions

Creates an account subscription.

update(, , ):
put/accounts/{account_id}/subscriptions/{subscription_identifier}

Updates an account subscription.

delete(, , ):
delete/accounts/{account_id}/subscriptions/{subscription_identifier}

Deletes an account's subscription.

Accounts

Tokens

Accounts.Tokens

Methods

list(, ): <>
get/accounts/{account_id}/tokens

List all Account Owned API tokens created for this account.

get(, , ):
get/accounts/{account_id}/tokens/{token_id}

Get information about a specific Account Owned API token.

create(, ):
post/accounts/{account_id}/tokens

Create a new Account Owned API token.

update(, , ):
put/accounts/{account_id}/tokens/{token_id}

Update an existing token.

delete(, , ): | null
delete/accounts/{account_id}/tokens/{token_id}

Destroy an Account Owned API token.

verify(, ):
get/accounts/{account_id}/tokens/verify

Test whether a token works.

AccountsTokens

Permission Groups

Accounts.Tokens.PermissionGroups

Methods

list(, ): <>
get/accounts/{account_id}/tokens/permission_groups

Find all available permission groups for Account Owned API Tokens

get(, ):
get/accounts/{account_id}/tokens/permission_groups

Find all available permission groups for Account Owned API Tokens

Accounts.Tokens.Value

Methods

update(, , ):
put/accounts/{account_id}/tokens/{token_id}/value

Roll the Account Owned API token secret.