For AI agents: markdown of this page — /docs-content-en/infra/lifecycle/start.md documentation index — /llms.txt
Start the server
POST /v1/infra/servers/:id/start
Brings a server up from the sleeping, error, or provisioning states. For sleeping, the virtual machine is started again at the provider and returns to running status as it becomes ready — the call returns a response immediately, without waiting for actual readiness; track it by polling GET /v1/infra/servers/:id. For error with a connected tunnel (blackholeStatus: "CONNECTED"), the server is moved straight to running without contacting the provider. For provisioning, the start is retried without resetting the wait timer. If the server is not in one of these states — for example, already running — the call returns 422 SERVER_WRONG_STATE with the current state (currentState) and the list of available actions (availableActions).
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id |
path | string (UUID) | yes | Server ID |
The request body is empty.
Examples
curl — personal key
curl -X POST -H "X-Api-Key: YOUR_API_KEY" \
https://vibecode.bitrix24.com/v1/infra/servers/SERVER_ID/start
curl — OAuth application
curl -X POST -H "X-Api-Key: YOUR_APP_KEY" \
-H "Authorization: Bearer USER_SESSION_TOKEN" \
https://vibecode.bitrix24.com/v1/infra/servers/SERVER_ID/start
JavaScript — personal key
await fetch(
`https://vibecode.bitrix24.com/v1/infra/servers/${serverId}/start`,
{ method: 'POST', headers: { 'X-Api-Key': 'YOUR_API_KEY' } }
)
// Wait for readiness — poll GET /v1/infra/servers/:id
JavaScript — OAuth application
await fetch(
`https://vibecode.bitrix24.com/v1/infra/servers/${serverId}/start`,
{
method: 'POST',
headers: {
'X-Api-Key': 'YOUR_APP_KEY',
'Authorization': 'Bearer USER_SESSION_TOKEN',
},
}
)
Response fields
| Field | Type | Description |
|---|---|---|
success |
boolean | true. The virtual machine has been started at the provider, or the start command has been dispatched in the background |
Response example
{ "success": true }
Error response example
422 — the server exists but is not in sleeping/error/provisioning status, for example already running. The response carries the current state and the actions available now:
{
"success": false,
"error": {
"code": "SERVER_WRONG_STATE",
"message": "Server is RUNNING; /start requires one of SLEEPING, ERROR, PROVISIONING.",
"userMessage": "Server is currently RUNNING. Start only applies to SLEEPING, ERROR, or PROVISIONING servers.",
"currentState": { "status": "RUNNING", "blackholeStatus": "CONNECTED", "hasExternalId": true },
"availableActions": ["reboot", "sleep-now", "delete"]
}
}
Errors
| HTTP | Code | Description |
|---|---|---|
| 401 | MISSING_API_KEY |
The X-Api-Key header was not provided |
| 401 | INVALID_API_KEY |
Invalid or expired API key |
| 402 | ACCOUNT_FROZEN |
Vibecode balance is frozen. Top up and retry |
| 404 | SERVER_NOT_FOUND |
No server with this id — deleted, or belonging to another API key |
| 409 | CONFLICT |
The server status changed during the operation — retry the request |
| 422 | SERVER_WRONG_STATE |
The server exists but is not in sleeping/error/provisioning status. error.currentState carries the current state; error.availableActions lists what you can do now |
| 422 | VM_MISSING |
The record has no externalId — the virtual machine was not created or was deleted externally. Delete the server and create a new one |
| 429 | RATE_LIMITED |
The platform-wide request limit was exceeded |
| 502 | PROVIDER_ERROR |
The cloud provider returned an error while starting the virtual machine |
Full list of common API errors — Errors.
Known specifics
- Blocking variant. If the client needs the server fully ready before the next step — use
POST /wake?wait=trueinstead of/start. It waits forstatus: "running"+blackholeStatus: "CONNECTED"for up to ~6.5 minutes. - Manual
/startbypassespreventWake. Unlike automatic wake on subdomain access, an explicitPOST /startclears thepreventWakeflag and starts the server even if it was blocked. Billing locks (ACCOUNT_FROZEN) are cleared by a separate top-up, not via/start. - For
runningit returns 422SERVER_WRONG_STATE. The server is already running — no repeat start is needed. For a reboot —POST /reboot.
See also
- Stop the server —
POST /v1/infra/servers/:id/stop. - Wake the server (with
?wait=true) — blocking variant that waits for readiness. - Sleep now — the reverse operation.
- Refresh status — force a provider poll after start.
- Get the server — poll for readiness.
Stop the server
POST /v1/infra/servers/:id/stop
A graceful stop of a running server. The virtual machine is stopped at the provider, the status changes to sleeping, the open billing transaction for the active period is closed, and a transaction for the sleep period is opened (the sleep tariff is substantially lower). Works for any mode — both BLACKHOLE and OPEN. The server can be started again via POST /start or woken automatically by accessing the subdomain.
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id |
path | string (UUID) | yes | Server ID |
The request body is empty.
Examples
curl — personal key
curl -X POST -H "X-Api-Key: YOUR_API_KEY" \
https://vibecode.bitrix24.com/v1/infra/servers/SERVER_ID/stop
curl — OAuth application
curl -X POST -H "X-Api-Key: YOUR_APP_KEY" \
-H "Authorization: Bearer USER_SESSION_TOKEN" \
https://vibecode.bitrix24.com/v1/infra/servers/SERVER_ID/stop
JavaScript — personal key
await fetch(
`https://vibecode.bitrix24.com/v1/infra/servers/${serverId}/stop`,
{ method: 'POST', headers: { 'X-Api-Key': 'YOUR_API_KEY' } }
)
JavaScript — OAuth application
await fetch(
`https://vibecode.bitrix24.com/v1/infra/servers/${serverId}/stop`,
{
method: 'POST',
headers: {
'X-Api-Key': 'YOUR_APP_KEY',
'Authorization': 'Bearer USER_SESSION_TOKEN',
},
}
)
Response fields
| Field | Type | Description |
|---|---|---|
success |
boolean | true on a successful stop |
Response example
{ "success": true }
Error response example
422 — the server exists but is not in running status (e.g. sleeping). The response carries the current state and the actions available now:
{
"success": false,
"error": {
"code": "SERVER_WRONG_STATE",
"message": "Server is SLEEPING; /stop requires RUNNING.",
"userMessage": "Server is currently SLEEPING. Stop only applies to a RUNNING server.",
"currentState": { "status": "SLEEPING", "blackholeStatus": "DISCONNECTED", "hasExternalId": true },
"availableActions": ["wake", "start", "repair", "delete"]
}
}
404 — no server with this id (deleted, or belonging to another API key):
{
"success": false,
"error": {
"code": "SERVER_NOT_FOUND",
"message": "Server not found"
}
}
Errors
| HTTP | Code | Description |
|---|---|---|
| 401 | MISSING_API_KEY |
The X-Api-Key header was not provided |
| 401 | INVALID_API_KEY |
Invalid or expired API key |
| 404 | SERVER_NOT_FOUND |
No server with this id — deleted, or belonging to another API key |
| 422 | SERVER_WRONG_STATE |
The server exists but is not in running status. error.currentState carries the current state; error.availableActions lists what you can do now |
| 422 | VM_MISSING |
The server record has no cloud VM (provisioning never finished or the VM was removed manually) — delete the server and create a new one |
| 429 | RATE_LIMITED |
The platform-wide request limit was exceeded |
| 502 | PROVIDER_ERROR |
The cloud provider returned an error while stopping |
Full list of common API errors — Errors.
Known specifics
- Why
sleeping, notstopped. This is Infrastructure API terminology: a stopped server is called "sleeping" because billing for it follows a separatesleepPriceMonthlytariff (see provider tariffs) — lower than the active one. The valuestoppeddoes not appear in v1 responses. /stopresetspreventWake(the automatic flag that blocks waking) — after stopping, the server can again be woken automatically by accessing the subdomain or via/wake.- For BLACKHOLE there is an alternative —
/sleep-now. The result is functionally identical./sleep-nowis used from the "Sleep" UI button and is explicitly marked as BH-specific;/stopis universal for any mode.
See also
- Start the server —
POST /v1/infra/servers/:id/start. - Sleep now — a synonym for BLACKHOLE.
- Configure auto-sleep — so the server sleeps by itself after N minutes of inactivity.
- Delete the server — full deletion of the virtual machine.