[{"data":1,"prerenderedAt":7},["ShallowReactive",2],{"docs-applications\u002Favailable-servers":3,"docs-tabs-applications\u002Favailable-servers":6},{"content":4,"lastmod":5},"\n## Servers for moving an application\n\n`GET \u002Fv1\u002Fapplications\u002F:id\u002Favailable-servers`\n\nShows where the owner can move the application: which of their own servers fit, and whether a new server can be created. Call it before you show the replace-server screen. The response tells you whether the replace button is needed and, if the replacement is unavailable, gives the reason as a code. The replacement itself is done by [`POST \u002Fv1\u002Fapplications\u002F:id\u002Freplace-server`](.\u002Freplace-server.md).\n\nOnly the card owner can call this method. A Bitrix24 account administrator who does not own the application gets `403 FORBIDDEN`, just as with the replacement itself. This way a button that would end in a refusal is never shown.\n\n**Authorization:** `X-Api-Key` with the `vibe:infra` scope.\n\n## Parameters\n\n| Parameter | Type | Required | Description |\n|-----------|------|:--------:|-------------|\n| `id` (path) | string | yes | Application ID. List: [`GET \u002Fv1\u002Fapplications`](.\u002Flist.md) |\n\n## Examples\n\n### curl — personal key\n\n```bash\ncurl -H \"X-Api-Key: YOUR_API_KEY\" \\\n  https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fapplications\u002Fcmsw806qi0000tdskiw2aegii\u002Favailable-servers\n```\n\n### curl — OAuth application\n\n```bash\ncurl -H \"X-Api-Key: YOUR_APP_KEY\" \\\n  -H \"Authorization: Bearer USER_SESSION_TOKEN\" \\\n  https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fapplications\u002Fcmsw806qi0000tdskiw2aegii\u002Favailable-servers\n```\n\n### JavaScript — personal key\n\n```javascript\nconst id = 'cmsw806qi0000tdskiw2aegii'\nconst res = await fetch(`https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fapplications\u002F${id}\u002Favailable-servers`, {\n  headers: { 'X-Api-Key': 'YOUR_API_KEY' },\n})\nconst { data } = await res.json()\n\nconsole.log('Own servers:', data.servers.map((s) => s.name))\nif (!data.canCreateNew) {\n  console.log('A new server is not available:', data.createNewBlocked.code)\n}\n```\n\n### JavaScript — OAuth application\n\n```javascript\nconst id = 'cmsw806qi0000tdskiw2aegii'\nconst res = await fetch(`https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fapplications\u002F${id}\u002Favailable-servers`, {\n  headers: {\n    'X-Api-Key': 'YOUR_APP_KEY',\n    'Authorization': 'Bearer USER_SESSION_TOKEN',\n  },\n})\nconst { data } = await res.json()\n```\n\n## Response fields\n\n| Field | Type | Description |\n|-------|------|-------------|\n| `success` | boolean | Always `true` on success |\n| `data` | object | Where the application can be moved |\n| `data.servers` | array | The owner's servers the application can be moved to. At most 50, newest first. May be empty |\n| `data.servers[].id` | string | Server ID. Pass it as `serverId` to [`POST \u002Fv1\u002Fapplications\u002F:id\u002Freplace-server`](.\u002Freplace-server.md) |\n| `data.servers[].name` | string | Server name |\n| `data.servers[].displayName` | string \\| null | Display name, if set |\n| `data.servers[].status` | string | Server state in lowercase, as in [`GET \u002Fv1\u002Finfra\u002Fservers`](\u002Fdocs\u002Finfra\u002Fservers\u002Flist) |\n| `data.servers[].providerId` | string | Server provider |\n| `data.servers[].plan` | string | Server plan |\n| `data.servers[].region` | string | Server region |\n| `data.servers[].kind` | string | `STANDALONE` — a separate machine, `GALAXY_APP` — an application container in a galaxy |\n| `data.servers[].blackholeStatus` | string \\| null | Tunnel state of the server |\n| `data.servers[].createdAt` | string | Server creation time, ISO 8601 |\n| `data.canCreateNew` | boolean | Whether the server can be replaced with a newly created one right now |\n| `data.createNewBlocked` | object | Present only when `canCreateNew` is `false`, and names the reason |\n| `data.createNewBlocked.code` | string | `ACCOUNT_FROZEN`, `INFRA_NOT_PERMITTED`, `SERVER_CREATION_DISABLED` or `SERVER_CREATION_ADMINS_ONLY` |\n| `data.createNewBlocked.message` | string | Text for logs, in English |\n| `data.createNewBlocked.userMessage` | string | Human-readable text in the key owner's language |\n| `data.createNewBlocked.alternatives` | array | What can be done instead of creating a server. The shape matches the `402` response of [`POST \u002Fv1\u002Fapplications\u002F:id\u002Freplace-server`](.\u002Freplace-server.md) |\n\n## Response example\n\n```json\n{\n  \"success\": true,\n  \"data\": {\n    \"servers\": [\n      {\n        \"id\": \"srv_new\",\n        \"name\": \"my-server\",\n        \"displayName\": null,\n        \"status\": \"running\",\n        \"providerId\": \"bitrix-cloud\",\n        \"plan\": \"bc-small\",\n        \"region\": \"bc-eu-central\",\n        \"kind\": \"STANDALONE\",\n        \"blackholeStatus\": null,\n        \"createdAt\": \"2026-10-01T09:00:00.000Z\"\n      }\n    ],\n    \"canCreateNew\": true\n  }\n}\n```\n\n## Error response example\n\n403 — the application belongs to someone else, and a Bitrix24 account administrator replaces the server in their Vibecode account:\n\n```json\n{\n  \"success\": false,\n  \"error\": {\n    \"code\": \"FORBIDDEN\",\n    \"message\": \"Forbidden\"\n  }\n}\n```\n\n## Errors\n\n| HTTP | Code | Description |\n|------|------|-------------|\n| 401 | `NO_PORTAL` | The key is not bound to a portal |\n| 401 | `MISSING_API_KEY`, `INVALID_API_KEY` | No valid key |\n| 402 | `ACCOUNT_FROZEN` | The portal balance is frozen and the whole `\u002Fv1` surface is closed. The body carries `message` and `topupUrl`. If only paid calls are closed, the method returns `200` with `canCreateNew: false` |\n| 403 | `INFRA_SCOPE_REQUIRED` | The key lacks the `vibe:infra` scope |\n| 403 | `INFRA_FORBIDDEN_FOR_COWORK_KEY` | A key with the `vibe:cowork` scope works with data only; this method is closed to it, reads included |\n| 403 | `FORBIDDEN` | The application does not belong to the key owner |\n| 403 | `WRITE_BLOCKED_READONLY_KEY` | The key is read-only |\n| 403 | `MANAGEMENT_KEY_NO_ENTITY_ACCESS` | Management key: use a personal key or an authorization key |\n| 403 | `PORTAL_KEY_REQUIRED` | The key record is corrupted and has no owner. An ordinary key without a portal gets `401 NO_PORTAL` above |\n| 404 | `APPLICATION_NOT_FOUND` | No such application on the portal the key is bound to. An application on another portal gets the same response |\n| 429 | `RATE_LIMITED` | 60 requests per minute for the card owner, whichever key they use |\n\nThe `error.message` text is in English and meant for logs: build interface texts from `error.code`. The full list of common API errors is in [Errors](\u002Fdocs\u002Ferrors).\n\n## Known specifics\n\n- **Not all of the owner's servers are listed.** A server must belong to the card owner, exist, not be the application's current server, not be linked to another application, not be an agent or bot server and not be a galaxy host. The replacement does not accept a server that is not listed here: `POST \u002Fv1\u002Fapplications\u002F:id\u002Freplace-server` returns `404 SERVER_NOT_FOUND` or `409 SERVER_ALREADY_LINKED` for it.\n- **An empty `servers` array does not block the replacement.** The server can also be replaced by creating a new one, if `canCreateNew` is `true`. Hide the replace button when the list is empty and `canCreateNew` is `false`, and take the reason from `createNewBlocked`.\n- **A frozen balance closes creation only.** With `ACCOUNT_FROZEN` in `createNewBlocked`, moving to your own existing server stays available, and `servers` is filled by the same rules.\n- **Creation depends on the account policy.** The codes `INFRA_NOT_PERMITTED`, `SERVER_CREATION_DISABLED` and `SERVER_CREATION_ADMINS_ONLY` mean the account policy does not let this person create servers. The replacement in the `new` form returns the same codes.\n- **The response is a snapshot at the time of the call.** A server may be taken or deleted between this method and the replacement. The replacement rechecks everything itself and returns the matching code.\n- **The method neither changes nor creates anything.** Call it as often as the screen needs.\n\n## See also\n\n- [Replace an application server](.\u002Freplace-server.md)\n- [Application card](.\u002Fget.md)\n- [Server list](\u002Fdocs\u002Finfra\u002Fservers\u002Flist)\n- [Application catalog](\u002Fdocs\u002Fapplications)\n- [Errors](\u002Fdocs\u002Ferrors)\n","2026-11-02",{},1794739459354]