> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# PFGroupsCreateGroupRoleRequest

> PFGroupsCreateGroupRoleRequest data model. Creates a new role within an existing group, with no members. Both the role ID and role name must be unique within.

PFGroupsCreateGroupRoleRequest data model. Creates a new role within an existing group, with no members. Both the role ID and role name must be unique within the group, but the name can be the same as the ID. The role ID is set at creation and cannot be changed. Returns information about the role that was created.

## Syntax

```cpp theme={null}
typedef struct PFGroupsCreateGroupRoleRequest {  
    PFStringDictionaryEntry const* customTags;  
    uint32_t customTagsCount;  
    PFEntityKey const* group;  
    const char* roleId;  
    const char* roleName;  
} PFGroupsCreateGroupRoleRequest;  
```

### Members

**`customTags`**   [PFStringDictionaryEntry](/services/playfab/api-references/c/pftypes/structs/pfstringdictionaryentry) const\*<br />*may be nullptr*

(Optional) The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).

**`customTagsCount`**   uint32\_t

Count of customTags

**`group`**   [PFEntityKey](/services/playfab/api-references/c/pftypes/structs/pfentitykey-c) const\*

The identifier of the group.

**`roleId`**   const char\*<br />*is null-terminated*

The ID of the role. This must be unique within the group and cannot be changed. Role IDs must be between 1 and 64 characters long and are restricted to a-Z, A-Z, 0-9, '(', ')', '\_', '-' and '.'.

**`roleName`**   const char\*<br />*is null-terminated*

The name of the role. This must be unique within the group and can be changed later. Role names must be between 1 and 100 characters long.

## Requirements

**Header:** PFGroupsTypes.h

## See also

[PFGroupsTypes members](/services/playfab/api-references/c/pfgroupstypes/pfgroupstypes_members)


## Related topics

- [PFGroupsCreateRoleAsync](/services/playfab/api-references/c/pfgroups/functions/pfgroupscreateroleasync.md)
- [Services C API overview - PFGroupsTypes.h](/services/playfab/api-references/c/pfgroupstypes/pfgroupstypes_members.md)
- [PFGroupsCreateGroupRequest](/services/playfab/api-references/c/pfgroupstypes/structs/pfgroupscreategrouprequest.md)
- [PFGroupsCreateGroupRoleResponse](/services/playfab/api-references/c/pfgroupstypes/structs/pfgroupscreategrouproleresponse.md)
- [PFGroupsUpdateGroupRoleRequest](/services/playfab/api-references/c/pfgroupstypes/structs/pfgroupsupdategrouprolerequest.md)
