swagger: '2.0'
info:
  title: User Management API
  description: Endpoints for organizations, boards, users, roles, memberships, invites,
    and audit.
  contact:
    email: support@example.com
  license:
    name: BSD License
  version: v1
host: eboard.devsgraphics.com
schemes:
- https
basePath: /api/v1/user-management
consumes:
- application/json
produces:
- application/json
securityDefinitions:
  Basic:
    type: basic
security:
- Basic: []
paths:
  /audit-events/:
    get:
      operationId: audit-events_list
      description: ''
      parameters:
      - name: page
        in: query
        description: A page number within the paginated result set.
        required: false
        type: integer
      - name: page_size
        in: query
        description: Number of results to return per page.
        required: false
        type: integer
      responses:
        '200':
          description: ''
          schema:
            required:
            - count
            - results
            type: object
            properties:
              count:
                type: integer
              next:
                type: string
                format: uri
                x-nullable: true
              previous:
                type: string
                format: uri
                x-nullable: true
              results:
                type: array
                items:
                  $ref: '#/definitions/AuditEvent'
      tags:
      - audit-events
    parameters: []
  /audit-events/{id}/:
    get:
      operationId: audit-events_read
      description: ''
      parameters: []
      responses:
        '200':
          description: ''
          schema:
            $ref: '#/definitions/AuditEvent'
      tags:
      - audit-events
    parameters:
    - name: id
      in: path
      required: true
      type: string
  /auth/lock-state/:
    get:
      operationId: auth_lock_state
      description: ''
      parameters: []
      responses:
        '200':
          description: ''
      tags:
      - auth
    parameters: []
  /auth/lock/:
    post:
      operationId: auth_lock
      description: ''
      parameters: []
      responses:
        '201':
          description: ''
      tags:
      - auth
    parameters: []
  /auth/login/:
    post:
      operationId: auth_login
      description: ''
      parameters: []
      responses:
        '201':
          description: ''
      tags:
      - auth
    parameters: []
  /auth/logout/:
    post:
      operationId: auth_logout
      description: |-
        Best effort:
        - If refresh provided in body, blacklist it (when blacklist app is installed)
        - If authenticated user present and blacklist app is installed, optionally blacklist all their outstanding tokens
        - Always clear the server session
      parameters: []
      responses:
        '201':
          description: ''
      tags:
      - auth
    parameters: []
  /auth/me/:
    get:
      operationId: auth_me
      description: ''
      parameters: []
      responses:
        '200':
          description: ''
      tags:
      - auth
    parameters: []
  /auth/refresh/:
    post:
      operationId: auth_refresh
      description: ''
      parameters: []
      responses:
        '201':
          description: ''
      tags:
      - auth
    parameters: []
  /auth/switch-context/:
    post:
      operationId: auth_switch_context
      description: ''
      parameters: []
      responses:
        '201':
          description: ''
      tags:
      - auth
    parameters: []
  /auth/token/:
    post:
      operationId: auth_token_create
      description: |-
        Takes a set of user credentials and returns an access and refresh JSON web
        token pair to prove the authentication of those credentials.
      parameters:
      - name: data
        in: body
        required: true
        schema:
          $ref: '#/definitions/TokenObtainPair'
      responses:
        '201':
          description: ''
          schema:
            $ref: '#/definitions/TokenObtainPair'
      tags:
      - auth
    parameters: []
  /auth/token/refresh/:
    post:
      operationId: auth_token_refresh_create
      description: |-
        Takes a refresh type JSON web token and returns an access type JSON web
        token if the refresh token is valid.
      parameters:
      - name: data
        in: body
        required: true
        schema:
          $ref: '#/definitions/TokenRefresh'
      responses:
        '201':
          description: ''
          schema:
            $ref: '#/definitions/TokenRefresh'
      tags:
      - auth
    parameters: []
  /auth/token/verify/:
    post:
      operationId: auth_token_verify_create
      description: |-
        Takes a token and indicates if it is valid.  This view provides no
        information about a token's fitness for a particular use.
      parameters:
      - name: data
        in: body
        required: true
        schema:
          $ref: '#/definitions/TokenVerify'
      responses:
        '201':
          description: ''
          schema:
            $ref: '#/definitions/TokenVerify'
      tags:
      - auth
    parameters: []
  /auth/unlock/:
    post:
      operationId: auth_unlock
      description: ''
      parameters: []
      responses:
        '201':
          description: ''
      tags:
      - auth
    parameters: []
  /boards/:
    get:
      operationId: boards_list
      description: |-
        Query params:
          - search: filter by board name/organization name/slug
          - page / page_size: pagination
      parameters:
      - name: page
        in: query
        description: A page number within the paginated result set.
        required: false
        type: integer
      - name: page_size
        in: query
        description: Number of results to return per page.
        required: false
        type: integer
      responses:
        '200':
          description: ''
          schema:
            required:
            - count
            - results
            type: object
            properties:
              count:
                type: integer
              next:
                type: string
                format: uri
                x-nullable: true
              previous:
                type: string
                format: uri
                x-nullable: true
              results:
                type: array
                items:
                  $ref: '#/definitions/Board'
      tags:
      - boards
    post:
      operationId: boards_create
      description: |-
        Query params:
          - search: filter by board name/organization name/slug
          - page / page_size: pagination
      parameters:
      - name: data
        in: body
        required: true
        schema:
          $ref: '#/definitions/Board'
      responses:
        '201':
          description: ''
          schema:
            $ref: '#/definitions/Board'
      tags:
      - boards
    parameters: []
  /boards/{id}/:
    get:
      operationId: boards_read
      description: |-
        Query params:
          - search: filter by board name/organization name/slug
          - page / page_size: pagination
      parameters: []
      responses:
        '200':
          description: ''
          schema:
            $ref: '#/definitions/Board'
      tags:
      - boards
    put:
      operationId: boards_update
      description: |-
        Query params:
          - search: filter by board name/organization name/slug
          - page / page_size: pagination
      parameters:
      - name: data
        in: body
        required: true
        schema:
          $ref: '#/definitions/Board'
      responses:
        '200':
          description: ''
          schema:
            $ref: '#/definitions/Board'
      tags:
      - boards
    patch:
      operationId: boards_partial_update
      description: |-
        Query params:
          - search: filter by board name/organization name/slug
          - page / page_size: pagination
      parameters:
      - name: data
        in: body
        required: true
        schema:
          $ref: '#/definitions/Board'
      responses:
        '200':
          description: ''
          schema:
            $ref: '#/definitions/Board'
      tags:
      - boards
    delete:
      operationId: boards_delete
      description: |-
        Query params:
          - search: filter by board name/organization name/slug
          - page / page_size: pagination
      parameters: []
      responses:
        '204':
          description: ''
      tags:
      - boards
    parameters:
    - name: id
      in: path
      required: true
      type: string
  /committee-memberships/:
    get:
      operationId: committee-memberships_list
      description: ''
      parameters:
      - name: search
        in: query
        description: A search term.
        required: false
        type: string
      - name: ordering
        in: query
        description: Which field to use when ordering the results.
        required: false
        type: string
      responses:
        '200':
          description: ''
          schema:
            type: array
            items:
              $ref: '#/definitions/CommitteeMembership'
      tags:
      - committee-memberships
    post:
      operationId: committee-memberships_create
      description: ''
      parameters:
      - name: data
        in: body
        required: true
        schema:
          $ref: '#/definitions/CommitteeMembership'
      responses:
        '201':
          description: ''
          schema:
            $ref: '#/definitions/CommitteeMembership'
      tags:
      - committee-memberships
    parameters: []
  /committee-memberships/{id}/:
    get:
      operationId: committee-memberships_read
      description: ''
      parameters: []
      responses:
        '200':
          description: ''
          schema:
            $ref: '#/definitions/CommitteeMembership'
      tags:
      - committee-memberships
    put:
      operationId: committee-memberships_update
      description: ''
      parameters:
      - name: data
        in: body
        required: true
        schema:
          $ref: '#/definitions/CommitteeMembership'
      responses:
        '200':
          description: ''
          schema:
            $ref: '#/definitions/CommitteeMembership'
      tags:
      - committee-memberships
    patch:
      operationId: committee-memberships_partial_update
      description: ''
      parameters:
      - name: data
        in: body
        required: true
        schema:
          $ref: '#/definitions/CommitteeMembership'
      responses:
        '200':
          description: ''
          schema:
            $ref: '#/definitions/CommitteeMembership'
      tags:
      - committee-memberships
    delete:
      operationId: committee-memberships_delete
      description: ''
      parameters: []
      responses:
        '204':
          description: ''
      tags:
      - committee-memberships
    parameters:
    - name: id
      in: path
      description: A unique integer value identifying this committee membership.
      required: true
      type: integer
  /committee-roles/:
    get:
      operationId: committee-roles_list
      description: ''
      parameters:
      - name: search
        in: query
        description: A search term.
        required: false
        type: string
      - name: ordering
        in: query
        description: Which field to use when ordering the results.
        required: false
        type: string
      responses:
        '200':
          description: ''
          schema:
            type: array
            items:
              $ref: '#/definitions/CommitteeRole'
      tags:
      - committee-roles
    post:
      operationId: committee-roles_create
      description: ''
      parameters:
      - name: data
        in: body
        required: true
        schema:
          $ref: '#/definitions/CommitteeRole'
      responses:
        '201':
          description: ''
          schema:
            $ref: '#/definitions/CommitteeRole'
      tags:
      - committee-roles
    parameters: []
  /committee-roles/{id}/:
    get:
      operationId: committee-roles_read
      description: ''
      parameters: []
      responses:
        '200':
          description: ''
          schema:
            $ref: '#/definitions/CommitteeRole'
      tags:
      - committee-roles
    put:
      operationId: committee-roles_update
      description: ''
      parameters:
      - name: data
        in: body
        required: true
        schema:
          $ref: '#/definitions/CommitteeRole'
      responses:
        '200':
          description: ''
          schema:
            $ref: '#/definitions/CommitteeRole'
      tags:
      - committee-roles
    patch:
      operationId: committee-roles_partial_update
      description: ''
      parameters:
      - name: data
        in: body
        required: true
        schema:
          $ref: '#/definitions/CommitteeRole'
      responses:
        '200':
          description: ''
          schema:
            $ref: '#/definitions/CommitteeRole'
      tags:
      - committee-roles
    delete:
      operationId: committee-roles_delete
      description: ''
      parameters: []
      responses:
        '204':
          description: ''
      tags:
      - committee-roles
    parameters:
    - name: id
      in: path
      description: A unique integer value identifying this committee role.
      required: true
      type: integer
  /committees/:
    get:
      operationId: committees_list
      description: ''
      parameters:
      - name: search
        in: query
        description: A search term.
        required: false
        type: string
      - name: ordering
        in: query
        description: Which field to use when ordering the results.
        required: false
        type: string
      responses:
        '200':
          description: ''
          schema:
            type: array
            items:
              $ref: '#/definitions/Committee'
      tags:
      - committees
    post:
      operationId: committees_create
      description: ''
      parameters:
      - name: data
        in: body
        required: true
        schema:
          $ref: '#/definitions/Committee'
      responses:
        '201':
          description: ''
          schema:
            $ref: '#/definitions/Committee'
      tags:
      - committees
    parameters: []
  /committees/{id}/:
    get:
      operationId: committees_read
      description: ''
      parameters: []
      responses:
        '200':
          description: ''
          schema:
            $ref: '#/definitions/Committee'
      tags:
      - committees
    put:
      operationId: committees_update
      description: ''
      parameters:
      - name: data
        in: body
        required: true
        schema:
          $ref: '#/definitions/Committee'
      responses:
        '200':
          description: ''
          schema:
            $ref: '#/definitions/Committee'
      tags:
      - committees
    patch:
      operationId: committees_partial_update
      description: ''
      parameters:
      - name: data
        in: body
        required: true
        schema:
          $ref: '#/definitions/Committee'
      responses:
        '200':
          description: ''
          schema:
            $ref: '#/definitions/Committee'
      tags:
      - committees
    delete:
      operationId: committees_delete
      description: ''
      parameters: []
      responses:
        '204':
          description: ''
      tags:
      - committees
    parameters:
    - name: id
      in: path
      description: A unique integer value identifying this committee.
      required: true
      type: integer
  /committees/{id}/add-member/:
    post:
      operationId: committees_add_member
      description: ''
      parameters:
      - name: data
        in: body
        required: true
        schema:
          $ref: '#/definitions/Committee'
      responses:
        '201':
          description: ''
          schema:
            $ref: '#/definitions/Committee'
      tags:
      - committees
    parameters:
    - name: id
      in: path
      description: A unique integer value identifying this committee.
      required: true
      type: integer
  /committees/{id}/remove-member/:
    post:
      operationId: committees_remove_member
      description: ''
      parameters:
      - name: data
        in: body
        required: true
        schema:
          $ref: '#/definitions/Committee'
      responses:
        '201':
          description: ''
          schema:
            $ref: '#/definitions/Committee'
      tags:
      - committees
    parameters:
    - name: id
      in: path
      description: A unique integer value identifying this committee.
      required: true
      type: integer
  /context/:
    get:
      operationId: context_list
      description: |-
        /api/user-management/context/ (GET)   -> current org_id/board_id
        /api/user-management/context/ (POST)  -> set org_id and/or board_id
      parameters: []
      responses:
        '200':
          description: ''
      tags:
      - context
    post:
      operationId: context_create
      description: |-
        /api/user-management/context/ (GET)   -> current org_id/board_id
        /api/user-management/context/ (POST)  -> set org_id and/or board_id
      parameters: []
      responses:
        '201':
          description: ''
      tags:
      - context
    parameters: []
  /invites/:
    get:
      operationId: invites_list
      description: |-
        - Default actions (list/retrieve/create/destroy) require:
          * IsAuthenticated AND IsMemberOrReadOnly
        - `accept` action is public (guarded by invite token + email checks).
      parameters:
      - name: page
        in: query
        description: A page number within the paginated result set.
        required: false
        type: integer
      - name: page_size
        in: query
        description: Number of results to return per page.
        required: false
        type: integer
      responses:
        '200':
          description: ''
          schema:
            required:
            - count
            - results
            type: object
            properties:
              count:
                type: integer
              next:
                type: string
                format: uri
                x-nullable: true
              previous:
                type: string
                format: uri
                x-nullable: true
              results:
                type: array
                items:
                  $ref: '#/definitions/Invite'
      tags:
      - invites
    post:
      operationId: invites_create
      description: |-
        - Default actions (list/retrieve/create/destroy) require:
          * IsAuthenticated AND IsMemberOrReadOnly
        - `accept` action is public (guarded by invite token + email checks).
      parameters:
      - name: data
        in: body
        required: true
        schema:
          $ref: '#/definitions/InviteCreate'
      responses:
        '201':
          description: ''
          schema:
            $ref: '#/definitions/InviteCreate'
      tags:
      - invites
    parameters: []
  /invites/accept/:
    post:
      operationId: invites_accept
      description: ''
      parameters:
      - name: data
        in: body
        required: true
        schema:
          $ref: '#/definitions/InviteAccept'
      responses:
        '201':
          description: ''
          schema:
            $ref: '#/definitions/InviteAccept'
      tags:
      - invites
    parameters: []
  /invites/{id}/:
    get:
      operationId: invites_read
      description: |-
        - Default actions (list/retrieve/create/destroy) require:
          * IsAuthenticated AND IsMemberOrReadOnly
        - `accept` action is public (guarded by invite token + email checks).
      parameters: []
      responses:
        '200':
          description: ''
          schema:
            $ref: '#/definitions/Invite'
      tags:
      - invites
    put:
      operationId: invites_update
      description: |-
        - Default actions (list/retrieve/create/destroy) require:
          * IsAuthenticated AND IsMemberOrReadOnly
        - `accept` action is public (guarded by invite token + email checks).
      parameters:
      - name: data
        in: body
        required: true
        schema:
          $ref: '#/definitions/Invite'
      responses:
        '200':
          description: ''
          schema:
            $ref: '#/definitions/Invite'
      tags:
      - invites
    patch:
      operationId: invites_partial_update
      description: |-
        - Default actions (list/retrieve/create/destroy) require:
          * IsAuthenticated AND IsMemberOrReadOnly
        - `accept` action is public (guarded by invite token + email checks).
      parameters:
      - name: data
        in: body
        required: true
        schema:
          $ref: '#/definitions/Invite'
      responses:
        '200':
          description: ''
          schema:
            $ref: '#/definitions/Invite'
      tags:
      - invites
    delete:
      operationId: invites_delete
      description: |-
        - Default actions (list/retrieve/create/destroy) require:
          * IsAuthenticated AND IsMemberOrReadOnly
        - `accept` action is public (guarded by invite token + email checks).
      parameters: []
      responses:
        '204':
          description: ''
      tags:
      - invites
    parameters:
    - name: id
      in: path
      required: true
      type: string
  /memberships/:
    get:
      operationId: memberships_list
      description: ''
      parameters:
      - name: page
        in: query
        description: A page number within the paginated result set.
        required: false
        type: integer
      - name: page_size
        in: query
        description: Number of results to return per page.
        required: false
        type: integer
      responses:
        '200':
          description: ''
          schema:
            required:
            - count
            - results
            type: object
            properties:
              count:
                type: integer
              next:
                type: string
                format: uri
                x-nullable: true
              previous:
                type: string
                format: uri
                x-nullable: true
              results:
                type: array
                items:
                  $ref: '#/definitions/Membership'
      tags:
      - memberships
    post:
      operationId: memberships_create
      description: ''
      parameters:
      - name: data
        in: body
        required: true
        schema:
          $ref: '#/definitions/MembershipCreate'
      responses:
        '201':
          description: ''
          schema:
            $ref: '#/definitions/MembershipCreate'
      tags:
      - memberships
    parameters: []
  /memberships/{id}/:
    get:
      operationId: memberships_read
      description: ''
      parameters: []
      responses:
        '200':
          description: ''
          schema:
            $ref: '#/definitions/Membership'
      tags:
      - memberships
    put:
      operationId: memberships_update
      description: ''
      parameters:
      - name: data
        in: body
        required: true
        schema:
          $ref: '#/definitions/MembershipUpdate'
      responses:
        '200':
          description: ''
          schema:
            $ref: '#/definitions/MembershipUpdate'
      tags:
      - memberships
    patch:
      operationId: memberships_partial_update
      description: ''
      parameters:
      - name: data
        in: body
        required: true
        schema:
          $ref: '#/definitions/MembershipUpdate'
      responses:
        '200':
          description: ''
          schema:
            $ref: '#/definitions/MembershipUpdate'
      tags:
      - memberships
    delete:
      operationId: memberships_delete
      description: ''
      parameters: []
      responses:
        '204':
          description: ''
      tags:
      - memberships
    parameters:
    - name: id
      in: path
      required: true
      type: string
  /org-roles/:
    get:
      operationId: org-roles_list
      description: ''
      parameters:
      - name: page
        in: query
        description: A page number within the paginated result set.
        required: false
        type: integer
      - name: page_size
        in: query
        description: Number of results to return per page.
        required: false
        type: integer
      responses:
        '200':
          description: ''
          schema:
            required:
            - count
            - results
            type: object
            properties:
              count:
                type: integer
              next:
                type: string
                format: uri
                x-nullable: true
              previous:
                type: string
                format: uri
                x-nullable: true
              results:
                type: array
                items:
                  $ref: '#/definitions/OrgRole'
      tags:
      - org-roles
    post:
      operationId: org-roles_create
      description: ''
      parameters:
      - name: data
        in: body
        required: true
        schema:
          $ref: '#/definitions/OrgRole'
      responses:
        '201':
          description: ''
          schema:
            $ref: '#/definitions/OrgRole'
      tags:
      - org-roles
    parameters: []
  /org-roles/{id}/:
    get:
      operationId: org-roles_read
      description: ''
      parameters: []
      responses:
        '200':
          description: ''
          schema:
            $ref: '#/definitions/OrgRole'
      tags:
      - org-roles
    put:
      operationId: org-roles_update
      description: ''
      parameters:
      - name: data
        in: body
        required: true
        schema:
          $ref: '#/definitions/OrgRole'
      responses:
        '200':
          description: ''
          schema:
            $ref: '#/definitions/OrgRole'
      tags:
      - org-roles
    patch:
      operationId: org-roles_partial_update
      description: ''
      parameters:
      - name: data
        in: body
        required: true
        schema:
          $ref: '#/definitions/OrgRole'
      responses:
        '200':
          description: ''
          schema:
            $ref: '#/definitions/OrgRole'
      tags:
      - org-roles
    delete:
      operationId: org-roles_delete
      description: ''
      parameters: []
      responses:
        '204':
          description: ''
      tags:
      - org-roles
    parameters:
    - name: id
      in: path
      description: A unique integer value identifying this org role.
      required: true
      type: integer
  /organizations/:
    get:
      operationId: organizations_list
      description: |-
        Query params:
          - search: filter by name/slug (icontains)
          - page:   page number (1-based)
          - page_size: items per page (default 50, max 200)
      parameters:
      - name: page
        in: query
        description: A page number within the paginated result set.
        required: false
        type: integer
      - name: page_size
        in: query
        description: Number of results to return per page.
        required: false
        type: integer
      responses:
        '200':
          description: ''
          schema:
            required:
            - count
            - results
            type: object
            properties:
              count:
                type: integer
              next:
                type: string
                format: uri
                x-nullable: true
              previous:
                type: string
                format: uri
                x-nullable: true
              results:
                type: array
                items:
                  $ref: '#/definitions/Organization'
      tags:
      - organizations
    post:
      operationId: organizations_create
      description: |-
        Query params:
          - search: filter by name/slug (icontains)
          - page:   page number (1-based)
          - page_size: items per page (default 50, max 200)
      parameters:
      - name: data
        in: body
        required: true
        schema:
          $ref: '#/definitions/Organization'
      responses:
        '201':
          description: ''
          schema:
            $ref: '#/definitions/Organization'
      tags:
      - organizations
    parameters: []
  /organizations/{id}/:
    get:
      operationId: organizations_read
      description: |-
        Query params:
          - search: filter by name/slug (icontains)
          - page:   page number (1-based)
          - page_size: items per page (default 50, max 200)
      parameters: []
      responses:
        '200':
          description: ''
          schema:
            $ref: '#/definitions/Organization'
      tags:
      - organizations
    put:
      operationId: organizations_update
      description: |-
        Query params:
          - search: filter by name/slug (icontains)
          - page:   page number (1-based)
          - page_size: items per page (default 50, max 200)
      parameters:
      - name: data
        in: body
        required: true
        schema:
          $ref: '#/definitions/Organization'
      responses:
        '200':
          description: ''
          schema:
            $ref: '#/definitions/Organization'
      tags:
      - organizations
    patch:
      operationId: organizations_partial_update
      description: |-
        Query params:
          - search: filter by name/slug (icontains)
          - page:   page number (1-based)
          - page_size: items per page (default 50, max 200)
      parameters:
      - name: data
        in: body
        required: true
        schema:
          $ref: '#/definitions/Organization'
      responses:
        '200':
          description: ''
          schema:
            $ref: '#/definitions/Organization'
      tags:
      - organizations
    delete:
      operationId: organizations_delete
      description: |-
        Query params:
          - search: filter by name/slug (icontains)
          - page:   page number (1-based)
          - page_size: items per page (default 50, max 200)
      parameters: []
      responses:
        '204':
          description: ''
      tags:
      - organizations
    parameters:
    - name: id
      in: path
      required: true
      type: string
  /users/:
    get:
      operationId: users_list
      description: ''
      parameters:
      - name: page
        in: query
        description: A page number within the paginated result set.
        required: false
        type: integer
      - name: page_size
        in: query
        description: Number of results to return per page.
        required: false
        type: integer
      responses:
        '200':
          description: ''
      tags:
      - users
    post:
      operationId: users_create
      description: ''
      parameters:
      - name: data
        in: body
        required: true
        schema:
          $ref: '#/definitions/UserCreate'
      responses:
        '201':
          description: ''
          schema:
            $ref: '#/definitions/UserCreate'
      tags:
      - users
    parameters: []
  /users/{id}/:
    get:
      operationId: users_read
      description: ''
      parameters: []
      responses:
        '200':
          description: ''
          schema:
            $ref: '#/definitions/User'
      tags:
      - users
    put:
      operationId: users_update
      description: ''
      parameters:
      - name: data
        in: body
        required: true
        schema:
          $ref: '#/definitions/UserUpdate'
      responses:
        '200':
          description: ''
          schema:
            $ref: '#/definitions/UserUpdate'
      tags:
      - users
    patch:
      operationId: users_partial_update
      description: ''
      parameters:
      - name: data
        in: body
        required: true
        schema:
          $ref: '#/definitions/UserUpdate'
      responses:
        '200':
          description: ''
          schema:
            $ref: '#/definitions/UserUpdate'
      tags:
      - users
    delete:
      operationId: users_delete
      description: ''
      parameters: []
      responses:
        '204':
          description: ''
      tags:
      - users
    parameters:
    - name: id
      in: path
      required: true
      type: string
definitions:
  MiniOrg:
    required:
    - name
    - slug
    type: object
    properties:
      id:
        title: ID
        type: integer
        readOnly: true
      name:
        title: Name
        type: string
        maxLength: 200
        minLength: 1
      slug:
        title: Slug
        type: string
        format: slug
        pattern: ^[-a-zA-Z0-9_]+$
        maxLength: 200
        minLength: 1
  MiniUser:
    required:
    - email
    type: object
    properties:
      id:
        title: ID
        type: integer
        readOnly: true
      email:
        title: Email
        type: string
        format: email
        maxLength: 254
        minLength: 1
      first_name:
        title: First name
        type: string
        maxLength: 150
      last_name:
        title: Last name
        type: string
        maxLength: 150
      avatar_url:
        title: Avatar url
        type: string
        format: uri
        maxLength: 200
  AuditEvent:
    required:
    - verb
    - object_type
    - object_id
    type: object
    properties:
      id:
        title: ID
        type: integer
        readOnly: true
      org:
        $ref: '#/definitions/MiniOrg'
      actor:
        $ref: '#/definitions/MiniUser'
      verb:
        title: Verb
        type: string
        maxLength: 64
        minLength: 1
      object_type:
        title: Object type
        type: string
        maxLength: 100
        minLength: 1
      object_id:
        title: Object id
        type: string
        maxLength: 64
        minLength: 1
      payload_json:
        title: Payload json
        type: object
      hash:
        title: Hash
        type: string
        readOnly: true
        minLength: 1
      prev_hash:
        title: Prev hash
        type: string
        readOnly: true
        minLength: 1
      ts:
        title: Ts
        type: string
        format: date-time
        readOnly: true
  TokenObtainPair:
    required:
    - email
    - password
    type: object
    properties:
      email:
        title: Email
        type: string
        minLength: 1
      password:
        title: Password
        type: string
        minLength: 1
  TokenRefresh:
    required:
    - refresh
    type: object
    properties:
      refresh:
        title: Refresh
        type: string
        minLength: 1
      access:
        title: Access
        type: string
        readOnly: true
        minLength: 1
  TokenVerify:
    required:
    - token
    type: object
    properties:
      token:
        title: Token
        type: string
        minLength: 1
  Board:
    required:
    - name
    - org_id
    type: object
    properties:
      id:
        title: ID
        type: integer
        readOnly: true
      name:
        title: Name
        type: string
        maxLength: 200
        minLength: 1
      description:
        title: Description
        type: string
      org:
        $ref: '#/definitions/MiniOrg'
      org_id:
        title: Org id
        type: integer
      created_at:
        title: Created at
        type: string
        format: date-time
        readOnly: true
  CommitteeRole:
    required:
    - name
    - code
    type: object
    properties:
      id:
        title: ID
        type: integer
        readOnly: true
      name:
        title: Name
        type: string
        maxLength: 100
        minLength: 1
      code:
        title: Code
        description: Stable key, e.g. 'board', 'zoom', 'hybrid'.
        type: string
        format: slug
        pattern: ^[-a-zA-Z0-9_]+$
        maxLength: 50
        minLength: 1
      description:
        title: Description
        type: string
        maxLength: 255
      is_active:
        title: Is active
        type: boolean
      sort_order:
        title: Sort order
        type: integer
        maximum: 9223372036854775807
        minimum: 0
  CommitteeMembership:
    required:
    - user
    - role_id
    type: object
    properties:
      id:
        title: ID
        type: integer
        readOnly: true
      committee:
        title: Committee
        type: integer
        readOnly: true
      user:
        title: User
        type: integer
      role:
        $ref: '#/definitions/CommitteeRole'
      role_id:
        title: Role id
        type: integer
      is_active:
        title: Is active
        type: boolean
        default: true
      joined_at:
        title: Joined at
        type: string
        format: date-time
      left_at:
        title: Left at
        type: string
        format: date-time
        x-nullable: true
      notes:
        title: Notes
        type: string
        maxLength: 255
  Committee:
    required:
    - org
    - name
    type: object
    properties:
      id:
        title: ID
        type: integer
        readOnly: true
      org:
        title: Org
        type: integer
      board:
        title: Board
        description: 'Optional: link to a parent Board.'
        type: integer
        x-nullable: true
      name:
        title: Name
        type: string
        maxLength: 200
        minLength: 1
      description:
        title: Description
        type: string
      is_active:
        title: Is active
        type: boolean
      created_at:
        title: Created at
        type: string
        format: date-time
        readOnly: true
      legacy_id:
        title: Legacy id
        description: Optional external ID from legacy/source system.
        type: string
        maxLength: 64
      extra:
        title: Extra
        description: Arbitrary metadata (e.g., additionalProp1).
        type: object
      chair:
        title: Chair
        type: integer
        x-nullable: true
      members_count:
        title: Members count
        type: integer
        readOnly: true
  Invite:
    required:
    - org
    - email
    - role
    - expires_at
    type: object
    properties:
      id:
        title: ID
        type: integer
        readOnly: true
      org:
        title: Org
        type: integer
      org_id:
        title: Org id
        type: integer
        readOnly: true
      board:
        title: Board
        description: 'Optional: set for board-specific invites.'
        type: integer
        x-nullable: true
      board_id:
        title: Board id
        type: integer
        readOnly: true
      email:
        title: Email
        type: string
        format: email
        maxLength: 254
        minLength: 1
      role:
        title: Role
        description: Org role or Board role depending on scope.
        type: string
        maxLength: 32
        minLength: 1
      scope:
        title: Scope
        type: string
        enum:
        - org
        - board
      token:
        title: Token
        type: string
        readOnly: true
        minLength: 1
      expires_at:
        title: Expires at
        type: string
        format: date-time
      invited_by:
        title: Invited by
        type: integer
        readOnly: true
        x-nullable: true
      accepted_at:
        title: Accepted at
        type: string
        format: date-time
        readOnly: true
        x-nullable: true
      created_at:
        title: Created at
        type: string
        format: date-time
        readOnly: true
  InviteCreate:
    required:
    - org_id
    - email
    - role
    - expires_at
    type: object
    properties:
      id:
        title: ID
        type: integer
        readOnly: true
      org_id:
        title: Org id
        type: integer
      board_id:
        title: Board id
        type: integer
        x-nullable: true
      email:
        title: Email
        type: string
        format: email
        maxLength: 254
        minLength: 1
      role:
        title: Role
        description: Org role or Board role depending on scope.
        type: string
        maxLength: 32
        minLength: 1
      scope:
        title: Scope
        type: string
        enum:
        - org
        - board
      expires_at:
        title: Expires at
        type: string
        format: date-time
  InviteAccept:
    required:
    - token
    type: object
    properties:
      token:
        title: Token
        type: string
        minLength: 1
      password:
        title: Password
        type: string
  MiniBoard:
    required:
    - name
    type: object
    properties:
      id:
        title: ID
        type: integer
        readOnly: true
      name:
        title: Name
        type: string
        maxLength: 200
        minLength: 1
      org:
        $ref: '#/definitions/MiniOrg'
  Membership:
    type: object
    properties:
      id:
        title: ID
        type: integer
        readOnly: true
      board:
        $ref: '#/definitions/MiniBoard'
      user:
        $ref: '#/definitions/MiniUser'
      role:
        title: Role
        type: string
        enum:
        - BoardAdmin
        - BoardMember
        - Guest
      status:
        title: Status
        type: string
        enum:
        - active
        - inactive
      joined_at:
        title: Joined at
        type: string
        format: date-time
        readOnly: true
  MembershipCreate:
    required:
    - board_id
    - user_id
    type: object
    properties:
      id:
        title: ID
        type: integer
        readOnly: true
      board_id:
        title: Board id
        type: integer
      user_id:
        title: User id
        type: integer
      role:
        title: Role
        type: string
        enum:
        - BoardAdmin
        - BoardMember
        - Guest
      status:
        title: Status
        type: string
        enum:
        - active
        - inactive
  MembershipUpdate:
    type: object
    properties:
      role:
        title: Role
        type: string
        enum:
        - BoardAdmin
        - BoardMember
        - Guest
      status:
        title: Status
        type: string
        enum:
        - active
        - inactive
  OrgRole:
    required:
    - org_id
    - user_id
    type: object
    properties:
      id:
        title: ID
        type: integer
        readOnly: true
      org:
        $ref: '#/definitions/MiniOrg'
      org_id:
        title: Org id
        type: integer
      user:
        $ref: '#/definitions/MiniUser'
      user_id:
        title: User id
        type: integer
      role:
        title: Role
        type: string
        enum:
        - Owner
        - Admin
        - Member
      created_at:
        title: Created at
        type: string
        format: date-time
        readOnly: true
  Organization:
    required:
    - name
    - slug
    - owner_id
    type: object
    properties:
      id:
        title: ID
        type: integer
        readOnly: true
      name:
        title: Name
        type: string
        maxLength: 200
        minLength: 1
      slug:
        title: Slug
        type: string
        format: slug
        pattern: ^[-a-zA-Z0-9_]+$
        minLength: 1
      owner:
        $ref: '#/definitions/MiniUser'
      owner_id:
        title: Owner id
        type: integer
      settings_json:
        title: Settings json
        type: object
      created_at:
        title: Created at
        type: string
        format: date-time
        readOnly: true
  UserCreate:
    required:
    - email
    type: object
    properties:
      id:
        title: ID
        type: integer
        readOnly: true
      email:
        title: Email
        type: string
        format: email
        maxLength: 254
        minLength: 1
      first_name:
        title: First name
        type: string
        maxLength: 150
      last_name:
        title: Last name
        type: string
        maxLength: 150
      phone:
        title: Phone
        type: string
        maxLength: 32
      time_zone:
        title: Time zone
        type: string
        maxLength: 64
        minLength: 1
      locale:
        title: Locale
        type: string
        maxLength: 16
        minLength: 1
      avatar_url:
        title: Avatar url
        type: string
        format: uri
        maxLength: 200
      password:
        title: Password
        type: string
      is_active:
        title: Active
        description: Designates whether this user should be treated as active. Unselect
          this instead of deleting accounts.
        type: boolean
  User:
    type: object
    properties:
      id:
        title: ID
        type: integer
        readOnly: true
      email:
        title: Email
        type: string
        format: email
        readOnly: true
        minLength: 1
      first_name:
        title: First name
        type: string
        maxLength: 150
      last_name:
        title: Last name
        type: string
        maxLength: 150
      phone:
        title: Phone
        type: string
        maxLength: 32
      time_zone:
        title: Time zone
        type: string
        maxLength: 64
        minLength: 1
      locale:
        title: Locale
        type: string
        maxLength: 16
        minLength: 1
      avatar_url:
        title: Avatar url
        type: string
        format: uri
        maxLength: 200
      auth_provider:
        title: Auth provider
        type: string
        enum:
        - local
        - oidc
        readOnly: true
      mfa_enabled:
        title: Mfa enabled
        type: boolean
        readOnly: true
      last_login_at:
        title: Last login at
        type: string
        format: date-time
        readOnly: true
        x-nullable: true
      created_at:
        title: Created at
        type: string
        format: date-time
        readOnly: true
      is_active:
        title: Active
        description: Designates whether this user should be treated as active. Unselect
          this instead of deleting accounts.
        type: boolean
      is_staff:
        title: Staff status
        description: Designates whether the user can log into this admin site.
        type: boolean
        readOnly: true
      is_superuser:
        title: Superuser status
        description: Designates that this user has all permissions without explicitly
          assigning them.
        type: boolean
        readOnly: true
      display_name:
        title: Display name
        type: string
        readOnly: true
      _context:
        title: context
        type: object
        readOnly: true
  UserUpdate:
    type: object
    properties:
      first_name:
        title: First name
        type: string
        maxLength: 150
      last_name:
        title: Last name
        type: string
        maxLength: 150
      phone:
        title: Phone
        type: string
        maxLength: 32
      time_zone:
        title: Time zone
        type: string
        maxLength: 64
        minLength: 1
      locale:
        title: Locale
        type: string
        maxLength: 16
        minLength: 1
      avatar_url:
        title: Avatar url
        type: string
        format: uri
        maxLength: 200
