Choose or change your username
curl --request PUT \
--url https://patch.gg/api/v1/me/username \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"username": "<string>"
}
'const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({username: '<string>'})
};
fetch('https://patch.gg/api/v1/me/username', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://patch.gg/api/v1/me/username"
payload = { "username": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text){
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"email": "<string>",
"username": "<string>",
"birthdate": "<string>",
"role": "user",
"orgs": [
{
"slug": "<string>",
"name": "<string>",
"kind": "personal",
"role": "<string>"
}
],
"auth": {
"via": "session",
"scopes": [
"read"
]
}
}{
"error": {
"code": "version_exists",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "version_exists",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "version_exists",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "version_exists",
"message": "<string>",
"details": "<unknown>"
}
}Account
Choose or change your username
The first time, this also creates your personal org with the same name. Renames are limited to once every 30 days; the old name redirects.
PUT
/
me
/
username
Choose or change your username
curl --request PUT \
--url https://patch.gg/api/v1/me/username \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"username": "<string>"
}
'const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({username: '<string>'})
};
fetch('https://patch.gg/api/v1/me/username', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://patch.gg/api/v1/me/username"
payload = { "username": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text){
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"email": "<string>",
"username": "<string>",
"birthdate": "<string>",
"role": "user",
"orgs": [
{
"slug": "<string>",
"name": "<string>",
"kind": "personal",
"role": "<string>"
}
],
"auth": {
"via": "session",
"scopes": [
"read"
]
}
}{
"error": {
"code": "version_exists",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "version_exists",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "version_exists",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "version_exists",
"message": "<string>",
"details": "<unknown>"
}
}Authorizations
An API key (pch_...) or the token from pch login.
Body
application/json
Required string length:
1 - 64Response
Updated
YYYY-MM-DD, once given; only you see it
Available options:
user, staff Show child attributes
Show child attributes
Show child attributes
Show child attributes