User

user

Methods

User Details -> Envelope<{ id, betas, country, 11 more... }>
get/user

User Details

Edit User -> Envelope<{ id, betas, country, 11 more... }>
patch/user

Edit part of your user details.

User

Audit Logs

user.audit_logs

Methods

Get User Audit Logs -> V4PagePaginationArray<>
get/user/audit_logs

Gets a list of audit logs for a user account. Can be filtered by who made the change, on which zone, and the timeframe of the change.

Security

The preferred authorization scheme for interacting with the Cloudflare API. Create a token.

Example: Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY

Accepted Permissions (at least one required)

Account Settings Write Account Settings Read

query Parameters
id: string
Optional

Finds a specific log by its ID.

action: {
Optional
type: string
Optional

Filters by the action type.

}
actor: {
Optional
email: string
Optional
(format: email)

Filters by the email address of the actor that made the change.

ip: string
Optional

Filters by the IP address of the request that made the change by specific IP address or valid CIDR Range.

}
before:
Optional

Limits the returned results to logs older than the specified date. A full-date that conforms to RFC3339.

FullDate = string

Limits the returned results to logs older than the specified date. A full-date that conforms to RFC3339.

DateTime = string

Limits the returned results to logs older than the specified date. A date-time that conforms to RFC3339.

direction:
Optional
(default: "desc")

Changes the direction of the chronological sorting.

"desc"
"asc"
export: boolean
Optional

Indicates that this request is an export of logs in CSV format.

hide_user_logs: boolean
Optional

Indicates whether or not to hide user level audit logs.

page: number
Optional
(minimum: 1, default: 1)

Defines which page of results to return.

per_page: number
Optional
(maximum: 1000, minimum: 1, default: 100)

Sets the number of results to return per page.

since:
Optional

Limits the returned results to logs newer than the specified date. A full-date that conforms to RFC3339.

FullDate = string

Limits the returned results to logs newer than the specified date. A full-date that conforms to RFC3339.

DateTime = string

Limits the returned results to logs newer than the specified date. A date-time that conforms to RFC3339.

zone: {
Optional
name: string
Optional

Filters by the name of the zone associated to the change.

}
Response fields
UnionMember0 = { errors, messages, result, 1 more... }
AaaAPIResponseCommon = { errors, messages, success }
Request example
200Example
User

Billing

user.billing

user.billing.history

Methods

Billing History Details -> V4PagePaginationArray<>
Deprecated
get/user/billing/history

Accesses your billing history object.

Domain types

BillingHistory = { id, action, amount, 5 more... }

user.billing.profile

Methods

Billing Profile Details -> Envelope<{ id, account_type, address, 36 more... }>
Deprecated
get/user/billing/profile

Accesses your billing profile object.

User

Invites

user.invites

Methods

List Invitations -> SinglePage<>
get/user/invites

Lists all invitations associated with my user.

Invitation Details -> Envelope<>
get/user/invites/{invite_id}

Gets the details of an invitation.

Respond To Invitation -> Envelope<>
patch/user/invites/{invite_id}

Responds to an invitation.

Domain types

Invite = { invited_member_id, organization_id, id, 8 more... }
User

Organizations

user.organizations

Methods

List Organizations -> V4PagePaginationArray<>
Deprecated
get/user/organizations

Lists organizations the user is associated with.

Organization Details -> Envelope<unknown>
Deprecated
get/user/organizations/{organization_id}

Gets a specific organization the user is associated with.

Leave Organization -> { id }
Deprecated
delete/user/organizations/{organization_id}

Removes association to an organization.

Domain types

Organization = { id, name, permissions, 2 more... }
User

Subscriptions

user.subscriptions

Methods

Get User Subscriptions -> SinglePage<>
get/user/subscriptions

Lists all of a user's subscriptions.

Update User Subscription -> Envelope<unknown | string>
put/user/subscriptions/{identifier}

Updates a user's subscriptions.

Delete User Subscription -> { subscription_id }
delete/user/subscriptions/{identifier}

Deletes a user's subscription.

User

Tokens

user.tokens

Methods

List Tokens -> V4PagePaginationArray<>
get/user/tokens

List all access tokens you created.

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

Get information about a specific token.

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

Create a new access token.

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

Update an existing token.

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

Destroy a token.

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

Test whether a token works.

UserTokens

Permission Groups

user.tokens.permission_groups

Methods

List Token Permission Groups -> SinglePage<{ id, name, scopes }>
get/user/tokens/permission_groups

Find all available permission groups for API Tokens

user.tokens.value

Methods

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

Roll the token secret.