> For the complete documentation index, see [llms.txt](https://developers.clashperk.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.clashperk.com/rosters.md). Agents can also search and read this documentation through its [MCP server](https://developers.clashperk.com/~gitbook/mcp).

# Rosters

Server rosters. Dashboard sessions only, unless a route names an API role.

## List the server's rosters and groups

> API tokens with the \`fetch:rosters\` role can use this too.

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"tags":[{"name":"Rosters","description":"Server rosters. Dashboard sessions only, unless a route names an API role."}],"servers":[{"url":"/v1","description":"[latest]"},{"url":"/v2","description":"[unstable]"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"JWT","type":"http","description":"in header (authorization: bearer [token])"}},"schemas":{"GetRostersDto":{"type":"object","properties":{"rosters":{"type":"array","items":{"$ref":"#/components/schemas/RostersEntity"}},"categories":{"type":"array","items":{"$ref":"#/components/schemas/RosterGroupsEntity"}}},"required":["rosters","categories"]},"RostersEntity":{"type":"object","properties":{"_id":{"type":"string"},"category":{"enum":["GENERAL","CWL","WAR","TROPHY","NO_CLAN"],"type":"string"},"name":{"type":"string"},"guildId":{"type":"string"},"maxMembers":{"type":"number"},"minTownHall":{"type":"number"},"maxTownHall":{"type":"number"},"minHeroLevels":{"type":"number"},"roleId":{"type":["string","null"]},"colorCode":{"type":"number"},"clan":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":"string"},"badgeUrl":{"type":"string"},"league":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"}},"selfRequired":false}},"required":["tag","name","badgeUrl","league"]},"members":{"type":"array","items":{"$ref":"#/components/schemas/RosterMemberOfRostersEntity"}},"layout":{"type":"string"},"sheetId":{"type":"string"},"closed":{"type":"boolean"},"startTime":{"format":"date-time","type":["string","null"]},"endTime":{"format":"date-time","type":["string","null"]},"sortBy":{"type":"string"},"useClanAlias":{"type":"boolean"},"allowUnlinked":{"type":"boolean"},"allowMultiSignup":{"type":"boolean"},"maxAccountsPerUser":{"type":["number","null"]},"rosterImage":{"type":["string","null"]},"allowCategorySelection":{"type":"boolean"},"requireCategorySelection":{"type":"boolean"},"categorySelectionCustomText":{"type":["string","null"]},"logChannelId":{"type":["string","null"]},"lastUpdated":{"format":"date-time","type":"string"},"createdAt":{"format":"date-time","type":"string"}},"required":["_id","category","name","guildId","clan","members","closed","lastUpdated","createdAt"]},"RosterMemberOfRostersEntity":{"type":"object","properties":{"warPreference":{"enum":["in","out",null],"type":["string","null"]},"categoryId":{"type":["string","null"]},"name":{"type":"string"},"tag":{"type":"string"},"userId":{"type":["string","null"]},"username":{"type":["string","null"]},"displayName":{"type":["string","null"]},"role":{"type":["string","null"]},"townHallLevel":{"type":"number"},"heroes":{"type":"object","additionalProperties":{"type":"number"}},"trophies":{"type":"number"},"leagueId":{"type":"number"},"clan":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":"string"},"alias":{"type":["string","null"]}},"required":["tag","name"]},"createdAt":{"format":"date-time","type":"string"}},"required":["warPreference","name","tag","userId","username","role","townHallLevel","heroes","trophies","createdAt"]},"RosterGroupsEntity":{"type":"object","properties":{"_id":{"type":"string"},"displayName":{"type":"string"},"name":{"type":"string"},"guildId":{"type":"string"},"order":{"type":"number"},"selectable":{"type":"boolean"},"roleId":{"type":["string","null"]},"createdAt":{"format":"date-time","type":"string"}},"required":["_id","displayName","name","guildId","order","selectable","createdAt"]},"ErrorResponseDto":{"type":"object","properties":{"code":{"allOf":[{"$ref":"#/components/schemas/ErrorCodes"}]},"message":{"type":"string"},"statusCode":{"type":"number"},"method":{"type":"string"},"path":{"type":"string"}},"required":["code","message","statusCode","method","path"]},"ErrorCodes":{"type":"string","enum":["FORBIDDEN","UNAUTHORIZED","NOT_FOUND","BAD_REQUEST","INTERNAL_SERVER_ERROR","SERVICE_UNAVAILABLE","HANDOFF_TOKEN_EXPIRED","USER_BLOCKED","INVALID_PASSKEY","GUILD_ACCESS_FORBIDDEN","BOT_NOT_IN_GUILD","GIVEAWAY_NOT_FOUND","GIVEAWAY_NOT_ACTIVE","GIVEAWAY_ALREADY_DRAWN","GIVEAWAY_ALREADY_ENTERED","GIVEAWAY_NO_LINKED_ACCOUNT","GIVEAWAY_NOT_IN_CLAN"]}}},"paths":{"/rosters/{guildId}/list":{"get":{"description":"API tokens with the `fetch:rosters` role can use this too.","operationId":"listRosters","parameters":[{"name":"guildId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetRostersDto"}}}},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"summary":"List the server's rosters and groups","tags":["Rosters"]}}}}
```

## Create a roster

> Its settings are saved as the server's defaults for the next roster. Set \`importMembers\` with a clan to sign up the clan's members right away.

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"tags":[{"name":"Rosters","description":"Server rosters. Dashboard sessions only, unless a route names an API role."}],"servers":[{"url":"/v1","description":"[latest]"},{"url":"/v2","description":"[unstable]"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"JWT","type":"http","description":"in header (authorization: bearer [token])"}},"schemas":{"RosterInput":{"type":"object","properties":{"category":{"allOf":[{"$ref":"#/components/schemas/RosterCategory"}]},"sortBy":{"allOf":[{"$ref":"#/components/schemas/RosterSortBy"}]},"name":{"type":"string","minLength":1,"maxLength":30},"clanTag":{"type":["string","null"],"description":"Leave out for a roster open to all clans."},"importMembers":{"type":"boolean","description":"Sign up the clan's current members when the roster is created."},"allowUnlinked":{"type":"boolean"},"allowMultiSignup":{"type":"boolean"},"allowCategorySelection":{"type":"boolean"},"requireCategorySelection":{"type":"boolean"},"categorySelectionCustomText":{"type":["string","null"],"minLength":1,"maxLength":100},"maxMembers":{"type":"number","minimum":5,"maximum":500},"maxAccountsPerUser":{"type":["number","null"],"minimum":1,"maximum":75},"minTownHall":{"type":["number","null"],"minimum":2,"maximum":19},"maxTownHall":{"type":["number","null"],"minimum":2,"maximum":19},"minHeroLevels":{"type":["number","null"],"minimum":0},"roleId":{"type":["string","null"],"pattern":"^\\d{17,20}$"},"layout":{"type":"string","description":"3 to 5 column keys joined by \"/\", e.g. \"#/TH_ICON/DISCORD/NAME/CLAN\"."},"useClanAlias":{"type":"boolean"},"colorCode":{"type":["number","null"],"minimum":0,"maximum":16777215},"rosterImage":{"type":["string","null"],"format":"uri"},"startTime":{"type":["string","null"],"description":"ISO time; null opens sign-ups right away."},"endTime":{"type":["string","null"],"description":"ISO time; null keeps sign-ups open until closed by hand."}},"required":["name"]},"RosterCategory":{"type":"string","enum":["GENERAL","CWL","WAR","TROPHY"]},"RosterSortBy":{"type":"string","enum":["PLAYER_NAME","DISCORD_NAME","DISCORD_USERNAME","TOWN_HALL_LEVEL","HERO_LEVEL","TH_HERO_LEVEL","CLAN_NAME","SIGNUP_TIME","TROPHIES","LEAGUES"]},"RostersEntity":{"type":"object","properties":{"_id":{"type":"string"},"category":{"enum":["GENERAL","CWL","WAR","TROPHY","NO_CLAN"],"type":"string"},"name":{"type":"string"},"guildId":{"type":"string"},"maxMembers":{"type":"number"},"minTownHall":{"type":"number"},"maxTownHall":{"type":"number"},"minHeroLevels":{"type":"number"},"roleId":{"type":["string","null"]},"colorCode":{"type":"number"},"clan":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":"string"},"badgeUrl":{"type":"string"},"league":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"}},"selfRequired":false}},"required":["tag","name","badgeUrl","league"]},"members":{"type":"array","items":{"$ref":"#/components/schemas/RosterMemberOfRostersEntity"}},"layout":{"type":"string"},"sheetId":{"type":"string"},"closed":{"type":"boolean"},"startTime":{"format":"date-time","type":["string","null"]},"endTime":{"format":"date-time","type":["string","null"]},"sortBy":{"type":"string"},"useClanAlias":{"type":"boolean"},"allowUnlinked":{"type":"boolean"},"allowMultiSignup":{"type":"boolean"},"maxAccountsPerUser":{"type":["number","null"]},"rosterImage":{"type":["string","null"]},"allowCategorySelection":{"type":"boolean"},"requireCategorySelection":{"type":"boolean"},"categorySelectionCustomText":{"type":["string","null"]},"logChannelId":{"type":["string","null"]},"lastUpdated":{"format":"date-time","type":"string"},"createdAt":{"format":"date-time","type":"string"}},"required":["_id","category","name","guildId","clan","members","closed","lastUpdated","createdAt"]},"RosterMemberOfRostersEntity":{"type":"object","properties":{"warPreference":{"enum":["in","out",null],"type":["string","null"]},"categoryId":{"type":["string","null"]},"name":{"type":"string"},"tag":{"type":"string"},"userId":{"type":["string","null"]},"username":{"type":["string","null"]},"displayName":{"type":["string","null"]},"role":{"type":["string","null"]},"townHallLevel":{"type":"number"},"heroes":{"type":"object","additionalProperties":{"type":"number"}},"trophies":{"type":"number"},"leagueId":{"type":"number"},"clan":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":"string"},"alias":{"type":["string","null"]}},"required":["tag","name"]},"createdAt":{"format":"date-time","type":"string"}},"required":["warPreference","name","tag","userId","username","role","townHallLevel","heroes","trophies","createdAt"]},"ErrorResponseDto":{"type":"object","properties":{"code":{"allOf":[{"$ref":"#/components/schemas/ErrorCodes"}]},"message":{"type":"string"},"statusCode":{"type":"number"},"method":{"type":"string"},"path":{"type":"string"}},"required":["code","message","statusCode","method","path"]},"ErrorCodes":{"type":"string","enum":["FORBIDDEN","UNAUTHORIZED","NOT_FOUND","BAD_REQUEST","INTERNAL_SERVER_ERROR","SERVICE_UNAVAILABLE","HANDOFF_TOKEN_EXPIRED","USER_BLOCKED","INVALID_PASSKEY","GUILD_ACCESS_FORBIDDEN","BOT_NOT_IN_GUILD","GIVEAWAY_NOT_FOUND","GIVEAWAY_NOT_ACTIVE","GIVEAWAY_ALREADY_DRAWN","GIVEAWAY_ALREADY_ENTERED","GIVEAWAY_NO_LINKED_ACCOUNT","GIVEAWAY_NOT_IN_CLAN"]}}},"paths":{"/rosters/{guildId}/create":{"post":{"description":"Its settings are saved as the server's defaults for the next roster. Set `importMembers` with a clan to sign up the clan's members right away.","operationId":"createRoster","parameters":[{"name":"guildId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RosterInput"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RostersEntity"}}}},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"summary":"Create a roster","tags":["Rosters"]}}}}
```

## POST /rosters/{guildId}/groups

> Create a roster group

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"tags":[{"name":"Rosters","description":"Server rosters. Dashboard sessions only, unless a route names an API role."}],"servers":[{"url":"/v1","description":"[latest]"},{"url":"/v2","description":"[unstable]"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"JWT","type":"http","description":"in header (authorization: bearer [token])"}},"schemas":{"RosterGroupInput":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":30},"roleId":{"type":["string","null"],"pattern":"^\\d{17,20}$"},"selectable":{"type":"boolean","description":"Players can pick it when they sign up."}},"required":["name"]},"GetRostersDto":{"type":"object","properties":{"rosters":{"type":"array","items":{"$ref":"#/components/schemas/RostersEntity"}},"categories":{"type":"array","items":{"$ref":"#/components/schemas/RosterGroupsEntity"}}},"required":["rosters","categories"]},"RostersEntity":{"type":"object","properties":{"_id":{"type":"string"},"category":{"enum":["GENERAL","CWL","WAR","TROPHY","NO_CLAN"],"type":"string"},"name":{"type":"string"},"guildId":{"type":"string"},"maxMembers":{"type":"number"},"minTownHall":{"type":"number"},"maxTownHall":{"type":"number"},"minHeroLevels":{"type":"number"},"roleId":{"type":["string","null"]},"colorCode":{"type":"number"},"clan":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":"string"},"badgeUrl":{"type":"string"},"league":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"}},"selfRequired":false}},"required":["tag","name","badgeUrl","league"]},"members":{"type":"array","items":{"$ref":"#/components/schemas/RosterMemberOfRostersEntity"}},"layout":{"type":"string"},"sheetId":{"type":"string"},"closed":{"type":"boolean"},"startTime":{"format":"date-time","type":["string","null"]},"endTime":{"format":"date-time","type":["string","null"]},"sortBy":{"type":"string"},"useClanAlias":{"type":"boolean"},"allowUnlinked":{"type":"boolean"},"allowMultiSignup":{"type":"boolean"},"maxAccountsPerUser":{"type":["number","null"]},"rosterImage":{"type":["string","null"]},"allowCategorySelection":{"type":"boolean"},"requireCategorySelection":{"type":"boolean"},"categorySelectionCustomText":{"type":["string","null"]},"logChannelId":{"type":["string","null"]},"lastUpdated":{"format":"date-time","type":"string"},"createdAt":{"format":"date-time","type":"string"}},"required":["_id","category","name","guildId","clan","members","closed","lastUpdated","createdAt"]},"RosterMemberOfRostersEntity":{"type":"object","properties":{"warPreference":{"enum":["in","out",null],"type":["string","null"]},"categoryId":{"type":["string","null"]},"name":{"type":"string"},"tag":{"type":"string"},"userId":{"type":["string","null"]},"username":{"type":["string","null"]},"displayName":{"type":["string","null"]},"role":{"type":["string","null"]},"townHallLevel":{"type":"number"},"heroes":{"type":"object","additionalProperties":{"type":"number"}},"trophies":{"type":"number"},"leagueId":{"type":"number"},"clan":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":"string"},"alias":{"type":["string","null"]}},"required":["tag","name"]},"createdAt":{"format":"date-time","type":"string"}},"required":["warPreference","name","tag","userId","username","role","townHallLevel","heroes","trophies","createdAt"]},"RosterGroupsEntity":{"type":"object","properties":{"_id":{"type":"string"},"displayName":{"type":"string"},"name":{"type":"string"},"guildId":{"type":"string"},"order":{"type":"number"},"selectable":{"type":"boolean"},"roleId":{"type":["string","null"]},"createdAt":{"format":"date-time","type":"string"}},"required":["_id","displayName","name","guildId","order","selectable","createdAt"]},"ErrorResponseDto":{"type":"object","properties":{"code":{"allOf":[{"$ref":"#/components/schemas/ErrorCodes"}]},"message":{"type":"string"},"statusCode":{"type":"number"},"method":{"type":"string"},"path":{"type":"string"}},"required":["code","message","statusCode","method","path"]},"ErrorCodes":{"type":"string","enum":["FORBIDDEN","UNAUTHORIZED","NOT_FOUND","BAD_REQUEST","INTERNAL_SERVER_ERROR","SERVICE_UNAVAILABLE","HANDOFF_TOKEN_EXPIRED","USER_BLOCKED","INVALID_PASSKEY","GUILD_ACCESS_FORBIDDEN","BOT_NOT_IN_GUILD","GIVEAWAY_NOT_FOUND","GIVEAWAY_NOT_ACTIVE","GIVEAWAY_ALREADY_DRAWN","GIVEAWAY_ALREADY_ENTERED","GIVEAWAY_NO_LINKED_ACCOUNT","GIVEAWAY_NOT_IN_CLAN"]}}},"paths":{"/rosters/{guildId}/groups":{"post":{"operationId":"createRosterGroup","parameters":[{"name":"guildId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RosterGroupInput"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetRostersDto"}}}},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"summary":"Create a roster group","tags":["Rosters"]}}}}
```

## Delete a roster group

> Its members stay on the roster without a group.

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"tags":[{"name":"Rosters","description":"Server rosters. Dashboard sessions only, unless a route names an API role."}],"servers":[{"url":"/v1","description":"[latest]"},{"url":"/v2","description":"[unstable]"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"JWT","type":"http","description":"in header (authorization: bearer [token])"}},"schemas":{"GetRostersDto":{"type":"object","properties":{"rosters":{"type":"array","items":{"$ref":"#/components/schemas/RostersEntity"}},"categories":{"type":"array","items":{"$ref":"#/components/schemas/RosterGroupsEntity"}}},"required":["rosters","categories"]},"RostersEntity":{"type":"object","properties":{"_id":{"type":"string"},"category":{"enum":["GENERAL","CWL","WAR","TROPHY","NO_CLAN"],"type":"string"},"name":{"type":"string"},"guildId":{"type":"string"},"maxMembers":{"type":"number"},"minTownHall":{"type":"number"},"maxTownHall":{"type":"number"},"minHeroLevels":{"type":"number"},"roleId":{"type":["string","null"]},"colorCode":{"type":"number"},"clan":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":"string"},"badgeUrl":{"type":"string"},"league":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"}},"selfRequired":false}},"required":["tag","name","badgeUrl","league"]},"members":{"type":"array","items":{"$ref":"#/components/schemas/RosterMemberOfRostersEntity"}},"layout":{"type":"string"},"sheetId":{"type":"string"},"closed":{"type":"boolean"},"startTime":{"format":"date-time","type":["string","null"]},"endTime":{"format":"date-time","type":["string","null"]},"sortBy":{"type":"string"},"useClanAlias":{"type":"boolean"},"allowUnlinked":{"type":"boolean"},"allowMultiSignup":{"type":"boolean"},"maxAccountsPerUser":{"type":["number","null"]},"rosterImage":{"type":["string","null"]},"allowCategorySelection":{"type":"boolean"},"requireCategorySelection":{"type":"boolean"},"categorySelectionCustomText":{"type":["string","null"]},"logChannelId":{"type":["string","null"]},"lastUpdated":{"format":"date-time","type":"string"},"createdAt":{"format":"date-time","type":"string"}},"required":["_id","category","name","guildId","clan","members","closed","lastUpdated","createdAt"]},"RosterMemberOfRostersEntity":{"type":"object","properties":{"warPreference":{"enum":["in","out",null],"type":["string","null"]},"categoryId":{"type":["string","null"]},"name":{"type":"string"},"tag":{"type":"string"},"userId":{"type":["string","null"]},"username":{"type":["string","null"]},"displayName":{"type":["string","null"]},"role":{"type":["string","null"]},"townHallLevel":{"type":"number"},"heroes":{"type":"object","additionalProperties":{"type":"number"}},"trophies":{"type":"number"},"leagueId":{"type":"number"},"clan":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":"string"},"alias":{"type":["string","null"]}},"required":["tag","name"]},"createdAt":{"format":"date-time","type":"string"}},"required":["warPreference","name","tag","userId","username","role","townHallLevel","heroes","trophies","createdAt"]},"RosterGroupsEntity":{"type":"object","properties":{"_id":{"type":"string"},"displayName":{"type":"string"},"name":{"type":"string"},"guildId":{"type":"string"},"order":{"type":"number"},"selectable":{"type":"boolean"},"roleId":{"type":["string","null"]},"createdAt":{"format":"date-time","type":"string"}},"required":["_id","displayName","name","guildId","order","selectable","createdAt"]},"ErrorResponseDto":{"type":"object","properties":{"code":{"allOf":[{"$ref":"#/components/schemas/ErrorCodes"}]},"message":{"type":"string"},"statusCode":{"type":"number"},"method":{"type":"string"},"path":{"type":"string"}},"required":["code","message","statusCode","method","path"]},"ErrorCodes":{"type":"string","enum":["FORBIDDEN","UNAUTHORIZED","NOT_FOUND","BAD_REQUEST","INTERNAL_SERVER_ERROR","SERVICE_UNAVAILABLE","HANDOFF_TOKEN_EXPIRED","USER_BLOCKED","INVALID_PASSKEY","GUILD_ACCESS_FORBIDDEN","BOT_NOT_IN_GUILD","GIVEAWAY_NOT_FOUND","GIVEAWAY_NOT_ACTIVE","GIVEAWAY_ALREADY_DRAWN","GIVEAWAY_ALREADY_ENTERED","GIVEAWAY_NO_LINKED_ACCOUNT","GIVEAWAY_NOT_IN_CLAN"]}}},"paths":{"/rosters/{guildId}/groups/{groupId}":{"delete":{"description":"Its members stay on the roster without a group.","operationId":"deleteRosterGroup","parameters":[{"name":"guildId","required":true,"in":"path","schema":{"type":"string"}},{"name":"groupId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetRostersDto"}}}},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"summary":"Delete a roster group","tags":["Rosters"]}}}}
```

## Update a roster group

> You only need to send the fields you want to change.

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"tags":[{"name":"Rosters","description":"Server rosters. Dashboard sessions only, unless a route names an API role."}],"servers":[{"url":"/v1","description":"[latest]"},{"url":"/v2","description":"[unstable]"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"JWT","type":"http","description":"in header (authorization: bearer [token])"}},"schemas":{"RosterGroupUpdateInput":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":30},"roleId":{"type":["string","null"],"pattern":"^\\d{17,20}$"},"selectable":{"type":"boolean","description":"Players can pick it when they sign up."},"order":{"type":"number","minimum":1,"maximum":1000}}},"GetRostersDto":{"type":"object","properties":{"rosters":{"type":"array","items":{"$ref":"#/components/schemas/RostersEntity"}},"categories":{"type":"array","items":{"$ref":"#/components/schemas/RosterGroupsEntity"}}},"required":["rosters","categories"]},"RostersEntity":{"type":"object","properties":{"_id":{"type":"string"},"category":{"enum":["GENERAL","CWL","WAR","TROPHY","NO_CLAN"],"type":"string"},"name":{"type":"string"},"guildId":{"type":"string"},"maxMembers":{"type":"number"},"minTownHall":{"type":"number"},"maxTownHall":{"type":"number"},"minHeroLevels":{"type":"number"},"roleId":{"type":["string","null"]},"colorCode":{"type":"number"},"clan":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":"string"},"badgeUrl":{"type":"string"},"league":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"}},"selfRequired":false}},"required":["tag","name","badgeUrl","league"]},"members":{"type":"array","items":{"$ref":"#/components/schemas/RosterMemberOfRostersEntity"}},"layout":{"type":"string"},"sheetId":{"type":"string"},"closed":{"type":"boolean"},"startTime":{"format":"date-time","type":["string","null"]},"endTime":{"format":"date-time","type":["string","null"]},"sortBy":{"type":"string"},"useClanAlias":{"type":"boolean"},"allowUnlinked":{"type":"boolean"},"allowMultiSignup":{"type":"boolean"},"maxAccountsPerUser":{"type":["number","null"]},"rosterImage":{"type":["string","null"]},"allowCategorySelection":{"type":"boolean"},"requireCategorySelection":{"type":"boolean"},"categorySelectionCustomText":{"type":["string","null"]},"logChannelId":{"type":["string","null"]},"lastUpdated":{"format":"date-time","type":"string"},"createdAt":{"format":"date-time","type":"string"}},"required":["_id","category","name","guildId","clan","members","closed","lastUpdated","createdAt"]},"RosterMemberOfRostersEntity":{"type":"object","properties":{"warPreference":{"enum":["in","out",null],"type":["string","null"]},"categoryId":{"type":["string","null"]},"name":{"type":"string"},"tag":{"type":"string"},"userId":{"type":["string","null"]},"username":{"type":["string","null"]},"displayName":{"type":["string","null"]},"role":{"type":["string","null"]},"townHallLevel":{"type":"number"},"heroes":{"type":"object","additionalProperties":{"type":"number"}},"trophies":{"type":"number"},"leagueId":{"type":"number"},"clan":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":"string"},"alias":{"type":["string","null"]}},"required":["tag","name"]},"createdAt":{"format":"date-time","type":"string"}},"required":["warPreference","name","tag","userId","username","role","townHallLevel","heroes","trophies","createdAt"]},"RosterGroupsEntity":{"type":"object","properties":{"_id":{"type":"string"},"displayName":{"type":"string"},"name":{"type":"string"},"guildId":{"type":"string"},"order":{"type":"number"},"selectable":{"type":"boolean"},"roleId":{"type":["string","null"]},"createdAt":{"format":"date-time","type":"string"}},"required":["_id","displayName","name","guildId","order","selectable","createdAt"]},"ErrorResponseDto":{"type":"object","properties":{"code":{"allOf":[{"$ref":"#/components/schemas/ErrorCodes"}]},"message":{"type":"string"},"statusCode":{"type":"number"},"method":{"type":"string"},"path":{"type":"string"}},"required":["code","message","statusCode","method","path"]},"ErrorCodes":{"type":"string","enum":["FORBIDDEN","UNAUTHORIZED","NOT_FOUND","BAD_REQUEST","INTERNAL_SERVER_ERROR","SERVICE_UNAVAILABLE","HANDOFF_TOKEN_EXPIRED","USER_BLOCKED","INVALID_PASSKEY","GUILD_ACCESS_FORBIDDEN","BOT_NOT_IN_GUILD","GIVEAWAY_NOT_FOUND","GIVEAWAY_NOT_ACTIVE","GIVEAWAY_ALREADY_DRAWN","GIVEAWAY_ALREADY_ENTERED","GIVEAWAY_NO_LINKED_ACCOUNT","GIVEAWAY_NOT_IN_CLAN"]}}},"paths":{"/rosters/{guildId}/groups/{groupId}":{"patch":{"description":"You only need to send the fields you want to change.","operationId":"updateRosterGroup","parameters":[{"name":"guildId","required":true,"in":"path","schema":{"type":"string"}},{"name":"groupId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RosterGroupUpdateInput"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetRostersDto"}}}},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"summary":"Update a roster group","tags":["Rosters"]}}}}
```

## GET /rosters/{guildId}/{rosterId}

> Get a roster

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"tags":[{"name":"Rosters","description":"Server rosters. Dashboard sessions only, unless a route names an API role."}],"servers":[{"url":"/v1","description":"[latest]"},{"url":"/v2","description":"[unstable]"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"JWT","type":"http","description":"in header (authorization: bearer [token])"}},"schemas":{"RostersEntity":{"type":"object","properties":{"_id":{"type":"string"},"category":{"enum":["GENERAL","CWL","WAR","TROPHY","NO_CLAN"],"type":"string"},"name":{"type":"string"},"guildId":{"type":"string"},"maxMembers":{"type":"number"},"minTownHall":{"type":"number"},"maxTownHall":{"type":"number"},"minHeroLevels":{"type":"number"},"roleId":{"type":["string","null"]},"colorCode":{"type":"number"},"clan":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":"string"},"badgeUrl":{"type":"string"},"league":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"}},"selfRequired":false}},"required":["tag","name","badgeUrl","league"]},"members":{"type":"array","items":{"$ref":"#/components/schemas/RosterMemberOfRostersEntity"}},"layout":{"type":"string"},"sheetId":{"type":"string"},"closed":{"type":"boolean"},"startTime":{"format":"date-time","type":["string","null"]},"endTime":{"format":"date-time","type":["string","null"]},"sortBy":{"type":"string"},"useClanAlias":{"type":"boolean"},"allowUnlinked":{"type":"boolean"},"allowMultiSignup":{"type":"boolean"},"maxAccountsPerUser":{"type":["number","null"]},"rosterImage":{"type":["string","null"]},"allowCategorySelection":{"type":"boolean"},"requireCategorySelection":{"type":"boolean"},"categorySelectionCustomText":{"type":["string","null"]},"logChannelId":{"type":["string","null"]},"lastUpdated":{"format":"date-time","type":"string"},"createdAt":{"format":"date-time","type":"string"}},"required":["_id","category","name","guildId","clan","members","closed","lastUpdated","createdAt"]},"RosterMemberOfRostersEntity":{"type":"object","properties":{"warPreference":{"enum":["in","out",null],"type":["string","null"]},"categoryId":{"type":["string","null"]},"name":{"type":"string"},"tag":{"type":"string"},"userId":{"type":["string","null"]},"username":{"type":["string","null"]},"displayName":{"type":["string","null"]},"role":{"type":["string","null"]},"townHallLevel":{"type":"number"},"heroes":{"type":"object","additionalProperties":{"type":"number"}},"trophies":{"type":"number"},"leagueId":{"type":"number"},"clan":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":"string"},"alias":{"type":["string","null"]}},"required":["tag","name"]},"createdAt":{"format":"date-time","type":"string"}},"required":["warPreference","name","tag","userId","username","role","townHallLevel","heroes","trophies","createdAt"]},"ErrorResponseDto":{"type":"object","properties":{"code":{"allOf":[{"$ref":"#/components/schemas/ErrorCodes"}]},"message":{"type":"string"},"statusCode":{"type":"number"},"method":{"type":"string"},"path":{"type":"string"}},"required":["code","message","statusCode","method","path"]},"ErrorCodes":{"type":"string","enum":["FORBIDDEN","UNAUTHORIZED","NOT_FOUND","BAD_REQUEST","INTERNAL_SERVER_ERROR","SERVICE_UNAVAILABLE","HANDOFF_TOKEN_EXPIRED","USER_BLOCKED","INVALID_PASSKEY","GUILD_ACCESS_FORBIDDEN","BOT_NOT_IN_GUILD","GIVEAWAY_NOT_FOUND","GIVEAWAY_NOT_ACTIVE","GIVEAWAY_ALREADY_DRAWN","GIVEAWAY_ALREADY_ENTERED","GIVEAWAY_NO_LINKED_ACCOUNT","GIVEAWAY_NOT_IN_CLAN"]}}},"paths":{"/rosters/{guildId}/{rosterId}":{"get":{"operationId":"getRoster","parameters":[{"name":"rosterId","required":true,"in":"path","schema":{"type":"string"}},{"name":"guildId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RostersEntity"}}}},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"summary":"Get a roster","tags":["Rosters"]}}}}
```

## Delete a roster

> Members keep their roster and group roles until the bot next refreshes roles.

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"tags":[{"name":"Rosters","description":"Server rosters. Dashboard sessions only, unless a route names an API role."}],"servers":[{"url":"/v1","description":"[latest]"},{"url":"/v2","description":"[unstable]"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"JWT","type":"http","description":"in header (authorization: bearer [token])"}},"schemas":{"ErrorResponseDto":{"type":"object","properties":{"code":{"allOf":[{"$ref":"#/components/schemas/ErrorCodes"}]},"message":{"type":"string"},"statusCode":{"type":"number"},"method":{"type":"string"},"path":{"type":"string"}},"required":["code","message","statusCode","method","path"]},"ErrorCodes":{"type":"string","enum":["FORBIDDEN","UNAUTHORIZED","NOT_FOUND","BAD_REQUEST","INTERNAL_SERVER_ERROR","SERVICE_UNAVAILABLE","HANDOFF_TOKEN_EXPIRED","USER_BLOCKED","INVALID_PASSKEY","GUILD_ACCESS_FORBIDDEN","BOT_NOT_IN_GUILD","GIVEAWAY_NOT_FOUND","GIVEAWAY_NOT_ACTIVE","GIVEAWAY_ALREADY_DRAWN","GIVEAWAY_ALREADY_ENTERED","GIVEAWAY_NO_LINKED_ACCOUNT","GIVEAWAY_NOT_IN_CLAN"]}}},"paths":{"/rosters/{guildId}/{rosterId}":{"delete":{"description":"Members keep their roster and group roles until the bot next refreshes roles.","operationId":"deleteRoster","parameters":[{"name":"guildId","required":true,"in":"path","schema":{"type":"string"}},{"name":"rosterId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"204":{"description":""},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"summary":"Delete a roster","tags":["Rosters"]}}}}
```

## Update a roster

> You only need to send the fields you want to change. The roster's settings are saved as the server's defaults for the next roster.

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"tags":[{"name":"Rosters","description":"Server rosters. Dashboard sessions only, unless a route names an API role."}],"servers":[{"url":"/v1","description":"[latest]"},{"url":"/v2","description":"[unstable]"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"JWT","type":"http","description":"in header (authorization: bearer [token])"}},"schemas":{"RosterUpdateInput":{"type":"object","properties":{"category":{"allOf":[{"$ref":"#/components/schemas/RosterCategory"}]},"sortBy":{"allOf":[{"$ref":"#/components/schemas/RosterSortBy"}]},"name":{"type":"string","minLength":1,"maxLength":30},"clanTag":{"type":["string","null"],"description":"Leave out for a roster open to all clans."},"importMembers":{"type":"boolean","description":"Sign up the clan's current members when the roster is created."},"allowUnlinked":{"type":"boolean"},"allowMultiSignup":{"type":"boolean"},"allowCategorySelection":{"type":"boolean"},"requireCategorySelection":{"type":"boolean"},"categorySelectionCustomText":{"type":["string","null"],"minLength":1,"maxLength":100},"maxMembers":{"type":"number","minimum":5,"maximum":500},"maxAccountsPerUser":{"type":["number","null"],"minimum":1,"maximum":75},"minTownHall":{"type":["number","null"],"minimum":2,"maximum":19},"maxTownHall":{"type":["number","null"],"minimum":2,"maximum":19},"minHeroLevels":{"type":["number","null"],"minimum":0},"roleId":{"type":["string","null"],"pattern":"^\\d{17,20}$"},"layout":{"type":"string","description":"3 to 5 column keys joined by \"/\", e.g. \"#/TH_ICON/DISCORD/NAME/CLAN\"."},"useClanAlias":{"type":"boolean"},"colorCode":{"type":["number","null"],"minimum":0,"maximum":16777215},"rosterImage":{"type":["string","null"],"format":"uri"},"startTime":{"type":["string","null"],"description":"ISO time; null opens sign-ups right away."},"endTime":{"type":["string","null"],"description":"ISO time; null keeps sign-ups open until closed by hand."},"closed":{"type":"boolean"}}},"RosterCategory":{"type":"string","enum":["GENERAL","CWL","WAR","TROPHY"]},"RosterSortBy":{"type":"string","enum":["PLAYER_NAME","DISCORD_NAME","DISCORD_USERNAME","TOWN_HALL_LEVEL","HERO_LEVEL","TH_HERO_LEVEL","CLAN_NAME","SIGNUP_TIME","TROPHIES","LEAGUES"]},"RostersEntity":{"type":"object","properties":{"_id":{"type":"string"},"category":{"enum":["GENERAL","CWL","WAR","TROPHY","NO_CLAN"],"type":"string"},"name":{"type":"string"},"guildId":{"type":"string"},"maxMembers":{"type":"number"},"minTownHall":{"type":"number"},"maxTownHall":{"type":"number"},"minHeroLevels":{"type":"number"},"roleId":{"type":["string","null"]},"colorCode":{"type":"number"},"clan":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":"string"},"badgeUrl":{"type":"string"},"league":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"}},"selfRequired":false}},"required":["tag","name","badgeUrl","league"]},"members":{"type":"array","items":{"$ref":"#/components/schemas/RosterMemberOfRostersEntity"}},"layout":{"type":"string"},"sheetId":{"type":"string"},"closed":{"type":"boolean"},"startTime":{"format":"date-time","type":["string","null"]},"endTime":{"format":"date-time","type":["string","null"]},"sortBy":{"type":"string"},"useClanAlias":{"type":"boolean"},"allowUnlinked":{"type":"boolean"},"allowMultiSignup":{"type":"boolean"},"maxAccountsPerUser":{"type":["number","null"]},"rosterImage":{"type":["string","null"]},"allowCategorySelection":{"type":"boolean"},"requireCategorySelection":{"type":"boolean"},"categorySelectionCustomText":{"type":["string","null"]},"logChannelId":{"type":["string","null"]},"lastUpdated":{"format":"date-time","type":"string"},"createdAt":{"format":"date-time","type":"string"}},"required":["_id","category","name","guildId","clan","members","closed","lastUpdated","createdAt"]},"RosterMemberOfRostersEntity":{"type":"object","properties":{"warPreference":{"enum":["in","out",null],"type":["string","null"]},"categoryId":{"type":["string","null"]},"name":{"type":"string"},"tag":{"type":"string"},"userId":{"type":["string","null"]},"username":{"type":["string","null"]},"displayName":{"type":["string","null"]},"role":{"type":["string","null"]},"townHallLevel":{"type":"number"},"heroes":{"type":"object","additionalProperties":{"type":"number"}},"trophies":{"type":"number"},"leagueId":{"type":"number"},"clan":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":"string"},"alias":{"type":["string","null"]}},"required":["tag","name"]},"createdAt":{"format":"date-time","type":"string"}},"required":["warPreference","name","tag","userId","username","role","townHallLevel","heroes","trophies","createdAt"]},"ErrorResponseDto":{"type":"object","properties":{"code":{"allOf":[{"$ref":"#/components/schemas/ErrorCodes"}]},"message":{"type":"string"},"statusCode":{"type":"number"},"method":{"type":"string"},"path":{"type":"string"}},"required":["code","message","statusCode","method","path"]},"ErrorCodes":{"type":"string","enum":["FORBIDDEN","UNAUTHORIZED","NOT_FOUND","BAD_REQUEST","INTERNAL_SERVER_ERROR","SERVICE_UNAVAILABLE","HANDOFF_TOKEN_EXPIRED","USER_BLOCKED","INVALID_PASSKEY","GUILD_ACCESS_FORBIDDEN","BOT_NOT_IN_GUILD","GIVEAWAY_NOT_FOUND","GIVEAWAY_NOT_ACTIVE","GIVEAWAY_ALREADY_DRAWN","GIVEAWAY_ALREADY_ENTERED","GIVEAWAY_NO_LINKED_ACCOUNT","GIVEAWAY_NOT_IN_CLAN"]}}},"paths":{"/rosters/{guildId}/{rosterId}":{"patch":{"description":"You only need to send the fields you want to change. The roster's settings are saved as the server's defaults for the next roster.","operationId":"updateRoster","parameters":[{"name":"guildId","required":true,"in":"path","schema":{"type":"string"}},{"name":"rosterId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RosterUpdateInput"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RostersEntity"}}}},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"summary":"Update a roster","tags":["Rosters"]}}}}
```

## Clone a roster

> Copies most settings, except the role, image and color. Members are copied over only if they still pass the sign-up checks.

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"tags":[{"name":"Rosters","description":"Server rosters. Dashboard sessions only, unless a route names an API role."}],"servers":[{"url":"/v1","description":"[latest]"},{"url":"/v2","description":"[unstable]"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"JWT","type":"http","description":"in header (authorization: bearer [token])"}},"schemas":{"CloneRosterInput":{"type":"object","properties":{"name":{"type":"string","description":"Defaults to \"<name> [CLONE]\".","minLength":1,"maxLength":30}}},"RostersEntity":{"type":"object","properties":{"_id":{"type":"string"},"category":{"enum":["GENERAL","CWL","WAR","TROPHY","NO_CLAN"],"type":"string"},"name":{"type":"string"},"guildId":{"type":"string"},"maxMembers":{"type":"number"},"minTownHall":{"type":"number"},"maxTownHall":{"type":"number"},"minHeroLevels":{"type":"number"},"roleId":{"type":["string","null"]},"colorCode":{"type":"number"},"clan":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":"string"},"badgeUrl":{"type":"string"},"league":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"}},"selfRequired":false}},"required":["tag","name","badgeUrl","league"]},"members":{"type":"array","items":{"$ref":"#/components/schemas/RosterMemberOfRostersEntity"}},"layout":{"type":"string"},"sheetId":{"type":"string"},"closed":{"type":"boolean"},"startTime":{"format":"date-time","type":["string","null"]},"endTime":{"format":"date-time","type":["string","null"]},"sortBy":{"type":"string"},"useClanAlias":{"type":"boolean"},"allowUnlinked":{"type":"boolean"},"allowMultiSignup":{"type":"boolean"},"maxAccountsPerUser":{"type":["number","null"]},"rosterImage":{"type":["string","null"]},"allowCategorySelection":{"type":"boolean"},"requireCategorySelection":{"type":"boolean"},"categorySelectionCustomText":{"type":["string","null"]},"logChannelId":{"type":["string","null"]},"lastUpdated":{"format":"date-time","type":"string"},"createdAt":{"format":"date-time","type":"string"}},"required":["_id","category","name","guildId","clan","members","closed","lastUpdated","createdAt"]},"RosterMemberOfRostersEntity":{"type":"object","properties":{"warPreference":{"enum":["in","out",null],"type":["string","null"]},"categoryId":{"type":["string","null"]},"name":{"type":"string"},"tag":{"type":"string"},"userId":{"type":["string","null"]},"username":{"type":["string","null"]},"displayName":{"type":["string","null"]},"role":{"type":["string","null"]},"townHallLevel":{"type":"number"},"heroes":{"type":"object","additionalProperties":{"type":"number"}},"trophies":{"type":"number"},"leagueId":{"type":"number"},"clan":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":"string"},"alias":{"type":["string","null"]}},"required":["tag","name"]},"createdAt":{"format":"date-time","type":"string"}},"required":["warPreference","name","tag","userId","username","role","townHallLevel","heroes","trophies","createdAt"]},"ErrorResponseDto":{"type":"object","properties":{"code":{"allOf":[{"$ref":"#/components/schemas/ErrorCodes"}]},"message":{"type":"string"},"statusCode":{"type":"number"},"method":{"type":"string"},"path":{"type":"string"}},"required":["code","message","statusCode","method","path"]},"ErrorCodes":{"type":"string","enum":["FORBIDDEN","UNAUTHORIZED","NOT_FOUND","BAD_REQUEST","INTERNAL_SERVER_ERROR","SERVICE_UNAVAILABLE","HANDOFF_TOKEN_EXPIRED","USER_BLOCKED","INVALID_PASSKEY","GUILD_ACCESS_FORBIDDEN","BOT_NOT_IN_GUILD","GIVEAWAY_NOT_FOUND","GIVEAWAY_NOT_ACTIVE","GIVEAWAY_ALREADY_DRAWN","GIVEAWAY_ALREADY_ENTERED","GIVEAWAY_NO_LINKED_ACCOUNT","GIVEAWAY_NOT_IN_CLAN"]}}},"paths":{"/rosters/{guildId}/{rosterId}/clone":{"post":{"description":"Copies most settings, except the role, image and color. Members are copied over only if they still pass the sign-up checks.","operationId":"cloneRoster","parameters":[{"name":"guildId","required":true,"in":"path","schema":{"type":"string"}},{"name":"rosterId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CloneRosterInput"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RostersEntity"}}}},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"summary":"Clone a roster","tags":["Rosters"]}}}}
```

## Check which players can join a roster

> Deprecated: send the same request with the \`QUERY\` method. This route is removed on 2026-11-25.

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"tags":[{"name":"Rosters","description":"Server rosters. Dashboard sessions only, unless a route names an API role."}],"servers":[{"url":"/v1","description":"[latest]"},{"url":"/v2","description":"[unstable]"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"JWT","type":"http","description":"in header (authorization: bearer [token])"}},"schemas":{"RosterTagsInput":{"type":"object","properties":{"playerTags":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string"}}},"required":["playerTags"]},"RosterPlayerCheckDto":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":["string","null"],"description":"Null when no player has this tag."},"townHallLevel":{"type":["number","null"]},"heroLevels":{"type":["number","null"]},"clanRole":{"type":["string","null"]},"user":{"description":"The linked Discord member, if any.","anyOf":[{"$ref":"#/components/schemas/RosterCheckUserDto"},{"type":"null"}]},"canJoin":{"type":"boolean"},"reason":{"type":["string","null"],"description":"Why the player can't join, in the bot's words."}},"required":["tag","name","townHallLevel","heroLevels","clanRole","user","canJoin","reason"]},"RosterCheckUserDto":{"type":"object","properties":{"id":{"type":"string"},"username":{"type":"string"},"displayName":{"type":"string"}},"required":["id","username","displayName"]},"ErrorResponseDto":{"type":"object","properties":{"code":{"allOf":[{"$ref":"#/components/schemas/ErrorCodes"}]},"message":{"type":"string"},"statusCode":{"type":"number"},"method":{"type":"string"},"path":{"type":"string"}},"required":["code","message","statusCode","method","path"]},"ErrorCodes":{"type":"string","enum":["FORBIDDEN","UNAUTHORIZED","NOT_FOUND","BAD_REQUEST","INTERNAL_SERVER_ERROR","SERVICE_UNAVAILABLE","HANDOFF_TOKEN_EXPIRED","USER_BLOCKED","INVALID_PASSKEY","GUILD_ACCESS_FORBIDDEN","BOT_NOT_IN_GUILD","GIVEAWAY_NOT_FOUND","GIVEAWAY_NOT_ACTIVE","GIVEAWAY_ALREADY_DRAWN","GIVEAWAY_ALREADY_ENTERED","GIVEAWAY_NO_LINKED_ACCOUNT","GIVEAWAY_NOT_IN_CLAN"]}}},"paths":{"/rosters/{guildId}/{rosterId}/members/check":{"post":{"deprecated":true,"description":"Deprecated: send the same request with the `QUERY` method. This route is removed on 2026-11-25.","operationId":"checkRosterMembersViaPost","parameters":[{"name":"guildId","required":true,"in":"path","schema":{"type":"string"}},{"name":"rosterId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RosterTagsInput"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RosterPlayerCheckDto"}}}}},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"summary":"Check which players can join a roster","tags":["Rosters"]}}}}
```

## Add players to a roster

> Players who fail a sign-up check are skipped, and the response says why for each one.

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"tags":[{"name":"Rosters","description":"Server rosters. Dashboard sessions only, unless a route names an API role."}],"servers":[{"url":"/v1","description":"[latest]"},{"url":"/v2","description":"[unstable]"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"JWT","type":"http","description":"in header (authorization: bearer [token])"}},"schemas":{"AddRosterMembersInput":{"type":"object","properties":{"playerTags":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string"}},"groupId":{"type":["string","null"]}},"required":["playerTags"]},"AddRosterMembersDto":{"type":"object","properties":{"roster":{"$ref":"#/components/schemas/RostersEntity"},"result":{"type":"array","items":{"$ref":"#/components/schemas/RosterPlayerCheckDto"}}},"required":["roster","result"]},"RostersEntity":{"type":"object","properties":{"_id":{"type":"string"},"category":{"enum":["GENERAL","CWL","WAR","TROPHY","NO_CLAN"],"type":"string"},"name":{"type":"string"},"guildId":{"type":"string"},"maxMembers":{"type":"number"},"minTownHall":{"type":"number"},"maxTownHall":{"type":"number"},"minHeroLevels":{"type":"number"},"roleId":{"type":["string","null"]},"colorCode":{"type":"number"},"clan":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":"string"},"badgeUrl":{"type":"string"},"league":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"}},"selfRequired":false}},"required":["tag","name","badgeUrl","league"]},"members":{"type":"array","items":{"$ref":"#/components/schemas/RosterMemberOfRostersEntity"}},"layout":{"type":"string"},"sheetId":{"type":"string"},"closed":{"type":"boolean"},"startTime":{"format":"date-time","type":["string","null"]},"endTime":{"format":"date-time","type":["string","null"]},"sortBy":{"type":"string"},"useClanAlias":{"type":"boolean"},"allowUnlinked":{"type":"boolean"},"allowMultiSignup":{"type":"boolean"},"maxAccountsPerUser":{"type":["number","null"]},"rosterImage":{"type":["string","null"]},"allowCategorySelection":{"type":"boolean"},"requireCategorySelection":{"type":"boolean"},"categorySelectionCustomText":{"type":["string","null"]},"logChannelId":{"type":["string","null"]},"lastUpdated":{"format":"date-time","type":"string"},"createdAt":{"format":"date-time","type":"string"}},"required":["_id","category","name","guildId","clan","members","closed","lastUpdated","createdAt"]},"RosterMemberOfRostersEntity":{"type":"object","properties":{"warPreference":{"enum":["in","out",null],"type":["string","null"]},"categoryId":{"type":["string","null"]},"name":{"type":"string"},"tag":{"type":"string"},"userId":{"type":["string","null"]},"username":{"type":["string","null"]},"displayName":{"type":["string","null"]},"role":{"type":["string","null"]},"townHallLevel":{"type":"number"},"heroes":{"type":"object","additionalProperties":{"type":"number"}},"trophies":{"type":"number"},"leagueId":{"type":"number"},"clan":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":"string"},"alias":{"type":["string","null"]}},"required":["tag","name"]},"createdAt":{"format":"date-time","type":"string"}},"required":["warPreference","name","tag","userId","username","role","townHallLevel","heroes","trophies","createdAt"]},"RosterPlayerCheckDto":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":["string","null"],"description":"Null when no player has this tag."},"townHallLevel":{"type":["number","null"]},"heroLevels":{"type":["number","null"]},"clanRole":{"type":["string","null"]},"user":{"description":"The linked Discord member, if any.","anyOf":[{"$ref":"#/components/schemas/RosterCheckUserDto"},{"type":"null"}]},"canJoin":{"type":"boolean"},"reason":{"type":["string","null"],"description":"Why the player can't join, in the bot's words."}},"required":["tag","name","townHallLevel","heroLevels","clanRole","user","canJoin","reason"]},"RosterCheckUserDto":{"type":"object","properties":{"id":{"type":"string"},"username":{"type":"string"},"displayName":{"type":"string"}},"required":["id","username","displayName"]},"ErrorResponseDto":{"type":"object","properties":{"code":{"allOf":[{"$ref":"#/components/schemas/ErrorCodes"}]},"message":{"type":"string"},"statusCode":{"type":"number"},"method":{"type":"string"},"path":{"type":"string"}},"required":["code","message","statusCode","method","path"]},"ErrorCodes":{"type":"string","enum":["FORBIDDEN","UNAUTHORIZED","NOT_FOUND","BAD_REQUEST","INTERNAL_SERVER_ERROR","SERVICE_UNAVAILABLE","HANDOFF_TOKEN_EXPIRED","USER_BLOCKED","INVALID_PASSKEY","GUILD_ACCESS_FORBIDDEN","BOT_NOT_IN_GUILD","GIVEAWAY_NOT_FOUND","GIVEAWAY_NOT_ACTIVE","GIVEAWAY_ALREADY_DRAWN","GIVEAWAY_ALREADY_ENTERED","GIVEAWAY_NO_LINKED_ACCOUNT","GIVEAWAY_NOT_IN_CLAN"]}}},"paths":{"/rosters/{guildId}/{rosterId}/members":{"put":{"description":"Players who fail a sign-up check are skipped, and the response says why for each one.","operationId":"addRosterMembers","parameters":[{"name":"guildId","required":true,"in":"path","schema":{"type":"string"}},{"name":"rosterId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddRosterMembersInput"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddRosterMembersDto"}}}},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"summary":"Add players to a roster","tags":["Rosters"]}}}}
```

## DELETE /rosters/{guildId}/{rosterId}/members

> Remove players from a roster

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"tags":[{"name":"Rosters","description":"Server rosters. Dashboard sessions only, unless a route names an API role."}],"servers":[{"url":"/v1","description":"[latest]"},{"url":"/v2","description":"[unstable]"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"JWT","type":"http","description":"in header (authorization: bearer [token])"}},"schemas":{"RemoveMembersBulkInput":{"type":"object","properties":{"playerTags":{"minItems":1,"type":"array","items":{"type":"string"}}},"required":["playerTags"]},"RostersEntity":{"type":"object","properties":{"_id":{"type":"string"},"category":{"enum":["GENERAL","CWL","WAR","TROPHY","NO_CLAN"],"type":"string"},"name":{"type":"string"},"guildId":{"type":"string"},"maxMembers":{"type":"number"},"minTownHall":{"type":"number"},"maxTownHall":{"type":"number"},"minHeroLevels":{"type":"number"},"roleId":{"type":["string","null"]},"colorCode":{"type":"number"},"clan":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":"string"},"badgeUrl":{"type":"string"},"league":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"}},"selfRequired":false}},"required":["tag","name","badgeUrl","league"]},"members":{"type":"array","items":{"$ref":"#/components/schemas/RosterMemberOfRostersEntity"}},"layout":{"type":"string"},"sheetId":{"type":"string"},"closed":{"type":"boolean"},"startTime":{"format":"date-time","type":["string","null"]},"endTime":{"format":"date-time","type":["string","null"]},"sortBy":{"type":"string"},"useClanAlias":{"type":"boolean"},"allowUnlinked":{"type":"boolean"},"allowMultiSignup":{"type":"boolean"},"maxAccountsPerUser":{"type":["number","null"]},"rosterImage":{"type":["string","null"]},"allowCategorySelection":{"type":"boolean"},"requireCategorySelection":{"type":"boolean"},"categorySelectionCustomText":{"type":["string","null"]},"logChannelId":{"type":["string","null"]},"lastUpdated":{"format":"date-time","type":"string"},"createdAt":{"format":"date-time","type":"string"}},"required":["_id","category","name","guildId","clan","members","closed","lastUpdated","createdAt"]},"RosterMemberOfRostersEntity":{"type":"object","properties":{"warPreference":{"enum":["in","out",null],"type":["string","null"]},"categoryId":{"type":["string","null"]},"name":{"type":"string"},"tag":{"type":"string"},"userId":{"type":["string","null"]},"username":{"type":["string","null"]},"displayName":{"type":["string","null"]},"role":{"type":["string","null"]},"townHallLevel":{"type":"number"},"heroes":{"type":"object","additionalProperties":{"type":"number"}},"trophies":{"type":"number"},"leagueId":{"type":"number"},"clan":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":"string"},"alias":{"type":["string","null"]}},"required":["tag","name"]},"createdAt":{"format":"date-time","type":"string"}},"required":["warPreference","name","tag","userId","username","role","townHallLevel","heroes","trophies","createdAt"]},"ErrorResponseDto":{"type":"object","properties":{"code":{"allOf":[{"$ref":"#/components/schemas/ErrorCodes"}]},"message":{"type":"string"},"statusCode":{"type":"number"},"method":{"type":"string"},"path":{"type":"string"}},"required":["code","message","statusCode","method","path"]},"ErrorCodes":{"type":"string","enum":["FORBIDDEN","UNAUTHORIZED","NOT_FOUND","BAD_REQUEST","INTERNAL_SERVER_ERROR","SERVICE_UNAVAILABLE","HANDOFF_TOKEN_EXPIRED","USER_BLOCKED","INVALID_PASSKEY","GUILD_ACCESS_FORBIDDEN","BOT_NOT_IN_GUILD","GIVEAWAY_NOT_FOUND","GIVEAWAY_NOT_ACTIVE","GIVEAWAY_ALREADY_DRAWN","GIVEAWAY_ALREADY_ENTERED","GIVEAWAY_NO_LINKED_ACCOUNT","GIVEAWAY_NOT_IN_CLAN"]}}},"paths":{"/rosters/{guildId}/{rosterId}/members":{"delete":{"operationId":"deleteRosterMembers","parameters":[{"name":"rosterId","required":true,"in":"path","schema":{"type":"string"}},{"name":"guildId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemoveMembersBulkInput"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RostersEntity"}}}},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"summary":"Remove players from a roster","tags":["Rosters"]}}}}
```

## Refresh a roster's members from the game

> Updates each member's game data and Discord link, and the roster's clan details.

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"tags":[{"name":"Rosters","description":"Server rosters. Dashboard sessions only, unless a route names an API role."}],"servers":[{"url":"/v1","description":"[latest]"},{"url":"/v2","description":"[unstable]"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"JWT","type":"http","description":"in header (authorization: bearer [token])"}},"schemas":{"RostersEntity":{"type":"object","properties":{"_id":{"type":"string"},"category":{"enum":["GENERAL","CWL","WAR","TROPHY","NO_CLAN"],"type":"string"},"name":{"type":"string"},"guildId":{"type":"string"},"maxMembers":{"type":"number"},"minTownHall":{"type":"number"},"maxTownHall":{"type":"number"},"minHeroLevels":{"type":"number"},"roleId":{"type":["string","null"]},"colorCode":{"type":"number"},"clan":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":"string"},"badgeUrl":{"type":"string"},"league":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"}},"selfRequired":false}},"required":["tag","name","badgeUrl","league"]},"members":{"type":"array","items":{"$ref":"#/components/schemas/RosterMemberOfRostersEntity"}},"layout":{"type":"string"},"sheetId":{"type":"string"},"closed":{"type":"boolean"},"startTime":{"format":"date-time","type":["string","null"]},"endTime":{"format":"date-time","type":["string","null"]},"sortBy":{"type":"string"},"useClanAlias":{"type":"boolean"},"allowUnlinked":{"type":"boolean"},"allowMultiSignup":{"type":"boolean"},"maxAccountsPerUser":{"type":["number","null"]},"rosterImage":{"type":["string","null"]},"allowCategorySelection":{"type":"boolean"},"requireCategorySelection":{"type":"boolean"},"categorySelectionCustomText":{"type":["string","null"]},"logChannelId":{"type":["string","null"]},"lastUpdated":{"format":"date-time","type":"string"},"createdAt":{"format":"date-time","type":"string"}},"required":["_id","category","name","guildId","clan","members","closed","lastUpdated","createdAt"]},"RosterMemberOfRostersEntity":{"type":"object","properties":{"warPreference":{"enum":["in","out",null],"type":["string","null"]},"categoryId":{"type":["string","null"]},"name":{"type":"string"},"tag":{"type":"string"},"userId":{"type":["string","null"]},"username":{"type":["string","null"]},"displayName":{"type":["string","null"]},"role":{"type":["string","null"]},"townHallLevel":{"type":"number"},"heroes":{"type":"object","additionalProperties":{"type":"number"}},"trophies":{"type":"number"},"leagueId":{"type":"number"},"clan":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":"string"},"alias":{"type":["string","null"]}},"required":["tag","name"]},"createdAt":{"format":"date-time","type":"string"}},"required":["warPreference","name","tag","userId","username","role","townHallLevel","heroes","trophies","createdAt"]},"ErrorResponseDto":{"type":"object","properties":{"code":{"allOf":[{"$ref":"#/components/schemas/ErrorCodes"}]},"message":{"type":"string"},"statusCode":{"type":"number"},"method":{"type":"string"},"path":{"type":"string"}},"required":["code","message","statusCode","method","path"]},"ErrorCodes":{"type":"string","enum":["FORBIDDEN","UNAUTHORIZED","NOT_FOUND","BAD_REQUEST","INTERNAL_SERVER_ERROR","SERVICE_UNAVAILABLE","HANDOFF_TOKEN_EXPIRED","USER_BLOCKED","INVALID_PASSKEY","GUILD_ACCESS_FORBIDDEN","BOT_NOT_IN_GUILD","GIVEAWAY_NOT_FOUND","GIVEAWAY_NOT_ACTIVE","GIVEAWAY_ALREADY_DRAWN","GIVEAWAY_ALREADY_ENTERED","GIVEAWAY_NO_LINKED_ACCOUNT","GIVEAWAY_NOT_IN_CLAN"]}}},"paths":{"/rosters/{guildId}/{rosterId}/members/refresh":{"post":{"description":"Updates each member's game data and Discord link, and the roster's clan details.","operationId":"refreshRosterMembers","parameters":[{"name":"guildId","required":true,"in":"path","schema":{"type":"string"}},{"name":"rosterId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RostersEntity"}}}},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"summary":"Refresh a roster's members from the game","tags":["Rosters"]}}}}
```

## Move players to another roster or group

> To move players to another group on the same roster, send only \`newGroupId\`. Players who fail the other roster's sign-up checks stay where they are.

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"tags":[{"name":"Rosters","description":"Server rosters. Dashboard sessions only, unless a route names an API role."}],"servers":[{"url":"/v1","description":"[latest]"},{"url":"/v2","description":"[unstable]"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"JWT","type":"http","description":"in header (authorization: bearer [token])"}},"schemas":{"TransferRosterMembersInput":{"type":"object","properties":{"newRosterId":{"type":"string","description":"Required unless newGroupId is set."},"newGroupId":{"type":"string","description":"Required unless newRosterId is set."},"playerTags":{"minItems":1,"type":"array","items":{"type":"string"}}},"required":["playerTags"]},"TransferRosterMembersDto":{"type":"object","properties":{"roster":{"$ref":"#/components/schemas/RostersEntity"},"result":{"type":"array","items":{"type":"object","properties":{"player":{"type":"object","properties":{"name":{"type":"string"},"tag":{"type":"string"}},"selfRequired":true},"success":{"type":"boolean"},"message":{"type":"string"}},"required":["player","success","message"]}}},"required":["roster","result"]},"RostersEntity":{"type":"object","properties":{"_id":{"type":"string"},"category":{"enum":["GENERAL","CWL","WAR","TROPHY","NO_CLAN"],"type":"string"},"name":{"type":"string"},"guildId":{"type":"string"},"maxMembers":{"type":"number"},"minTownHall":{"type":"number"},"maxTownHall":{"type":"number"},"minHeroLevels":{"type":"number"},"roleId":{"type":["string","null"]},"colorCode":{"type":"number"},"clan":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":"string"},"badgeUrl":{"type":"string"},"league":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"}},"selfRequired":false}},"required":["tag","name","badgeUrl","league"]},"members":{"type":"array","items":{"$ref":"#/components/schemas/RosterMemberOfRostersEntity"}},"layout":{"type":"string"},"sheetId":{"type":"string"},"closed":{"type":"boolean"},"startTime":{"format":"date-time","type":["string","null"]},"endTime":{"format":"date-time","type":["string","null"]},"sortBy":{"type":"string"},"useClanAlias":{"type":"boolean"},"allowUnlinked":{"type":"boolean"},"allowMultiSignup":{"type":"boolean"},"maxAccountsPerUser":{"type":["number","null"]},"rosterImage":{"type":["string","null"]},"allowCategorySelection":{"type":"boolean"},"requireCategorySelection":{"type":"boolean"},"categorySelectionCustomText":{"type":["string","null"]},"logChannelId":{"type":["string","null"]},"lastUpdated":{"format":"date-time","type":"string"},"createdAt":{"format":"date-time","type":"string"}},"required":["_id","category","name","guildId","clan","members","closed","lastUpdated","createdAt"]},"RosterMemberOfRostersEntity":{"type":"object","properties":{"warPreference":{"enum":["in","out",null],"type":["string","null"]},"categoryId":{"type":["string","null"]},"name":{"type":"string"},"tag":{"type":"string"},"userId":{"type":["string","null"]},"username":{"type":["string","null"]},"displayName":{"type":["string","null"]},"role":{"type":["string","null"]},"townHallLevel":{"type":"number"},"heroes":{"type":"object","additionalProperties":{"type":"number"}},"trophies":{"type":"number"},"leagueId":{"type":"number"},"clan":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":"string"},"alias":{"type":["string","null"]}},"required":["tag","name"]},"createdAt":{"format":"date-time","type":"string"}},"required":["warPreference","name","tag","userId","username","role","townHallLevel","heroes","trophies","createdAt"]},"ErrorResponseDto":{"type":"object","properties":{"code":{"allOf":[{"$ref":"#/components/schemas/ErrorCodes"}]},"message":{"type":"string"},"statusCode":{"type":"number"},"method":{"type":"string"},"path":{"type":"string"}},"required":["code","message","statusCode","method","path"]},"ErrorCodes":{"type":"string","enum":["FORBIDDEN","UNAUTHORIZED","NOT_FOUND","BAD_REQUEST","INTERNAL_SERVER_ERROR","SERVICE_UNAVAILABLE","HANDOFF_TOKEN_EXPIRED","USER_BLOCKED","INVALID_PASSKEY","GUILD_ACCESS_FORBIDDEN","BOT_NOT_IN_GUILD","GIVEAWAY_NOT_FOUND","GIVEAWAY_NOT_ACTIVE","GIVEAWAY_ALREADY_DRAWN","GIVEAWAY_ALREADY_ENTERED","GIVEAWAY_NO_LINKED_ACCOUNT","GIVEAWAY_NOT_IN_CLAN"]}}},"paths":{"/rosters/{guildId}/{rosterId}/members/transfer":{"put":{"description":"To move players to another group on the same roster, send only `newGroupId`. Players who fail the other roster's sign-up checks stay where they are.","operationId":"transferRosterMembers","parameters":[{"name":"rosterId","required":true,"in":"path","schema":{"type":"string"}},{"name":"guildId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransferRosterMembersInput"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransferRosterMembersDto"}}}},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"summary":"Move players to another roster or group","tags":["Rosters"]}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://developers.clashperk.com/rosters.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
