PHP Client for Cloudflare API
Iam

User Groups

User Groups endpoint reference.

List

List all the user groups for an account.

ParamTypeRequiredDefaultDescription
accountIdstringYesAccount identifier.
paramsarrayNo[]Array containing the necessary params, e.g. id, name, fuzzyName.
php
$response = $client->iam()->userGroups()->list('ACCOUNT_ID', []);
View this operation on the Cloudflare API Reference

Create

Create a new user group under the specified account.

ParamTypeRequiredDefaultDescription
accountIdstringYesAccount identifier.
valuesarrayYesUser Group values, requires name.
php
$response = $client->iam()->userGroups()->create('ACCOUNT_ID', []);
View this operation on the Cloudflare API Reference

Get

Get information about a specific user group in an account.

ParamTypeRequiredDefaultDescription
accountIdstringYesAccount identifier.
userGroupIdstringYesUser Group identifier.
php
$response = $client->iam()->userGroups()->get('ACCOUNT_ID', 'USER_GROUP_ID');
View this operation on the Cloudflare API Reference

Update

Modify an existing user group.

ParamTypeRequiredDefaultDescription
accountIdstringYesAccount identifier.
userGroupIdstringYesUser Group identifier.
valuesarrayNo[]User Group values, e.g. name, policies.
php
$response = $client->iam()->userGroups()->update('ACCOUNT_ID', 'USER_GROUP_ID', []);
View this operation on the Cloudflare API Reference

Delete

Remove a user group from an account.

ParamTypeRequiredDefaultDescription
accountIdstringYesAccount identifier.
userGroupIdstringYesUser Group identifier.
php
$response = $client->iam()->userGroups()->delete('ACCOUNT_ID', 'USER_GROUP_ID');
View this operation on the Cloudflare API Reference
Copyright © 2026