Import Resource | Vercel REST API
Import Resource
PUT https://api.vercel.com/v1/installations/{integrationConfigurationId}/resources/{resourceId}
This endpoint imports (upserts) a resource to Vercel's installation. This may be needed if resources can be independently created on the partner's side and need to be synchronized to Vercel. When importing as part of the user-initiated import flow, call this endpoint before redirecting the user back to Vercel. See the Import existing resources flow for the full contract.
Example Request
const response = await fetch('https://api.vercel.com/v1/installations/integrationConfigurationId/resources/resourceId', {
method: 'PUT',
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
'Content-Type': 'application/json',
},
body: JSON.stringify({
"ownership": "owned",
"productId": "example_id",
"name": "Example Name",
"status": "ready",
"metadata": "value",
"billingPlan": {
"id": "icfg_1234567890",
"type": "prepayment",
"name": "Example Name",
"description": "string",
"paymentMethodRequired": "true",
"cost": "string",
"details": [
{
"label": "string",
"value": "string"
}
],
"highlightedDetails": [
{
"label": "string",
"value": "string"
}
],
"effectiveDate": "string"
},
"notification": {
"level": "info",
"title": "string",
"message": "string",
"href": "https://example.com"
},
"extras": "value",
"secrets": [
{
"name": "Example Name",
"value": "string",
"prefix": "string",
"environmentOverrides": {
"development": "string",
"preview": "string",
"production": "string"
}
}
],
"customClaims": {
"roles": [],
"defaultRole": "string",
"claimRules": [
{
"when": {
"role": [],
"environment": []
},
"claims": "value"
}
]
}
}),
});
const data = await response.json();
console.log(data);
Response
{
"name": "Example Name"
}
Authentication
Authorization: bearerToken Default authentication mechanism
Path parameters
integrationConfigurationId: string (Required)resourceId: string (Required)
Body
application/jsonownership: string (Optional)productId: string (Required)name: string (Required)status: string (Required)metadata: object (Optional)billingPlan: object (Optional)notification: object (Optional)extras: object (Optional)secrets: array (Optional)customClaims: object (Optional)
Response
200: Successname: string (Required)
Errors
400: One of the provided values in the request body is invalid.401: The request is not authorized.403: You do not have permission to access this resource.404: Error409: Error410: Error422: Error