Skip to content
Start here

Remove User Group Member

client.iam.userGroups.members.delete(stringuserGroupId, stringmemberId, MemberDeleteParams { account_id } params, RequestOptionsoptions?): MemberDeleteResponse { id, email, status }
DELETE/accounts/{account_id}/iam/user_groups/{user_group_id}/members/{member_id}

Remove a member from User Group

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)
SCIM ProvisioningAccount Settings Write
ParametersExpand Collapse
userGroupId: string

User Group identifier tag.

maxLength32
minLength32
memberId: string

The identifier of an existing account Member.

maxLength32
minLength32
params: MemberDeleteParams { account_id }
account_id: string

Account identifier tag.

maxLength32
minLength32
ReturnsExpand Collapse
MemberDeleteResponse { id, email, status }

Member attached to a User Group.

id: string

Account member identifier.

email?: string

The contact email address of the user.

maxLength90
status?: "accepted" | "pending"

The member’s status in the account.

One of the following:
"accepted"
"pending"

Remove User Group Member

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 member = await client.iam.userGroups.members.delete(
  '023e105f4ecef8ad9ca31a8372d0c353',
  '023e105f4ecef8ad9ca31a8372d0c353',
  { account_id: '023e105f4ecef8ad9ca31a8372d0c353' },
);

console.log(member.id);
{
  "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": "4f5f0c14a2a41d5063dd301b2f829f04",
    "email": "user@example.com",
    "status": "accepted"
  }
}
Returns Examples
{
  "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": "4f5f0c14a2a41d5063dd301b2f829f04",
    "email": "user@example.com",
    "status": "accepted"
  }
}