Account - REST API
Corie Lynch
July 26, 2023 17:18
Invite User List Organization Invites List Users User Account Details Deactivate User
Invite User
You can invite a user to join your Platform account using POST /account/invite/. Users currently will have the same scope and will upload apps and run assessments against the Account limits.
POST https://lab-api.nowsecure.com/invite/
curl -H "Authorization: Bearer ${API_TOKEN}" -H "Content-Type: application/json" -d '{"name": "Amanda", "email": "amanda@example.com", "group_refs": ["40c5892d-a47c-4cbe-b188-ac97eab99328"]}' -X POST "https://lab-api.nowsecure.com/invite/"
Header
Field
Type
Description
Authorization
String
Send header with value Bearer: ${API_TOKEN}
to authenticate
Body
Field
Type
Description
email
String
The email address of the user to invite
name (optional)
String
The name of the user to invite
group_ref
String
An array of group ref
UUIDs to add the user to
List Organization Invites
Organization admins can view a list of invites using GET /resource/invitation/. This will return the name and email of each user that has been invited to the organization.
GET https://lab-api.nowsecure.com/resource/invitation/
curl -H "Authorization: Bearer ${API_TOKEN}" https://lab-api.nowsecure.com/resource/invitation/
HTTP/1.1 200 OK
[
{
"ref": "991125d8-53cf-4794-a441-08bad87fb89b",
"organization_id": 105,
"invited_by": 113,
"user_id": null,
"group_ids": [
104
],
"role_ids": [
6
],
"name": "JohnDoe",
"email": "user@aol.com",
"accepted_at": null,
"created_at": "2019-10-22T03:21:05.245Z",
"updated_at": "2019-10-22T03:21:05.245Z",
"deleted_at": null
}
]
Header
Field
Type
Description
Authorization
String
Send header with value Bearer: ${API_TOKEN}
to authenticate
List Users
View list of current Account users
GET https://lab-api.nowsecure.com/account/user/
curl -H "Authorization: Bearer ${API_TOKEN}" -X GET \
https://lab-api.nowsecure.com/account/user/
code block 2 would go here
Header
Field
Type
Description
Authorization
String
Send header with value Bearer: ${API_TOKEN}
to authenticate
User Account Details
Request user Account details
GET https://lab-api.nowsecure.com/account/user/:user_ref
curl -H "Authorization: Bearer ${API_TOKEN}" \
"https://lab-api.nowsecure.com/account/user/23acg9a8-c335-a3e3-badb-4afa3a4323ae"
code block 2 would go here
Header
Field
Type
Description
Authorization
String
Send header with value Bearer: ${API_TOKEN}
to authenticate
Route
Field
Type
Description
user_ref
String
UUID user ref to request information
Deactivate User
Deactivate a user account
POST https://lab-api.nowsecure.com/resource/user/:ref/deactivate
curl -H "Authorization: Bearer ${API_TOKEN}" \
https://lab-api.nowsecure.com/resource/user/:user_ref/deactivate
code block 2 would go here
Header
Field
Type
Description
Authorization
String
Send header with value Bearer: ${API_TOKEN}
to authenticate
Route
Field
Type
Description
user_ref
String
UUID user ref to request information
Comments
Article is closed for comments.