---
title: User Details
---

[Skip to content](#_top)

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

[User](https://developers.cloudflare.com/api/typescript/resources/user)

Copy Markdown

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

---

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

# User Details

client.user.get(RequestOptionsoptions?): [UserGetResponse](<https://developers.cloudflare.com/api/typescript/resources/user#(resource)%20user%20%3E%20(model)%20user_get_response%20%3E%20(schema)>) {id, email, betas, 12 more }

GET/user

Retrieves detailed information about the currently authenticated user, including email, name, and account memberships.

##### 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)

`User Details Write``User Details Read`

##### ReturnsExpand Collapse

<details>

<summary>

UserGetResponse {id, email, betas, 12 more }

</summary>

id: string

Identifier of the user.

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

email: string

Current email address of the user.

formatemail

<a href="#(resource)%20user%20%3E%20(model)%20user_get_response%20%3E%20(schema)%20%3E%20(property)%20email">Link to this property</a>

betas?: Array&lt;string&gt;

Lists the betas that the user is participating in.

<a href="#(resource)%20user%20%3E%20(model)%20user_get_response%20%3E%20(schema)%20%3E%20(property)%20betas">Link to this property</a>

country?: string| null

The country in which the user lives.

maxLength30

<a href="#(resource)%20user%20%3E%20(model)%20user_get_response%20%3E%20(schema)%20%3E%20(property)%20country">Link to this property</a>

first\_name?: string| null

User’s first name

maxLength60

<a href="#(resource)%20user%20%3E%20(model)%20user_get_response%20%3E%20(schema)%20%3E%20(property)%20first_name">Link to this property</a>

has\_business\_zones?: boolean

Indicates whether user has any business zones

<a href="#(resource)%20user%20%3E%20(model)%20user_get_response%20%3E%20(schema)%20%3E%20(property)%20has_business_zones">Link to this property</a>

has\_enterprise\_zones?: boolean

Indicates whether user has any enterprise zones

<a href="#(resource)%20user%20%3E%20(model)%20user_get_response%20%3E%20(schema)%20%3E%20(property)%20has_enterprise_zones">Link to this property</a>

has\_pro\_zones?: boolean

Indicates whether user has any pro zones

<a href="#(resource)%20user%20%3E%20(model)%20user_get_response%20%3E%20(schema)%20%3E%20(property)%20has_pro_zones">Link to this property</a>

last\_name?: string| null

User’s last name

maxLength60

<a href="#(resource)%20user%20%3E%20(model)%20user_get_response%20%3E%20(schema)%20%3E%20(property)%20last_name">Link to this property</a>

<details>

<summary>

organizations?: Array&lt;<a href="https://developers.cloudflare.com/api/typescript/resources/user#(resource)%20user.organizations%20%3E%20(model)%20organization%20%3E%20(schema)">Organization</a> {id, name, permissions, 2 more } &gt;

</summary>

id?: string

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?: string

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?: Array&lt;<a href="https://developers.cloudflare.com/api/typescript/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20permission%20%3E%20(schema)">Permission</a>&gt;

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?: Array&lt;string&gt;

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>

<details>

<summary>

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

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

</summary>

One of the following:

"member"

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

"invited"

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

</details>

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

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

suspended?: boolean

Indicates whether user has been suspended

<a href="#(resource)%20user%20%3E%20(model)%20user_get_response%20%3E%20(schema)%20%3E%20(property)%20suspended">Link to this property</a>

telephone?: string| null

User’s telephone number

maxLength20

<a href="#(resource)%20user%20%3E%20(model)%20user_get_response%20%3E%20(schema)%20%3E%20(property)%20telephone">Link to this property</a>

two\_factor\_authentication\_enabled?: boolean

Indicates whether two-factor authentication is enabled for the user account. Does not apply to API authentication.

<a href="#(resource)%20user%20%3E%20(model)%20user_get_response%20%3E%20(schema)%20%3E%20(property)%20two_factor_authentication_enabled">Link to this property</a>

two\_factor\_authentication\_locked?: boolean

Indicates whether two-factor authentication is required by one of the accounts that the user is a member of.

<a href="#(resource)%20user%20%3E%20(model)%20user_get_response%20%3E%20(schema)%20%3E%20(property)%20two_factor_authentication_locked">Link to this property</a>

zipcode?: string| null

The zipcode or postal code where the user lives.

maxLength20

<a href="#(resource)%20user%20%3E%20(model)%20user_get_response%20%3E%20(schema)%20%3E%20(property)%20zipcode">Link to this property</a>

</details>

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

### User Details

TypeScript

HTTPTypeScriptPythonGoTerraform

```
import Cloudflare from 'cloudflare';

const client = new Cloudflare({
  apiEmail: process.env['CLOUDFLARE_EMAIL'], // This is the default and can be omitted
  apiKey: process.env['CLOUDFLARE_API_KEY'], // This is the default and can be omitted
});

const user = await client.user.get();

console.log(user.id);
```

200 example

```
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "success": true,
  "result": {
    "id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1",
    "email": "alice@example.com",
    "betas": [
      "zone_level_access_beta"
    ],
    "country": "US",
    "first_name": "John",
    "has_business_zones": true,
    "has_enterprise_zones": true,
    "has_pro_zones": true,
    "last_name": "Appleseed",
    "organizations": [
      {
        "id": "023e105f4ecef8ad9ca31a8372d0c353",
        "name": "Cloudflare, Inc.",
        "permissions": [
          "#zones:read"
        ],
        "roles": [
          "All Privileges - Super Administrator"
        ],
        "status": "member"
      }
    ],
    "suspended": true,
    "telephone": "+1 123-123-1234",
    "two_factor_authentication_enabled": true,
    "two_factor_authentication_locked": true,
    "zipcode": "12345"
  }
}
```

##### Returns Examples

200 example

```
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "success": true,
  "result": {
    "id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1",
    "email": "alice@example.com",
    "betas": [
      "zone_level_access_beta"
    ],
    "country": "US",
    "first_name": "John",
    "has_business_zones": true,
    "has_enterprise_zones": true,
    "has_pro_zones": true,
    "last_name": "Appleseed",
    "organizations": [
      {
        "id": "023e105f4ecef8ad9ca31a8372d0c353",
        "name": "Cloudflare, Inc.",
        "permissions": [
          "#zones:read"
        ],
        "roles": [
          "All Privileges - Super Administrator"
        ],
        "status": "member"
      }
    ],
    "suspended": true,
    "telephone": "+1 123-123-1234",
    "two_factor_authentication_enabled": true,
    "two_factor_authentication_locked": true,
    "zipcode": "12345"
  }
}
```