Team Members

List members of a team

get

Gets the list of all members that belong to the specified team

Path parameters
teamIdstring · uuidRequired

Unique ID of the team

Example: team123-def6-7890-abcd-ef1234567890
Query parameters
pageinteger · min: 1Optional

Page number for pagination

Default: 1Example: 1
limitinteger · min: 1 · max: 100Optional

Number of items per page

Default: 20Example: 20
Responses
200

List of team members retrieved successfully

application/json
get
GET /memberships/teams/{teamId}/members HTTP/1.1
Host: api.example.com
Accept: */*
{
  "data": [
    {
      "id": "member123-def6-7890-abcd-ef1234567890",
      "userId": "456e7890-e89b-12d3-a456-426614174001",
      "teamId": "team123-def6-7890-abcd-ef1234567890",
      "user": {
        "id": "456e7890-e89b-12d3-a456-426614174001",
        "email": "john.doe@example.com",
        "firstName": "John",
        "lastName": "Doe",
        "avatar": "https://example.com/avatars/john.jpg"
      },
      "role": "member",
      "joinedAt": "2024-01-15T10:30:00Z",
      "updatedAt": "2024-01-20T14:45:00Z",
      "metadata": {
        "position": "Frontend Developer",
        "level": "Senior"
      }
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 20,
    "total": 1,
    "totalPages": 1,
    "hasNext": false,
    "hasPrev": false
  }
}

Add member to team

post

Adds an existing organization user to the specified team

Path parameters
teamIdstring · uuidRequired

Unique ID of the team

Example: team123-def6-7890-abcd-ef1234567890
Body
userIdstring · uuidRequired

ID of the existing organization user to add to the team

Example: 456e7890-e89b-12d3-a456-426614174001
rolestring · enumOptional

Role of the user in the team

Default: memberExample: memberPossible values:
Responses
201

Member successfully added to team

application/json
post
POST /memberships/teams/{teamId}/members HTTP/1.1
Host: api.example.com
Content-Type: application/json
Accept: */*
Content-Length: 127

{
  "userId": "456e7890-e89b-12d3-a456-426614174001",
  "role": "member",
  "metadata": {
    "position": "Frontend Developer",
    "level": "Senior"
  }
}
{
  "id": "member123-def6-7890-abcd-ef1234567890",
  "userId": "456e7890-e89b-12d3-a456-426614174001",
  "teamId": "team123-def6-7890-abcd-ef1234567890",
  "user": {
    "id": "456e7890-e89b-12d3-a456-426614174001",
    "email": "john.doe@example.com",
    "firstName": "John",
    "lastName": "Doe",
    "avatar": "https://example.com/avatars/john.jpg"
  },
  "role": "member",
  "joinedAt": "2024-01-15T10:30:00Z",
  "updatedAt": "2024-01-15T10:30:00Z",
  "metadata": {
    "position": "Frontend Developer",
    "level": "Senior"
  }
}

Get team member information

get

Gets the information of a specific team member

Path parameters
teamIdstring · uuidRequired

Unique ID of the team

Example: team123-def6-7890-abcd-ef1234567890
memberIdstring · uuidRequired

Unique ID of the team member

Example: member123-def6-7890-abcd-ef1234567890
Responses
200

Team member information retrieved successfully

application/json
get
GET /memberships/teams/{teamId}/members/{memberId} HTTP/1.1
Host: api.example.com
Accept: */*
{
  "id": "member123-def6-7890-abcd-ef1234567890",
  "userId": "456e7890-e89b-12d3-a456-426614174001",
  "teamId": "team123-def6-7890-abcd-ef1234567890",
  "user": {
    "id": "456e7890-e89b-12d3-a456-426614174001",
    "email": "john.doe@example.com",
    "firstName": "John",
    "lastName": "Doe",
    "avatar": "https://example.com/avatars/john.jpg"
  },
  "role": "member",
  "joinedAt": "2024-01-15T10:30:00Z",
  "updatedAt": "2024-01-20T14:45:00Z",
  "metadata": {
    "position": "Frontend Developer",
    "level": "Senior"
  }
}

Update team member

put

Updates the role and information of a team member

Path parameters
teamIdstring · uuidRequired

Unique ID of the team

Example: team123-def6-7890-abcd-ef1234567890
memberIdstring · uuidRequired

Unique ID of the team member

Example: member123-def6-7890-abcd-ef1234567890
Body
rolestring · enumOptional

New role for the team member

Example: leadPossible values:
Responses
200

Team member updated successfully

application/json
put
PUT /memberships/teams/{teamId}/members/{memberId} HTTP/1.1
Host: api.example.com
Content-Type: application/json
Accept: */*
Content-Length: 131

{
  "role": "lead",
  "metadata": {
    "position": "Tech Lead",
    "level": "Senior",
    "responsibilities": "Team coordination and technical decisions"
  }
}
{
  "id": "member123-def6-7890-abcd-ef1234567890",
  "userId": "456e7890-e89b-12d3-a456-426614174001",
  "teamId": "team123-def6-7890-abcd-ef1234567890",
  "user": {
    "id": "456e7890-e89b-12d3-a456-426614174001",
    "email": "john.doe@example.com",
    "firstName": "John",
    "lastName": "Doe",
    "avatar": "https://example.com/avatars/john.jpg"
  },
  "role": "lead",
  "joinedAt": "2024-01-15T10:30:00Z",
  "updatedAt": "2024-01-22T16:30:00Z",
  "metadata": {
    "position": "Tech Lead",
    "level": "Senior",
    "responsibilities": "Team coordination and technical decisions"
  }
}

Remove member from team

delete

Removes a member from the specified team

Path parameters
teamIdstring · uuidRequired

Unique ID of the team

Example: team123-def6-7890-abcd-ef1234567890
memberIdstring · uuidRequired

Unique ID of the team member to remove

Example: member123-def6-7890-abcd-ef1234567890
Responses
200

Member successfully removed from team

application/json
delete
DELETE /memberships/teams/{teamId}/members/{memberId} HTTP/1.1
Host: api.example.com
Accept: */*
{
  "success": true,
  "message": "Member successfully removed from team"
}