Links

InviteUsersToProjectTeam

This method can be used for the following functionality: Invite user(s) to a project.

Parameters

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.

Headers

POST /api/ss/project/:id/team/invite
HTTP/1.1
Host: localhost:3000
X-SSAPI-KEY: APIKey
Content-Type: application/json
Connection: close

Query

id (string)

Project Id.
Example:
POST /api/ss/project/620f1707c66ef8821d35ee17/team/invite HTTP/1.1

users (array of objects)

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"
}
]

Example

The following example is a cURL request to add multiple users to a specified project.

Request

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

Response contains a results array.
{
"result": [
{
"userId": "6132a2db9239f0975f505c4b",
"username": "[email protected]",
"email": "[email protected]",
"accessLevel": "View",
"status": "Invited"
}
]
}

Errors

Error response will appear as follows.
{
"result": [
{
"user": "...",
"status": "..."
}
]
}
"user" will contain the data submitted for the user:
When user cannot be found:
"status": "User Not Found"
When access level is not either View, Upload or Edit:
"status": "Invalid accessLevel"