Up - API Reference - Home
Requires JWT.
Invite a user to the project. This can be an existing or a new user.
To invite a new user you need their email address, for an existing user you can use either the email address or their username.
Only the owner of the project can invite users.
POST /api/p/<project gid>/members/invite
Authorization: Bearer <JWT>
{
"username_or_email": "unicat",
}
username_or_email
invite the user who has this username or email address. A username is case-sensitive, an email address is not.
Authorization: <JWT>
{
"success": true,
"result": {
"user": "b76f701d-3d34-4f39-8eeb-fafe294ab01e",
},
"data": {
"cc.users": {
"b76f701d-3d34-4f39-8eeb-fafe294ab01e": {
"gid": "b76f701d-3d34-4f39-8eeb-fafe294ab01e",
"name": "Unicat",
"avatar": "96ec02b2-fb8d-4fb4-b952-fad0c4b88a74.jpg",
"username": "unicat"
},
},
"cc.projects_members": [
{
"project_gid": "<project gid>",
"user_gid": "b76f701d-3d34-4f39-8eeb-fafe294ab01e",
"status": "invited",
"roles": [
"member"
],
"options": {
"language": "en",
"timezone": "Europe/Amsterdam"
}
}
]
}
}
user
is the invitee's gid.
cc.users
is a dictionary with an entry for the user.
cc.projects_members
is a list with metadata for the invited member.
401
Unauthorized - missing or expired JWT
403
Forbidden - not the owner of this project
422
Unprocessable entity - invite failed