Members

List team members

List the members of the team.

GET/organizations/{organizationId}/teams/{teamId}/members
Authorization
Path parameters
organizationId*string

The organization ID

teamId*string

ID for a team

Query parameters
Response

OK

Body
resultsarray of TeamMember
nextPageTokenstring

The token to fetch the next page of results. If empty, there are no more results to fetch.

Request
const response = await fetch('/organizations/{organizationId}/teams/{teamId}/members', {
    method: 'GET',
    headers: {
      "Authorization": "Bearer jwt"
    },
});
const data = await response.json();
Response
{
  "results": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "type": "user",
      "status": "active",
      "createdAt": "2024-12-21T12:05:14.067Z",
      "updatedAt": "2024-12-21T12:05:14.067Z"
    }
  ],
  "nextPageToken": "text"
}

Add team member

Add a member to the team.

POST/organizations/{organizationId}/teams/{teamId}/members
Authorization
Path parameters
organizationId*string

The organization ID

teamId*string

ID for a team

Body
type*enum
user
id*string (uuid)
Response

OK

Body
resultsarray of TeamMember
Request
const response = await fetch('/organizations/{organizationId}/teams/{teamId}/members', {
    method: 'POST',
    headers: {
      "Authorization": "Bearer jwt",
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      "type": "user",
      "id": "123e4567-e89b-12d3-a456-426614174000"
    }),
});
const data = await response.json();
Response
{
  "results": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "type": "user",
      "status": "active",
      "createdAt": "2024-12-21T12:05:14.067Z",
      "updatedAt": "2024-12-21T12:05:14.067Z"
    }
  ]
}

Get team member

Retrieve a single team member.

GET/organizations/{organizationId}/teams/{teamId}/members/{teamMemberId}
Authorization
Response

OK

Body
id*string (uuid)
type*enum
user
status*enum
activeinvitedrequested-to-join
createdAt*string (date-time)
updatedAt*string (date-time)
Request
const response = await fetch('/organizations/{organizationId}/teams/{teamId}/members/{teamMemberId}', {
    method: 'GET',
    headers: {
      "Authorization": "Bearer jwt"
    },
});
const data = await response.json();
Response
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "type": "user",
  "status": "active",
  "createdAt": "2024-12-21T12:05:14.067Z",
  "updatedAt": "2024-12-21T12:05:14.067Z"
}

Remove team member

Remove a member from a team.

DELETE/organizations/{organizationId}/teams/{teamId}/members/{teamMemberId}
Authorization
Path parameters
organizationId*string

The organization ID

teamId*string

ID for a team

teamMemberId*string

ID for a team member

Response

OK

Request
const response = await fetch('/organizations/{organizationId}/teams/{teamId}/members/{teamMemberId}', {
    method: 'DELETE',
    headers: {
      "Authorization": "Bearer jwt"
    },
});
const data = await response.json();
Response
{
  "code": "text",
  "message": "text"
}

Last updated