Skip to content
Docs

Creates an access group

POSThttps://api.vercel.com/v1/access-groups
Allows to create an access group
https://api.vercel.com/v1/access-groups
const response = await fetch('https://api.vercel.com/v1/access-groups?teamId=string&slug=string', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
'Content-Type': 'application/json',
},
body: JSON.stringify({
"name": "My access group",
"projects": [
{
"projectId": "prj_ndlgr43fadlPyCtREAqxxdyFK",
"role": "ADMIN"
}
],
"membersToAdd": []
}),
});
const data = await response.json();
console.log(data);
Response
{
"entitlements": [],
"membersCount": "123",
"projectsCount": "123",
"name": "my-access-group",
"createdAt": "1588720733602",
"teamId": "team_123a6c5209bc3778245d011443644c8d27dc2c50",
"updatedAt": "1588720733602",
"accessGroupId": "ag_123a6c5209bc3778245d011443644c8d27dc2c50",
"teamRoles": [],
"teamPermissions": []
}
AuthorizationbearerToken

Default authentication mechanism

teamIdstringOptional
The Team identifier to perform the request on behalf of.
slugstringOptional
The Team slug to perform the request on behalf of.
application/json
namestringRequired
The name of the access group
projectsarrayOptional
membersToAddarrayOptional
List of members to add to the access group.
200Success
entitlementsarrayRequired
membersCountnumberRequired
projectsCountnumberRequired
namestringRequired
The name of this access group.
createdAtstringRequired
Timestamp in milliseconds when the access group was created.
teamIdstringRequired
ID of the team that this access group belongs to.
updatedAtstringRequired
Timestamp in milliseconds when the access group was last updated.
accessGroupIdstringRequired
ID of the access group.
teamRolesarrayOptional
Roles that the team has in the access group.
teamPermissionsarrayOptional
Permissions that the team has in the access group.
400One of the provided values in the request body is invalid.
401The request is not authorized.
403You do not have permission to access this resource.