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. Collaboration role to assign to the user. Must be one of the following options: Not Assigned, Client, Consultant, Pentester, Pentest Lead, Security Manager, Project Manager, Executive, Business Owner, Developer, Engineer, Architect, Red Team, Blue Team, SOC

Example:

"users": [
  {
    "user": "bruce.wayne@attackforge.com",
    "accessLevel": "View",
    "role": "Client"
  },
  {
    "user": "6132a2db9239f0975f505c4b",
    "accessLevel": "Edit",
    "role": "Pentester"
  }
]

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": "bruce.wayne@attackforge.com",
      "accessLevel": "View"
    },
    {
      "user": "6132a2db9239f0975f505c4b",
      "accessLevel": "Edit"
    }
  ]
}'

Response

Response contains a results array.

{
  "result": [
    {
      "userId": "6132a2db9239f0975f505c4b",
      "username": "bruce.wayne@attackforge.com",
      "email": "bruce.wayne@attackforge.com",
      "accessLevel": "View",
      "status": "Invited"
    }
  ]
}

Errors

Error response will appear as follows.

{
  "result": [
    {
      "user": "...",
      "status": "..."
    }
  ]
}

"user" will contain the data submitted for the user:

"user": "bruce.not-wayne@attackforge.com"

When user cannot be found:

"status": "User Not Found"

When access level is not either View, Upload or Edit:

"status": "Invalid accessLevel"

Last updated

Check YouTube for more tutorials: https://youtube.com/@attackforge