Staff: add a host game
curl --request POST \
--url https://patch.gg/api/v1/host-games \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"slug": "<string>",
"name": "<string>",
"engine": "<string>",
"cover_url": "<string>",
"stores": []
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
slug: '<string>',
name: '<string>',
engine: '<string>',
cover_url: '<string>',
stores: []
})
};
fetch('https://patch.gg/api/v1/host-games', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://patch.gg/api/v1/host-games"
payload = {
"slug": "<string>",
"name": "<string>",
"engine": "<string>",
"cover_url": "<string>",
"stores": []
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"slug": "<string>",
"name": "<string>",
"cover_url": "<string>",
"engine": "<string>",
"stores": [
{
"store": "steam",
"ref": "<string>"
}
],
"builds": [
{
"store": "steam",
"build_ref": "<string>",
"version_label": "<string>"
}
]
}{
"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>"
}
}Host games
Staff: add a host game
POST
/
host-games
Staff: add a host game
curl --request POST \
--url https://patch.gg/api/v1/host-games \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"slug": "<string>",
"name": "<string>",
"engine": "<string>",
"cover_url": "<string>",
"stores": []
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
slug: '<string>',
name: '<string>',
engine: '<string>',
cover_url: '<string>',
stores: []
})
};
fetch('https://patch.gg/api/v1/host-games', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://patch.gg/api/v1/host-games"
payload = {
"slug": "<string>",
"name": "<string>",
"engine": "<string>",
"cover_url": "<string>",
"stores": []
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"slug": "<string>",
"name": "<string>",
"cover_url": "<string>",
"engine": "<string>",
"stores": [
{
"store": "steam",
"ref": "<string>"
}
],
"builds": [
{
"store": "steam",
"build_ref": "<string>",
"version_label": "<string>"
}
]
}{
"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