> 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/users.md). Agents can also search and read this documentation through its [MCP server](https://developers.clashperk.com/~gitbook/mcp).

# Users

The signed-in dashboard user. Dashboard sessions only.

## GET /users/me

> Get your default clan, bookmarks and timezone

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"tags":[{"name":"Users","description":"The signed-in dashboard user. Dashboard sessions only."}],"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":{"UserSettingsDto":{"type":"object","properties":{"clan":{"description":"Used by bot commands run without a clan tag.","anyOf":[{"$ref":"#/components/schemas/ClanRefDto"},{"type":"null"}]},"bookmarks":{"description":"Clans the user bookmarked on the dashboard, on every device.","type":"array","items":{"$ref":"#/components/schemas/ClanRefDto"}},"timezone":{"description":"Used by /activity charts; null means UTC.","anyOf":[{"$ref":"#/components/schemas/TimezoneDto"},{"type":"null"}]}},"required":["clan","bookmarks","timezone"]},"ClanRefDto":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":["string","null"]}},"required":["tag","name"]},"TimezoneDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"location":{"type":"string"}},"required":["id","name","location"]},"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":{"/users/me":{"get":{"operationId":"getUserSettings","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserSettingsDto"}}}},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"summary":"Get your default clan, bookmarks and timezone","tags":["Users"]}}}}
```

## List your accounts' current wars

> Covers your linked accounts that you haven't hidden. CWL rounds still show even if the account has left the clan.

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"tags":[{"name":"Users","description":"The signed-in dashboard user. Dashboard sessions only."}],"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":{"WarTasksDto":{"type":"object","properties":{"items":{"description":"One per account and war that hasn't ended, including CWL rounds in clans the account left.","type":"array","items":{"$ref":"#/components/schemas/WarTaskDto"}}},"required":["items"]},"WarTaskDto":{"type":"object","properties":{"warType":{"allOf":[{"$ref":"#/components/schemas/WarTypes"}]},"state":{"description":"From the war's times rather than the stored state, which can lag behind.","enum":["preparation","inWar"],"type":"string"},"warTag":{"type":["string","null"],"description":"Set for CWL rounds only."},"round":{"type":["number","null"],"description":"The CWL round number; null for other wars."},"startTime":{"type":"string","format":"date-time"},"endTime":{"type":"string","format":"date-time"},"account":{"$ref":"#/components/schemas/TaskAccountDto"},"clan":{"description":"The account's side.","allOf":[{"$ref":"#/components/schemas/TaskClanDto"}]},"opponent":{"$ref":"#/components/schemas/TaskClanDto"},"attacks":{"type":"number"},"attackLimit":{"type":"number"}},"required":["warType","state","warTag","round","startTime","endTime","account","clan","opponent","attacks","attackLimit"]},"WarTypes":{"type":"number","enum":[1,2,3]},"TaskAccountDto":{"type":"object","properties":{"townHallLevel":{"type":["number","null"],"description":"Null when the game didn't return the player."},"tag":{"type":"string"},"name":{"type":"string"}},"required":["townHallLevel","tag","name"]},"TaskClanDto":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":"string"}},"required":["tag","name"]},"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":{"/users/me/tasks/wars":{"get":{"description":"Covers your linked accounts that you haven't hidden. CWL rounds still show even if the account has left the clan.","operationId":"getWarTasks","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WarTasksDto"}}}},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"summary":"List your accounts' current wars","tags":["Users"]}}}}
```

## List your accounts' capital raid attacks

> Empty outside raid weekends.

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"tags":[{"name":"Users","description":"The signed-in dashboard user. Dashboard sessions only."}],"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":{"CapitalRaidTasksDto":{"type":"object","properties":{"items":{"description":"One per account whose current clan is raiding; empty outside a raid weekend.","type":"array","items":{"$ref":"#/components/schemas/CapitalRaidTaskDto"}}},"required":["items"]},"CapitalRaidTaskDto":{"type":"object","properties":{"attackLimit":{"type":["number","null"],"description":"Attacks allowed, bonus included; null until the account's first attack this weekend."},"endTime":{"type":"string","format":"date-time"},"account":{"$ref":"#/components/schemas/TaskAccountDto"},"clan":{"$ref":"#/components/schemas/TaskClanDto"},"attacks":{"type":"number"}},"required":["attackLimit","endTime","account","clan","attacks"]},"TaskAccountDto":{"type":"object","properties":{"townHallLevel":{"type":["number","null"],"description":"Null when the game didn't return the player."},"tag":{"type":"string"},"name":{"type":"string"}},"required":["townHallLevel","tag","name"]},"TaskClanDto":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":"string"}},"required":["tag","name"]},"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":{"/users/me/tasks/capital-raids":{"get":{"description":"Empty outside raid weekends.","operationId":"getCapitalRaidTasks","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CapitalRaidTasksDto"}}}},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"summary":"List your accounts' capital raid attacks","tags":["Users"]}}}}
```

## List your accounts' Clan Games points

> Empty outside Clan Games.

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"tags":[{"name":"Users","description":"The signed-in dashboard user. Dashboard sessions only."}],"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":{"ClanGamesTasksDto":{"type":"object","properties":{"items":{"description":"One per tracked account; empty outside Clan Games.","type":"array","items":{"$ref":"#/components/schemas/ClanGamesTaskDto"}}},"required":["items"]},"ClanGamesTaskDto":{"type":"object","properties":{"clan":{"description":"The clan the account is earning points in; null when unknown.","anyOf":[{"$ref":"#/components/schemas/TaskClanDto"},{"type":"null"}]},"endTime":{"type":"string","format":"date-time"},"account":{"$ref":"#/components/schemas/TaskAccountDto"},"points":{"type":"number"},"maxPoints":{"type":"number"}},"required":["clan","endTime","account","points","maxPoints"]},"TaskClanDto":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":"string"}},"required":["tag","name"]},"TaskAccountDto":{"type":"object","properties":{"townHallLevel":{"type":["number","null"],"description":"Null when the game didn't return the player."},"tag":{"type":"string"},"name":{"type":"string"}},"required":["townHallLevel","tag","name"]},"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":{"/users/me/tasks/clan-games":{"get":{"description":"Empty outside Clan Games.","operationId":"getClanGamesTasks","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClanGamesTasksDto"}}}},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"summary":"List your accounts' Clan Games points","tags":["Users"]}}}}
```

## GET /users/me/tasks/legends

> List your accounts' Legend League attacks today

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"tags":[{"name":"Users","description":"The signed-in dashboard user. Dashboard sessions only."}],"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":{"LegendTasksDto":{"type":"object","properties":{"items":{"description":"One per account in Legend League.","type":"array","items":{"$ref":"#/components/schemas/LegendTaskDto"}}},"required":["items"]},"LegendTaskDto":{"type":"object","properties":{"endTime":{"type":"string","description":"When the legend day ends.","format":"date-time"},"account":{"$ref":"#/components/schemas/TaskAccountDto"},"league":{"$ref":"#/components/schemas/TaskLeagueDto"},"attacks":{"type":"number","description":"Attacks on the current legend day."},"attackLimit":{"type":"number"}},"required":["endTime","account","league","attacks","attackLimit"]},"TaskAccountDto":{"type":"object","properties":{"townHallLevel":{"type":["number","null"],"description":"Null when the game didn't return the player."},"tag":{"type":"string"},"name":{"type":"string"}},"required":["townHallLevel","tag","name"]},"TaskLeagueDto":{"type":"object","properties":{"iconUrl":{"type":["string","null"]},"id":{"type":"number"},"name":{"type":"string"}},"required":["iconUrl","id","name"]},"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":{"/users/me/tasks/legends":{"get":{"operationId":"getLegendTasks","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LegendTasksDto"}}}},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"summary":"List your accounts' Legend League attacks today","tags":["Users"]}}}}
```

## GET /users/me/tasks/ranked

> List your accounts' ranked attacks this week

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"tags":[{"name":"Users","description":"The signed-in dashboard user. Dashboard sessions only."}],"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":{"RankedTasksDto":{"type":"object","properties":{"items":{"description":"One per account in a ranked group this week.","type":"array","items":{"$ref":"#/components/schemas/RankedTaskDto"}}},"required":["items"]},"RankedTaskDto":{"type":"object","properties":{"attackLimit":{"type":["number","null"],"description":"Null when the game data is unavailable."},"endTime":{"type":"string","description":"When the ranked week ends.","format":"date-time"},"account":{"$ref":"#/components/schemas/TaskAccountDto"},"league":{"$ref":"#/components/schemas/TaskLeagueDto"},"attacks":{"type":"number","description":"Attacks this ranked week."}},"required":["attackLimit","endTime","account","league","attacks"]},"TaskAccountDto":{"type":"object","properties":{"townHallLevel":{"type":["number","null"],"description":"Null when the game didn't return the player."},"tag":{"type":"string"},"name":{"type":"string"}},"required":["townHallLevel","tag","name"]},"TaskLeagueDto":{"type":"object","properties":{"iconUrl":{"type":["string","null"]},"id":{"type":"number"},"name":{"type":"string"}},"required":["iconUrl","id","name"]},"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":{"/users/me/tasks/ranked":{"get":{"operationId":"getRankedTasks","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RankedTasksDto"}}}},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"summary":"List your accounts' ranked attacks this week","tags":["Users"]}}}}
```

## PUT /users/me/clan

> Set your default clan

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"tags":[{"name":"Users","description":"The signed-in dashboard user. Dashboard sessions only."}],"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":{"ClanTagInput":{"type":"object","properties":{"clanTag":{"type":"string","pattern":"^#?[0-9A-Za-z]{3,12}$"}},"required":["clanTag"]},"UserSettingsDto":{"type":"object","properties":{"clan":{"description":"Used by bot commands run without a clan tag.","anyOf":[{"$ref":"#/components/schemas/ClanRefDto"},{"type":"null"}]},"bookmarks":{"description":"Clans the user bookmarked on the dashboard, on every device.","type":"array","items":{"$ref":"#/components/schemas/ClanRefDto"}},"timezone":{"description":"Used by /activity charts; null means UTC.","anyOf":[{"$ref":"#/components/schemas/TimezoneDto"},{"type":"null"}]}},"required":["clan","bookmarks","timezone"]},"ClanRefDto":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":["string","null"]}},"required":["tag","name"]},"TimezoneDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"location":{"type":"string"}},"required":["id","name","location"]},"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":{"/users/me/clan":{"put":{"operationId":"setDefaultClan","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClanTagInput"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserSettingsDto"}}}},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"summary":"Set your default clan","tags":["Users"]}}}}
```

## DELETE /users/me/clan

> Clear your default clan

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"tags":[{"name":"Users","description":"The signed-in dashboard user. Dashboard sessions only."}],"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":{"UserSettingsDto":{"type":"object","properties":{"clan":{"description":"Used by bot commands run without a clan tag.","anyOf":[{"$ref":"#/components/schemas/ClanRefDto"},{"type":"null"}]},"bookmarks":{"description":"Clans the user bookmarked on the dashboard, on every device.","type":"array","items":{"$ref":"#/components/schemas/ClanRefDto"}},"timezone":{"description":"Used by /activity charts; null means UTC.","anyOf":[{"$ref":"#/components/schemas/TimezoneDto"},{"type":"null"}]}},"required":["clan","bookmarks","timezone"]},"ClanRefDto":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":["string","null"]}},"required":["tag","name"]},"TimezoneDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"location":{"type":"string"}},"required":["id","name","location"]},"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":{"/users/me/clan":{"delete":{"operationId":"clearDefaultClan","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserSettingsDto"}}}},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"summary":"Clear your default clan","tags":["Users"]}}}}
```

## Bookmark a clan

> You can bookmark up to 50 clans. Bookmarking a clan again updates its saved name.

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"tags":[{"name":"Users","description":"The signed-in dashboard user. Dashboard sessions only."}],"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":{"ClanTagInput":{"type":"object","properties":{"clanTag":{"type":"string","pattern":"^#?[0-9A-Za-z]{3,12}$"}},"required":["clanTag"]},"UserSettingsDto":{"type":"object","properties":{"clan":{"description":"Used by bot commands run without a clan tag.","anyOf":[{"$ref":"#/components/schemas/ClanRefDto"},{"type":"null"}]},"bookmarks":{"description":"Clans the user bookmarked on the dashboard, on every device.","type":"array","items":{"$ref":"#/components/schemas/ClanRefDto"}},"timezone":{"description":"Used by /activity charts; null means UTC.","anyOf":[{"$ref":"#/components/schemas/TimezoneDto"},{"type":"null"}]}},"required":["clan","bookmarks","timezone"]},"ClanRefDto":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":["string","null"]}},"required":["tag","name"]},"TimezoneDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"location":{"type":"string"}},"required":["id","name","location"]},"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":{"/users/me/bookmarks":{"post":{"description":"You can bookmark up to 50 clans. Bookmarking a clan again updates its saved name.","operationId":"addBookmark","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClanTagInput"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserSettingsDto"}}}},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"summary":"Bookmark a clan","tags":["Users"]}}}}
```

## DELETE /users/me/bookmarks/{clanTag}

> Remove a clan bookmark

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"tags":[{"name":"Users","description":"The signed-in dashboard user. Dashboard sessions only."}],"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":{"UserSettingsDto":{"type":"object","properties":{"clan":{"description":"Used by bot commands run without a clan tag.","anyOf":[{"$ref":"#/components/schemas/ClanRefDto"},{"type":"null"}]},"bookmarks":{"description":"Clans the user bookmarked on the dashboard, on every device.","type":"array","items":{"$ref":"#/components/schemas/ClanRefDto"}},"timezone":{"description":"Used by /activity charts; null means UTC.","anyOf":[{"$ref":"#/components/schemas/TimezoneDto"},{"type":"null"}]}},"required":["clan","bookmarks","timezone"]},"ClanRefDto":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":["string","null"]}},"required":["tag","name"]},"TimezoneDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"location":{"type":"string"}},"required":["id","name","location"]},"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":{"/users/me/bookmarks/{clanTag}":{"delete":{"operationId":"removeBookmark","parameters":[{"name":"clanTag","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserSettingsDto"}}}},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"summary":"Remove a clan bookmark","tags":["Users"]}}}}
```

## PUT /users/me/timezone

> Set your timezone

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"tags":[{"name":"Users","description":"The signed-in dashboard user. Dashboard sessions only."}],"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":{"TimezoneInput":{"type":"object","properties":{"id":{"type":"string","description":"IANA ID, e.g. `Asia/Kolkata`.","minLength":1,"maxLength":64}},"required":["id"]},"UserSettingsDto":{"type":"object","properties":{"clan":{"description":"Used by bot commands run without a clan tag.","anyOf":[{"$ref":"#/components/schemas/ClanRefDto"},{"type":"null"}]},"bookmarks":{"description":"Clans the user bookmarked on the dashboard, on every device.","type":"array","items":{"$ref":"#/components/schemas/ClanRefDto"}},"timezone":{"description":"Used by /activity charts; null means UTC.","anyOf":[{"$ref":"#/components/schemas/TimezoneDto"},{"type":"null"}]}},"required":["clan","bookmarks","timezone"]},"ClanRefDto":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":["string","null"]}},"required":["tag","name"]},"TimezoneDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"location":{"type":"string"}},"required":["id","name","location"]},"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":{"/users/me/timezone":{"put":{"operationId":"setTimezone","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TimezoneInput"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserSettingsDto"}}}},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"summary":"Set your timezone","tags":["Users"]}}}}
```

## DELETE /users/me/timezone

> Clear your timezone

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"tags":[{"name":"Users","description":"The signed-in dashboard user. Dashboard sessions only."}],"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":{"UserSettingsDto":{"type":"object","properties":{"clan":{"description":"Used by bot commands run without a clan tag.","anyOf":[{"$ref":"#/components/schemas/ClanRefDto"},{"type":"null"}]},"bookmarks":{"description":"Clans the user bookmarked on the dashboard, on every device.","type":"array","items":{"$ref":"#/components/schemas/ClanRefDto"}},"timezone":{"description":"Used by /activity charts; null means UTC.","anyOf":[{"$ref":"#/components/schemas/TimezoneDto"},{"type":"null"}]}},"required":["clan","bookmarks","timezone"]},"ClanRefDto":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":["string","null"]}},"required":["tag","name"]},"TimezoneDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"location":{"type":"string"}},"required":["id","name","location"]},"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":{"/users/me/timezone":{"delete":{"operationId":"clearTimezone","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserSettingsDto"}}}},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"summary":"Clear your timezone","tags":["Users"]}}}}
```

## List your saved game data exports

> Only the exports you saved, even if someone else has linked the same account.

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"tags":[{"name":"Users","description":"The signed-in dashboard user. Dashboard sessions only."}],"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":{"GameExportsDto":{"type":"object","properties":{"items":{"description":"One per account this user saved an export for.","type":"array","items":{"$ref":"#/components/schemas/GameExportDto"}}},"required":["items"]},"GameExportDto":{"type":"object","properties":{"data":{"type":"object","additionalProperties":true},"tag":{"type":"string"},"exportedAt":{"format":"date-time","type":"string","description":"When the game made the export."},"updatedAt":{"format":"date-time","type":"string"}},"required":["data","tag","exportedAt","updatedAt"]},"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":{"/users/me/game-exports":{"get":{"description":"Only the exports you saved, even if someone else has linked the same account.","operationId":"getGameExports","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GameExportsDto"}}}},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"summary":"List your saved game data exports","tags":["Users"]}}}}
```

## Save a game data export for an account

> The account must be linked to you, and the export must be for the same player tag.

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"tags":[{"name":"Users","description":"The signed-in dashboard user. Dashboard sessions only."}],"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":{"GameExportInput":{"type":"object","properties":{"data":{"type":"object","additionalProperties":true,"description":"The game's data export for this account, as copied from the game."}},"required":["data"]},"GameExportDto":{"type":"object","properties":{"data":{"type":"object","additionalProperties":true},"tag":{"type":"string"},"exportedAt":{"format":"date-time","type":"string","description":"When the game made the export."},"updatedAt":{"format":"date-time","type":"string"}},"required":["data","tag","exportedAt","updatedAt"]},"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":{"/users/me/game-exports/{playerTag}":{"put":{"description":"The account must be linked to you, and the export must be for the same player tag.","operationId":"saveGameExport","parameters":[{"name":"playerTag","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GameExportInput"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GameExportDto"}}}},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"summary":"Save a game data export for an account","tags":["Users"]}}}}
```

## DELETE /users/me/game-exports/{playerTag}

> Delete a saved game data export

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"tags":[{"name":"Users","description":"The signed-in dashboard user. Dashboard sessions only."}],"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":{"ResultOkDto":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]},"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":{"/users/me/game-exports/{playerTag}":{"delete":{"operationId":"removeGameExport","parameters":[{"name":"playerTag","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultOkDto"}}}},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"summary":"Delete a saved game data export","tags":["Users"]}}}}
```


---

# 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/users.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.
