Documentation

CreateGroup

Creates a new group.

Request Details

Creates a new group, as well as administration and member roles, based off of a title's group template. Returns information about the group that was created.

CreateGroupRequest
Request Properties
Entity EntityKey

The entity to perform this action on.

GroupName (required) String

The name of the group. This is unique at the title level by default.

POST https://{{TitleID}}.playfabapi.com/Group/CreateGroup
    Content-Type: application/json
{
  "GroupName": "Example Group"
}
        

Response Details

CreateGroupResponse
Result Properties
AdminRoleId String

The ID of the administrator role for the group.

Created (required) DateTime

The server date and time the group was created.

Group (required) EntityKey

The identifier of the group

GroupName String

The name of the group.

MemberRoleId String

The ID of the default member role for the group.

ProfileVersion (required) int32

The current version of the profile, can be used for concurrency control during updates.

Roles Dict<String, String>

The list of roles and names that belong to the group.

Sample Response

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
  "code": 200,
  "status": "OK",
  "data": {
    "GroupName": "Example Group",
    "Group": {
      "Id": "ABC1234ABC"
    },
    "MemberRoleId": "ABC123DEF",
    "AdminRoleId": "ABC123456",
    "Roles": {
      "admins": "Administrators",
      "members": "Members",
      "awesomepeople": "Some Other Role"
    },
    "Created": "2017-12-31T11:59:59Z",
    "ProfileVersion": 17
  }
}

Authentication

EntityToken

Possible Error Codes

Name Code
GroupNameNotAvailable 1368
NotAuthenticated 1074
NotAuthorized 1089
ProfileDoesNotExist 1298