Skip to content

Teams

Manage teams, team members, invitations, and team-owned content.

All team endpoints are prefixed with /teams


GET /teams

Get all teams with optional filters.

Authentication: Not required

Query Parameters:

  • search (string, optional) - Search query for team name
  • limit (number, optional) - Results per page
  • offset (number, optional) - Pagination offset

Response:

{
"teams": [
{
"id": "team-id",
"name": "My Team",
"slug": "my-team",
"description": "Team description",
"logoUrl": "https://...",
"bannerUrl": "https://...",
"memberCount": 5,
"resourceCount": 10,
"serverCount": 2
}
],
"total": 50
}

GET /teams/slug/:slug

Get a team by its unique slug.

Authentication: Not required

URL Parameters:

  • slug (string) - Team slug

Response:

{
"id": "team-id",
"name": "My Team",
"slug": "my-team",
"description": "Full team description",
"logoUrl": "https://...",
"bannerUrl": "https://...",
"members": [...],
"socialLinks": [...],
"createdAt": "2024-01-01T00:00:00Z"
}

POST /teams

Create a new team.

Authentication: Required

Request Body:

{
"name": "My Team",
"slug": "my-team",
"description": "Team description"
}

Response:

{
"id": "team-id",
"name": "My Team",
"slug": "my-team",
"ownerId": "user-id",
"members": [
{
"userId": "user-id",
"role": "OWNER"
}
]
}

PATCH /teams/:id

Update team details.

Authentication: Required (must be owner or admin)

URL Parameters:

  • id (string) - Team ID

Request Body: (all fields optional)

{
"name": "Updated Name",
"description": "Updated description"
}

DELETE /teams/:id

Delete a team.

Authentication: Required (must be owner)

URL Parameters:

  • id (string) - Team ID

POST /teams/:id/logo

Upload a logo for the team.

Authentication: Required (must be owner or admin)

Content-Type: multipart/form-data

URL Parameters:

  • id (string) - Team ID

Form Data:

  • logo (file) - Image file (PNG, JPG, WEBP)

POST /teams/:id/banner

Upload a banner for the team.

Authentication: Required (must be owner or admin)

Content-Type: multipart/form-data

URL Parameters:

  • id (string) - Team ID

Form Data:

  • banner (file) - Image file (PNG, JPG, WEBP)

DELETE /teams/:id/logo

Delete the team logo.

Authentication: Required (must be owner or admin)

URL Parameters:

  • id (string) - Team ID

DELETE /teams/:id/banner

Delete the team banner.

Authentication: Required (must be owner or admin)

URL Parameters:

  • id (string) - Team ID

POST /teams/:id/invitations

Invite a user to join the team.

Authentication: Required (must be owner or admin)

URL Parameters:

  • id (string) - Team ID

Request Body:

{
"userId": "user-id-to-invite",
"role": "MEMBER"
}

Roles: MEMBER, MODERATOR, ADMIN

Response:

{
"id": "invitation-id",
"teamId": "team-id",
"userId": "user-id",
"role": "MEMBER",
"status": "PENDING",
"expiresAt": "2024-01-08T00:00:00Z",
"createdAt": "2024-01-01T00:00:00Z"
}

GET /teams/:id/invitations

Get all invitations for a team.

Authentication: Required (must be team member)

URL Parameters:

  • id (string) - Team ID

Query Parameters:

  • status (string, optional) - Filter by status (PENDING, ACCEPTED, DECLINED, CANCELLED)

Response:

{
"invitations": [
{
"id": "invitation-id",
"user": {
"id": "user-id",
"username": "username",
"displayName": "Display Name"
},
"role": "MEMBER",
"status": "PENDING",
"createdAt": "2024-01-01T00:00:00Z",
"expiresAt": "2024-01-08T00:00:00Z"
}
]
}

DELETE /teams/:id/invitations/:invitationId

Cancel a pending invitation.

Authentication: Required (must be owner or admin)

URL Parameters:

  • id (string) - Team ID
  • invitationId (string) - Invitation ID

GET /teams/invitations/me

Get all team invitations for the current user.

Authentication: Required

Query Parameters:

  • status (string, optional) - Filter by status

Response:

{
"invitations": [
{
"id": "invitation-id",
"team": {
"id": "team-id",
"name": "Team Name",
"slug": "team-slug",
"logoUrl": "https://..."
},
"role": "MEMBER",
"status": "PENDING",
"createdAt": "2024-01-01T00:00:00Z",
"expiresAt": "2024-01-08T00:00:00Z"
}
]
}

POST /teams/invitations/:invitationId/respond

Accept or decline a team invitation.

Authentication: Required

URL Parameters:

  • invitationId (string) - Invitation ID

Request Body:

{
"accept": true
}

Response:

{
"message": "Invitation accepted",
"teamMember": {
"teamId": "team-id",
"userId": "user-id",
"role": "MEMBER"
}
}

PATCH /teams/:id/members/:memberId

Update a team member’s role.

Authentication: Required (must be owner or admin)

URL Parameters:

  • id (string) - Team ID
  • memberId (string) - Team member ID

Request Body:

{
"role": "ADMIN"
}

Roles: MEMBER, MODERATOR, ADMIN, OWNER


DELETE /teams/:id/members/:memberId

Remove a member from the team.

Authentication: Required (must be owner or admin)

URL Parameters:

  • id (string) - Team ID
  • memberId (string) - Team member ID

DELETE /teams/:id/leave

Leave a team you’re a member of.

Authentication: Required

URL Parameters:

  • id (string) - Team ID

Note: Team owners cannot leave their team without transferring ownership first.


GET /teams/:id/resources

Get all resources owned by a team.

Authentication: Not required

URL Parameters:

  • id (string) - Team ID

Response:

{
"resources": [...]
}

GET /teams/:id/servers

Get all servers owned by a team.

Authentication: Not required

URL Parameters:

  • id (string) - Team ID

Response:

{
"servers": [...]
}

GET /teams/me

Get all teams the current user is a member of.

Authentication: Required

Response:

{
"teams": [
{
"id": "team-id",
"name": "Team Name",
"slug": "team-slug",
"role": "ADMIN",
"logoUrl": "https://..."
}
]
}

GET /teams/:id/social-links

Get all social links for a team.

Authentication: Not required

URL Parameters:

  • id (string) - Team ID

POST /teams/:id/social-links

Add a social link to a team.

Authentication: Required (must be owner or admin)

URL Parameters:

  • id (string) - Team ID

Request Body:

{
"platform": "DISCORD",
"url": "https://discord.gg/..."
}

PATCH /teams/:id/social-links/:linkId

Update a social link.

Authentication: Required (must be owner or admin)

URL Parameters:

  • id (string) - Team ID
  • linkId (string) - Social link ID

DELETE /teams/:id/social-links/:linkId

Delete a social link.

Authentication: Required (must be owner or admin)

URL Parameters:

  • id (string) - Team ID
  • linkId (string) - Social link ID

PATCH /teams/:id/social-links/reorder

Reorder social links.

Authentication: Required (must be owner or admin)

URL Parameters:

  • id (string) - Team ID

Request Body:

{
"linkIds": ["link-id-1", "link-id-2"]
}