Skip to content
Start here

Users

Get users
client.zeroTrust.access.users.list(UserListParams { account_id, email, name, 3 more } params, RequestOptionsoptions?): V4PagePaginationArray<UserListResponse { id, access_seat, active_device_count, 8 more } >
GET/accounts/{account_id}/access/users
Get a user
client.zeroTrust.access.users.get(stringuserId, UserGetParams { account_id } params, RequestOptionsoptions?): UserGetResponse { id, access_seat, active_device_count, 8 more }
GET/accounts/{account_id}/access/users/{user_id}
Create a user
client.zeroTrust.access.users.create(UserCreateParams { account_id, email, name } params, RequestOptionsoptions?): UserCreateResponse { id, access_seat, active_device_count, 8 more }
POST/accounts/{account_id}/access/users
Update a user
client.zeroTrust.access.users.update(stringuserId, UserUpdateParams { account_id, email, name } params, RequestOptionsoptions?): UserUpdateResponse { id, access_seat, active_device_count, 8 more }
PUT/accounts/{account_id}/access/users/{user_id}
Delete a user
client.zeroTrust.access.users.delete(stringuserId, UserDeleteParams { account_id } params, RequestOptionsoptions?): UserDeleteResponse | null
DELETE/accounts/{account_id}/access/users/{user_id}
ModelsExpand Collapse
AccessUser { id, active, displayName, 4 more }
id?: string

The unique Cloudflare-generated Id of the SCIM resource.

active?: boolean

Determines the status of the SCIM User resource.

displayName?: string

The name of the SCIM User resource.

emails?: Array<Email>
primary?: boolean

Indicates if the email address is the primary email belonging to the SCIM User resource.

type?: string

Indicates the type of the email address.

value?: string

The email address of the SCIM User resource.

formatemail
externalId?: string

The IdP-generated Id of the SCIM resource.

meta?: Meta { created, lastModified }

The metadata of the SCIM resource.

created?: string

The timestamp of when the SCIM resource was created.

formatdate-time
lastModified?: string

The timestamp of when the SCIM resource was last modified.

formatdate-time
schemas?: Array<string>

The list of URIs which indicate the attributes contained within a SCIM resource.

UserListResponse { id, access_seat, active_device_count, 8 more }
id?: string

UUID.

maxLength36
access_seat?: boolean

True if the user has authenticated with Cloudflare Access.

active_device_count?: number

The number of active devices registered to the user.

created_at?: string
formatdate-time
email?: string

The email of the user.

formatemail
gateway_seat?: boolean

True if the user has logged into the WARP client.

last_successful_login?: string

The time at which the user last successfully logged in.

formatdate-time
name?: string

The name of the user.

seat_uid?: string

The unique API identifier for the Zero Trust seat.

uid?: string

The unique API identifier for the user.

updated_at?: string
formatdate-time
UserGetResponse { id, access_seat, active_device_count, 8 more }
id?: string

UUID.

maxLength36
access_seat?: boolean

True if the user has authenticated with Cloudflare Access.

active_device_count?: number

The number of active devices registered to the user.

created_at?: string
formatdate-time
email?: string

The email of the user.

formatemail
gateway_seat?: boolean

True if the user has logged into the WARP client.

last_successful_login?: string

The time at which the user last successfully logged in.

formatdate-time
name?: string

The name of the user.

seat_uid?: string

The unique API identifier for the Zero Trust seat.

uid?: string

The unique API identifier for the user.

updated_at?: string
formatdate-time
UserCreateResponse { id, access_seat, active_device_count, 8 more }
id?: string

UUID.

maxLength36
access_seat?: boolean

True if the user has authenticated with Cloudflare Access.

active_device_count?: number

The number of active devices registered to the user.

created_at?: string
formatdate-time
email?: string

The email of the user.

formatemail
gateway_seat?: boolean

True if the user has logged into the WARP client.

last_successful_login?: string

The time at which the user last successfully logged in.

formatdate-time
name?: string

The name of the user.

seat_uid?: string

The unique API identifier for the Zero Trust seat.

uid?: string

The unique API identifier for the user.

updated_at?: string
formatdate-time
UserUpdateResponse { id, access_seat, active_device_count, 8 more }
id?: string

UUID.

maxLength36
access_seat?: boolean

True if the user has authenticated with Cloudflare Access.

active_device_count?: number

The number of active devices registered to the user.

created_at?: string
formatdate-time
email?: string

The email of the user.

formatemail
gateway_seat?: boolean

True if the user has logged into the WARP client.

last_successful_login?: string

The time at which the user last successfully logged in.

formatdate-time
name?: string

The name of the user.

seat_uid?: string

The unique API identifier for the Zero Trust seat.

uid?: string

The unique API identifier for the user.

updated_at?: string
formatdate-time
UserDeleteResponse = unknown

UsersActive Sessions

Get active sessions
client.zeroTrust.access.users.activeSessions.list(stringuserId, ActiveSessionListParams { account_id } params, RequestOptionsoptions?): SinglePage<ActiveSessionListResponse { expiration, metadata, name } >
GET/accounts/{account_id}/access/users/{user_id}/active_sessions
Get single active session
client.zeroTrust.access.users.activeSessions.get(stringuserId, stringnonce, ActiveSessionGetParams { account_id } params, RequestOptionsoptions?): ActiveSessionGetResponse { account_id, auth_status, common_name, 16 more }
GET/accounts/{account_id}/access/users/{user_id}/active_sessions/{nonce}
ModelsExpand Collapse
ActiveSessionListResponse { expiration, metadata, name }
expiration?: number
metadata?: Metadata { apps, expires, iat, 2 more }
apps?: Record<string, Apps>
hostname?: string
name?: string
type?: string
uid?: string
expires?: number
iat?: number
nonce?: string
ttl?: number
name?: string
ActiveSessionGetResponse { account_id, auth_status, common_name, 16 more }
account_id?: string
auth_status?: string
common_name?: string
device_id?: string
device_sessions?: Record<string, DeviceSessions>
last_authenticated?: number
devicePosture?: Record<string, DevicePosture>
id?: string
check?: Check { exists, path }
exists?: boolean
path?: string
data?: unknown
description?: string
error?: string
rule_name?: string
success?: boolean
timestamp?: string
type?: string
email?: string
geo?: UserPolicyCheckGeo { country }
iat?: number
idp?: IdP { id, type }
id?: string
type?: string
ip?: string
is_gateway?: boolean
is_warp?: boolean
isActive?: boolean
mtls_auth?: MTLSAuth { auth_status, cert_issuer_dn, cert_issuer_ski, 2 more }
auth_status?: string
cert_issuer_dn?: string
cert_issuer_ski?: string
cert_presented?: boolean
cert_serial?: string
service_token_id?: string
service_token_status?: boolean
user_uuid?: string
version?: number

UsersLast Seen Identity

Get last seen identity
client.zeroTrust.access.users.lastSeenIdentity.get(stringuserId, LastSeenIdentityGetParams { account_id } params, RequestOptionsoptions?): Identity { account_id, auth_status, common_name, 15 more }
GET/accounts/{account_id}/access/users/{user_id}/last_seen_identity
ModelsExpand Collapse
Identity { account_id, auth_status, common_name, 15 more }
account_id?: string
auth_status?: string
common_name?: string
device_id?: string
device_sessions?: Record<string, DeviceSessions>
last_authenticated?: number
devicePosture?: Record<string, DevicePosture>
id?: string
check?: Check { exists, path }
exists?: boolean
path?: string
data?: unknown
description?: string
error?: string
rule_name?: string
success?: boolean
timestamp?: string
type?: string
email?: string
geo?: UserPolicyCheckGeo { country }
iat?: number
idp?: IdP { id, type }
id?: string
type?: string
ip?: string
is_gateway?: boolean
is_warp?: boolean
mtls_auth?: MTLSAuth { auth_status, cert_issuer_dn, cert_issuer_ski, 2 more }
auth_status?: string
cert_issuer_dn?: string
cert_issuer_ski?: string
cert_presented?: boolean
cert_serial?: string
service_token_id?: string
service_token_status?: boolean
user_uuid?: string
version?: number

UsersFailed Logins

Get failed logins
client.zeroTrust.access.users.failedLogins.list(stringuserId, FailedLoginListParams { account_id } params, RequestOptionsoptions?): SinglePage<FailedLoginListResponse { expiration, metadata } >
GET/accounts/{account_id}/access/users/{user_id}/failed_logins
ModelsExpand Collapse
FailedLoginListResponse { expiration, metadata }
expiration?: number
metadata?: unknown