Client Reference
Accounts
Accounts endpoint reference.
List
List all accounts you have ownership or verified access to.
| Param | Type | Required | Default | Description |
|---|---|---|---|---|
params | array | No | [] | Array containing the necessary params. |
php
$response = $client->accounts()->list([]);
Create
Create an account (only available for tenant admins at this time)
$client->accounts()->create([
'name' => 'Example Account',
'type' => 'standard',
]);
| Param | Type | Required | Default | Description |
|---|---|---|---|---|
values | array | Yes | `name` and `type` (`standard` for self-serve, `enterprise` otherwise) are required. `unit` optionally names the [tenant unit](https://developers.cloudflare.com/tenant/how-to/manage-accounts/) to create the account under, as `['id' => '…']`. |
php
$response = $client->accounts()->create([]);
Get
Get information about a specific account that you are a member of.
| Param | Type | Required | Default | Description |
|---|---|---|---|---|
accountId | string | Yes | Account identifier. |
php
$response = $client->accounts()->get('ACCOUNT_ID');
Update
Update an existing account.
| Param | Type | Required | Default | Description |
|---|---|---|---|---|
accountId | string | Yes | Account identifier. | |
values | array | Yes | `name` is required; `settings` is optional. |
php
$response = $client->accounts()->update('ACCOUNT_ID', []);
Delete
Delete a specific account (only available for tenant admins at this time). This is a permanent operation that will delete any zones or other resources under the account
| Param | Type | Required | Default | Description |
|---|---|---|---|---|
accountId | string | Yes | Account identifier. |
php
$response = $client->accounts()->delete('ACCOUNT_ID');
Profile
Get account profile.
| Param | Type | Required | Default | Description |
|---|---|---|---|---|
accountId | string | Yes | Account identifier. |
php
$response = $client->accounts()->profile('ACCOUNT_ID');
Update Profile
Modify account profile.
| Param | Type | Required | Default | Description |
|---|---|---|---|---|
accountId | string | Yes | Account identifier. | |
values | array | No | [] | Account profile values. |
php
$response = $client->accounts()->updateProfile('ACCOUNT_ID', []);
Organizations
List account organizations.
| Param | Type | Required | Default | Description |
|---|---|---|---|---|
accountId | string | Yes | Account identifier. |
php
$response = $client->accounts()->organizations('ACCOUNT_ID');
Move
Move an account within an organization hierarchy, or out of one.
$client->accounts()->move('ACCOUNT_ID', 'ORGANIZATION_ID');
| Param | Type | Required | Default | Description |
|---|---|---|---|---|
accountId | string | Yes | Account identifier. | |
destinationOrganizationId | string | Yes | Organization to move the account to. |
php
$response = $client->accounts()->move('ACCOUNT_ID', 'DESTINATION_ORGANIZATION_ID');

