API / Method reference / Projects
Projects
Projects and their members.
Base URL:
https://sourhost.net/api/v1·Auth: Authorization: Bearer sh_live_…GET
/projectsList projects
Scope:
projects:readExample request
curl "https://sourhost.net/api/v1/projects" \
-H "Authorization: Bearer $SOURHOST_TOKEN"Response
HTTP
HTTP/2 200 OK
[
{
"id": "12",
"name": "Мой проект",
"role": "owner",
"createdAt": "2026-08-07T20:04:03Z",
"services": 2,
"monthly": 600,
"members": [
{
"id": "27",
"email": "[email protected]",
"owner": true
}
]
}
]POST
/projectsCreate a project
Scope:
projects:writeExample request
curl -X POST "https://sourhost.net/api/v1/projects" \
-H "Authorization: Bearer $SOURHOST_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name":"Турнир"}'Response
201 Success
PATCH
/projects/:idRename a project
Scope:
projects:writeParameters
idrequired | path · string | Project number (from GET /projects), or ticket number |
Example request
curl -X PATCH "https://sourhost.net/api/v1/projects/12" \
-H "Authorization: Bearer $SOURHOST_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name":"Турнир 2026"}'Response
204 Empty response
DELETE
/projects/:idDelete a project
Scope:
projects:deleteParameters
idrequired | path · string | Project number (from GET /projects), or ticket number |
Example request
curl -X DELETE "https://sourhost.net/api/v1/projects/12" \
-H "Authorization: Bearer $SOURHOST_TOKEN"Response
204 Empty response
POST
/projects/:id/membersAdd a member
Scope:
projects:membersParameters
idrequired | path · string | Project number (from GET /projects), or ticket number |
Example request
curl -X POST "https://sourhost.net/api/v1/projects/12/members" \
-H "Authorization: Bearer $SOURHOST_TOKEN" \
-H "Content-Type: application/json" \
-d '{"email":"[email protected]"}'Response
204 Empty response
DELETE
/projects/:id/members/:memberIdRemove a member
Scope:
projects:membersParameters
idrequired | path · string | Project number (from GET /projects), or ticket number |
memberIdrequired | path · string | Member ID (from the list) |
Example request
curl -X DELETE "https://sourhost.net/api/v1/projects/12/members/9" \
-H "Authorization: Bearer $SOURHOST_TOKEN"Response
204 Empty response
Common errors
Any method can answer with these. More on errors
| 400 | bad_request | Invalid body or parameters |
| 401 | token_invalid | The token is wrong, revoked or expired |
| 403 | token_scope_missing | The token lacks the scope |
| 403 | token_project_forbidden | The project or service is outside the token’s limits |
| 404 | not_found | No such project, service or object |
| 429 | token_rate_limited | Too many requests, see Retry-After |
| 503 | upstream_unavailable | The panel or node didn't answer — retry later |