InviteUsersToProjectTeam
This method can be used for the following functionality: Invite user(s) to a project.
The following URL, Headers and Parameters are required for requests to this API endpoint. Where a parameter is optional, it will be indicated. Otherwise treat all parameters as mandatory.
POST /api/ss/project/:id/team/invite
HTTP/1.1
Host: localhost:3000
X-SSAPI-KEY: APIKey
Content-Type: application/json
Connection: close
Project Id.
Example:
POST /api/ss/project/620f1707c66ef8821d35ee17/team/invite HTTP/1.1
Usernames, email addresses or userIds + access level for the users you are inviting to the project. Access level to assign to the user for the specified project must be either View, Upload or Edit.
Example:
"users": [
{
"user": "[email protected]",
"accessLevel": "View"
},
{
"user": "6132a2db9239f0975f505c4b",
"accessLevel": "Edit"
}
]
The following example is a cURL request to add multiple users to a specified project.
Include API Token instead of stars in 'X-SSAPI-KEY: ***************************************' parameter.
curl -X POST 'https://localhost:3000/api/ss/project/620f1707c66ef8821d35ee17/team/invite' -H 'Host: localhost:3000' -H 'X-SSAPI-KEY: ***************************************' -H 'Content-Type: application/json' -H 'Connection: close' -d '{
"users": [
{
"user": "[email protected]",
"accessLevel": "View"
},
{
"user": "6132a2db9239f0975f505c4b",
"accessLevel": "Edit"
}
]
}'
Response contains a results array.
{
"result": [
{
"userId": "6132a2db9239f0975f505c4b",
"username": "[email protected]",
"email": "[email protected]",
"accessLevel": "View",
"status": "Invited"
}
]
}
Error response will appear as follows.
{
"result": [
{
"user": "...",
"status": "..."
}
]
}
"user" will contain the data submitted for the user:
"user": "[email protected]"
When user cannot be found:
"status": "User Not Found"
When access level is not either View, Upload or Edit:
"status": "Invalid accessLevel"
Last modified 1yr ago