---
title: User
---

[Skip to content](#_top)

[API Reference](https://developers.cloudflare.com/api/go)

Copy Markdown

Open in **Claude**Open in **ChatGPT**Open in **Cursor**

---

**Copy Markdown****View as Markdown**

# User

##### [User Details](https://developers.cloudflare.com/api/go/resources/user/methods/get)

client.User.Get(ctx) (\*[UserGetResponse](<https://developers.cloudflare.com/api/go/resources/user#(resource)%20user%20%3E%20(model)%20UserGetResponse%20%3E%20(schema)>), error)

GET/user

##### [Edit User](https://developers.cloudflare.com/api/go/resources/user/methods/edit)

client.User.Edit(ctx, body) (\*[UserEditResponse](<https://developers.cloudflare.com/api/go/resources/user#(resource)%20user%20%3E%20(model)%20UserEditResponse%20%3E%20(schema)>), error)

PATCH/user

#### UserAudit Logs

##### [Get user audit logs](https://developers.cloudflare.com/api/go/resources/user/subresources/audit_logs/methods/list)

client.User.AuditLogs.List(ctx, query) (\*V4PagePaginationArray\[[AuditLog](<https://developers.cloudflare.com/api/go/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20audit_log%20%3E%20(schema)>)], error)

GET/user/audit\_logs

#### UserBilling

#### UserBillingHistory

##### [Billing History Details](https://developers.cloudflare.com/api/go/resources/user/subresources/billing/subresources/history/methods/list)

Deprecated

client.User.Billing.History.List(ctx, query) (\*V4PagePaginationArray\[[BillingHistory](<https://developers.cloudflare.com/api/go/resources/user#(resource)%20user.billing.history%20%3E%20(model)%20billing_history%20%3E%20(schema)>)], error)

GET/user/billing/history

##### ModelsExpand Collapse

<details>

<summary>

type BillingHistory struct{…}

</summary>

ID string

Billing item identifier tag.

maxLength32

<a href="#(resource)%20user.billing.history%20%3E%20(model)%20billing_history%20%3E%20(schema)%20%3E%20(property)%20id">Link to this property</a>

Action string

The billing item action.

maxLength30

<a href="#(resource)%20user.billing.history%20%3E%20(model)%20billing_history%20%3E%20(schema)%20%3E%20(property)%20action">Link to this property</a>

Amount float64

The amount associated with this billing item.

<a href="#(resource)%20user.billing.history%20%3E%20(model)%20billing_history%20%3E%20(schema)%20%3E%20(property)%20amount">Link to this property</a>

Currency string

The monetary unit in which pricing information is displayed.

<a href="#(resource)%20user.billing.history%20%3E%20(model)%20billing_history%20%3E%20(schema)%20%3E%20(property)%20currency">Link to this property</a>

Description string

The billing item description.

maxLength255

<a href="#(resource)%20user.billing.history%20%3E%20(model)%20billing_history%20%3E%20(schema)%20%3E%20(property)%20description">Link to this property</a>

OccurredAt Time

When the billing item was created.

formatdate-time

<a href="#(resource)%20user.billing.history%20%3E%20(model)%20billing_history%20%3E%20(schema)%20%3E%20(property)%20occurred_at">Link to this property</a>

Type string

The billing item type.

maxLength30

<a href="#(resource)%20user.billing.history%20%3E%20(model)%20billing_history%20%3E%20(schema)%20%3E%20(property)%20type">Link to this property</a>

<details>

<summary>

Zone BillingHistoryZone

</summary>

Name stringOptional

<a href="#(resource)%20user.billing.history%20%3E%20(model)%20billing_history%20%3E%20(schema)%20%3E%20(property)%20zone%20%3E%20(property)%20name">Link to this property</a>

</details>

<a href="#(resource)%20user.billing.history%20%3E%20(model)%20billing_history%20%3E%20(schema)%20%3E%20(property)%20zone">Link to this property</a>

</details>

[Link to this property](<#(resource)%20user.billing.history%20%3E%20(model)%20billing_history%20%3E%20(schema)>)

#### UserBillingProfile

##### [Billing Profile Details](https://developers.cloudflare.com/api/go/resources/user/subresources/billing/subresources/profile/methods/get)

Deprecated

client.User.Billing.Profile.Get(ctx) (\*[BillingProfileGetResponse](<https://developers.cloudflare.com/api/go/resources/user#(resource)%20user.billing.profile%20%3E%20(model)%20BillingProfileGetResponse%20%3E%20(schema)>), error)

GET/user/billing/profile

#### UserInvites

##### [List Invitations](https://developers.cloudflare.com/api/go/resources/user/subresources/invites/methods/list)

client.User.Invites.List(ctx) (\*SinglePage\[[Invite](<https://developers.cloudflare.com/api/go/resources/user#(resource)%20user.invites%20%3E%20(model)%20invite%20%3E%20(schema)>)], error)

GET/user/invites

##### [Invitation Details](https://developers.cloudflare.com/api/go/resources/user/subresources/invites/methods/get)

client.User.Invites.Get(ctx, inviteID) (\*[Invite](<https://developers.cloudflare.com/api/go/resources/user#(resource)%20user.invites%20%3E%20(model)%20invite%20%3E%20(schema)>), error)

GET/user/invites/{invite\_id}

##### [Respond to Invitation](https://developers.cloudflare.com/api/go/resources/user/subresources/invites/methods/edit)

client.User.Invites.Edit(ctx, inviteID, body) (\*[Invite](<https://developers.cloudflare.com/api/go/resources/user#(resource)%20user.invites%20%3E%20(model)%20invite%20%3E%20(schema)>), error)

PATCH/user/invites/{invite\_id}

##### ModelsExpand Collapse

<details>

<summary>

type Invite struct{…}

</summary>

InvitedMemberID string

ID of the user to add to the organization.

maxLength32

<a href="#(resource)%20user.invites%20%3E%20(model)%20invite%20%3E%20(schema)%20%3E%20(property)%20invited_member_id">Link to this property</a>

OrganizationID string

ID of the organization the user will be added to.

maxLength32

<a href="#(resource)%20user.invites%20%3E%20(model)%20invite%20%3E%20(schema)%20%3E%20(property)%20organization_id">Link to this property</a>

ID stringOptional

Invite identifier tag.

maxLength32

<a href="#(resource)%20user.invites%20%3E%20(model)%20invite%20%3E%20(schema)%20%3E%20(property)%20id">Link to this property</a>

ExpiresOn TimeOptional

When the invite is no longer active.

formatdate-time

<a href="#(resource)%20user.invites%20%3E%20(model)%20invite%20%3E%20(schema)%20%3E%20(property)%20expires_on">Link to this property</a>

InvitedBy stringOptional

The email address of the user who created the invite.

maxLength90

<a href="#(resource)%20user.invites%20%3E%20(model)%20invite%20%3E%20(schema)%20%3E%20(property)%20invited_by">Link to this property</a>

InvitedMemberEmail stringOptional

Email address of the user to add to the organization.

maxLength90

<a href="#(resource)%20user.invites%20%3E%20(model)%20invite%20%3E%20(schema)%20%3E%20(property)%20invited_member_email">Link to this property</a>

InvitedOn TimeOptional

When the invite was sent.

formatdate-time

<a href="#(resource)%20user.invites%20%3E%20(model)%20invite%20%3E%20(schema)%20%3E%20(property)%20invited_on">Link to this property</a>

OrganizationIsEnforcingTwofactor boolOptional

<a href="#(resource)%20user.invites%20%3E%20(model)%20invite%20%3E%20(schema)%20%3E%20(property)%20organization_is_enforcing_twofactor">Link to this property</a>

OrganizationName stringOptional

Organization name.

maxLength100

<a href="#(resource)%20user.invites%20%3E%20(model)%20invite%20%3E%20(schema)%20%3E%20(property)%20organization_name">Link to this property</a>

Roles \[]stringOptional

List of role names the membership has for this account.

<a href="#(resource)%20user.invites%20%3E%20(model)%20invite%20%3E%20(schema)%20%3E%20(property)%20roles">Link to this property</a>

<details>

<summary>

Status InviteStatusOptional

Current status of the invitation.

</summary>

One of the following:

const InviteStatusPending InviteStatus = "pending"

<a href="#(resource)%20user.invites%20%3E%20(model)%20invite%20%3E%20(schema)%20%3E%20(property)%20status%20%3E%20(member)%200">Link to this property</a>

const InviteStatusAccepted InviteStatus = "accepted"

<a href="#(resource)%20user.invites%20%3E%20(model)%20invite%20%3E%20(schema)%20%3E%20(property)%20status%20%3E%20(member)%201">Link to this property</a>

const InviteStatusRejected InviteStatus = "rejected"

<a href="#(resource)%20user.invites%20%3E%20(model)%20invite%20%3E%20(schema)%20%3E%20(property)%20status%20%3E%20(member)%202">Link to this property</a>

const InviteStatusExpired InviteStatus = "expired"

<a href="#(resource)%20user.invites%20%3E%20(model)%20invite%20%3E%20(schema)%20%3E%20(property)%20status%20%3E%20(member)%203">Link to this property</a>

</details>

<a href="#(resource)%20user.invites%20%3E%20(model)%20invite%20%3E%20(schema)%20%3E%20(property)%20status">Link to this property</a>

</details>

[Link to this property](<#(resource)%20user.invites%20%3E%20(model)%20invite%20%3E%20(schema)>)

#### UserOrganizations

##### [List Organizations](https://developers.cloudflare.com/api/go/resources/user/subresources/organizations/methods/list)

Deprecated

client.User.Organizations.List(ctx, query) (\*V4PagePaginationArray\[[Organization](<https://developers.cloudflare.com/api/go/resources/user#(resource)%20user.organizations%20%3E%20(model)%20organization%20%3E%20(schema)>)], error)

GET/user/organizations

##### [Organization Details](https://developers.cloudflare.com/api/go/resources/user/subresources/organizations/methods/get)

Deprecated

client.User.Organizations.Get(ctx, organizationID) (\*[OrganizationGetResponse](<https://developers.cloudflare.com/api/go/resources/user#(resource)%20user.organizations%20%3E%20(model)%20OrganizationGetResponse%20%3E%20(schema)>), error)

GET/user/organizations/{organization\_id}

##### [Leave Organization](https://developers.cloudflare.com/api/go/resources/user/subresources/organizations/methods/delete)

Deprecated

client.User.Organizations.Delete(ctx, organizationID) (\*[OrganizationDeleteResponse](<https://developers.cloudflare.com/api/go/resources/user#(resource)%20user.organizations%20%3E%20(model)%20OrganizationDeleteResponse%20%3E%20(schema)>), error)

DELETE/user/organizations/{organization\_id}

##### ModelsExpand Collapse

<details>

<summary>

type Organization struct{…}

</summary>

ID stringOptional

Identifier

maxLength32

minLength32

<a href="#(resource)%20user.organizations%20%3E%20(model)%20organization%20%3E%20(schema)%20%3E%20(property)%20id">Link to this property</a>

Name stringOptional

Organization name.

maxLength100

<a href="#(resource)%20user.organizations%20%3E%20(model)%20organization%20%3E%20(schema)%20%3E%20(property)%20name">Link to this property</a>

Permissions \[]<a href="https://developers.cloudflare.com/api/go/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20permission%20%3E%20(schema)">Permission</a>Optional

Access permissions for this User.

<a href="#(resource)%20user.organizations%20%3E%20(model)%20organization%20%3E%20(schema)%20%3E%20(property)%20permissions">Link to this property</a>

Roles \[]stringOptional

List of roles that a user has within an organization.

<a href="#(resource)%20user.organizations%20%3E%20(model)%20organization%20%3E%20(schema)%20%3E%20(property)%20roles">Link to this property</a>

Status <a href="https://developers.cloudflare.com/api/go/resources/accounts#(resource)%20accounts.members%20%3E%20(model)%20status%20%3E%20(schema)">Status</a>Optional

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

<a href="#(resource)%20user.organizations%20%3E%20(model)%20organization%20%3E%20(schema)%20%3E%20(property)%20status">Link to this property</a>

</details>

[Link to this property](<#(resource)%20user.organizations%20%3E%20(model)%20organization%20%3E%20(schema)>)

#### UserSpectrum Analytics

#### UserSpectrum AnalyticsZones

#### UserSpectrum AnalyticsZonesReports

##### [Get zones bandwidth report](https://developers.cloudflare.com/api/go/resources/user/subresources/spectrum_analytics/subresources/zones/subresources/reports/methods/get)

client.User.SpectrumAnalytics.Zones.Reports.Get(ctx, query) (\*\[] [SpectrumAnalyticsZoneReportGetResponse](<https://developers.cloudflare.com/api/go/resources/user#(resource)%20user.spectrum_analytics.zones.reports%20%3E%20(model)%20SpectrumAnalyticsZoneReportGetResponse%20%3E%20(schema)>), error)

GET/user/spectrum\_analytics/zones/report

#### UserSubscriptions

##### [Get User Subscriptions](https://developers.cloudflare.com/api/go/resources/user/subresources/subscriptions/methods/get)

client.User.Subscriptions.Get(ctx) (\*SinglePage\[[Subscription](<https://developers.cloudflare.com/api/go/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20subscription%20%3E%20(schema)>)], error)

GET/user/subscriptions

##### [Update User Subscription](https://developers.cloudflare.com/api/go/resources/user/subresources/subscriptions/methods/update)

client.User.Subscriptions.Update(ctx, identifier, body) (\*unknown, error)

PUT/user/subscriptions/{identifier}

##### [Delete User Subscription](https://developers.cloudflare.com/api/go/resources/user/subresources/subscriptions/methods/delete)

client.User.Subscriptions.Delete(ctx, identifier) (\*[SubscriptionDeleteResponse](<https://developers.cloudflare.com/api/go/resources/user#(resource)%20user.subscriptions%20%3E%20(model)%20SubscriptionDeleteResponse%20%3E%20(schema)>), error)

DELETE/user/subscriptions/{identifier}

#### UserTenants

##### [List user tenants](https://developers.cloudflare.com/api/go/resources/user/subresources/tenants/methods/list)

client.User.Tenants.List(ctx) (\*SinglePage\[[Organization](<https://developers.cloudflare.com/api/go/resources/organizations#(resource)%20organizations%20%3E%20(model)%20organization%20%3E%20(schema)>)], error)

GET/user/tenants

#### UserTokens

##### [List Tokens](https://developers.cloudflare.com/api/go/resources/user/subresources/tokens/methods/list)

client.User.Tokens.List(ctx, query) (\*V4PagePaginationArray\[[Token](<https://developers.cloudflare.com/api/go/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20token%20%3E%20(schema)>)], error)

GET/user/tokens

##### [Token Details](https://developers.cloudflare.com/api/go/resources/user/subresources/tokens/methods/get)

client.User.Tokens.Get(ctx, tokenID) (\*[Token](<https://developers.cloudflare.com/api/go/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20token%20%3E%20(schema)>), error)

GET/user/tokens/{token\_id}

##### [Create Token](https://developers.cloudflare.com/api/go/resources/user/subresources/tokens/methods/create)

client.User.Tokens.New(ctx, body) (\*[TokenNewResponse](<https://developers.cloudflare.com/api/go/resources/user#(resource)%20user.tokens%20%3E%20(model)%20TokenNewResponse%20%3E%20(schema)>), error)

POST/user/tokens

##### [Update Token](https://developers.cloudflare.com/api/go/resources/user/subresources/tokens/methods/update)

client.User.Tokens.Update(ctx, tokenID, body) (\*[Token](<https://developers.cloudflare.com/api/go/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20token%20%3E%20(schema)>), error)

PUT/user/tokens/{token\_id}

##### [Delete Token](https://developers.cloudflare.com/api/go/resources/user/subresources/tokens/methods/delete)

client.User.Tokens.Delete(ctx, tokenID) (\*[TokenDeleteResponse](<https://developers.cloudflare.com/api/go/resources/user#(resource)%20user.tokens%20%3E%20(model)%20TokenDeleteResponse%20%3E%20(schema)>), error)

DELETE/user/tokens/{token\_id}

##### [Verify Token](https://developers.cloudflare.com/api/go/resources/user/subresources/tokens/methods/verify)

client.User.Tokens.Verify(ctx) (\*[TokenVerifyResponse](<https://developers.cloudflare.com/api/go/resources/user#(resource)%20user.tokens%20%3E%20(model)%20TokenVerifyResponse%20%3E%20(schema)>), error)

GET/user/tokens/verify

#### UserTokensPermission Groups

##### [List Token Permission Groups](https://developers.cloudflare.com/api/go/resources/user/subresources/tokens/subresources/permission_groups/methods/list)

client.User.Tokens.PermissionGroups.List(ctx, query) (\*SinglePage\[[TokenPermissionGroupListResponse](<https://developers.cloudflare.com/api/go/resources/user#(resource)%20user.tokens.permission_groups%20%3E%20(model)%20TokenPermissionGroupListResponse%20%3E%20(schema)>)], error)

GET/user/tokens/permission\_groups

#### UserTokensValue

##### [Roll Token](https://developers.cloudflare.com/api/go/resources/user/subresources/tokens/subresources/value/methods/update)

client.User.Tokens.Value.Update(ctx, tokenID) (\*[TokenValue](<https://developers.cloudflare.com/api/go/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20token_value%20%3E%20(schema)>), error)

PUT/user/tokens/{token\_id}/value