Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions docs/content/2.client/22.user/00.index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---
title: User
description: "User endpoint reference."
navigation:
title: User
---

## Get

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

```php [php]
$response = $client->user()->get();
```

::callout{icon="i-simple-icons-cloudflare" to="https://developers.cloudflare.com/api/operations/user-user-details"}
View this operation on the Cloudflare API Reference
::

## Update

Edit part of your user details.

::params-table
---
params:
- name: "values"
type: "array"
required: false
description: "User values, e.g. first_name, last_name, telephone, country, zipcode."
default: "[]"
---
::

```php [php]
$response = $client->user()->update([]);
```

::callout{icon="i-simple-icons-cloudflare" to="https://developers.cloudflare.com/api/operations/user-edit-user"}
View this operation on the Cloudflare API Reference
::

## Related

- [Audit Logs](/client/user/audit-logs)
- [Invites](/client/user/invites)
- [Subscriptions](/client/user/subscriptions)
- [Tenants](/client/user/tenants)
- [Tokens](/client/user/tokens)

30 changes: 30 additions & 0 deletions docs/content/2.client/22.user/01.audit-logs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
title: Audit Logs
description: "Audit Logs endpoint reference."
navigation:
title: Audit Logs
---

## List

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.

::params-table
---
params:
- name: "params"
type: "array"
required: false
description: "Array containing the necessary params."
default: "[]"
---
::

```php [php]
$response = $client->user()->auditLogs()->list([]);
```

::callout{icon="i-simple-icons-cloudflare" to="https://developers.cloudflare.com/api/operations/audit-logs-get-user-audit-logs"}
View this operation on the Cloudflare API Reference
::

67 changes: 67 additions & 0 deletions docs/content/2.client/22.user/02.invites.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
---
title: Invites
description: "Invites endpoint reference."
navigation:
title: Invites
---

## List

Lists all invitations associated with my user.

```php [php]
$response = $client->user()->invites()->list();
```

::callout{icon="i-simple-icons-cloudflare" to="https://developers.cloudflare.com/api/operations/user's-invites-list-invitations"}
View this operation on the Cloudflare API Reference
::

## Get

Gets the details of an invitation.

::params-table
---
params:
- name: "inviteId"
type: "string"
required: true
description: "Invite identifier tag."
---
::

```php [php]
$response = $client->user()->invites()->get('INVITE_ID');
```

::callout{icon="i-simple-icons-cloudflare" to="https://developers.cloudflare.com/api/operations/user's-invites-invitation-details"}
View this operation on the Cloudflare API Reference
::

## Respond

Responds to an invitation.

::params-table
---
params:
- name: "inviteId"
type: "string"
required: true
description: "Invite identifier tag."
- name: "status"
type: "string"
required: true
description: "Status of the invitation, e.g. accepted, rejected."
---
::

```php [php]
$response = $client->user()->invites()->respond('INVITE_ID', 'STATUS');
```

::callout{icon="i-simple-icons-cloudflare" to="https://developers.cloudflare.com/api/operations/user's-invites-respond-to-invitation"}
View this operation on the Cloudflare API Reference
::

91 changes: 91 additions & 0 deletions docs/content/2.client/22.user/03.subscriptions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
---
title: Subscriptions
description: "Subscriptions endpoint reference."
navigation:
title: Subscriptions
---

## List

Lists all of a user's subscriptions.

```php [php]
$response = $client->user()->subscriptions()->list();
```

::callout{icon="i-simple-icons-cloudflare" to="https://developers.cloudflare.com/api/operations/user-subscription-get-user-subscriptions"}
View this operation on the Cloudflare API Reference
::

## Create

Creates a user subscription.

::params-table
---
params:
- name: "values"
type: "array"
required: false
description: "Subscription values, e.g. frequency, rate_plan."
default: "[]"
---
::

```php [php]
$response = $client->user()->subscriptions()->create([]);
```

::callout{icon="i-simple-icons-cloudflare" to="https://developers.cloudflare.com/api/operations/user-subscription-create-user-subscription"}
View this operation on the Cloudflare API Reference
::

## Update

Updates a user's subscription.

::params-table
---
params:
- name: "subscriptionId"
type: "string"
required: true
description: "Subscription identifier tag."
- name: "values"
type: "array"
required: false
description: "Subscription values, e.g. frequency, rate_plan."
default: "[]"
---
::

```php [php]
$response = $client->user()->subscriptions()->update('SUBSCRIPTION_ID', []);
```

::callout{icon="i-simple-icons-cloudflare" to="https://developers.cloudflare.com/api/operations/user-subscription-update-user-subscription"}
View this operation on the Cloudflare API Reference
::

## Delete

Deletes a user's subscription.

::params-table
---
params:
- name: "subscriptionId"
type: "string"
required: true
description: "Subscription identifier tag."
---
::

```php [php]
$response = $client->user()->subscriptions()->delete('SUBSCRIPTION_ID');
```

::callout{icon="i-simple-icons-cloudflare" to="https://developers.cloudflare.com/api/operations/user-subscription-delete-user-subscription"}
View this operation on the Cloudflare API Reference
::

19 changes: 19 additions & 0 deletions docs/content/2.client/22.user/04.tenants.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
title: Tenants
description: "Tenants endpoint reference."
navigation:
title: Tenants
---

## List

Retrieves list of tenants the authenticated user has access to.

```php [php]
$response = $client->user()->tenants()->list();
```

::callout{icon="i-simple-icons-cloudflare" to="https://developers.cloudflare.com/api/operations/User_listUserTenants"}
View this operation on the Cloudflare API Reference
::

Loading
Loading