Fork a drive
POST
/__remote/api.vercel.com/v2/sandboxes/drives/{name}/forkFork the provided drive into a new one with the provided name, inheriting the region and max size.
/__remote/api.vercel.com/v2/sandboxes/drives/{name}/fork
const response = await fetch('/__remote/api.vercel.com/v2/sandboxes/drives/name/fork?projectId=string&teamId=string&slug=string', { method: 'POST', headers: { 'Authorization': 'Bearer YOUR_ACCESS_TOKEN', 'Content-Type': 'application/json', }, body: JSON.stringify({ "name": "workspace-fork" }),});
const data = await response.json();console.log(data);Response
{ "drive": { "createdAt": "1750344501629", "currentSandboxName": "my-sandbox", "currentSessionId": "sbx_123", "id": "drive_abc123", "maxSizeBytes": "1099511627776", "name": "workspace", "parentDriveId": "example_id", "projectId": "prj_abc123", "region": "iad1", "rootDriveId": "example_id", "updatedAt": "1750344501629", "workloadType": "sandbox" }}AuthorizationbearerToken
Default authentication mechanism
400One of the provided values in the request body is invalid.
One of the provided values in the request query is invalid.
401The request is not authorized.
402The account is missing a payment so payment method must be updated
403You do not have permission to access this resource.
404Error
409Error
410Error
422Error
429Error
503Error