Documentation Index
Fetch the complete documentation index at: https://sferadev.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
A type-safe API client for the Vercel Platform API, auto-generated from the official OpenAPI specification with full TypeScript support.
Features
- Type-Safe - Full TypeScript support with auto-generated types from OpenAPI spec
- Zod Schemas - Runtime validation with Zod schemas for all API types
- Auto-Updated - Daily regeneration from upstream OpenAPI specs
Installation
Usage
Basic Usage
import { createClient } from "vercel-api-js";
const client = createClient({
baseUrl: "https://api.vercel.com",
headers: {
Authorization: `Bearer ${process.env.VERCEL_TOKEN}`,
},
});
// List all projects
const projects = await client.getProjects();
// Get a specific project
const project = await client.getProject({ idOrName: "my-project" });
// Create a new deployment
const deployment = await client.createDeployment({
name: "my-project",
target: "production",
});
With Fetchers API
import { Fetchers } from "vercel-api-js";
// Use individual fetchers for specific endpoints
const projects = await Fetchers.getProjects({
config: {
headers: { Authorization: `Bearer ${token}` },
},
});
Type Exports
import type { Types } from "vercel-api-js";
// Use TypeScript types
type Project = Types.GetProjectResponseBody;
type Deployment = Types.CreateDeploymentResponseBody;
Zod Schemas
import { Schemas } from "vercel-api-js";
// Validate API responses
const projectSchema = Schemas.getProjectResponseBody;
const validated = projectSchema.parse(response);
API Reference
The client exposes all Vercel API endpoints including:
- Projects - Create, list, update, and delete projects
- Deployments - Manage deployments and rollbacks
- Domains - Configure custom domains
- Environment Variables - Manage env vars across environments
- Teams - Team and member management
- Edge Config - Edge configuration management
- And more…
For the complete API reference, see the Vercel REST API documentation.