Docs menu — REST API / Authentication Documentation

Getting Started

MCP Server

REST API

REST API Updated 2026-11-25

Authentication

SVGForge exposes a versioned HTTP API under /api/v1/. Responses use a JSON envelope unless noted otherwise:

JSON
{
  "code": 0,
  "msg": "ok",
  "data": {}
}

Non-zero code (and HTTP status) indicate errors. Base URL in production: https://svgforge.dev.

Public icon endpoints

No authentication required:

Method Path Docs
GET /api/v1/icons/search Search Icons
GET /api/v1/icons/:prefix/:icon Get Icon
GET /api/v1/icon-sets List Icon Sets
GET /api/v1/icons/metadata/:prefix Raw Iconify JSON for a pack (CDN-friendly, not envelope-wrapped)

Plugin API (Bearer token)

Used by MCP, VS Code, Chrome, and Figma:

HTTP
Authorization: Bearer sf_xxxxxxxx
Method Path Notes
GET /api/v1/plugin/me Token owner profile
GET /api/v1/plugin/search Same search as public icons
GET /api/v1/plugin/collections Requires valid token
GET /api/v1/plugin/collections/:id/items List icons in a Collection
POST /api/v1/plugin/collections/items Add icon to a Collection
GET /api/v1/plugin/custom-icons Pro only

Create tokens at Dashboard → API tokens. Full details: Plugin API.

Session API (web app)

The Dashboard uses Cookie JWT (access + refresh) plus CSRF for mutating routes. That surface is for the official SPA (/app), not third-party integrations. Prefer Plugin Bearer tokens for automation and MCP.

Rate limits & privacy

Public icon and Plugin/MCP traffic is quota-limited by tier (Guest / Free / Pro). Full table, headers, and 429 shape: Rate Limits & Quota.

  • Responses include X-RateLimit-*; over-limit calls return HTTP 429 with retryAfter.
  • Browser SVG tools run locally and do not upload files through these endpoints.
  • Revoke compromised tokens immediately from the Dashboard.

Health check

Shell
curl https://svgforge.dev/api/v1/health