API / Method reference / Account

Account

Profile, balance, summary and notification settings.

GET/me

Account and balance

Scope: account:read
Example request
curl "https://sourhost.net/api/v1/me" \
  -H "Authorization: Bearer $SOURHOST_TOKEN"
Response
HTTP
HTTP/2 200 OK
{
  "id": 27,
  "email": "[email protected]",
  "name": "Олег",
  "balance": 1250,
  "timezone": "Europe/Kyiv",
  "locale": "uk",
  "role": "user"
}
GET/dashboard/summary

Summary

Projects, active services, monthly total and the next payment.

Scope: account:read
Example request
curl "https://sourhost.net/api/v1/dashboard/summary" \
  -H "Authorization: Bearer $SOURHOST_TOKEN"
Response
HTTP
HTTP/2 200 OK
{
  "monthlyTotal": 900,
  "projects": 2,
  "activeServices": 3,
  "openTickets": 0,
  "nextPaymentAt": "2026-12-01T00:00:00Z"
}
GET/settings

Notification settings

Scope: account:read
Example request
curl "https://sourhost.net/api/v1/settings" \
  -H "Authorization: Bearer $SOURHOST_TOKEN"
Response
HTTP
HTTP/2 200 OK
{
  "email_notification": true,
  "telegram_notification": false,
  "renewal_reminders": true,
  "auto_pay": false
}
PATCH/settings

Change settings

Scope: account:write
Example request
curl -X PATCH "https://sourhost.net/api/v1/settings" \
  -H "Authorization: Bearer $SOURHOST_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"renewal_reminders":true,"auto_pay":true}'
Response
204 Empty response
PATCH/profile

Change the profile

Scope: account:write
Example request
curl -X PATCH "https://sourhost.net/api/v1/profile" \
  -H "Authorization: Bearer $SOURHOST_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name":"Олег","phone":"+380501234567","timezone":"Europe/Kyiv"}'
Response
204 Empty response
GET/referral

Referral programme

Scope: account:read
Example request
curl "https://sourhost.net/api/v1/referral" \
  -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