Name Change Endpoints
Related Endpoints​
Search Name Changes​
GET/names
Searches for name changes that match a name and/or status filter. Returns an array of NameChange objects.
Query Params
Field | Type | Required | Description |
---|---|---|---|
username | string | false | The partial username for the player you're trying to search for. |
status | NameChangeStatus | false | The status to filter the results by. |
limit | integer | false | The pagination limit. See Pagination |
offset | integer | false | The pagination offset. See Pagination |
Example Request
- cURL
- JavaScript / TypeScript
curl -X GET https://api.wiseoldman.net/v2/names?username=zezi&status=pending&limit=2 \
-H "Content-Type: application/json"
const { WOMClient, NameChangeStatus } = require('@wise-old-man/utils');
const client = new WOMClient();
const nameChanges = await client.nameChanges.searchNameChanges(
{ username: 'zezi', status: NameChangeStatus.PENDING },
{ limit: 2 }
);
Example Response
[
{
"id": 122524,
"playerId": 534993,
"oldName": "iicyc",
"newName": "ZezimaNite",
"status": "pending",
"reviewContext": {
"reason": "excessive_gains";
"ehpDiff": 407;
"ehbDiff": 204;
"hoursDiff": 596;
}
"resolvedAt": null,
"updatedAt": "2022-10-13T18:01:17.159Z",
"createdAt": "2022-10-13T18:01:17.159Z"
},
{
"id": 33296,
"playerId": 63821,
"oldName": "Zezime54",
"newName": "zezi1meme",
"status": "pending",
"reviewContext": null,
"resolvedAt": null,
"updatedAt": "2021-10-25T11:50:31.581Z",
"createdAt": "2021-10-25T11:50:31.581Z"
}
]
Submit Name Change​
POST/names
Submits a name change request between two usernames (old and new). Returns a (pending) NameChange object.
Body Params
Field | Type | Required | Description |
---|---|---|---|
oldName | string | true | The player's "previous" username. |
newName | string | true | The player's "new" username. |
Example Request
- cURL
- JavaScript / TypeScript
curl -X POST https://api.wiseoldman.net/v2/names \
-H "Content-Type: application/json" \
-d '{
"oldName": "psikoi",
"newName": "zezima",
}'
const { WOMClient } = require('@wise-old-man/utils');
const client = new WOMClient();
const newNameChange = await client.nameChanges.submitNameChange('psikoi', 'zezima');
Example Response
{
"id": 63421,
"playerId": 2,
"oldName": "psikoi",
"newName": "zezima",
"status": "pending",
"reviewContext": null,
"resolvedAt": null,
"updatedAt": "2022-10-25T11:50:31.581Z",
"createdAt": "2022-10-25T11:50:31.581Z"
}