Loading...
Loading...
Vercel Platform and API Documentation
npx skill4agent add rawveg/skillsforge-marketplace vercelvercel.json# Using cURL with Vercel API
curl -X GET "https://api.vercel.com/v9/projects" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json"# Deploy to production
vercel --prod
# Deploy with environment variables
vercel --env NEXT_PUBLIC_API_URL=https://api.example.com
# Force new deployment without cache
vercel --force
# Deploy with build logs
vercel --logs# Pull environment variables and project settings
vercel pull --yes --environment=preview --token=$VERCEL_TOKEN
# Build locally
vercel build --token=$VERCEL_TOKEN
# Deploy pre-built artifacts
vercel deploy --prebuilt --token=$VERCEL_TOKEN{
"$schema": "https://openapi.vercel.sh/vercel.json",
"crons": [
{
"path": "/api/every-minute",
"schedule": "* * * * *"
},
{
"path": "/api/every-hour",
"schedule": "0 * * * *"
},
{
"path": "/api/daily-cleanup",
"schedule": "0 0 * * *"
}
]
}{
"buildCommand": "npm run build",
"outputDirectory": "dist",
"framework": "nextjs",
"installCommand": "npm install"
}{
"env": {
"API_URL": "https://api.example.com",
"FEATURE_FLAG": "true"
},
"build": {
"env": {
"BUILD_TIME": "@now"
}
}
}# Get team deployments
curl -X GET "https://api.vercel.com/v6/deployments?teamId=TEAM_ID" \
-H "Authorization: Bearer YOUR_TOKEN"
# Create deployment for team project
curl -X POST "https://api.vercel.com/v13/deployments?teamId=TEAM_ID" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name": "my-project", "files": []}'{
"bunVersion": "1.0.0",
"functions": {
"api/**/*.ts": {
"runtime": "bun"
}
}
}// api/hello.js
export default function handler(req, res) {
const { name = 'World' } = req.query;
res.status(200).json({
message: `Hello ${name}!`,
timestamp: new Date().toISOString()
});
}// middleware.js
export const config = {
matcher: '/api/:path*',
};
export default function middleware(req) {
const response = NextResponse.next();
response.headers.set('x-custom-header', 'my-value');
return response;
}https://api.vercel.comapplication/jsonX-RateLimit-LimitX-RateLimit-RemainingX-RateLimit-Resetuntilnextprev--prodvercel buildreferences/viewnpm i -g vercelvercel loginvercelvercel.jsonvercel.jsonvercel buildvercel deploy --prebuiltvercel.jsonvercel.json--prebuiltvercel.json