Popsink team_member API
The team_member API from Popsink — 3 operation(s) for team_member.
The team_member API from Popsink — 3 operation(s) for team_member.
openapi: 3.1.0
info:
title: Fast admin team_member API
version: 0.1.0
servers:
- url: /api
tags:
- name: team_member
paths:
/teams/{team_id}/members/bulk:
post:
tags:
- team_member
summary: Team Member:Bulk Create
description: 'Bulk create team members.
Add multiple users to a team as either members or owners.
Returns 204 No Content on success.
Users who are already team members will be skipped.'
operationId: team_member_bulk_create_teams__team_id__members_bulk_post
security:
- OAuth2PasswordBearer: []
parameters:
- name: team_id
in: path
required: true
schema:
type: string
format: uuid
title: Team Id
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/TeamMemberBulkCreate'
responses:
'204':
description: Successful Response
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/teams/{team_id}/members:
get:
tags:
- team_member
summary: Team Member:List
description: List the team members of the specified team.
operationId: team_member_list_teams__team_id__members_get
security:
- OAuth2PasswordBearer: []
parameters:
- name: team_id
in: path
required: true
schema:
type: string
format: uuid
title: Team Id
- name: page
in: query
required: false
schema:
type: integer
minimum: 1
default: 1
title: Page
- name: size
in: query
required: false
schema:
type: integer
maximum: 100
minimum: 1
default: 50
title: Size
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/Page_TeamMemberList_'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/teams/{team_id}/members/me:
get:
tags:
- team_member
summary: Team Member:Get
description: Get the team member details of the current user.
operationId: team_member_get_teams__team_id__members_me_get
security:
- OAuth2PasswordBearer: []
parameters:
- name: team_id
in: path
required: true
schema:
type: string
format: uuid
title: Team Id
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/TeamMemberRead'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
components:
schemas:
HTTPValidationError:
properties:
detail:
items:
$ref: '#/components/schemas/ValidationError'
type: array
title: Detail
type: object
title: HTTPValidationError
ValidationError:
properties:
loc:
items:
anyOf:
- type: string
- type: integer
type: array
title: Location
msg:
type: string
title: Message
type:
type: string
title: Error Type
type: object
required:
- loc
- msg
- type
title: ValidationError
TeamMemberBulkCreate:
properties:
owners:
items:
type: string
format: uuid
type: array
title: Owners
description: List of user IDs to add as team owners (admin=true)
default: []
examples:
- - d290f1ee-6c54-4b01-90e6-d701748f0851
- e391f2fc-7e92-4dcd-b1f6-4200e4e9f1f4
members:
items:
type: string
format: uuid
type: array
title: Members
description: List of user IDs to add as team members (admin=false)
default: []
examples:
- - f492f3fd-8f93-4ede-c2f7-5301f5ea0f5
- g593f4fe-9g94-4fef-d3g8-6412g6fb1g6
type: object
title: TeamMemberBulkCreate
description: Request model for creating team members with separate owner and member lists.
TeamMemberList:
properties:
id:
type: string
format: uuid
title: Id
description: Unique identifier of the team member entry
examples:
- b154b9c4-4b28-4c6b-97c2-fdab3ed37f0e
user_id:
type: string
format: uuid
title: User Id
description: Unique identifier of the user
examples:
- d290f1ee-6c54-4b01-90e6-d701748f0851
email:
type: string
title: Email
description: Email address of the user
examples:
- user@example.com
admin:
type: boolean
title: Admin
description: Whether the user is an admin
examples:
- false
type: object
required:
- id
- user_id
- email
- admin
title: TeamMemberList
description: Response model for listing team members with additional user info.
TeamMemberRead:
properties:
id:
type: string
format: uuid
title: Id
description: Unique identifier of the team member entry
examples:
- b154b9c4-4b28-4c6b-97c2-fdab3ed37f0e
user_id:
type: string
format: uuid
title: User Id
description: Unique identifier of the user being added
examples:
- d290f1ee-6c54-4b01-90e6-d701748f0851
team_id:
type: string
format: uuid
title: Team Id
description: Unique identifier of the team
examples:
- a7d1f2fc-6e92-4dcd-b1f6-4200e4e9f1f3
admin:
type: boolean
title: Admin
description: Whether the user has admin privileges in the team
examples:
- true
type: object
required:
- id
- user_id
- team_id
- admin
title: TeamMemberRead
description: Response model for reading a team member.
Page_TeamMemberList_:
properties:
items:
items:
$ref: '#/components/schemas/TeamMemberList'
type: array
title: Items
total:
anyOf:
- type: integer
minimum: 0
- type: 'null'
title: Total
page:
anyOf:
- type: integer
minimum: 1
- type: 'null'
title: Page
size:
anyOf:
- type: integer
minimum: 1
- type: 'null'
title: Size
pages:
anyOf:
- type: integer
minimum: 0
- type: 'null'
title: Pages
type: object
required:
- items
- total
- page
- size
title: Page[TeamMemberList]
securitySchemes:
OAuth2PasswordBearer:
type: oauth2
flows:
password:
scopes: {}
tokenUrl: auth/jwt/login