secrets
Change secret name
Enables to edit the name of a secret. The name has to be unique to the user or team’s secrets.
- namestringrequired
The name of the secret.
Examplemy-api-key
- teamIdstring
The Team identifier to perform the request on behalf of.
- slugstring
The Team slug to perform the request on behalf of.
The name of the new secret.
my-api-key
- 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.
- 410
fetch('https://api.vercel.com/v2/secrets/{name}', {
method: 'PATCH',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: 'my-api-key'
})
})
{
"uid": "…",
"name": "…",
"created": "2025-04-02T04:18:45.334Z",
"oldName": "…"
}
Create a new secret
Allows to create a new secret.
- teamIdstring
The Team identifier to perform the request on behalf of.
- slugstring
The Team slug to perform the request on behalf of.
The name of the secret (max 100 characters).
my-api-key
The value of the new secret.
some secret value
Whether the secret value can be decrypted after it has been created.
true
Associate a secret to a project.
prj_2WjyKQmM8ZnGcJsPWMrHRHrE
- 400
One of the provided values in the request body 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.
- 410
fetch('https://api.vercel.com/v2/secrets/{name}', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: 'my-api-key',
value: 'some secret value',
decryptable: true,
projectId: 'prj_2WjyKQmM8ZnGcJsPWMrHRHrE'
})
})
{
"value": {
"type": "Buffer",
"data": [
1
]
},
"created": "2021-02-10T13:11:49.180Z",
"name": "my-api-key",
"teamId": "team_LLHUOMOoDlqOp8wPE4kFo9pE",
"uid": "sec_XCG7t7AIHuO2SBA8667zNUiM",
"userId": "2qDDuGFTWXBLDNnqZfWPDp1A",
"createdAt": 1609492210000,
"projectId": "prj_2WjyKQmM8ZnGcJsPWMrHRHrE",
"decryptable": true
}
Successful response showing the created secret.
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
access-groups
- POST/v1/access-groups/{accessGroupIdOrName}/projects
- POST/v1/access-groups
- DELETE/v1/access-groups/{accessGroupIdOrName}/projects/{projectId}
- DELETE/v1/access-groups/{idOrName}
- GET/v1/access-groups
- GET/v1/access-groups/{idOrName}/members
- GET/v1/access-groups/{idOrName}/projects
- GET/v1/access-groups/{idOrName}
- GET/v1/access-groups/{accessGroupIdOrName}/projects/{projectId}
- POST/v1/access-groups/{idOrName}
- PATCH/v1/access-groups/{accessGroupIdOrName}/projects/{projectId}
aliases
api-experimentation
artifacts
authentication
certs
checks
deployments
- PATCH/v12/deployments/{id}/cancel
- POST/v13/deployments
- DELETE/v13/deployments/{id}
- GET/v13/deployments/{idOrUrl}
- GET/v3/deployments/{idOrUrl}/events
- GET/v7/deployments/{id}/files/{fileId}
- GET/v6/deployments/{id}/files
- GET/v6/deployments
- PATCH/v1/deployments/{deploymentId}/integrations/{integrationConfigurationId}/resources/{resourceId}/actions/{action}
- POST/v2/files
dns
domains
edge-config
- POST/v1/edge-config
- POST/v1/edge-config/{edgeConfigId}/token
- DELETE/v1/edge-config/{edgeConfigId}
- DELETE/v1/edge-config/{edgeConfigId}/schema
- DELETE/v1/edge-config/{edgeConfigId}/tokens
- GET/v1/edge-config/{edgeConfigId}/tokens
- GET/v1/edge-config/{edgeConfigId}
- GET/v1/edge-config/{edgeConfigId}/item/{edgeConfigItemKey}
- GET/v1/edge-config/{edgeConfigId}/backups/{edgeConfigBackupVersionId}
- GET/v1/edge-config/{edgeConfigId}/backups
- GET/v1/edge-config/{edgeConfigId}/items
- GET/v1/edge-config/{edgeConfigId}/schema
- GET/v1/edge-config/{edgeConfigId}/token/{token}
- GET/v1/edge-config
- PUT/v1/edge-config/{edgeConfigId}
- PATCH/v1/edge-config/{edgeConfigId}/items
- POST/v1/edge-config/{edgeConfigId}/schema
environment
- POST/v9/projects/{idOrName}/custom-environments
- DELETE/v9/projects/{idOrName}/custom-environments/{environmentSlugOrId}
- GET/v9/projects/{idOrName}/custom-environments/{environmentSlugOrId}
- GET/v9/projects/{idOrName}/custom-environments
- PATCH/v9/projects/{idOrName}/custom-environments/{environmentSlugOrId}
integrations
logDrains
marketplace
- POST/v1/installations/{integrationConfigurationId}/events
- POST/v1/installations/{integrationConfigurationId}/resources/{resourceId}/experimentation/items
- DELETE/v1/installations/{integrationConfigurationId}/resources/{resourceId}/experimentation/items/{itemId}
- GET/v1/installations/{integrationConfigurationId}/account
- GET/v1/installations/{integrationConfigurationId}/billing/invoices/{invoiceId}
- GET/v1/installations/{integrationConfigurationId}/member/{memberId}
- HEAD/v1/installations/{integrationConfigurationId}/resources/{resourceId}/experimentation/edge-config
- PUT/v1/installations/{integrationConfigurationId}/resources/{resourceId}
- POST/v1/installations/{integrationConfigurationId}/billing/invoices/{invoiceId}/actions
- PATCH/v1/installations/{integrationConfigurationId}/resources/{resourceId}/experimentation/items/{itemId}
- PUT/v1/installations/{integrationConfigurationId}/resources/{resourceId}/experimentation/edge-config
- POST/v1/integrations/sso/token
- POST/v1/installations/{integrationConfigurationId}/billing
- POST/v1/installations/{integrationConfigurationId}/billing/invoices
- POST/v1/installations/{integrationConfigurationId}/billing/balance
- PUT/v1/installations/{integrationConfigurationId}/resources/{resourceId}/secrets
- PUT/v1/installations/{integrationConfigurationId}/products/{integrationProductIdOrSlug}/resources/{resourceId}/secrets
projectMembers
Models
idOrName Required |
Accept | */* |
teamId | |
slug |