const response = await fetch('https://cloud-api.calyptia.com/v1/projects/{projectID}/invite', {
method: 'POST',
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"email": "name@gmail.com",
"permissions": [
"create:*"
],
"redirectURI": "https://example.com"
}),
});
const data = await response.json();