curl --request POST \
--url https://patch.gg/api/v1/projects/{owner}/{slug}/claim \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"evidence": "https://github.com/mira/lantern"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({evidence: 'https://github.com/mira/lantern'})
};
fetch('https://patch.gg/api/v1/projects/{owner}/{slug}/claim', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://patch.gg/api/v1/projects/{owner}/{slug}/claim"
payload = { "evidence": "https://github.com/mira/lantern" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"status": "approved",
"claim": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "pending",
"evidence": "<string>",
"github_login": "<string>",
"reviewed_at": "<string>",
"created_at": "<string>"
},
"project": {
"owner": "<string>",
"slug": "<string>",
"handle": "mira/lantern",
"slug_changed": true
},
"old_handle": "patch/lantern"
}{
"status": "pending",
"claim": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "pending",
"evidence": "<string>",
"github_login": "<string>",
"reviewed_at": "<string>",
"created_at": "<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>"
}
}{
"error": {
"code": "version_exists",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "version_exists",
"message": "<string>",
"details": "<unknown>"
}
}Claim a project as its original creator
Signed in to Patch as yourself, not with an API key (403 session_required). A project whose original_creator hasn’t claimed it can be claimed by them; Patch knows them by their GitHub account, so a Patch account with no GitHub linked gets 422 github_required (link it in Settings, Account). When a GitHub account linked to yours is the one Patch recorded, the claim is approved at once (200): the project moves to your own account, keeping its slug, or the next free one there (project.slug_changed), and its old address keeps leading to it. Otherwise the claim waits for Patch’s staff (202), and needs evidence (422 evidence_required): a link that shows it’s yours, or a few words. Asking again while it waits replaces the evidence. A project with no original creator answers 409 no_original_creator, one already claimed 409 already_claimed, and one on an account you’re in 409 already_yours. You need a username first (422 username_required).
curl --request POST \
--url https://patch.gg/api/v1/projects/{owner}/{slug}/claim \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"evidence": "https://github.com/mira/lantern"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({evidence: 'https://github.com/mira/lantern'})
};
fetch('https://patch.gg/api/v1/projects/{owner}/{slug}/claim', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://patch.gg/api/v1/projects/{owner}/{slug}/claim"
payload = { "evidence": "https://github.com/mira/lantern" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"status": "approved",
"claim": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "pending",
"evidence": "<string>",
"github_login": "<string>",
"reviewed_at": "<string>",
"created_at": "<string>"
},
"project": {
"owner": "<string>",
"slug": "<string>",
"handle": "mira/lantern",
"slug_changed": true
},
"old_handle": "patch/lantern"
}{
"status": "pending",
"claim": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "pending",
"evidence": "<string>",
"github_login": "<string>",
"reviewed_at": "<string>",
"created_at": "<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>"
}
}{
"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
What shows it's yours, for staff: a link (the original's page or repo naming you) or a few words. Not needed when your GitHub account is the one recorded.
2000"https://github.com/mira/lantern"