API / Method reference / Support
Support
Tickets and replies.
Base URL:
https://sourhost.net/api/v1·Auth: Authorization: Bearer sh_live_…GET
/support/ticketsMy tickets
Scope:
support:readExample request
curl "https://sourhost.net/api/v1/support/tickets" \
-H "Authorization: Bearer $SOURHOST_TOKEN"Response
204 Empty response
GET
/support/tickets/:idA ticket with its messages
Scope:
support:readParameters
idrequired | path · string | Project number (from GET /projects), or ticket number |
Example request
curl "https://sourhost.net/api/v1/support/tickets/12" \
-H "Authorization: Bearer $SOURHOST_TOKEN"Response
204 Empty response
POST
/support/ticketsOpen a ticket
Form fields, not JSON.
Scope:
support:writeParameters
subjectrequired | body · string | Subject |
messagerequired | body · string | Text |
department | body · string | tech, billing, general or transfer |
serviceId | body · string | The service it is about |
Example request
curl -X POST "https://sourhost.net/api/v1/support/tickets" \
-H "Authorization: Bearer $SOURHOST_TOKEN" \
--data-urlencode "subject=Сервер не стартует" \
--data-urlencode "message=После обновления сервер сразу падает." \
--data-urlencode "department=tech" \
--data-urlencode "serviceId=34"Response
201 Success
POST
/support/tickets/:id/messagesReply in a ticket
Scope:
support:writeParameters
idrequired | path · string | Project number (from GET /projects), or ticket number |
Example request
curl -X POST "https://sourhost.net/api/v1/support/tickets/12/messages" \
-H "Authorization: Bearer $SOURHOST_TOKEN" \
--data-urlencode "text=Спасибо, заработало!"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 |