
## App icon

The app icon is an **SVG** shown in the Bitrix24 app catalog and as the browser-tab favicon. The platform does not generate it — you upload your own via the Deploy API. This page is the single source for the format and upload procedure; the "App icon" prompt in the cabinet links here.

**Scope:** `vibe:infra` (added to every API key automatically) · **Base URL:** `https://vibecode.bitrix24.com/v1` · **Auth:** `X-Api-Key` header

## Format

- **SVG only** (`image/svg+xml`). Other formats are rejected.
- **Up to 256 KB.**
- **No scripts, event handlers or external references** — no `<script>`, `on*` attributes, `<foreignObject>`, or links to external resources. The icon is sanitized on upload; unsafe content is rejected.
- **You upload SVG, you get back PNG.** The upload only accepts SVG — it is stored as the source. The serve URL always returns the icon as a 256×256 PNG (`Content-Type: image/png`), converted by the platform from your SVG. If the SVG can't be rasterized, the upload is rejected with `ICON_RASTERIZE_FAILED` — fix the file and upload again.

## Upload the icon — the mandatory step (no sources needed)

Generate an SVG and upload it to the server:

```
POST /v1/infra/servers/:id/icon
Content-Type: multipart/form-data — field file, type image/svg+xml
```

This is the **only mandatory step**, and it **does not need the app sources**: the icon immediately appears in the Bitrix24 app catalog and is served at the stable anonymous URL `…/api/server-icons/:id`. Re-uploading / regenerating later is the same `POST` again.

## Browser-tab favicon — one line in your HTML

To also make the icon the browser-tab favicon, add a single line to your app HTML:

```html
<link rel="icon" href="/_gw/icon">
```

`/_gw/icon` is a platform-served path on your app's own origin (served by the platform, not by your app) that always returns the CURRENT uploaded icon. The line carries no server id and is identical for every app — you can bake it in at build time in a single pass (including a one-shot app create).

Do NOT ship your own static icon file (`/icon.svg` and the like) — a static file cannot be changed through the Vibecode UI. `/_gw/icon` updates on its own: re-upload the icon via `POST …/icon` and the favicon refreshes within ~5 minutes, with no rebuild.

## Changing the icon — no rebuild

The catalog icon and the browser-tab favicon are the SAME image, both driven by one upload:

- Upload a new SVG with the same `POST …/icon` — both the Bitrix24 catalog card and the browser-tab favicon (`/_gw/icon`) update within ~5 minutes.
- No app sources are needed and no rebuild/redeploy is required — as long as the `<link rel="icon" href="/_gw/icon">` line was written in at build time.
- If the `<link>` line was never added, there is no tab favicon (expected), but the Bitrix24 catalog icon still works. You can add the tab favicon at the next rebuild by writing in the `<link>` line (no id needed).

## See also

- [Create a server](/docs/infra/servers/create) — the step before deploy.
- [Deploy API](/docs/infra/deploy) — deploy the app and verify it works.
- [Root section — Infrastructure](/docs/infra) — limits and errors overall.
