Skip to content
Docs

Upload a cache artifact

PUThttps://api.vercel.com/v8/artifacts/{hash}
Uploads a cache artifact identified by the hash specified on the path. The cache artifact can then be downloaded with the provided hash.
https://api.vercel.com/v8/artifacts/{hash}
const response = await fetch('https://api.vercel.com/v8/artifacts/hash?teamId=string&slug=string', {
method: 'PUT',
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
'Content-Type': 'application/json',
'Content-Length': '123',
},
});
const data = await response.json();
console.log(data);
Response
{
"urls": []
}
AuthorizationbearerToken

Default authentication mechanism

hashstringRequired
The artifact hash
teamIdstringOptional
The Team identifier to perform the request on behalf of.
slugstringOptional
The Team slug to perform the request on behalf of.
Content-LengthnumberRequired
The artifact size in bytes
x-artifact-durationnumberOptional
The time taken to generate the uploaded artifact in milliseconds.
x-artifact-client-cistringOptional
The continuous integration or delivery environment where this artifact was generated.
x-artifact-client-interactiveintegerOptional
1 if the client is an interactive shell. Otherwise 0
x-artifact-tagstringOptional
The base64 encoded tag for this artifact. The value is sent back to clients when the artifact is downloaded as the header x-artifact-tag
x-artifact-shastringOptional
The SHA of the source control revision that generated this artifact.
x-artifact-dirty-hashstringOptional
A hash representing uncommitted changes in the working directory when this artifact was generated.
202File successfully uploaded
urlsarrayRequired
Array of URLs where the artifact was updated
400One of the provided values in the request query is invalid. One of the provided values in the headers is invalid File size is not valid
401The request is not authorized.
402The account is missing a payment so payment method must be updated
403The customer has reached their spend cap limit and has been paused. An owner can disable the cap or raise the limit in settings. The Remote Caching usage limit has been reached for this account for this billing cycle. Remote Caching has been disabled for this team or user. An owner can enable it in the billing settings. You do not have permission to access this resource.
404Error
410Error