working-with-vercel-api
Use when working with the Vercel **REST API** and **@vercel/sdk** — the programmatic interface to the Vercel hosting platform at api.vercel.com. Covers bearer-token auth (VERCEL_TOKEN), team scoping (
SKILL.mdskills/working-with-vercel-api/SKILL.md
GitHubWorking with the Vercel REST API
Offline reference for the Vercel REST API (api.vercel.com) and the @vercel/sdk TypeScript client. The centerpiece is the complete, machine-readable OpenAPI spec in references/openapi.yaml — the authoritative source for every endpoint, parameter, and schema.
Scope. This skill is the REST API + SDK. For the
vercelCLI, the hosted MCP server, and platform concepts (deployments, domains, env vars, functions, storage), use the sibling skillworking-with-vercel. For the Vercel AI SDK (aipackage), useworking-with-vercel-ai-sdk.
How to use this skill
- For exact endpoint shapes, grep
references/openapi.yaml. It's the full OpenAPI 3.x spec (paths, methods, params, request/response schemas, thebearerTokensecurity scheme). Example:grep -n 'createDeployment\|/v13/deployments' references/openapi.yaml, then read the surrounding block. Never guess endpoint paths, params, or schemas from memory — read the spec. - Read
references/rest-api-guide.mdfor the cross-cutting concerns the spec doesn't spell out narratively: auth, team scoping, versioning, pagination, errors, and rate limits. - Conceptual pages —
references/docs__rest-api.md(overview),references/docs__rest-api__errors.md, andreferences/docs__rest-api__sdk.mdcarrysource/fetched_at/sha256frontmatter. - If something looks stale or missing, fetch the live spec (
https://openapi.vercel.sh) or append.mdto anyvercel.com/docs/rest-api/...page URL.
Behavioral guidance
- Auth: every call needs
Authorization: Bearer <token>. UseVERCEL_TOKENfrom the environment; never hardcode tokens. The same token works for the CLI. - Team scoping: resources owned by a team require a
teamId(orslug) query param — a common source of 403/404s when omitted. - Versioning is per-endpoint (
/v1/…,/v9/…,/v13/…). Use the exact version path from the spec; don't assume a global version. - Prefer
@vercel/sdk(typed, generated from this same spec) over hand-rolledfetchfor TypeScript automation. Seereferences/docs__rest-api__sdk.md.
Keeping this current
references/ is regenerated by scripts/update_docs.js: it fetches the OpenAPI spec from openapi.vercel.sh (converting JSON → YAML via yq) and the conceptual REST pages from vercel.com. Per-endpoint doc pages are intentionally excluded — the spec already covers them, and bundling both would duplicate several MB (and exceed the skill-size limit). A weekly GitHub Action runs it. To refresh locally: make update-working-with-vercel-api.
The API is not URL-versioned at the docs level, so this is a snapshot at fetch time (tracked by fetched_at/sha256), not a version pin — no PINNED_VERSION file.