API conventions
Base address, authentication, errors, languages, asynchronous actions and status values that apply to every endpoint.
Base address and format
All endpoints live under /api on the same host as the dashboard, for example https://veneshcloud.ir/api. Requests and responses use JSON. Send Accept: application/json, and Content-Type: application/json when there is a body.
Authentication
Send your API key as Authorization: Bearer <key>. Endpoints marked public in the reference need no key. A missing or revoked key gets 401.
Errors
| Status | Meaning |
|---|---|
401 |
No valid key or token. |
403 |
The resource exists but belongs to another account. |
404 |
Not found. |
422 |
The input is invalid, or the action is not allowed in the resource's current state (for example resizing a VM that is stopped). |
429 |
Too many requests. Sign-up, login and code endpoints are limited per address. Wait and retry. |
Error bodies contain a message. Validation errors also contain an errors object with a list of messages for each field.
Language
Send Accept-Language: fa or en to receive error messages in Persian or English. Anything else falls back to English. Only the text changes, never the structure.
Asynchronous actions
Creating a VM and acting on one takes time, so the API answers quickly and finishes the work in the background.
- Call the action, such as
POST /orders/{order}/actions/stop. It answers202with the VM in a working status, for examplestopping. - Poll
GET /orders/{order}every few seconds. - Stop when the status is a resting one:
running,stopped,failedorterminated.
Working statuses are pending, provisioning, starting, stopping, rebooting, resizing, reinstalling, restoring and deleting. If a VM ends in failed, failure_reason explains why.
Private-network changes and app deployments follow the same pattern with their own status fields.
Amounts and lists
Money for display is in Rial, in fields ending in _rial. List endpoints accept per_page, and paginated ones return a meta object alongside data.
Related pages
Each reference page shows every field and a curl example: start at the Developer overview.