# Team Management

## List teams

> Retrieve a list of teams within the workspace, showcasing their members count and other details.

```json
{"openapi":"3.0.3","info":{"title":"Collaboration","version":"v1"},"tags":[{"description":"Teams are the groups of the Collaboration API.","name":"team"}],"security":[{"user":[]},{"accessKey":[]}],"components":{"securitySchemes":{"user":{"description":"Provide the token that is returned upon login","scheme":"bearer","type":"http","bearerFormat":"jwt"},"accessKey":{"description":"Uses the Authorization header: 'AccessKey ' followed by your access key token (e.g., 'Authorization: AccessKey AbCdEfGhIjKlMnOpQrStUvWxYzAbCdEfGhIj')","scheme":"AccessKey","type":"http"}},"parameters":{"queryLimit":{"description":"Limits the number of results to return","in":"query","name":"limit","schema":{"default":10,"maximum":100,"minimum":1,"type":"integer"}},"queryCursor":{"description":"Pagination token that keeps of track of the current position in the list","in":"query","name":"pageToken","schema":{"maxLength":8000,"type":"string"}},"queryDirection":{"description":"Order in which to retrieve the results","in":"query","name":"reverse","schema":{"default":false,"type":"boolean"}},"queryTeamSortBy":{"description":"Sort by field specified","in":"query","name":"sortBy","schema":{"enum":["name"],"type":"string"}}},"schemas":{"TeamList":{"type":"object","required":["results"],"additionalProperties":false,"properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/Team"}}}},"Team":{"type":"object","required":["id","workspaceId","name","description","visibility","activeMemberCount","pendingMemberCount","featuredMembers","hideFromViews","createdAt","updatedAt"],"additionalProperties":false,"properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"visibility":{"type":"string"},"accessibility":{"type":"string"},"activeMemberCount":{"type":"integer"},"pendingMemberCount":{"type":"integer"},"featuredMembers":{"type":"array","items":{"type":"object","required":["type","id"],"additionalProperties":false,"properties":{"id":{"type":"string"},"type":{"type":"string"}}}},"hideFromViews":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"pagination":{"properties":{"nextPageToken":{"description":"The token that can be passed as pageToken in URL to retrieve the next set of results. If missing, no more results to display.","type":"string"},"total":{"description":"The total number of results across all pages.","type":"integer"}},"type":"object"},"Error":{"type":"object","additionalProperties":false,"required":["code","message"],"properties":{"code":{"type":"string","minLength":5},"details":{"type":"object","additionalProperties":true},"message":{"type":"string","minLength":5}}}}},"paths":{"/workspaces/{workspaceId}/teams":{"get":{"description":"Retrieve a list of teams within the workspace, showcasing their members count and other details.","operationId":"listWorkspaceTeams","parameters":[{"$ref":"#/components/parameters/queryLimit"},{"$ref":"#/components/parameters/queryCursor"},{"$ref":"#/components/parameters/queryDirection"},{"$ref":"#/components/parameters/queryTeamSortBy"}],"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TeamList"},{"$ref":"#/components/schemas/pagination"}]}}},"description":"OK"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Workspace not found"}},"summary":"List teams","tags":["team"]}}}}
```

## Get team

> Retrieve information about a specific team within the workspace, including its name, and other details.

```json
{"openapi":"3.0.3","info":{"title":"Collaboration","version":"v1"},"tags":[{"description":"Teams are the groups of the Collaboration API.","name":"team"}],"security":[{"user":[]},{"accessKey":[]}],"components":{"securitySchemes":{"user":{"description":"Provide the token that is returned upon login","scheme":"bearer","type":"http","bearerFormat":"jwt"},"accessKey":{"description":"Uses the Authorization header: 'AccessKey ' followed by your access key token (e.g., 'Authorization: AccessKey AbCdEfGhIjKlMnOpQrStUvWxYzAbCdEfGhIj')","scheme":"AccessKey","type":"http"}},"schemas":{"Team":{"type":"object","required":["id","workspaceId","name","description","visibility","activeMemberCount","pendingMemberCount","featuredMembers","hideFromViews","createdAt","updatedAt"],"additionalProperties":false,"properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"visibility":{"type":"string"},"accessibility":{"type":"string"},"activeMemberCount":{"type":"integer"},"pendingMemberCount":{"type":"integer"},"featuredMembers":{"type":"array","items":{"type":"object","required":["type","id"],"additionalProperties":false,"properties":{"id":{"type":"string"},"type":{"type":"string"}}}},"hideFromViews":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"Error":{"type":"object","additionalProperties":false,"required":["code","message"],"properties":{"code":{"type":"string","minLength":5},"details":{"type":"object","additionalProperties":true},"message":{"type":"string","minLength":5}}}}},"paths":{"/workspaces/{workspaceId}/teams/{teamId}":{"get":{"description":"Retrieve information about a specific team within the workspace, including its name, and other details.","operationId":"getWorkspaceTeam","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Team"}}},"description":"OK"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Team or workspace not found"}},"summary":"Get team","tags":["team"]}}}}
```

## Create team

> Create a new team within the workspace, defining its name, and other relevant attributes.

```json
{"openapi":"3.0.3","info":{"title":"Collaboration","version":"v1"},"tags":[{"description":"Teams are the groups of the Collaboration API.","name":"team"}],"security":[{"user":[]},{"accessKey":[]}],"components":{"securitySchemes":{"user":{"description":"Provide the token that is returned upon login","scheme":"bearer","type":"http","bearerFormat":"jwt"},"accessKey":{"description":"Uses the Authorization header: 'AccessKey ' followed by your access key token (e.g., 'Authorization: AccessKey AbCdEfGhIjKlMnOpQrStUvWxYzAbCdEfGhIj')","scheme":"AccessKey","type":"http"}},"schemas":{"CreateTeam":{"type":"object","title":"CreateTeam","description":"Input for creating a new team.","required":["name"],"additionalProperties":false,"properties":{"name":{"type":"string","minLength":5,"maxLength":20},"description":{"type":"string","maxLength":240},"hideFromViews":{"type":"boolean","default":false},"members":{"type":"array","items":{"type":"object","required":["type","id"],"additionalProperties":false,"properties":{"id":{"type":"string"},"type":{"type":"string"}}}}}},"Team":{"type":"object","required":["id","workspaceId","name","description","visibility","activeMemberCount","pendingMemberCount","featuredMembers","hideFromViews","createdAt","updatedAt"],"additionalProperties":false,"properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"visibility":{"type":"string"},"accessibility":{"type":"string"},"activeMemberCount":{"type":"integer"},"pendingMemberCount":{"type":"integer"},"featuredMembers":{"type":"array","items":{"type":"object","required":["type","id"],"additionalProperties":false,"properties":{"id":{"type":"string"},"type":{"type":"string"}}}},"hideFromViews":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"Error":{"type":"object","additionalProperties":false,"required":["code","message"],"properties":{"code":{"type":"string","minLength":5},"details":{"type":"object","additionalProperties":true},"message":{"type":"string","minLength":5}}},"ValidationError":{"type":"object","additionalProperties":false,"required":["code","message"],"properties":{"code":{"type":"string","minLength":5},"message":{"type":"string","minLength":5},"details":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}},"paths":{"/workspaces/{workspaceId}/teams":{"post":{"description":"Create a new team within the workspace, defining its name, and other relevant attributes.","operationId":"createWorkspaceTeam","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTeam"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Team"}}},"description":"Created"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Workspace not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"}}},"description":"Invalid request"}},"summary":"Create team","tags":["team"]}}}}
```

## Update team

> Modify the details of a specific team within the workspace, such as its name, or other attributes.

```json
{"openapi":"3.0.3","info":{"title":"Collaboration","version":"v1"},"tags":[{"description":"Teams are the groups of the Collaboration API.","name":"team"}],"security":[{"user":[]},{"accessKey":[]}],"components":{"securitySchemes":{"user":{"description":"Provide the token that is returned upon login","scheme":"bearer","type":"http","bearerFormat":"jwt"},"accessKey":{"description":"Uses the Authorization header: 'AccessKey ' followed by your access key token (e.g., 'Authorization: AccessKey AbCdEfGhIjKlMnOpQrStUvWxYzAbCdEfGhIj')","scheme":"AccessKey","type":"http"}},"schemas":{"UpdateTeam":{"type":"object","title":"UpdateTeam","description":"Input for updating a team's properties.","additionalProperties":false,"properties":{"name":{"type":"string","minLength":5,"maxLength":20},"description":{"type":"string","maxLength":240},"hideFromViews":{"type":"boolean"}}},"Team":{"type":"object","required":["id","workspaceId","name","description","visibility","activeMemberCount","pendingMemberCount","featuredMembers","hideFromViews","createdAt","updatedAt"],"additionalProperties":false,"properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"visibility":{"type":"string"},"accessibility":{"type":"string"},"activeMemberCount":{"type":"integer"},"pendingMemberCount":{"type":"integer"},"featuredMembers":{"type":"array","items":{"type":"object","required":["type","id"],"additionalProperties":false,"properties":{"id":{"type":"string"},"type":{"type":"string"}}}},"hideFromViews":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"Error":{"type":"object","additionalProperties":false,"required":["code","message"],"properties":{"code":{"type":"string","minLength":5},"details":{"type":"object","additionalProperties":true},"message":{"type":"string","minLength":5}}},"ValidationError":{"type":"object","additionalProperties":false,"required":["code","message"],"properties":{"code":{"type":"string","minLength":5},"message":{"type":"string","minLength":5},"details":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}},"paths":{"/workspaces/{workspaceId}/teams/{teamId}":{"patch":{"description":"Modify the details of a specific team within the workspace, such as its name, or other attributes.","operationId":"updateWorkspaceTeam","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateTeam"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Team"}}},"description":"OK"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Team or workspace not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"}}},"description":"Invalid request"}},"summary":"Update team","tags":["team"]}}}}
```

## Delete team

> Remove a specific team from the workspace, permanently deleting its profile and associated data.

```json
{"openapi":"3.0.3","info":{"title":"Collaboration","version":"v1"},"tags":[{"description":"Teams are the groups of the Collaboration API.","name":"team"}],"security":[{"user":[]},{"accessKey":[]}],"components":{"securitySchemes":{"user":{"description":"Provide the token that is returned upon login","scheme":"bearer","type":"http","bearerFormat":"jwt"},"accessKey":{"description":"Uses the Authorization header: 'AccessKey ' followed by your access key token (e.g., 'Authorization: AccessKey AbCdEfGhIjKlMnOpQrStUvWxYzAbCdEfGhIj')","scheme":"AccessKey","type":"http"}},"schemas":{"Error":{"type":"object","additionalProperties":false,"required":["code","message"],"properties":{"code":{"type":"string","minLength":5},"details":{"type":"object","additionalProperties":true},"message":{"type":"string","minLength":5}}}}},"paths":{"/workspaces/{workspaceId}/teams/{teamId}":{"delete":{"description":"Remove a specific team from the workspace, permanently deleting its profile and associated data.","operationId":"deleteWorkspaceTeam","responses":{"204":{"description":"Deleted"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Team or workspace not found"}},"summary":"Delete team","tags":["team"]}}}}
```

## List members

> Retrieve a list of members within the team, showcasing their names and other details.

```json
{"openapi":"3.0.3","info":{"title":"Collaboration","version":"v1"},"tags":[{"description":"Teams are the groups of the Collaboration API.","name":"team"}],"security":[{"user":[]},{"accessKey":[]}],"components":{"securitySchemes":{"user":{"description":"Provide the token that is returned upon login","scheme":"bearer","type":"http","bearerFormat":"jwt"},"accessKey":{"description":"Uses the Authorization header: 'AccessKey ' followed by your access key token (e.g., 'Authorization: AccessKey AbCdEfGhIjKlMnOpQrStUvWxYzAbCdEfGhIj')","scheme":"AccessKey","type":"http"}},"schemas":{"MembershipList":{"type":"object","additionalProperties":false,"required":["results"],"properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/Membership"}}}},"Membership":{"type":"object","required":["id","teamId","type","status","createdAt","updatedAt"],"additionalProperties":false,"properties":{"id":{"type":"string"},"teamId":{"type":"string"},"type":{"type":"string"},"status":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"Error":{"type":"object","additionalProperties":false,"required":["code","message"],"properties":{"code":{"type":"string","minLength":5},"details":{"type":"object","additionalProperties":true},"message":{"type":"string","minLength":5}}}}},"paths":{"/workspaces/{workspaceId}/teams/{teamId}/members":{"get":{"description":"Retrieve a list of members within the team, showcasing their names and other details.","operationId":"listMembers","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MembershipList"}}},"description":"OK"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Team or workspace not found"}},"summary":"List members","tags":["team"]}}}}
```

## Create member

> Add a new member to the team.

```json
{"openapi":"3.0.3","info":{"title":"Collaboration","version":"v1"},"tags":[{"description":"Teams are the groups of the Collaboration API.","name":"team"}],"security":[{"user":[]},{"accessKey":[]}],"components":{"securitySchemes":{"user":{"description":"Provide the token that is returned upon login","scheme":"bearer","type":"http","bearerFormat":"jwt"},"accessKey":{"description":"Uses the Authorization header: 'AccessKey ' followed by your access key token (e.g., 'Authorization: AccessKey AbCdEfGhIjKlMnOpQrStUvWxYzAbCdEfGhIj')","scheme":"AccessKey","type":"http"}},"schemas":{"NewMember":{"type":"object","additionalProperties":false,"required":["id","type"],"properties":{"id":{"type":"string","minLength":1},"type":{"type":"string","minLength":1,"enum":["user"]}}},"Membership":{"type":"object","required":["id","teamId","type","status","createdAt","updatedAt"],"additionalProperties":false,"properties":{"id":{"type":"string"},"teamId":{"type":"string"},"type":{"type":"string"},"status":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"Error":{"type":"object","additionalProperties":false,"required":["code","message"],"properties":{"code":{"type":"string","minLength":5},"details":{"type":"object","additionalProperties":true},"message":{"type":"string","minLength":5}}},"ValidationError":{"type":"object","additionalProperties":false,"required":["code","message"],"properties":{"code":{"type":"string","minLength":5},"message":{"type":"string","minLength":5},"details":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}},"paths":{"/workspaces/{workspaceId}/teams/{teamId}/members":{"post":{"description":"Add a new member to the team.","operationId":"createMember","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewMember"}}}},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Membership"}}},"description":"Created"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Team or workspace not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"User is already a member"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"}}},"description":"Invalid request"}},"summary":"Create member","tags":["team"]}}}}
```

## Get member

> Retrieve information about a specific member within the team, including their name and other details.

```json
{"openapi":"3.0.3","info":{"title":"Collaboration","version":"v1"},"tags":[{"description":"Teams are the groups of the Collaboration API.","name":"team"}],"security":[{"user":[]},{"accessKey":[]}],"components":{"securitySchemes":{"user":{"description":"Provide the token that is returned upon login","scheme":"bearer","type":"http","bearerFormat":"jwt"},"accessKey":{"description":"Uses the Authorization header: 'AccessKey ' followed by your access key token (e.g., 'Authorization: AccessKey AbCdEfGhIjKlMnOpQrStUvWxYzAbCdEfGhIj')","scheme":"AccessKey","type":"http"}},"schemas":{"Membership":{"type":"object","required":["id","teamId","type","status","createdAt","updatedAt"],"additionalProperties":false,"properties":{"id":{"type":"string"},"teamId":{"type":"string"},"type":{"type":"string"},"status":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"Error":{"type":"object","additionalProperties":false,"required":["code","message"],"properties":{"code":{"type":"string","minLength":5},"details":{"type":"object","additionalProperties":true},"message":{"type":"string","minLength":5}}}}},"paths":{"/workspaces/{workspaceId}/teams/{teamId}/members/user/{teamMemberUserID}":{"get":{"description":"Retrieve information about a specific member within the team, including their name and other details.","operationId":"getMember","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Membership"}}},"description":"OK"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Member, team or workspace not found"}},"summary":"Get member","tags":["team"]}}}}
```

## Remove member

> Remove a specific member from the team.

```json
{"openapi":"3.0.3","info":{"title":"Collaboration","version":"v1"},"tags":[{"description":"Teams are the groups of the Collaboration API.","name":"team"}],"security":[{"user":[]},{"accessKey":[]}],"components":{"securitySchemes":{"user":{"description":"Provide the token that is returned upon login","scheme":"bearer","type":"http","bearerFormat":"jwt"},"accessKey":{"description":"Uses the Authorization header: 'AccessKey ' followed by your access key token (e.g., 'Authorization: AccessKey AbCdEfGhIjKlMnOpQrStUvWxYzAbCdEfGhIj')","scheme":"AccessKey","type":"http"}},"schemas":{"Error":{"type":"object","additionalProperties":false,"required":["code","message"],"properties":{"code":{"type":"string","minLength":5},"details":{"type":"object","additionalProperties":true},"message":{"type":"string","minLength":5}}}}},"paths":{"/workspaces/{workspaceId}/teams/{teamId}/members/user/{teamMemberUserID}":{"delete":{"description":"Remove a specific member from the team.","operationId":"removeMember","responses":{"204":{"description":"deleted"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Member, team or workspace not found"}},"summary":"Remove member","tags":["team"]}}}}
```
