v0.0.1
OAS 3.0.3

Vercel REST API

The Vercel REST API is a REST-styled API that gives you full control over the entire Vercel platform. You can use it with any programming language or framework that can send HTTP requests. You need to authenticate with a Vercel access token for every request.

Production API

No authentication selected
Client Libraries

api-experimentation

api-experimentation Endpoints

certs

environment

Create a custom environment for the current project.

Creates a custom environment for the current project. Cannot be named 'Production' or 'Preview'.

Path Parameters
  • idOrName
    string
    required

    The unique project identifier or the project name

Query Parameters
  • teamId
    string

    The Team identifier to perform the request on behalf of.

  • slug
    string

    The Team slug to perform the request on behalf of.

Body
application/json
slug
string
max: 
32

The slug of the custom environment to create.

description
string
max: 
256

Description of the custom environment. This is optional.

branchMatcher
object

How we want to determine a matching branch. This is optional.

copyEnvVarsFrom
string

Where to copy environment variables from. This is optional.

Responses
  • 400

    One of the provided values in the request body is invalid. One of the provided values in the request query is invalid.

  • 401
  • 402

    The account was soft-blocked for an unhandled reason. The account is missing a payment so payment method must be updated

  • 403

    You do not have permission to access this resource.

  • 500
POST/v9/projects/{idOrName}/custom-environments
fetch('https://api.vercel.com/v9/projects/{idOrName}/custom-environments', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    slug: '',
    description: '',
    branchMatcher: {
      type: 'equals',
      pattern: ''
    },
    copyEnvVarsFrom: ''
  })
})
{}

Remove a custom environment

Remove a custom environment for the project. Must not be named 'Production' or 'Preview'.

Path Parameters
  • idOrName
    string
    required

    The unique project identifier or the project name

  • environmentSlugOrId
    string
    required

    The unique custom environment identifier within the project

Query Parameters
  • teamId
    string

    The Team identifier to perform the request on behalf of.

  • slug
    string

    The Team slug to perform the request on behalf of.

Body
application/json
deleteUnassignedEnvironmentVariables
boolean

Delete Environment Variables that are not assigned to any environments.

Responses
  • 400

    One of the provided values in the request body is invalid. One of the provided values in the request query is invalid.

  • 401
  • 403

    You do not have permission to access this resource.

DELETE/v9/projects/{idOrName}/custom-environments/{environmentSlugOrId}
fetch('https://api.vercel.com/v9/projects/{idOrName}/custom-environments/{environmentSlugOrId}', {
  method: 'DELETE',
  headers: {
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    deleteUnassignedEnvironmentVariables: true
  })
})
{}

Retrieve a custom environment

Retrieve a custom environment for the project. Must not be named 'Production' or 'Preview'.

Path Parameters
  • idOrName
    string
    required

    The unique project identifier or the project name

  • environmentSlugOrId
    string
    required

    The unique custom environment identifier within the project

Query Parameters
  • teamId
    string

    The Team identifier to perform the request on behalf of.

  • slug
    string

    The Team slug to perform the request on behalf of.

Responses
  • 400

    One of the provided values in the request query is invalid.

  • 401
  • 403

    You do not have permission to access this resource.

  • 404
GET/v9/projects/{idOrName}/custom-environments/{environmentSlugOrId}
fetch('https://api.vercel.com/v9/projects/{idOrName}/custom-environments/{environmentSlugOrId}')
{}

Retrieve custom environments

Retrieve custom environments for the project. Must not be named 'Production' or 'Preview'.

Path Parameters
  • idOrName
    string
    required

    The unique project identifier or the project name

Query Parameters
  • gitBranch
    string

    Fetch custom environments for a specific git branch

  • teamId
    string

    The Team identifier to perform the request on behalf of.

  • slug
    string

    The Team slug to perform the request on behalf of.

Responses
  • 400

    One of the provided values in the request query is invalid.

  • 401
  • 403

    You do not have permission to access this resource.

GET/v9/projects/{idOrName}/custom-environments
fetch('https://api.vercel.com/v9/projects/{idOrName}/custom-environments')
{
  "environments": [
    {}
  ]
}

Update a custom environment

Update a custom environment for the project. Must not be named 'Production' or 'Preview'.

Path Parameters
  • idOrName
    string
    required

    The unique project identifier or the project name

  • environmentSlugOrId
    string
    required

    The unique custom environment identifier within the project

Query Parameters
  • teamId
    string

    The Team identifier to perform the request on behalf of.

  • slug
    string

    The Team slug to perform the request on behalf of.

Body
application/json
slug
string
max: 
32

The slug of the custom environment.

description
string
max: 
256

Description of the custom environment. This is optional.

branchMatcher
object | null
Responses
  • 400

    One of the provided values in the request body is invalid. One of the provided values in the request query is invalid.

  • 401
  • 402

    The account was soft-blocked for an unhandled reason. The account is missing a payment so payment method must be updated

  • 403

    You do not have permission to access this resource.

  • 500
PATCH/v9/projects/{idOrName}/custom-environments/{environmentSlugOrId}
fetch('https://api.vercel.com/v9/projects/{idOrName}/custom-environments/{environmentSlugOrId}', {
  method: 'PATCH',
  headers: {
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    slug: '',
    description: '',
    branchMatcher: {
      type: 'equals',
      pattern: ''
    }
  })
})
{}

projectMembers

user

webhooks

Models