Skip to content
Docs

List sessions

GEThttps://api.vercel.com/v2/sandboxes/sessions
Retrieves a paginated list of sessions belonging to a specific sandbox. Results are sorted by creation time and paginated using an opaque cursor.
https://api.vercel.com/v2/sandboxes/sessions
const response = await fetch('https://api.vercel.com/v2/sandboxes/sessions?project=string&name=string&limit=123&cursor=string&sortOrder=string&teamId=string&slug=string', {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
'Content-Type': 'application/json',
},
});
const data = await response.json();
console.log(data);
Response
"value"
AuthorizationbearerToken

Default authentication mechanism

projectstringOptional
The unique identifier or name of the project to list sessions for.
namestringOptional
Filter sessions by sandbox name. Only sessions belonging to the specified sandbox are returned.
limitnumberOptional
Maximum number of sessions to return in the response. Used for pagination.
cursorstringOptional
Opaque pagination cursor from a previous response.
sortOrderstringOptional
Sort direction for results by creation time.
teamIdstringOptional
The Team identifier to perform the request on behalf of.
slugstringOptional
The Team slug to perform the request on behalf of.
200The list of sessions matching the request filters.
400One of the provided values in the request query is invalid.
401The request is not authorized.
403You do not have permission to access this resource.
404Error
410Error
429Error
500Error