Accounts

accounts

Methods

Create An Account -> Envelope<>
post/accounts

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

Delete A Specific Account -> Envelope<{ id }>
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

Account Details -> Envelope<>
get/accounts/{account_id}

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

List Accounts -> V4PagePaginationArray<>
get/accounts

List all accounts you have ownership or verified access to.

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

Parameters
direction:
Optional

Direction to order results.

"asc"
"desc"
name: string
Optional

Name of the account.

page: number
Optional

Page number of paginated results.

per_page: number
Optional

Maximum number of results per page.

Response fields
errors: Array<>
messages: Array<>
success: true

Whether the API call was successful

result: Array<>
Optional
result_info: { count, page, per_page, 1 more... }
Optional
Request example
200Example
Update Account -> Envelope<>
put/accounts/{account_id}

Update an existing account.

Domain types

Account = { id, name, created_on, 1 more... }

accounts.logs

accounts.logs.audit

Methods

Get Account Audit Logs Version 2 Beta Release -> CursorLimitPagination<{ id, account, action, 4 more... }>
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

Add Member -> Envelope<>
post/accounts/{account_id}/members

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

Remove Member -> Envelope<{ id }>
delete/accounts/{account_id}/members/{member_id}

Remove a member from an account.

Member Details -> Envelope<>
get/accounts/{account_id}/members/{member_id}

Get information about a specific member of an account.

List Members -> V4PagePaginationArray<>
get/accounts/{account_id}/members

List all members of an account.

Update Member -> Envelope<>
put/accounts/{account_id}/members/{member_id}

Modify an account member.

Domain types

Status = "member" | "invited"

accounts.roles

Methods

Role Details -> Envelope<>
get/accounts/{account_id}/roles/{role_id}

Get information about a specific role for an account.

List Roles -> SinglePage<>
get/accounts/{account_id}/roles

Get all available roles for an account.

Accounts

Subscriptions

accounts.subscriptions

Methods

Create Subscription -> Envelope<unknown>
post/accounts/{account_id}/subscriptions

Creates an account subscription.

Delete Subscription -> Envelope<{ subscription_id }>
delete/accounts/{account_id}/subscriptions/{subscription_identifier}

Deletes an account's subscription.

List Subscriptions -> Envelope<Array<>>
get/accounts/{account_id}/subscriptions

Lists all of an account's subscriptions.

Update Subscription -> Envelope<unknown>
put/accounts/{account_id}/subscriptions/{subscription_identifier}

Updates an account subscription.

Accounts

Tokens

accounts.tokens

Methods

Create Token -> Envelope<{ id, condition, expires_on, 8 more... }>
post/accounts/{account_id}/tokens

Create a new Account Owned API token.

Delete Token -> Envelope<{ id }>
delete/accounts/{account_id}/tokens/{token_id}

Destroy an Account Owned API token.

Token Details -> Envelope<>
get/accounts/{account_id}/tokens/{token_id}

Get information about a specific Account Owned API token.

List Tokens -> V4PagePaginationArray<>
get/accounts/{account_id}/tokens

List all Account Owned API tokens created for this account.

Update Token -> Envelope<>
put/accounts/{account_id}/tokens/{token_id}

Update an existing token.

Verify Token -> Envelope<{ id, status, expires_on, 1 more... }>
get/accounts/{account_id}/tokens/verify

Test whether a token works.

AccountsTokens

Permission Groups

accounts.tokens.permission_groups

Methods

List Permission Groups -> SinglePage<unknown>
get/accounts/{account_id}/tokens/permission_groups

Find all available permission groups for Account Owned API Tokens

accounts.tokens.value

Methods

Roll Token -> Envelope<>
put/accounts/{account_id}/tokens/{token_id}/value

Roll the Account Owned API token secret.