Troubleshooting
If requests fail, run zero doctor check-connector --env-name VERCEL_TOKEN or zero doctor check-connector --url https://api.vercel.com/v2/user --method GET
User
Get Current User
curl -s "https://api.vercel.com/v2/user" \
--header "Authorization: Bearer $VERCEL_TOKEN"
List Auth Tokens
curl -s "https://api.vercel.com/v6/user/tokens" \
--header "Authorization: Bearer $VERCEL_TOKEN"
Projects
List Projects
curl -s "https://api.vercel.com/v10/projects" \
--header "Authorization: Bearer $VERCEL_TOKEN"
Get Project
curl -s "https://api.vercel.com/v9/projects/<project-name>" \
--header "Authorization: Bearer $VERCEL_TOKEN"
Use project name or ID.
Create Project
curl -s -X POST "https://api.vercel.com/v11/projects" \
--header "Authorization: Bearer $VERCEL_TOKEN" \
--header "Content-Type: application/json" \
-d "{\"name\": \"my-new-project\", \"framework\": \"nextjs\"}"
Only name is required. Optional: framework, buildCommand, outputDirectory, rootDirectory, installCommand.
Update Project
curl -s -X PATCH "https://api.vercel.com/v9/projects/<project-name>" \
--header "Authorization: Bearer $VERCEL_TOKEN" \
--header "Content-Type: application/json" \
-d "{\"buildCommand\": \"next build\", \"outputDirectory\": \".next\"}"
Delete Project
curl -s -X DELETE "https://api.vercel.com/v9/projects/<project-name>" \
--header "Authorization: Bearer $VERCEL_TOKEN"
Returns 204 on success. Permanently deletes the project and all its deployments.
Pause Project
curl -s -X POST "https://api.vercel.com/v1/projects/<project-id>/pause" \
--header "Authorization: Bearer $VERCEL_TOKEN"
Unpause Project
curl -s -X POST "https://api.vercel.com/v1/projects/<project-id>/unpause" \
--header "Authorization: Bearer $VERCEL_TOKEN"
Deployments
List Deployments
curl -s "https://api.vercel.com/v6/deployments?limit=10" \
--header "Authorization: Bearer $VERCEL_TOKEN"
Params: limit, projectId, state (BUILDING/READY/ERROR/QUEUED/CANCELED), target (production/preview), until (pagination timestamp).
List Deployments for a Project
curl -s "https://api.vercel.com/v6/deployments?projectId=<project-name>&limit=10" \
--header "Authorization: Bearer $VERCEL_TOKEN"
Get Deployment
curl -s "https://api.vercel.com/v13/deployments/<deployment-id>" \
--header "Authorization: Bearer $VERCEL_TOKEN"
Get Build Logs
curl -s "https://api.vercel.com/v3/deployments/<deployment-id>/events?limit=-1" \
--header "Authorization: Bearer $VERCEL_TOKEN"
Use limit=-1 to get all log events.
Get Runtime Logs
curl -s "https://api.vercel.com/v1/projects/<project-id>/deployments/<deployment-id>/runtime-logs" \
--header "Authorization: Bearer $VERCEL_TOKEN"
Create Deployment (Redeploy)
curl -s -X POST "https://api.vercel.com/v13/deployments" \
--header "Authorization: Bearer $VERCEL_TOKEN" \
--header "Content-Type: application/json" \
-d "{\"name\": \"my-project\", \"deploymentId\": \"<prev-deployment-id>\", \"target\": \"production\"}"
Promote to Production (Rollback)
curl -s -X POST "https://api.vercel.com/v10/projects/<project-id>/promote/<deployment-id>" \
--header "Authorization: Bearer $VERCEL_TOKEN"
Cancel Deployment
Only works for BUILDING or QUEUED deployments.
curl -s -X PATCH "https://api.vercel.com/v12/deployments/<deployment-id>/cancel" \
--header "Authorization: Bearer $VERCEL_TOKEN"
Delete Deployment
curl -s -X DELETE "https://api.vercel.com/v13/deployments/<deployment-id>" \
--header "Authorization: Bearer $VERCEL_TOKEN"
List Deployment Aliases
curl -s "https://api.vercel.com/v2/deployments/<deployment-id>/aliases" \
--header "Authorization: Bearer $VERCEL_TOKEN"
Domains
List Domains
curl -s "https://api.vercel.com/v5/domains" \
--header "Authorization: Bearer $VERCEL_TOKEN"
Get Domain
curl -s "https://api.vercel.com/v5/domains/<domain>" \
--header "Authorization: Bearer $VERCEL_TOKEN"
Get Domain Config
curl -s "https://api.vercel.com/v6/domains/<domain>/config" \
--header "Authorization: Bearer $VERCEL_TOKEN"
Add Domain
curl -s -X POST "https://api.vercel.com/v7/domains" \
--header "Authorization: Bearer $VERCEL_TOKEN" \
--header "Content-Type: application/json" \
-d "{\"name\": \"example.com\"}"
Update Domain
curl -s -X PATCH "https://api.vercel.com/v3/domains/<domain>" \
--header "Authorization: Bearer $VERCEL_TOKEN" \
--header "Content-Type: application/json" \
-d "{\"op\": \"update\", \"redirectTarget\": \"www.example.com\"}"
Delete Domain
curl -s -X DELETE "https://api.vercel.com/v6/domains/<domain>" \
--header "Authorization: Bearer $VERCEL_TOKEN"
Project Domains
List Project Domains
curl -s "https://api.vercel.com/v9/projects/<project-name>/domains" \
--header "Authorization: Bearer $VERCEL_TOKEN"
Add Domain to Project
curl -s -X POST "https://api.vercel.com/v10/projects/<project-name>/domains" \
--header "Authorization: Bearer $VERCEL_TOKEN" \
--header "Content-Type: application/json" \
-d "{\"name\": \"example.com\"}"
Verify Project Domain
curl -s -X POST "https://api.vercel.com/v9/projects/<project-name>/domains/<domain>/verify" \
--header "Authorization: Bearer $VERCEL_TOKEN"
Update Project Domain
curl -s -X PATCH "https://api.vercel.com/v9/projects/<project-name>/domains/<domain>" \
--header "Authorization: Bearer $VERCEL_TOKEN" \
--header "Content-Type: application/json" \
-d "{\"redirect\": \"www.example.com\", \"redirectStatusCode\": 301}"
Remove Domain from Project
curl -s -X DELETE "https://api.vercel.com/v9/projects/<project-name>/domains/<domain>" \
--header "Authorization: Bearer $VERCEL_TOKEN"
DNS Records
List DNS Records
curl -s "https://api.vercel.com/v5/domains/<domain>/records" \
--header "Authorization: Bearer $VERCEL_TOKEN"
Create DNS Record
curl -s -X POST "https://api.vercel.com/v2/domains/<domain>/records" \
--header "Authorization: Bearer $VERCEL_TOKEN" \
--header "Content-Type: application/json" \
-d "{\"name\": \"www\", \"type\": \"CNAME\", \"value\": \"cname.vercel-dns.com\"}"
Delete DNS Record
curl -s -X DELETE "https://api.vercel.com/v2/domains/<domain>/records/<record-id>" \
--header "Authorization: Bearer $VERCEL_TOKEN"
Environment Variables
List Project Env Vars
curl -s "https://api.vercel.com/v10/projects/<project-name>/env" \
--header "Authorization: Bearer $VERCEL_TOKEN"
Get Env Var
curl -s "https://api.vercel.com/v1/projects/<project-name>/env/<env-id>" \
--header "Authorization: Bearer $VERCEL_TOKEN"
Create Env Var
curl -s -X POST "https://api.vercel.com/v10/projects/<project-name>/env" \
--header "Authorization: Bearer $VERCEL_TOKEN" \
--header "Content-Type: application/json" \
-d "{\"key\": \"MY_VAR\", \"value\": \"my-value\", \"type\": \"encrypted\", \"target\": [\"production\", \"preview\", \"development\"]}"
type: plain, encrypted, secret, sensitive. target: production, preview, development.
Update Env Var
curl -s -X PATCH "https://api.vercel.com/v9/projects/<project-name>/env/<env-id>" \
--header "Authorization: Bearer $VERCEL_TOKEN" \
--header "Content-Type: application/json" \
-d "{\"value\": \"new-value\", \"target\": [\"production\"]}"
Delete Env Var
curl -s -X DELETE "https://api.vercel.com/v9/projects/<project-name>/env/<env-id>" \
--header "Authorization: Bearer $VERCEL_TOKEN"
Edge Config
List Edge Configs
curl -s "https://api.vercel.com/v1/edge-config" \
--header "Authorization: Bearer $VERCEL_TOKEN"
Get Edge Config
curl -s "https://api.vercel.com/v1/edge-config/<edge-config-id>" \
--header "Authorization: Bearer $VERCEL_TOKEN"
Create Edge Config
curl -s -X POST "https://api.vercel.com/v1/edge-config" \
--header "Authorization: Bearer $VERCEL_TOKEN" \
--header "Content-Type: application/json" \
-d "{\"slug\": \"my-edge-config\"}"
Update Edge Config Items
curl -s -X PATCH "https://api.vercel.com/v1/edge-config/<edge-config-id>/items" \
--header "Authorization: Bearer $VERCEL_TOKEN" \
--header "Content-Type: application/json" \
-d "{\"items\": [{\"operation\": \"upsert\", \"key\": \"greeting\", \"value\": \"hello\"}]}"
Operations: upsert, delete.
Get Edge Config Items
curl -s "https://api.vercel.com/v1/edge-config/<edge-config-id>/items" \
--header "Authorization: Bearer $VERCEL_TOKEN"
Get Single Item
curl -s "https://api.vercel.com/v1/edge-config/<edge-config-id>/item/<key>" \
--header "Authorization: Bearer $VERCEL_TOKEN"
Delete Edge Config
curl -s -X DELETE "https://api.vercel.com/v1/edge-config/<edge-config-id>" \
--header "Authorization: Bearer $VERCEL_TOKEN"
Teams
List Teams
curl -s "https://api.vercel.com/v2/teams" \
--header "Authorization: Bearer $VERCEL_TOKEN"
Get Team
curl -s "https://api.vercel.com/v2/teams/<team-id>" \
--header "Authorization: Bearer $VERCEL_TOKEN"
Create Team
curl -s -X POST "https://api.vercel.com/v1/teams" \
--header "Authorization: Bearer $VERCEL_TOKEN" \
--header "Content-Type: application/json" \
-d "{\"slug\": \"my-team\", \"name\": \"My Team\"}"
Update Team
curl -s -X PATCH "https://api.vercel.com/v2/teams/<team-id>" \
--header "Authorization: Bearer $VERCEL_TOKEN" \
--header "Content-Type: application/json" \
-d "{\"name\": \"Updated Team Name\"}"
List Team Members
curl -s "https://api.vercel.com/v3/teams/<team-id>/members" \
--header "Authorization: Bearer $VERCEL_TOKEN"
Invite Team Member
curl -s -X POST "https://api.vercel.com/v2/teams/<team-id>/members" \
--header "Authorization: Bearer $VERCEL_TOKEN" \
--header "Content-Type: application/json" \
-d "{\"email\": \"user@example.com\", \"role\": \"MEMBER\"}"
Roles: OWNER, MEMBER, VIEWER, DEVELOPER, BILLING.
Remove Team Member
curl -s -X DELETE "https://api.vercel.com/v1/teams/<team-id>/members/<uid>" \
--header "Authorization: Bearer $VERCEL_TOKEN"
Webhooks
List Webhooks
curl -s "https://api.vercel.com/v1/webhooks" \
--header "Authorization: Bearer $VERCEL_TOKEN"
Get Webhook
curl -s "https://api.vercel.com/v1/webhooks/<webhook-id>" \
--header "Authorization: Bearer $VERCEL_TOKEN"
Create Webhook
curl -s -X POST "https://api.vercel.com/v1/webhooks" \
--header "Authorization: Bearer $VERCEL_TOKEN" \
--header "Content-Type: application/json" \
-d "{\"url\": \"https://example.com/webhook\", \"events\": [\"deployment.created\", \"deployment.succeeded\", \"deployment.error\"]}"
Common events: deployment.created, deployment.succeeded, deployment.error, deployment.canceled, deployment.ready, project.created, project.removed.
The secret is only returned at creation time — save it to verify webhook payloads.
Delete Webhook
curl -s -X DELETE "https://api.vercel.com/v1/webhooks/<webhook-id>" \
--header "Authorization: Bearer $VERCEL_TOKEN"
Log Drains
List Log Drains
curl -s "https://api.vercel.com/v1/log-drains" \
--header "Authorization: Bearer $VERCEL_TOKEN"
Create Log Drain
curl -s -X POST "https://api.vercel.com/v1/log-drains" \
--header "Authorization: Bearer $VERCEL_TOKEN" \
--header "Content-Type: application/json" \
-d "{\"name\": \"My Drain\", \"type\": \"json\", \"url\": \"https://example.com/logs\", \"sources\": [\"static\", \"lambda\", \"edge\", \"build\"]}"
type: json, ndjson, syslog. sources: static, lambda, edge, build, external.
Delete Log Drain
curl -s -X DELETE "https://api.vercel.com/v1/log-drains/<id>" \
--header "Authorization: Bearer $VERCEL_TOKEN"
Aliases
List Aliases
curl -s "https://api.vercel.com/v4/aliases" \
--header "Authorization: Bearer $VERCEL_TOKEN"
Get Alias
curl -s "https://api.vercel.com/v4/aliases/<alias-id>" \
--header "Authorization: Bearer $VERCEL_TOKEN"
Assign Alias to Deployment
curl -s -X POST "https://api.vercel.com/v2/deployments/<deployment-id>/aliases" \
--header "Authorization: Bearer $VERCEL_TOKEN" \
--header "Content-Type: application/json" \
-d "{\"alias\": \"my-alias.vercel.app\"}"
Delete Alias
curl -s -X DELETE "https://api.vercel.com/v2/aliases/<alias-id>" \
--header "Authorization: Bearer $VERCEL_TOKEN"
Certificates
Get Certificate
curl -s "https://api.vercel.com/v8/certs/<cert-id>" \
--header "Authorization: Bearer $VERCEL_TOKEN"
Issue Certificate
curl -s -X POST "https://api.vercel.com/v8/certs" \
--header "Authorization: Bearer $VERCEL_TOKEN" \
--header "Content-Type: application/json" \
-d "{\"domains\": [\"example.com\"]}"
Delete Certificate
curl -s -X DELETE "https://api.vercel.com/v8/certs/<cert-id>" \
--header "Authorization: Bearer $VERCEL_TOKEN"
Deployment States
| State | Description |
|-------|-------------|
| QUEUED | Waiting to build |
| BUILDING | Build in progress |
| READY | Deployment is live |
| ERROR | Build or deployment failed |
| CANCELED | Deployment was canceled |
Guidelines
- Pagination: Use
?limit=N&until=<timestamp>for paginated results. Theuntilvalue comes from the last item's timestamp. - Project references: Most endpoints accept project name or project ID as
{idOrName}. - API versioning: Vercel uses per-endpoint versioning (e.g.,
/v10/projects,/v13/deployments). Always use the version shown in this document. - Rate limits: Back off on 429 responses. Use
Retry-Afterheader. - Team scope: For team resources, add
?teamId=<team-id>query param or use team tokens. - Environment targets: Env vars can target
production,preview,development, or any combination. - Edge Config: Use Edge Config for feature flags and runtime configuration that needs to be read at the edge with zero latency.
How to Look Up More API Details
- REST API Reference: https://vercel.com/docs/rest-api
- Endpoints: https://vercel.com/docs/rest-api/endpoints
- Authentication: https://vercel.com/docs/rest-api/authentication
- Edge Config: https://vercel.com/docs/edge-config
- Webhooks: https://vercel.com/docs/webhooks