Organization

The unique combination of your Agents, monitored infrastructure, and users is what makes a Threat Stack organization.

Each organization has one owner (administrator), but can have many members with different roles, such as user or reader.

The organization endpoints help you view a list of organization members, invite new or existing Threat Stack users to your organization, and remove users from your organization.

List current members of an organization

Overview

This method enables you to get a list of all of the members of your organization.

Sample Queries

Find all of the members of your your organization:

https://api.threatstack.com/v2/organizations/<orgId>/members

Find only the enabled members of an organization:

https://api.threatstack.com/v2/organizations/members?enabledOnly=true
Request
query Parameters
enabledOnly
string

Limits response to organization members that are currently enabled.

Responses
200
400

Bad parameters

401
403

The user is not allowed to perform this action.

429

Rate limit hit.

500

An internal error has occurred.

get/organizations/<orgId>/members
Response samples
application/json
{
  • "id": "string",
  • "displayName": "string",
  • "email": "string",
  • "lastAuthenticatedAt": "string",
  • "role": "string",
  • "ssoEnabled": true,
  • "mfaEnabled": true,
  • "userEnabled": true
}

Add an existing user to an organization

Overview

This method enables you add an existing user to an existing organization.

Sample Queries

Add an existing user to your existing organization:

https://api.threatstack.com/v2/organizations/members
Request
Request Body schema: application/json
id
required
string

The unique Threat Stack identifier for a Threat Stack user account.

role
string

The role assigned to the user account in the organization.

Enum: "owner" "user" "reader"
Responses
200
400

Bad parameters

401
403

The user is not allowed to perform this action.

429

Rate limit hit.

500

An internal error has occurred.

post/organizations/members
Request samples
application/json
{
  • "id": "string",
  • "role": "owner"
}
Response samples
application/json
{
  • "id": "string",
  • "displayName": "string",
  • "email": "string",
  • "lastAuthenticatedAt": "string",
  • "role": "string",
  • "ssoEnabled": true,
  • "mfaEnabled": true,
  • "userEnabled": true
}

Revoke a user's membership from an organization

Overview

This method allows you to remove a user from an organization.

Sample Queries

Remove a user from your organization:

https://api.threatstack.com/v2/organizations/members/{userId}
Request
path Parameters
userId
required
string

Limits response to the unique identifier for the Threat Stack user account.

Responses
204

No Content

400

Bad parameters

401
403

The user is not allowed to perform this action.

429

Rate limit hit.

500

An internal error has occurred.

delete/organizations/members/{userId}
Response samples
application/json
{
  • "message": "string"
}

Invite a new user to an existing organization

Overview

This method allows you to add a new Threat Stack user to an existing organization.

Sample Queries

Invite a new Threat Stack user to your organization:

https://api.threatstack.com/v2/organizations/invites
Request
Request Body schema: application/json
email
required
string

The email address of the user you want to invite to join the organization.

role
string

The role assigned to the user account in the organization.

Enum: "owner" "user" "reader"
Responses
200
400

Bad parameters

401
403

The user is not allowed to perform this action.

429

Rate limit hit.

500

An internal error has occurred.

post/organizations/invites
Request samples
application/json
{
  • "email": "string",
  • "role": "owner"
}
Response samples
application/json
{
  • "sentToEmail": "string",
  • "status": "string",
  • "role": "owner"
}