Grant project access
POST
/api/v1/projects/{projectIdOrKey}/members
const url = 'https://app.avera.io/api/v1/projects/example/members';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"principalId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","itemTypeId":"example","roles":["example"],"expiresAt":"2026-04-15T12:00:00Z"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://app.avera.io/api/v1/projects/example/members \ --header 'Content-Type: application/json' \ --data '{ "principalId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "itemTypeId": "example", "roles": [ "example" ], "expiresAt": "2026-04-15T12:00:00Z" }'Grants a user roles on the project, optionally scoped to one item type and optionally time-bounded.
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”projectIdOrKey
required
string
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
principalId
required
string format: uuid
itemTypeId
string | null
roles
required
Array<string>
expiresAt
string | null format: date-time
Example generated
{ "principalId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "itemTypeId": "example", "roles": [ "example" ], "expiresAt": "2026-04-15T12:00:00Z"}Responses
Section titled “Responses”OK
Media type*/*
object
grantId
required
string format: uuid
principalId
required
string format: uuid
displayName
string | null
email
string | null
itemTypeId
string | null
roles
required
Array<string>
status
required
string
expiresAt
string | null format: date-time
grantedAt
required
string format: date-time