- API Reference
- Libraries
- API Overview
- Accounts
- AccountsAccount Organizations
- AccountsAccount Profile
- AccountsMembers
- AccountsRoles
- AccountsSubscriptions
- AccountsSubscriptionsCancel Reason
- AccountsSubscriptionsActions
- AccountsSubscriptionsBulk
- AccountsTokens
- AccountsTokensPermission Groups
- AccountsTokensValue
- AccountsLogs
- AccountsLogsAudit
- AccountsEntitlements
- AccountsSpeed Settings
- AccountsSpeed SettingsTransformations
- AccountsPayment Methods
- AccountsPay Invoice
- AccountsPay Bad Debt
- AccountsReceipts
- AccountsInvoices
- AccountsClient Secret
- Organizations
- OrganizationsOrganization Accounts
- OrganizationsOrganization Profile
- OrganizationsMembers
- OrganizationsLogs
- OrganizationsLogsAudit
- OrganizationsBilling
- OrganizationsBillingUsage
- Tenants
- TenantsAccount Types
- TenantsAccounts
- TenantsEntitlements
- TenantsMemberships
- Origin CA Certificates
- IPs
- Memberships
- User
- UserAudit Logs
- UserBilling
- UserBillingHistory
- UserBillingProfile
- UserInvites
- UserOrganizations
- UserSpectrum Analytics
- UserSpectrum AnalyticsZones
- UserSpectrum AnalyticsZonesReports
API Reference
Libraries
TypeScript
7.3.0
npm install cloudflare
Python
5.9.0
pip install cloudflare
Go
v7.13.1
go get -u github.com/cloudflare/cloudflare-go/v7@v7.13.1
Terraform
5.28.1
terraform {
required_providers {
cloudflare = {
source = "cloudflare/cloudflare"
version = "~> 5.0"
}
}
}
API Overview
Accounts
List Accounts
GET/accounts
Account Details
GET/accounts/{account_id}
Create an Account
POST/accounts
Update Account
PUT/accounts/{account_id}
Delete a specific account
DELETE/accounts/{account_id}
AccountsAccount Organizations
Move account to organization
POST/accounts/{account_id}/move
AccountsAccount Profile
Get account profile
GET/accounts/{account_id}/profile
Update account profile
PUT/accounts/{account_id}/profile
AccountsMembers
List Members
GET/accounts/{account_id}/members
Member Details
GET/accounts/{account_id}/members/{member_id}
Add Member
POST/accounts/{account_id}/members
Update Member
PUT/accounts/{account_id}/members/{member_id}
Remove Member
DELETE/accounts/{account_id}/members/{member_id}
AccountsRoles
List Roles
Deprecated
GET/accounts/{account_id}/roles
Role Details
Deprecated
GET/accounts/{account_id}/roles/{role_id}
AccountsSubscriptions
List Subscriptions
GET/{accounts_or_zones}/{account_or_zone_id}/subscriptions
Get Subscription
GET/accounts/{account_id}/subscriptions/{subscription_identifier}
Create Subscription
POST/{accounts_or_zones}/{account_or_zone_id}/subscriptions
Update Subscription
PUT/accounts/{account_id}/subscriptions/{subscription_identifier}
Delete Subscription
DELETE/accounts/{account_id}/subscriptions/{subscription_identifier}
Cancel Delayed Downgrade
POST/accounts/{account_id}/subscriptions/cancel-downgrade
AccountsSubscriptionsCancel Reason
Create Cancel Reason
POST/accounts/{account_id}/subscriptions/{subscription_identifier}/cancel-reason
Get Cancel Reason
GET/accounts/{account_id}/subscriptions/{subscription_identifier}/cancel-reason
AccountsSubscriptionsActions
Append Subscription Action
POST/accounts/{account_id}/subscriptions/{subscription_identifier}/action/append
AccountsSubscriptionsBulk
Create Subscriptions
POST/accounts/{account_id}/bulk/subscriptions
AccountsTokens
List Tokens
GET/accounts/{account_id}/tokens
Token Details
GET/accounts/{account_id}/tokens/{token_id}
Create Token
POST/accounts/{account_id}/tokens
Update Token
PUT/accounts/{account_id}/tokens/{token_id}
Delete Token
DELETE/accounts/{account_id}/tokens/{token_id}
Verify Token
GET/accounts/{account_id}/tokens/verify
AccountsTokensPermission Groups
List Permission Groups
GET/accounts/{account_id}/tokens/permission_groups
List Permission Groups
GET/accounts/{account_id}/tokens/permission_groups
AccountsTokensValue
Roll Token
PUT/accounts/{account_id}/tokens/{token_id}/value
AccountsLogs
AccountsLogsAudit
Get account audit logs (Version 2)
GET/accounts/{account_id}/logs/audit
Get resource change history from an account audit log entry (Version 2)
GET/accounts/{account_id}/logs/audit/{id}/history
List account audit log product categories (Version 2)
GET/accounts/{account_id}/logs/audit/product_categories
AccountsEntitlements
Get Account Entitlements
GET/accounts/{account_id}/entitlements
AccountsSpeed Settings
AccountsSpeed SettingsTransformations
List Image Resizing configurations for account
GET/accounts/{account_id}/settings/transformations
AccountsPayment Methods
List Payment Methods
GET/accounts/{account_id}/payment-methods
Create Payment Method
POST/accounts/{account_id}/payment-methods
Get Payment Method
GET/accounts/{account_id}/payment-methods/{payment_method_id}
Update Payment Method
PUT/accounts/{account_id}/payment-methods/{payment_method_id}
Delete Payment Method
DELETE/accounts/{account_id}/payment-methods/{payment_method_id}
Set Default Payment Method
POST/accounts/{account_id}/payment-methods/{payment_method_id}/set-as-default
AccountsPay Invoice
Pay Invoice
POST/accounts/{account_id}/pay-invoice
AccountsPay Bad Debt
AccountsReceipts
Get Receipt PDF
GET/accounts/{account_id}/receipts/{receipt_id}/pdf
AccountsInvoices
Toggle PDF Invoices
PATCH/accounts/{account_id}/invoices
AccountsClient Secret
Create Setup Intent
POST/accounts/{account_id}/client-secret
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
GET/organizations
Get organization
GET/organizations/{organization_id}
Create organization
POST/organizations
Update organization
PUT/organizations/{organization_id}
Delete organization
DELETE/organizations/{organization_id}
OrganizationsOrganization Accounts
List organization accounts
GET/organizations/{organization_id}/accounts
OrganizationsOrganization Profile
Get organization profile
GET/organizations/{organization_id}/profile
Modify organization profile.
PUT/organizations/{organization_id}/profile
OrganizationsMembers
List organization members
GET/organizations/{organization_id}/members
Get organization member
GET/organizations/{organization_id}/members/{member_id}
Create organization member
POST/organizations/{organization_id}/members
Delete organization member
DELETE/organizations/{organization_id}/members/{member_id}
OrganizationsLogs
OrganizationsLogsAudit
Get organization audit logs (Version 2)
GET/organizations/{organization_id}/logs/audit
Get resource change history from an organization audit log entry (Version 2)
GET/organizations/{organization_id}/logs/audit/{id}/history
OrganizationsBilling
OrganizationsBillingUsage
Get Organization Usage (Version 2, Alpha, Restricted)
GET/organizations/{organization_id}/billable/usage
Tenants
Get tenant details
GET/tenants/{tenant_id}
TenantsAccount Types
List tenant account types
GET/tenants/{tenant_id}/account_types
TenantsAccounts
List tenant accounts
GET/tenants/{tenant_id}/accounts
TenantsEntitlements
List tenant entitlements
GET/tenants/{tenant_id}/entitlements
TenantsMemberships
List tenant memberships
GET/tenants/{tenant_id}/memberships
Origin CA Certificates
List Certificates
GET/certificates
Get Certificate
GET/certificates/{certificate_id}
Create Certificate
POST/certificates
Revoke Certificate
DELETE/certificates/{certificate_id}
IPs
Cloudflare/JD Cloud IP Details
GET/ips
Memberships
List Memberships
GET/memberships
Membership Details
GET/memberships/{membership_id}
Update Membership
PUT/memberships/{membership_id}
Delete Membership
DELETE/memberships/{membership_id}
User
User Details
GET/user
Edit User
PATCH/user
UserAudit Logs
Get user audit logs
GET/user/audit_logs
UserBilling
UserBillingHistory
Billing History Details
Deprecated
GET/user/billing/history
UserBillingProfile
Billing Profile Details
Deprecated
GET/user/billing/profile
UserInvites
List Invitations
GET/user/invites
Invitation Details
GET/user/invites/{invite_id}
Respond to Invitation
PATCH/user/invites/{invite_id}
UserOrganizations
List Organizations
Deprecated
GET/user/organizations
Organization Details
Deprecated
GET/user/organizations/{organization_id}
Leave Organization
Deprecated
DELETE/user/organizations/{organization_id}
