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.

create(, ):
post/accounts

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

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

Update an existing account.

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)

Account Settings Write

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

Path param: Account identifier tag.

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

Body param: Identifier

name: string
(maxLength: 100)

Body param: Account name

type: "standard" | "enterprise"

Body param

managed_by?:

Body param: Parent container details

settings?:

Body param: Account settings

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
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.