API / Method reference / Projects

Projects

Projects and their members.

GET/projects

List projects

Scope: projects:read
Example 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/projects

Create a project

Scope: projects:write
Example 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/:id

Rename a project

Scope: projects:write
Parameters
idrequiredpath · stringProject 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/:id

Delete a project

Scope: projects:delete
Parameters
idrequiredpath · stringProject 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/members

Add a member

Scope: projects:members
Parameters
idrequiredpath · stringProject 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/:memberId

Remove a member

Scope: projects:members
Parameters
idrequiredpath · stringProject number (from GET /projects), or ticket number
memberIdrequiredpath · stringMember 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

400bad_requestInvalid body or parameters
401token_invalidThe token is wrong, revoked or expired
403token_scope_missingThe token lacks the scope
403token_project_forbiddenThe project or service is outside the token’s limits
404not_foundNo such project, service or object
429token_rate_limitedToo many requests, see Retry-After
503upstream_unavailableThe panel or node didn't answer — retry later