Add a team member (sends an invite)
curl --request POST \
--url https://my.server.express/api/v1/user/teams/{id}/members \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"email": "[email protected]",
"role": "VIEWER"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({email: '[email protected]', role: 'VIEWER'})
};
fetch('https://my.server.express/api/v1/user/teams/{id}/members', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://my.server.express/api/v1/user/teams/{id}/members"
payload = {
"email": "[email protected]",
"role": "VIEWER"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"data": {
"invited": true,
"invite": {
"id": "<string>",
"email": "[email protected]",
"role": "ADMIN",
"expired": false,
"expiresAt": "2023-11-07T05:31:56Z"
},
"message": "<string>"
}
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}Teams
Add a team member (sends an invite)
Same action as POST /v1/user/teams//invites — nobody joins a team without accepting, so this emails an invite and returns 202. Same rules, limits and audit entry.
POST
/
v1
/
user
/
teams
/
{id}
/
members
Add a team member (sends an invite)
curl --request POST \
--url https://my.server.express/api/v1/user/teams/{id}/members \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"email": "[email protected]",
"role": "VIEWER"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({email: '[email protected]', role: 'VIEWER'})
};
fetch('https://my.server.express/api/v1/user/teams/{id}/members', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://my.server.express/api/v1/user/teams/{id}/members"
payload = {
"email": "[email protected]",
"role": "VIEWER"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"data": {
"invited": true,
"invite": {
"id": "<string>",
"email": "[email protected]",
"role": "ADMIN",
"expired": false,
"expiresAt": "2023-11-07T05:31:56Z"
},
"message": "<string>"
}
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}Authorizations
Session access token (JWT) from POST /v1/auth/login or /v1/auth/refresh. A session satisfies every API scope.
Path Parameters
Team id.
Body
application/json