openapi: 3.1.0
info: 
  title: PluralBuddy API
  version: 1.0.2
servers: 
  - url: https://pluralbuddy.app/api
security: 
  - bearerAuth: 
      []
    apiKeyCookie: 
      []
    oAuth2: 
      []
components: 
  securitySchemes: 
    apiKeyCookie: 
      type: apiKey
      in: cookie
      name: apiKeyCookie
      description: API Key authentication via cookie
    bearerAuth: 
      type: http
      scheme: bearer
      description: Bearer token authentication
    oAuth2: 
      type: oauth2
      description: OAuth 2.1 authentication
      flows: 
        authorizationCode: 
          authorizationUrl: https://pluralbuddy.app/api/auth/oauth2/authorize
          tokenUrl: https://pluralbuddy.app/api/auth/oauth2/token
          scopes: 
            profile: Read profile
            openid: Read user ID
            email: Read (fake) user email
            offline_access: Refresh token
            alters:read: Read alter data
            alters:write: Write alter data
            tags:read: Read tag data
            tags:write: Write tag data
            tags:alters: Assign tags to alters
            system:read: Read system data
            system:write: Write to system data
            system:admin: "Read/write to alter, tags & system data."
            system:ai-ap: Create custom auto proxy modes as if this integration was a front tracker.
        clientCredentials: 
          authorizationUrl: https://pluralbuddy.app/api/auth/oauth2/authorize
          tokenUrl: https://pluralbuddy.app/api/auth/oauth2/token
          scopes: 
            profile: Read profile
            openid: Read user ID
            email: Read (fake) user email
            offline_access: Refresh token
            alters:read: Read alter data
            alters:write: Write alter data
            tags:read: Read tag data
            tags:write: Write tag data
            tags:alters: Assign tags to alters
            system:read: Read system data
            system:write: Write to system data
            system:admin: "Read/write to alter, tags & system data."
  schemas: 
    PTag: 
      type: object
      properties: 
        tagId: 
          type: string
        systemId: 
          type: string
        tagFriendlyName: 
          type: string
          maxLength: 100
        tagDescription: 
          type: 
            - string
            - "null"
          maxLength: 1000
        tagColor: 
          type: string
          enum: 
            - red
            - orange
            - amber
            - yellow
            - lime
            - green
            - emerald
            - teal
            - cyan
            - sky
            - blue
            - indigo
            - violet
            - purple
            - fuchsia
            - pink
            - rose
        associatedAlters: 
          type: array
          items: 
            type: string
        orderString: 
          type: string
          minLength: 1
          maxLength: 4
        public: 
          type: number
          minimum: 0
          description: "This is a bitwise operation-based number which determines the protection flags that are public. By default, everything on PluralBuddy is private.\n\n| Public Flag     | Value                   | Description |\n|-----------------|-------------------------|-------------|\n| NAME            | `1` `(1 << 0)`      | Allows external users to see the tag's name. |\n| DESCRIPTION     | `2` `(1 << 1)`      | Allows external users to see the tag's description. |\n| ALTERS          | `32` `(1 << 5)`     | Allows external users to see the tag's associated alters. |\n| COLOR           | `64` `(1 << 6)`     | Allows external users to see the tag's banner. |"
          example: 0
        fields: 
          type: object
          additionalProperties: 
            type: string
            maxLength: 150
          default: 
            {}
      required: 
        - tagId
        - systemId
        - tagFriendlyName
        - tagColor
        - associatedAlters
        - public
    PAlter: 
      type: object
      properties: 
        alterId: 
          type: number
        systemId: 
          type: string
        username: 
          type: string
          maxLength: 100
          pattern: "^[^\\s@\\\\/]+$"
        displayName: 
          type: string
          maxLength: 100
        nameMap: 
          type: array
          items: 
            type: object
            properties: 
              server: 
                type: string
                maxLength: 20
              name: 
                type: string
                maxLength: 100
            required: 
              - server
              - name
        color: 
          type: 
            - string
            - "null"
          pattern: "^#[0-9A-F]{6}$/i"
        description: 
          type: 
            - string
            - "null"
          maxLength: 1000
        created: 
          type: 
            - string
            - "null"
          format: date-time
        pronouns: 
          type: 
            - string
            - "null"
          maxLength: 100
        avatarUrl: 
          type: 
            - string
            - "null"
        avatarUrlMap: 
          type: object
          additionalProperties: 
            type: string
          default: 
            {}
        webhookAvatarUrl: 
          type: 
            - string
            - "null"
        banner: 
          type: 
            - string
            - "null"
        lastMessageTimestamp: 
          type: 
            - string
            - "null"
          format: date-time
        messageCount: 
          type: number
        alterMode: 
          type: string
          enum: 
            - nickname
            - webhook
            - both
          default: webhook
        proxyTags: 
          type: array
          items: 
            type: object
            properties: 
              prefix: 
                type: string
                maxLength: 100
              suffix: 
                type: string
                maxLength: 100
              id: 
                type: string
            required: 
              - prefix
              - suffix
              - id
          default: 
            []
        tagIds: 
          type: array
          items: 
            type: string
          default: 
            []
          description: Edit the tags associated with this alter. This will **replace** the list of tags inheriting this alter when using the API.
        public: 
          type: number
          minimum: 0
          default: 0
          description: "This is a bitwise operation-based number which determines the protection flags that are public. By default, everything on PluralBuddy is private.\n\n| Public Flag     | Value                   | Description |\n|-----------------|-------------------------|-------------|\n| VISIBILITY      | `1` `(1 << 0)`      | Allows external users to see the alter. |\n| NAME            | `2` `(1 << 1)`      | Allows external users to see the alter's name. |\n| DESCRIPTION     | `4` `(1 << 2)`      | Allows external users to see the alter's description. |\n| BANNER          | `8` `(1 << 3)`      | Allows external users to see the alter's banner. |\n| PRONOUNS        | `16` `(1 << 4)`     | Allows external users to see the alter's pronouns. |\n| AVATAR          | `32` `(1 << 5)`     | Allows external users to see the alter's avatar. |\n| TAGS            | `128` `(1 << 7)`    | Allows external users to see the alter's associated tags. |\n| MESSAGE_COUNT   | `256` `(1 << 8)`    | Allows external users to see the alter's message count. |\n| USERNAME        | `512` `(1 << 9)`    | Allows external users to see the alter's username. |"
        flags: 
          type: number
          minimum: 0
          default: 0
          description: "This is a bitwise operation-based number which determines which features are enabled.\n\n| Alter Flag              | Value                   | Description |\n|-------------------------|-------------------------|-------------|\n| PROXY_TAGS_KEPT         | `1` `(1 << 0)`      | Keeps proxy tags after proxying for this specific alter. |"
        fields: 
          type: object
          additionalProperties: 
            type: string
            maxLength: 150
          default: 
            {}
      required: 
        - alterId
        - systemId
        - username
        - displayName
        - nameMap
        - color
        - description
        - created
        - pronouns
        - avatarUrl
        - webhookAvatarUrl
        - banner
        - lastMessageTimestamp
        - messageCount
    PSystem: 
      type: object
      properties: 
        associatedUserId: 
          type: string
        systemName: 
          type: string
          minLength: 1
          maxLength: 100
        systemDisplayTag: 
          type: 
            - string
            - "null"
        displayTagMap: 
          type: object
          additionalProperties: 
            type: string
          default: 
            {}
          description: "This is a map that shows the association between a Discord server ID and a custom display tag.\n\n```js\n{ \n  \"1444187699924963350\": \"string\"\n}\n```"
          example: 
            &example
            "1444187699924963350": string
        systemDescription: 
          type: string
          maxLength: 4000
        systemAvatar: 
          type: 
            - string
            - "null"
        systemBanner: 
          type: 
            - string
            - "null"
        systemPronouns: 
          type: 
            - string
            - "null"
        nicknameFormat: 
          type: 
            - string
            - "null"
        alterIds: 
          type: array
          items: 
            type: number
          maxItems: 2000
          default: 
            []
        tagIds: 
          type: array
          items: 
            type: string
          maxItems: 500
          default: 
            []
        createdAt: 
          type: 
            - string
            - "null"
          format: date-time
        systemAutoproxy: 
          type: array
          items: 
            type: object
            properties: 
              autoproxyMode: 
                anyOf: 
                  - type: string
                    enum: 
                      - "off"
                      - latch
                      - alter
                  - type: string
              autoproxyAlter: 
                type: 
                  - string
                  - "null"
              serverId: 
                type: string
              lastLatchTimestamp: 
                type: 
                  - string
                  - "null"
                format: date-time
            required: 
              - autoproxyMode
              - serverId
        systemOperationDM: 
          type: boolean
          default: true
        latchExpiration: 
          type: number
          minimum: 0
          maximum: 36000000
        public: 
          type: number
          minimum: 0
          description: "This is a bitwise operation-based number which determines the protection flags that are public. By default, everything on PluralBuddy is private.\n\n| Public Flag     | Value                   | Description |\n|-----------------|-------------------------|-------------|\n| NAME            | `1` `(1 << 0)`      | Allows external users to see system name. |\n| DISPLAY_TAG     | `2` `(1 << 1)`      | Allows external users to see system display tag. |\n| DESCRIPTION     | `4` `(1 << 2)`      | Allows external users to see system description. |\n| AVATAR          | `8` `(1 << 3)`      | Allows external users to see system avatar. |\n| BANNER          | `16` `(1 << 4)`     | Allows external users to see system banner. |\n| PRONOUNS        | `32` `(1 << 5)`     | Allows external users to see system pronouns. |\n| ALTERS          | `64` `(1 << 6)`     | Allows external users to see alters inside of the system. |\n| TAGS            | `128` `(1 << 7)`    | Allows external users to see tags inside of the system. |"
        flags: 
          type: number
          minimum: 0
          default: 0
          description: "This is a bitwise operation-based number which determines certain system settings.\n\n| Public Flag              | Value                   | Description |\n|--------------------------|-------------------------|-------------|\n| KEEP_PROXY_TAGS          | `1` `(1 << 0)`      | All messages sent in the system will maintain their proxy tags. |\n| KEEP_PRONOUNS            | `2` `(1 << 1)`      | Pronouns will be shown in the webhook name of the proxying. |\n| NO_TYPING_STATUS         | `4` `(1 << 2)`      | Typing status from the bot wont be displayed. |\n| PREFER_ACCESSIBLITY      | `8` `(1 << 3)`      | Prefer accessiblity in menus for this system. |\n| LEFT_SIDED_TAG           | `16` `(1 << 4)`     | Display tags will be displayed on the left side of the webhook. |\n| CASE_INSENSITIVE_PROXIES | `32` `(1 << 5)`     | Proxy tags when proxying will be matched case insensitively. |\n| PUBLIC_DEFAULT           | `64` `(1 << 6)`     | All new objects in the system will automatically be created publicly. |"
        disabledGuilds: 
          type: array
          items: 
            type: string
          default: 
            []
        subAccounts: 
          type: array
          items: 
            type: string
          default: 
            []
        disabled: 
          type: boolean
          default: false
      required: 
        - associatedUserId
        - systemName
        - createdAt
        - systemAutoproxy
        - public
  parameters: 
    {}
paths: 
  "/v1/users/{user}/alters/{alter}": 
    delete: 
      summary: Delete a system alter
      description: "Delete a system alter by its ID. `{user}` can be `@me` to target the current OAuth user."
      security: 
        - oAuth2: 
            - alters:write
      parameters: 
        - name: user
          in: path
          required: true
          description: "`{user}` is a Discord user Snowflake, or `@me`, referencing the current OAuth user."
          schema: 
            type: string
        - name: alter
          in: path
          required: true
          description: "`{alter}` is the alter ID."
          schema: 
            type: string
      responses: 
        "200": 
          description: Success.
          content: 
            application/json: 
              schema: 
                type: object
                properties: 
                  success: 
                    type: boolean
                    enum: 
                      - true
                required: 
                  - success
        "400": 
          description: Client error while processing input.
          content: 
            application/json: 
              schema: 
                type: object
                properties: 
                  errors: 
                    type: array
                    items: 
                      type: object
                      properties: 
                        type: 
                          type: string
                          enum: 
                            - not-matching-oauth
                            - zod
                        friendly: 
                          type: string
                      required: 
                        - type
                        - friendly
                required: 
                  - errors
        "401": 
          description: No access token when authenticating.
          content: 
            application/json: 
              schema: 
                type: object
                properties: 
                  errors: 
                    type: array
                    items: 
                      type: object
                      properties: 
                        type: 
                          type: string
                          enum: 
                            - no-access-token
                            - invalid-scopes
                            - unknown-token
                        friendly: 
                          type: string
                      required: 
                        - type
                        - friendly
                required: 
                  - errors
        "404": 
          description: "Couldn't find the alter"
          content: 
            application/json: 
              schema: 
                type: object
                properties: 
                  type: 
                    type: string
                    enum: 
                      - unknown-alter
                  friendly: 
                    type: string
                    enum: 
                      - "Couldn't find this alter."
                required: 
                  - type
                  - friendly
    get: 
      summary: Get a system alter
      description: "Get data about a specific alter by ID. `{user}` can be `@me` to target the current OAuth user. This endpoint **does** allow for external system alter data (if achievable in conjunction with the system's privacy settings and the logged in OAuth user)."
      security: 
        - oAuth2: 
            - alters:read
      parameters: 
        - name: user
          in: path
          required: true
          description: "`{user}` is a Discord user Snowflake, or `@me`, referencing the current OAuth user."
          schema: 
            type: string
        - name: alter
          in: path
          required: true
          description: "`{alter}` is the alter ID."
          schema: 
            type: string
      responses: 
        "200": 
          description: Success.
          content: 
            application/json: 
              schema: 
                type: object
                properties: 
                  isSelf: 
                    type: boolean
                  data: 
                    allOf: 
                      - $ref: "#/components/schemas/PAlter"
                      - type: 
                          - object
                          - "null"
                required: 
                  - isSelf
                  - data
        "401": 
          description: No access token when authenticating.
          content: 
            application/json: 
              schema: 
                type: object
                properties: 
                  errors: 
                    type: array
                    items: 
                      type: object
                      properties: 
                        type: 
                          type: string
                          enum: 
                            - no-access-token
                            - invalid-scopes
                            - unknown-token
                        friendly: 
                          type: string
                      required: 
                        - type
                        - friendly
                required: 
                  - errors
  "/v1/users/{user}/tags/{tag}": 
    delete: 
      summary: Delete a system tag
      description: "Delete a system tag by its ID. `{user}` can be `@me` to target the current OAuth user."
      security: 
        - oAuth2: 
            - tags:write
      parameters: 
        - name: user
          in: path
          required: true
          description: "`{user}` is a Discord user Snowflake, or `@me`, referencing the current OAuth user."
          schema: 
            type: string
        - name: tag
          in: path
          required: true
          description: "`{tag}` is the tag ID."
          schema: 
            type: string
      responses: 
        "200": 
          description: Success.
          content: 
            application/json: 
              schema: 
                type: object
                properties: 
                  success: 
                    type: boolean
                    enum: 
                      - true
                required: 
                  - success
        "400": 
          description: Client error while processing input.
          content: 
            application/json: 
              schema: 
                type: object
                properties: 
                  errors: 
                    type: array
                    items: 
                      type: object
                      properties: 
                        type: 
                          type: string
                          enum: 
                            - not-matching-oauth
                            - zod
                        friendly: 
                          type: string
                      required: 
                        - type
                        - friendly
                required: 
                  - errors
        "401": 
          description: No access token when authenticating.
          content: 
            application/json: 
              schema: 
                type: object
                properties: 
                  errors: 
                    type: array
                    items: 
                      type: object
                      properties: 
                        type: 
                          type: string
                          enum: 
                            - no-access-token
                            - invalid-scopes
                            - unknown-token
                        friendly: 
                          type: string
                      required: 
                        - type
                        - friendly
                required: 
                  - errors
        "404": 
          description: "Couldn't find the tag"
          content: 
            application/json: 
              schema: 
                type: object
                properties: 
                  type: 
                    type: string
                    enum: 
                      - unknown-tag
                  friendly: 
                    type: string
                    enum: 
                      - "Couldn't find this tag."
                required: 
                  - type
                  - friendly
    get: 
      summary: Get a system tag
      description: "Get data about a specific tag by ID. `{user}` can be `@me` to target the current OAuth user. This endpoint **does** allow for external system tag data (if achievable in conjunction with the system's privacy settings and the logged in OAuth user)."
      security: 
        - oAuth2: 
            - tags:read
      parameters: 
        - name: user
          in: path
          required: true
          description: "`{user}` is a Discord user Snowflake, or `@me`, referencing the current OAuth user."
          schema: 
            type: string
        - name: tag
          in: path
          required: true
          description: "`{tag}` is the tag ID."
          schema: 
            type: string
      responses: 
        "200": 
          description: Success.
          content: 
            application/json: 
              schema: 
                type: object
                properties: 
                  isSelf: 
                    type: boolean
                  data: 
                    allOf: 
                      - $ref: "#/components/schemas/PTag"
                      - type: 
                          - object
                          - "null"
                required: 
                  - isSelf
                  - data
        "401": 
          description: No access token when authenticating.
          content: 
            application/json: 
              schema: 
                type: object
                properties: 
                  errors: 
                    type: array
                    items: 
                      type: object
                      properties: 
                        type: 
                          type: string
                          enum: 
                            - no-access-token
                            - invalid-scopes
                            - unknown-token
                        friendly: 
                          type: string
                      required: 
                        - type
                        - friendly
                required: 
                  - errors
  /auth/oauth2/authorize: 
    get: 
      summary: Authorize an OAuth2 request
      security: 
        - bearerAuth: 
            []
      parameters: 
        - name: response_type
          in: query
          required: true
          schema: 
            type: string
          description: "OAuth2 response type (e.g., 'code')"
        - name: client_id
          in: query
          required: true
          schema: 
            type: string
          description: OAuth2 client ID
        - name: redirect_uri
          in: query
          required: false
          schema: 
            type: string
            format: uri
          description: OAuth2 redirect URI
        - name: scope
          in: query
          required: false
          schema: 
            type: string
          description: OAuth2 scopes (space-separated)
        - name: state
          in: query
          required: false
          schema: 
            type: string
          description: OAuth2 state parameter
        - name: code_challenge
          in: query
          required: false
          schema: 
            type: string
          description: PKCE code challenge
        - name: code_challenge_method
          in: query
          required: false
          schema: 
            type: string
          description: PKCE code challenge method
        - name: nonce
          in: query
          required: false
          schema: 
            type: string
          description: OpenID Connect nonce
        - name: prompt
          in: query
          required: false
          schema: 
            type: string
          description: OAuth2 prompt parameter
      responses: 
        "302": 
          description: Redirect to client with code or error
          headers: 
            Location: 
              description: Redirect URI with code or error
              schema: 
                type: string
                format: uri
        "400": 
          description: Invalid request
          content: 
            application/json: 
              schema: 
                type: object
                properties: 
                  error: 
                    type: string
                  error_description: 
                    type: string
                  state: 
                    type: string
                required: 
                  - error
        "401": 
          description: Unauthorized. Due to missing or invalid authentication.
          content: 
            application/json: 
              schema: 
                type: object
                properties: 
                  message: 
                    type: string
                required: 
                  - message
        "403": 
          description: Forbidden. You do not have permission to access this resource or to perform this action.
          content: 
            application/json: 
              schema: 
                type: object
                properties: 
                  message: 
                    type: string
        "404": 
          description: Not Found. The requested resource was not found.
          content: 
            application/json: 
              schema: 
                type: object
                properties: 
                  message: 
                    type: string
        "429": 
          description: Too Many Requests. You have exceeded the rate limit. Try again later.
          content: 
            application/json: 
              schema: 
                type: object
                properties: 
                  message: 
                    type: string
        "500": 
          description: Internal Server Error. This is a problem with the server that you cannot fix.
          content: 
            application/json: 
              schema: 
                type: object
                properties: 
                  message: 
                    type: string
  /v1/stats: 
    get: 
      summary: Get PluralBuddy statistics
      security: 
        []
      description: Get data of statistical data related to PluralBuddy.
      responses: 
        "200": 
          description: Successful.
          content: 
            application/json: 
              schema: 
                type: object
                properties: 
                  guildCount: 
                    type: number
                  userCount: 
                    type: number
                  lastDrip: 
                    type: number
                required: 
                  - guildCount
                  - userCount
                  - lastDrip
  "/v1/users/{user}/front": 
    post: 
      summary: Front an alter
      description: "Push an alter to front with [AI/AP](/docs/pluralbuddy/ai-ap)."
      security: 
        - oAuth2: 
            - system:ai-ap
      parameters: 
        - name: user
          in: path
          required: true
          description: "`{user}` is a Discord user Snowflake, or `@me`, referencing the current OAuth user."
          schema: 
            type: string
      requestBody: 
        content: 
          application/json: 
            schema: 
              type: object
              properties: 
                alter: 
                  type: string
              required: 
                - alter
      responses: 
        "200": 
          description: Success.
          content: 
            application/json: 
              schema: 
                type: object
                properties: 
                  success: 
                    type: boolean
                    enum: 
                      - true
                required: 
                  - success
        "400": 
          description: Client error while processing input.
          content: 
            application/json: 
              schema: 
                type: object
                properties: 
                  errors: 
                    type: array
                    items: 
                      type: object
                      properties: 
                        type: 
                          type: string
                          enum: 
                            - not-matching-oauth
                            - zod
                        friendly: 
                          type: string
                      required: 
                        - type
                        - friendly
                required: 
                  - errors
        "401": 
          description: No access token when authenticating.
          content: 
            application/json: 
              schema: 
                type: object
                properties: 
                  errors: 
                    type: array
                    items: 
                      type: object
                      properties: 
                        type: 
                          type: string
                          enum: 
                            - no-access-token
                            - invalid-scopes
                            - unknown-token
                        friendly: 
                          type: string
                      required: 
                        - type
                        - friendly
                required: 
                  - errors
        "404": 
          description: "Couldn't find the alter"
          content: 
            application/json: 
              schema: 
                type: object
                properties: 
                  type: 
                    type: string
                    enum: 
                      - unknown-alter
                      - no-ai-ap-id
                      - no-client-id
                      - not-matching-oauth
                  friendly: 
                    type: string
                    enum: 
                      - Unable to find the specific alter.
                      - There is no assigned AI/AP ID which is required to set a front.
                      - Unable to find the client ID for this OAuth application.
                      - This endpoint requires the user currently logged in via OAuth.
                required: 
                  - type
                  - friendly
  /auth/oauth2/revoke: 
    post: 
      summary: Revoke OAuth2 access or refresh token
      security: 
        - bearerAuth: 
            []
      parameters: 
        []
      requestBody: 
        required: true
        content: 
          application/json: 
            schema: 
              type: object
              properties: 
                client_id: 
                  type: string
                  description: OAuth2 client ID
                client_secret: 
                  type: string
                  description: OAuth2 client secret
                token: 
                  type: string
                  description: The token to revoke (access or refresh token)
                token_type_hint: 
                  type: string
                  enum: 
                    - access_token
                    - refresh_token
                  description: Hint about the type of the token submitted for revocation
              required: 
                - token
      responses: 
        "200": 
          description: Token revoked successfully. The response body is empty.
          content: 
            application/json: 
              schema: 
                type: object
                description: Empty object on success
        "400": 
          description: Invalid request or error response
          content: 
            application/json: 
              schema: 
                type: object
                properties: 
                  error: 
                    type: string
                  error_description: 
                    type: string
                  error_uri: 
                    type: string
                required: 
                  - error
        "401": 
          description: Unauthorized. Due to missing or invalid authentication.
          content: 
            application/json: 
              schema: 
                type: object
                properties: 
                  message: 
                    type: string
                required: 
                  - message
        "403": 
          description: Forbidden. You do not have permission to access this resource or to perform this action.
          content: 
            application/json: 
              schema: 
                type: object
                properties: 
                  message: 
                    type: string
        "404": 
          description: Not Found. The requested resource was not found.
          content: 
            application/json: 
              schema: 
                type: object
                properties: 
                  message: 
                    type: string
        "429": 
          description: Too Many Requests. You have exceeded the rate limit. Try again later.
          content: 
            application/json: 
              schema: 
                type: object
                properties: 
                  message: 
                    type: string
        "500": 
          description: Internal Server Error. This is a problem with the server that you cannot fix.
          content: 
            application/json: 
              schema: 
                type: object
                properties: 
                  message: 
                    type: string
  /auth/oauth2/introspect: 
    post: 
      summary: Introspect an OAuth2 access or refresh token
      security: 
        - bearerAuth: 
            []
      parameters: 
        []
      requestBody: 
        required: true
        content: 
          application/json: 
            schema: 
              type: object
              properties: 
                client_id: 
                  type: string
                  description: OAuth2 client ID
                client_secret: 
                  type: string
                  description: OAuth2 client secret
                token: 
                  type: string
                  description: The token to introspect (access or refresh token)
                token_type_hint: 
                  type: string
                  enum: 
                    - access_token
                    - refresh_token
                  description: Hint about the type of the token submitted for introspection
                resource: 
                  type: string
                  description: Introspects a token for a specific resource.
              required: 
                - token
      responses: 
        "200": 
          description: Token introspection response
          content: 
            application/json: 
              schema: 
                type: object
                properties: 
                  active: 
                    type: boolean
                    description: Whether the token is active
                  scope: 
                    type: string
                    description: Scopes associated with the token
                  client_id: 
                    type: string
                    description: Client ID associated with the token
                  username: 
                    type: string
                    description: Username associated with the token
                  token_type: 
                    type: string
                    description: Type of the token
                  exp: 
                    type: number
                    description: Expiration time of the token (seconds since epoch)
                  iat: 
                    type: number
                    description: Issued at time (seconds since epoch)
                  nbf: 
                    type: number
                    description: Not before time (seconds since epoch)
                  sub: 
                    type: string
                    description: Subject of the token
                  aud: 
                    type: string
                    description: Audience of the token
                  iss: 
                    type: string
                    description: Issuer of the token
                  jti: 
                    type: string
                    description: JWT ID
                required: 
                  - active
        "400": 
          description: Invalid request or error response
          content: 
            application/json: 
              schema: 
                type: object
                properties: 
                  error: 
                    type: string
                  error_description: 
                    type: string
                  error_uri: 
                    type: string
                required: 
                  - error
        "401": 
          description: Unauthorized. Due to missing or invalid authentication.
          content: 
            application/json: 
              schema: 
                type: object
                properties: 
                  message: 
                    type: string
                required: 
                  - message
        "403": 
          description: Forbidden. You do not have permission to access this resource or to perform this action.
          content: 
            application/json: 
              schema: 
                type: object
                properties: 
                  message: 
                    type: string
        "404": 
          description: Not Found. The requested resource was not found.
          content: 
            application/json: 
              schema: 
                type: object
                properties: 
                  message: 
                    type: string
        "429": 
          description: Too Many Requests. You have exceeded the rate limit. Try again later.
          content: 
            application/json: 
              schema: 
                type: object
                properties: 
                  message: 
                    type: string
        "500": 
          description: Internal Server Error. This is a problem with the server that you cannot fix.
          content: 
            application/json: 
              schema: 
                type: object
                properties: 
                  message: 
                    type: string
  /auth/oauth2/token: 
    post: 
      summary: Obtain an OAuth2.1 access token
      security: 
        - bearerAuth: 
            []
      parameters: 
        []
      requestBody: 
        required: true
        content: 
          application/x-www-form-urlencoded: 
            schema: 
              type: object
              properties: 
                grant_type: 
                  type: string
                  enum: 
                    - authorization_code
                    - client_credentials
                    - refresh_token
                  description: OAuth2 grant type
                client_id: 
                  type: string
                  description: OAuth2 client ID
                client_secret: 
                  type: string
                  description: OAuth2 client secret
                code: 
                  type: string
                  description: Authorization code (for authorization_code grant)
                code_verifier: 
                  type: string
                  description: PKCE code verifier (for authorization_code grant)
                redirect_uri: 
                  type: string
                  format: uri
                  description: Redirect URI (for authorization_code grant)
                refresh_token: 
                  type: string
                  description: Refresh token (for refresh_token grant)
                resource: 
                  type: string
                  description: Requested token resource (ie audience) to obtain a JWT formatted access token
                  enum: 
                    - https://pluralbuddy.app
                scope: 
                  type: string
                  description: Requested scopes (for client_credentials grant)
              required: 
                - grant_type
      responses: 
        "200": 
          description: Access token response
          content: 
            application/json: 
              schema: 
                type: object
                properties: 
                  access_token: 
                    type: string
                    description: The access token issued by the authorization server
                  token_type: 
                    type: string
                    description: The type of the token issued
                    enum: 
                      - Bearer
                  expires_in: 
                    type: number
                    description: Lifetime in seconds of the access token
                  refresh_token: 
                    type: string
                    description: "Refresh token, if issued"
                  scope: 
                    type: string
                    description: Scopes granted by the access token
                  id_token: 
                    type: string
                    description: ID Token (if OpenID Connect)
                required: 
                  - access_token
                  - token_type
                  - expires_in
        "400": 
          description: Invalid request or error response
          content: 
            application/json: 
              schema: 
                type: object
                properties: 
                  error: 
                    type: string
                  error_description: 
                    type: string
                  error_uri: 
                    type: string
                required: 
                  - error
        "401": 
          description: Unauthorized. Due to missing or invalid authentication.
          content: 
            application/json: 
              schema: 
                type: object
                properties: 
                  message: 
                    type: string
                required: 
                  - message
        "403": 
          description: Forbidden. You do not have permission to access this resource or to perform this action.
          content: 
            application/json: 
              schema: 
                type: object
                properties: 
                  message: 
                    type: string
        "404": 
          description: Not Found. The requested resource was not found.
          content: 
            application/json: 
              schema: 
                type: object
                properties: 
                  message: 
                    type: string
        "429": 
          description: Too Many Requests. You have exceeded the rate limit. Try again later.
          content: 
            application/json: 
              schema: 
                type: object
                properties: 
                  message: 
                    type: string
        "500": 
          description: Internal Server Error. This is a problem with the server that you cannot fix.
          content: 
            application/json: 
              schema: 
                type: object
                properties: 
                  message: 
                    type: string
  "/v1/messages/{id}": 
    get: 
      summary: Get PluralBuddy message
      description: Get a PluralBuddy message by Message ID
      security: 
        - oAuth2: 
            []
      parameters: 
        - name: id
          in: path
          required: true
          description: "`{id}` is the Discord Message ID."
          schema: 
            type: string
      responses: 
        "200": 
          description: Success response. Response with the message.
          content: 
            application/json: 
              schema: 
                type: object
                properties: 
                  message: 
                    type: object
                    properties: 
                      messageId: 
                        type: string
                        examples: 
                          &examples
                          - "1481859770611666944"
                      systemId: 
                        type: string
                        examples: 
                          &examples1
                          - "1481859816656736257"
                      alterId: 
                        type: number
                        examples: 
                          &examples2
                          - "1481859842262962178"
                      createdAt: 
                        type: string
                        format: date-time
                      guildId: 
                        type: string
                        examples: 
                          &examples3
                          - "1481859908541353987"
                      channelId: 
                        type: string
                        examples: 
                          &examples4
                          - "1481859951688159236"
                      referencedMessage: 
                        type: string
                      expressUserId: 
                        type: string
                      endpoints: 
                        type: object
                        properties: 
                          system: 
                            type: string
                            examples: 
                              - api/v1/users/1481859816656736257/system
                        required: 
                          - system
                    required: 
                      - messageId
                      - systemId
                      - alterId
                      - createdAt
                      - channelId
                      - endpoints
                required: 
                  - message
        "401": 
          description: No access token when authenticating.
          content: 
            application/json: 
              schema: 
                type: object
                properties: 
                  errors: 
                    type: array
                    items: 
                      type: object
                      properties: 
                        type: 
                          type: string
                          enum: 
                            - no-access-token
                            - invalid-scopes
                            - unknown-token
                        friendly: 
                          type: string
                      required: 
                        - type
                        - friendly
                required: 
                  - errors
  "/v1/users/{user}/terminology": 
    get: 
      summary: "Get a user's terminology"
      description: "Get specific data about a user's terminology. `{user}` can be `@me` to target the current OAuth user."
      security: 
        - oAuth2: 
            - system:read
      parameters: 
        - name: user
          in: path
          required: true
          description: "`{user}` is a Discord user Snowflake, or `@me`, referencing the current OAuth user."
          schema: 
            type: string
      responses: 
        "200": 
          description: Success.
          content: 
            application/json: 
              schema: 
                type: object
                properties: 
                  alters: 
                    type: string
                    maxLength: 15
                    default: alter
                  alters_plural: 
                    type: string
                    maxLength: 15
                    default: alters
                  alters_capital: 
                    type: string
                    maxLength: 15
                    default: Alter
                  tags: 
                    type: string
                    maxLength: 15
                    default: tag
                  tags_plural: 
                    type: string
                    maxLength: 15
                    default: tags
                  tags_capital: 
                    type: string
                    maxLength: 15
                    default: Tag
                  system: 
                    type: string
                    maxLength: 15
                    default: system
                  system_plural: 
                    type: string
                    maxLength: 15
                    default: systems
                  system_capital: 
                    type: string
                    maxLength: 15
                    default: System
                  display_tag: 
                    type: string
                    maxLength: 15
                    default: display tag
                  proxy_tag: 
                    type: string
                    maxLength: 15
                    default: proxy tag
                  proxy_tags_plural: 
                    type: string
                    maxLength: 15
                    default: proxy tags
                  proxy_tags_capital: 
                    type: string
                    maxLength: 15
                    default: Proxy Tags
        "401": 
          description: No access token when authenticating.
          content: 
            application/json: 
              schema: 
                type: object
                properties: 
                  errors: 
                    type: array
                    items: 
                      type: object
                      properties: 
                        type: 
                          type: string
                          enum: 
                            - no-access-token
                            - invalid-scopes
                            - unknown-token
                        friendly: 
                          type: string
                      required: 
                        - type
                        - friendly
                required: 
                  - errors
    post: 
      summary: "Modify a user's terminology"
      description: "Modify specific data about a user's terminology. `{user}` can be `@me` to target the current OAuth user."
      security: 
        - oAuth2: 
            - system:write
      parameters: 
        - name: user
          in: path
          required: true
          description: "`{user}` is a Discord user Snowflake, or `@me`, referencing the current OAuth user."
          schema: 
            type: string
      requestBody: 
        content: 
          application/json: 
            schema: 
              type: object
              properties: 
                alters: 
                  type: string
                  maxLength: 15
                  default: alter
                alters_plural: 
                  type: string
                  maxLength: 15
                  default: alters
                alters_capital: 
                  type: string
                  maxLength: 15
                  default: Alter
                tags: 
                  type: string
                  maxLength: 15
                  default: tag
                tags_plural: 
                  type: string
                  maxLength: 15
                  default: tags
                tags_capital: 
                  type: string
                  maxLength: 15
                  default: Tag
                system: 
                  type: string
                  maxLength: 15
                  default: system
                system_plural: 
                  type: string
                  maxLength: 15
                  default: systems
                system_capital: 
                  type: string
                  maxLength: 15
                  default: System
                display_tag: 
                  type: string
                  maxLength: 15
                  default: display tag
                proxy_tag: 
                  type: string
                  maxLength: 15
                  default: proxy tag
                proxy_tags_plural: 
                  type: string
                  maxLength: 15
                  default: proxy tags
                proxy_tags_capital: 
                  type: string
                  maxLength: 15
                  default: Proxy Tags
      responses: 
        "200": 
          description: Success.
          content: 
            application/json: 
              schema: 
                type: object
                properties: 
                  success: 
                    type: boolean
                    enum: 
                      - true
                required: 
                  - success
        "401": 
          description: No access token when authenticating.
          content: 
            application/json: 
              schema: 
                type: object
                properties: 
                  errors: 
                    type: array
                    items: 
                      type: object
                      properties: 
                        type: 
                          type: string
                          enum: 
                            - no-access-token
                            - invalid-scopes
                            - unknown-token
                        friendly: 
                          type: string
                      required: 
                        - type
                        - friendly
                required: 
                  - errors
  "/v1/users/{user}/system/create-tag": 
    post: 
      summary: Create a system tag
      description: "Create a system tag. `{user}` can be `@me` to target the current OAuth user."
      security: 
        - oAuth2: 
            - tags:write
      parameters: 
        - name: user
          in: path
          required: true
          description: "`{user}` is a Discord user Snowflake, or `@me`, referencing the current OAuth user."
          schema: 
            type: string
      requestBody: 
        content: 
          application/json: 
            schema: 
              allOf: 
                - type: object
                  properties: 
                    tagDescription: 
                      type: 
                        - string
                        - "null"
                      maxLength: 1000
                    orderString: 
                      type: string
                      minLength: 1
                      maxLength: 4
                    public: 
                      type: number
                      minimum: 0
                      description: "This is a bitwise operation-based number which determines the protection flags that are public. By default, everything on PluralBuddy is private.\n\n| Public Flag     | Value                   | Description |\n|-----------------|-------------------------|-------------|\n| NAME            | `1` `(1 << 0)`      | Allows external users to see the tag's name. |\n| DESCRIPTION     | `2` `(1 << 1)`      | Allows external users to see the tag's description. |\n| ALTERS          | `32` `(1 << 5)`     | Allows external users to see the tag's associated alters. |\n| COLOR           | `64` `(1 << 6)`     | Allows external users to see the tag's banner. |"
                      example: 0
                  required: 
                    - public
                - type: object
                  properties: 
                    color: 
                      type: string
                      enum: 
                        - red
                        - orange
                        - amber
                        - yellow
                        - lime
                        - green
                        - emerald
                        - teal
                        - cyan
                        - sky
                        - blue
                        - indigo
                        - violet
                        - purple
                        - fuchsia
                        - pink
                        - rose
                    displayName: 
                      type: string
                      minLength: 3
                      maxLength: 100
                  required: 
                    - color
                    - displayName
      responses: 
        "200": 
          description: Success.
          content: 
            application/json: 
              schema: 
                $ref: "#/components/schemas/PTag"
        "400": 
          description: Client error while processing input.
          content: 
            application/json: 
              schema: 
                type: object
                properties: 
                  errors: 
                    type: array
                    items: 
                      type: object
                      properties: 
                        type: 
                          type: string
                          enum: 
                            - not-matching-oauth
                            - zod
                            - too-many-tags
                        friendly: 
                          type: string
                      required: 
                        - type
                        - friendly
                required: 
                  - errors
        "401": 
          description: No access token when authenticating.
          content: 
            application/json: 
              schema: 
                type: object
                properties: 
                  errors: 
                    type: array
                    items: 
                      type: object
                      properties: 
                        type: 
                          type: string
                          enum: 
                            - no-access-token
                            - invalid-scopes
                            - unknown-token
                        friendly: 
                          type: string
                      required: 
                        - type
                        - friendly
                required: 
                  - errors
        "404": 
          description: "Couldn't find the alter"
          content: 
            application/json: 
              schema: 
                type: object
                properties: 
                  type: 
                    type: string
                    enum: 
                      - unknown-alter
                  friendly: 
                    type: string
                    enum: 
                      - "Couldn't find this alter."
                required: 
                  - type
                  - friendly
  "/v1/users/{user}/system/list-tags": 
    get: 
      summary: List system tags
      description: "List data about tags in a system. `{user}` can be `@me` to target the current OAuth user. This endpoint **does** allow for external system tag data (if achievable in conjunction with the system's privacy settings and the logged in OAuth user)."
      security: 
        - oAuth2: 
            - alters:read
      parameters: 
        - name: user
          in: path
          required: true
          description: "`{user}` is a Discord user Snowflake, or `@me`, referencing the current OAuth user."
          schema: 
            type: string
        - description: How many entries to show at most if in a pagination. Can only be at most 250 tags.
          name: max
          in: query
          schema: 
            type: number
            maximum: 250
        - description: How many entries to skip if in a pagination.
          name: skip
          in: query
          schema: 
            type: number
      responses: 
        "200": 
          description: Success.
          content: 
            application/json: 
              schema: 
                type: array
                items: 
                  $ref: "#/components/schemas/PTag"
        "400": 
          description: "You can only show at most 250 tags in a current pagination or you aren't using the current OAuth user."
          content: 
            application/json: 
              schema: 
                type: object
                properties: 
                  errors: 
                    type: array
                    items: 
                      type: object
                      properties: 
                        type: 
                          type: string
                          enum: 
                            - not-matching-oauth
                            - max-too-high
                        friendly: 
                          type: string
                      required: 
                        - type
                        - friendly
                required: 
                  - errors
        "401": 
          description: No access token when authenticating.
          content: 
            application/json: 
              schema: 
                type: object
                properties: 
                  errors: 
                    type: array
                    items: 
                      type: object
                      properties: 
                        type: 
                          type: string
                          enum: 
                            - no-access-token
                            - invalid-scopes
                            - unknown-token
                        friendly: 
                          type: string
                      required: 
                        - type
                        - friendly
                required: 
                  - errors
  "/v1/users/{user}/tags/{tag}/edit": 
    post: 
      summary: Edit a system tag
      description: "Edit a system tag by its ID. `{user}` can be `@me` to target the current OAuth user."
      security: 
        - oAuth2: 
            - tags:write
      parameters: 
        - name: user
          in: path
          required: true
          description: "`{user}` is a Discord user Snowflake, or `@me`, referencing the current OAuth user."
          schema: 
            type: string
        - name: tag
          in: path
          required: true
          description: "`{tag}` is the tag ID."
          schema: 
            type: string
      requestBody: 
        content: 
          application/json: 
            schema: 
              type: object
              properties: 
                tagFriendlyName: 
                  type: string
                  maxLength: 100
                tagDescription: 
                  type: 
                    - string
                    - "null"
                  maxLength: 1000
                tagColor: 
                  type: string
                  enum: 
                    - red
                    - orange
                    - amber
                    - yellow
                    - lime
                    - green
                    - emerald
                    - teal
                    - cyan
                    - sky
                    - blue
                    - indigo
                    - violet
                    - purple
                    - fuchsia
                    - pink
                    - rose
                orderString: 
                  type: string
                  minLength: 1
                  maxLength: 4
                public: 
                  type: number
                  minimum: 0
                  description: "This is a bitwise operation-based number which determines the protection flags that are public. By default, everything on PluralBuddy is private.\n\n| Public Flag     | Value                   | Description |\n|-----------------|-------------------------|-------------|\n| NAME            | `1` `(1 << 0)`      | Allows external users to see the tag's name. |\n| DESCRIPTION     | `2` `(1 << 1)`      | Allows external users to see the tag's description. |\n| ALTERS          | `32` `(1 << 5)`     | Allows external users to see the tag's associated alters. |\n| COLOR           | `64` `(1 << 6)`     | Allows external users to see the tag's banner. |"
                  example: 0
                fields: 
                  type: object
                  additionalProperties: 
                    type: string
                    maxLength: 150
                  default: 
                    {}
              default: 
                {}
      responses: 
        "200": 
          description: Success.
          content: 
            application/json: 
              schema: 
                $ref: "#/components/schemas/PTag"
        "400": 
          description: Client error while processing input.
          content: 
            application/json: 
              schema: 
                type: object
                properties: 
                  errors: 
                    type: array
                    items: 
                      type: object
                      properties: 
                        type: 
                          type: string
                          enum: 
                            - not-matching-oauth
                            - zod
                        friendly: 
                          type: string
                      required: 
                        - type
                        - friendly
                required: 
                  - errors
        "401": 
          description: No access token when authenticating.
          content: 
            application/json: 
              schema: 
                type: object
                properties: 
                  errors: 
                    type: array
                    items: 
                      type: object
                      properties: 
                        type: 
                          type: string
                          enum: 
                            - no-access-token
                            - invalid-scopes
                            - unknown-token
                        friendly: 
                          type: string
                      required: 
                        - type
                        - friendly
                required: 
                  - errors
        "404": 
          description: "Couldn't find the tag"
          content: 
            application/json: 
              schema: 
                type: object
                properties: 
                  type: 
                    type: string
                    enum: 
                      - unknown-tag
                  friendly: 
                    type: string
                    enum: 
                      - "Couldn't find this tag."
                required: 
                  - type
                  - friendly
  "/v1/users/{user}/system/create-alter": 
    post: 
      summary: Create a system alter
      description: "Create a system alter. `{user}` can be `@me` to target the current OAuth user. Username must be unique."
      security: 
        - oAuth2: 
            - alters:write
      parameters: 
        - name: user
          in: path
          required: true
          description: "`{user}` is a Discord user Snowflake, or `@me`, referencing the current OAuth user."
          schema: 
            type: string
      requestBody: 
        content: 
          application/json: 
            schema: 
              allOf: 
                - type: object
                  properties: 
                    username: 
                      type: string
                      maxLength: 100
                      pattern: "^[^\\s@\\\\/]+$"
                    displayName: 
                      type: string
                      maxLength: 100
                    nameMap: 
                      type: array
                      items: 
                        type: object
                        properties: 
                          server: 
                            type: string
                            maxLength: 20
                          name: 
                            type: string
                            maxLength: 100
                        required: 
                          - server
                          - name
                    color: 
                      type: 
                        - string
                        - "null"
                      pattern: "^#[0-9A-F]{6}$/i"
                    description: 
                      type: 
                        - string
                        - "null"
                      maxLength: 1000
                    pronouns: 
                      type: 
                        - string
                        - "null"
                      maxLength: 100
                    avatarUrl: 
                      type: 
                        - string
                        - "null"
                    avatarUrlMap: 
                      type: object
                      additionalProperties: 
                        type: string
                      default: 
                        {}
                    webhookAvatarUrl: 
                      type: 
                        - string
                        - "null"
                    banner: 
                      type: 
                        - string
                        - "null"
                    alterMode: 
                      type: string
                      enum: 
                        - nickname
                        - webhook
                        - both
                      default: webhook
                    public: 
                      type: number
                      minimum: 0
                      default: 0
                      description: "This is a bitwise operation-based number which determines the protection flags that are public. By default, everything on PluralBuddy is private.\n\n| Public Flag     | Value                   | Description |\n|-----------------|-------------------------|-------------|\n| VISIBILITY      | `1` `(1 << 0)`      | Allows external users to see the alter. |\n| NAME            | `2` `(1 << 1)`      | Allows external users to see the alter's name. |\n| DESCRIPTION     | `4` `(1 << 2)`      | Allows external users to see the alter's description. |\n| BANNER          | `8` `(1 << 3)`      | Allows external users to see the alter's banner. |\n| PRONOUNS        | `16` `(1 << 4)`     | Allows external users to see the alter's pronouns. |\n| AVATAR          | `32` `(1 << 5)`     | Allows external users to see the alter's avatar. |\n| TAGS            | `128` `(1 << 7)`    | Allows external users to see the alter's associated tags. |\n| MESSAGE_COUNT   | `256` `(1 << 8)`    | Allows external users to see the alter's message count. |\n| USERNAME        | `512` `(1 << 9)`    | Allows external users to see the alter's username. |"
                    flags: 
                      type: number
                      minimum: 0
                      default: 0
                      description: "This is a bitwise operation-based number which determines which features are enabled.\n\n| Alter Flag              | Value                   | Description |\n|-------------------------|-------------------------|-------------|\n| PROXY_TAGS_KEPT         | `1` `(1 << 0)`      | Keeps proxy tags after proxying for this specific alter. |"
                - type: object
                  properties: 
                    username: 
                      type: string
                      maxLength: 100
                      pattern: "^[^\\s@\\\\/]+$"
                    displayName: 
                      type: string
                      maxLength: 100
                    proxyTags: 
                      type: array
                      items: 
                        type: object
                        properties: 
                          prefix: 
                            type: string
                            maxLength: 100
                          suffix: 
                            type: string
                            maxLength: 100
                        required: 
                          - prefix
                          - suffix
                      default: 
                        []
                  required: 
                    - username
                    - displayName
      responses: 
        "200": 
          description: Success.
          content: 
            application/json: 
              schema: 
                $ref: "#/components/schemas/PAlter"
        "400": 
          description: Client error while processing input.
          content: 
            application/json: 
              schema: 
                type: object
                properties: 
                  errors: 
                    type: array
                    items: 
                      type: object
                      properties: 
                        type: 
                          type: string
                          enum: 
                            - not-matching-oauth
                            - zod
                            - too-many-alters
                            - duplicate
                        friendly: 
                          type: string
                      required: 
                        - type
                        - friendly
                required: 
                  - errors
        "401": 
          description: No access token when authenticating.
          content: 
            application/json: 
              schema: 
                type: object
                properties: 
                  errors: 
                    type: array
                    items: 
                      type: object
                      properties: 
                        type: 
                          type: string
                          enum: 
                            - no-access-token
                            - invalid-scopes
                            - unknown-token
                        friendly: 
                          type: string
                      required: 
                        - type
                        - friendly
                required: 
                  - errors
        "404": 
          description: "Couldn't find the alter"
          content: 
            application/json: 
              schema: 
                type: object
                properties: 
                  type: 
                    type: string
                    enum: 
                      - unknown-alter
                  friendly: 
                    type: string
                    enum: 
                      - "Couldn't find this alter."
                required: 
                  - type
                  - friendly
  "/v1/users/{user}/system/list-alters": 
    get: 
      summary: List system alters
      description: "List data about alters in a system. `{user}` can be `@me` to target the current OAuth user. This endpoint **does** allow for external system tag data (if achievable in conjunction with the system's privacy settings and the logged in OAuth user)."
      security: 
        - oAuth2: 
            - alters:read
      parameters: 
        - name: user
          in: path
          required: true
          description: "`{user}` is a Discord user Snowflake, or `@me`, referencing the current OAuth user."
          schema: 
            type: string
        - description: How many entries to show at most if in a pagination. Can only be at most 250 alters.
          name: max
          in: query
          schema: 
            type: number
            maximum: 250
        - description: How many entries to skip if in a pagination.
          name: skip
          in: query
          schema: 
            type: number
      responses: 
        "200": 
          description: Success.
          content: 
            application/json: 
              schema: 
                type: array
                items: 
                  $ref: "#/components/schemas/PAlter"
        "400": 
          description: "You can only show at most 30 alters in a current pagination or you aren't using the current OAuth user."
          content: 
            application/json: 
              schema: 
                type: object
                properties: 
                  errors: 
                    type: array
                    items: 
                      type: object
                      properties: 
                        type: 
                          type: string
                          enum: 
                            - not-matching-oauth
                            - max-too-high
                        friendly: 
                          type: string
                      required: 
                        - type
                        - friendly
                required: 
                  - errors
        "401": 
          description: No access token when authenticating.
          content: 
            application/json: 
              schema: 
                type: object
                properties: 
                  errors: 
                    type: array
                    items: 
                      type: object
                      properties: 
                        type: 
                          type: string
                          enum: 
                            - no-access-token
                            - invalid-scopes
                            - unknown-token
                        friendly: 
                          type: string
                      required: 
                        - type
                        - friendly
                required: 
                  - errors
  "/v1/users/{user}/fields/tags/{id}": 
    get: 
      summary: Get a tag by integration field
      description: "Get data about a specific tag by integration field. `{user}` can be `@me` to target the current OAuth user."
      security: 
        - oAuth2: 
            - alters:read
      parameters: 
        - name: user
          in: path
          required: true
          description: "`{user}` is a Discord user Snowflake, or `@me`, referencing the current OAuth user."
          schema: 
            type: string
        - name: id
          in: path
          required: true
          description: "`{id}` is the field contents."
          schema: 
            type: string
      responses: 
        "200": 
          description: Success.
          content: 
            application/json: 
              schema: 
                $ref: "#/components/schemas/PAlter"
        "401": 
          description: No access token when authenticating.
          content: 
            application/json: 
              schema: 
                type: object
                properties: 
                  errors: 
                    type: array
                    items: 
                      type: object
                      properties: 
                        type: 
                          type: string
                          enum: 
                            - no-access-token
                            - invalid-scopes
                            - unknown-token
                        friendly: 
                          type: string
                      required: 
                        - type
                        - friendly
                required: 
                  - errors
  "/v1/users/{user}/fields/alters/{id}": 
    get: 
      summary: Get an alter by integration field
      description: "Get data about a specific alter by integration field. `{user}` can be `@me` to target the current OAuth user."
      security: 
        - oAuth2: 
            - alters:read
      parameters: 
        - name: user
          in: path
          required: true
          description: "`{user}` is a Discord user Snowflake, or `@me`, referencing the current OAuth user."
          schema: 
            type: string
        - name: id
          in: path
          required: true
          description: "`{id}` is the field contents."
          schema: 
            type: string
      responses: 
        "200": 
          description: Success.
          content: 
            application/json: 
              schema: 
                $ref: "#/components/schemas/PAlter"
        "401": 
          description: No access token when authenticating.
          content: 
            application/json: 
              schema: 
                type: object
                properties: 
                  errors: 
                    type: array
                    items: 
                      type: object
                      properties: 
                        type: 
                          type: string
                          enum: 
                            - no-access-token
                            - invalid-scopes
                            - unknown-token
                        friendly: 
                          type: string
                      required: 
                        - type
                        - friendly
                required: 
                  - errors
  "/v1/users/{user}/alters/{alter}/edit": 
    post: 
      summary: Edit a system alter
      description: "Edit a system alter by its ID. `{user}` can be `@me` to target the current OAuth user."
      security: 
        - oAuth2: 
            - alters:write
      parameters: 
        - name: user
          in: path
          required: true
          description: "`{user}` is a Discord user Snowflake, or `@me`, referencing the current OAuth user."
          schema: 
            type: string
        - name: alter
          in: path
          required: true
          description: "`{alter}` is the alter ID."
          schema: 
            type: string
      requestBody: 
        content: 
          application/json: 
            schema: 
              type: object
              properties: 
                username: 
                  type: string
                  maxLength: 100
                  pattern: "^[^\\s@\\\\/]+$"
                displayName: 
                  type: string
                  maxLength: 100
                nameMap: 
                  type: array
                  items: 
                    type: object
                    properties: 
                      server: 
                        type: string
                        maxLength: 20
                      name: 
                        type: string
                        maxLength: 100
                    required: 
                      - server
                      - name
                color: 
                  type: 
                    - string
                    - "null"
                  pattern: "^#[0-9A-F]{6}$/i"
                description: 
                  type: 
                    - string
                    - "null"
                  maxLength: 1000
                pronouns: 
                  type: 
                    - string
                    - "null"
                  maxLength: 100
                avatarUrl: 
                  type: 
                    - string
                    - "null"
                avatarUrlMap: 
                  type: object
                  additionalProperties: 
                    type: string
                  default: 
                    {}
                webhookAvatarUrl: 
                  type: 
                    - string
                    - "null"
                banner: 
                  type: 
                    - string
                    - "null"
                alterMode: 
                  type: string
                  enum: 
                    - nickname
                    - webhook
                    - both
                  default: webhook
                proxyTags: 
                  type: array
                  items: 
                    type: object
                    properties: 
                      prefix: 
                        type: string
                        maxLength: 100
                      suffix: 
                        type: string
                        maxLength: 100
                      id: 
                        type: string
                    required: 
                      - prefix
                      - suffix
                      - id
                  default: 
                    []
                tagIds: 
                  type: array
                  items: 
                    type: string
                  default: 
                    []
                  description: Edit the tags associated with this alter. This will **replace** the list of tags inheriting this alter when using the API.
                public: 
                  type: number
                  minimum: 0
                  default: 0
                  description: "This is a bitwise operation-based number which determines the protection flags that are public. By default, everything on PluralBuddy is private.\n\n| Public Flag     | Value                   | Description |\n|-----------------|-------------------------|-------------|\n| VISIBILITY      | `1` `(1 << 0)`      | Allows external users to see the alter. |\n| NAME            | `2` `(1 << 1)`      | Allows external users to see the alter's name. |\n| DESCRIPTION     | `4` `(1 << 2)`      | Allows external users to see the alter's description. |\n| BANNER          | `8` `(1 << 3)`      | Allows external users to see the alter's banner. |\n| PRONOUNS        | `16` `(1 << 4)`     | Allows external users to see the alter's pronouns. |\n| AVATAR          | `32` `(1 << 5)`     | Allows external users to see the alter's avatar. |\n| TAGS            | `128` `(1 << 7)`    | Allows external users to see the alter's associated tags. |\n| MESSAGE_COUNT   | `256` `(1 << 8)`    | Allows external users to see the alter's message count. |\n| USERNAME        | `512` `(1 << 9)`    | Allows external users to see the alter's username. |"
                flags: 
                  type: number
                  minimum: 0
                  default: 0
                  description: "This is a bitwise operation-based number which determines which features are enabled.\n\n| Alter Flag              | Value                   | Description |\n|-------------------------|-------------------------|-------------|\n| PROXY_TAGS_KEPT         | `1` `(1 << 0)`      | Keeps proxy tags after proxying for this specific alter. |"
                fields: 
                  type: object
                  additionalProperties: 
                    type: string
                    maxLength: 150
                  default: 
                    {}
              default: 
                {}
              additionalProperties: false
      responses: 
        "200": 
          description: Success.
          content: 
            application/json: 
              schema: 
                $ref: "#/components/schemas/PAlter"
        "400": 
          description: Client error while processing input.
          content: 
            application/json: 
              schema: 
                type: object
                properties: 
                  errors: 
                    type: array
                    items: 
                      type: object
                      properties: 
                        type: 
                          type: string
                          enum: 
                            - not-matching-oauth
                            - zod
                        friendly: 
                          type: string
                      required: 
                        - type
                        - friendly
                required: 
                  - errors
        "401": 
          description: No access token when authenticating.
          content: 
            application/json: 
              schema: 
                type: object
                properties: 
                  errors: 
                    type: array
                    items: 
                      type: object
                      properties: 
                        type: 
                          type: string
                          enum: 
                            - no-access-token
                            - invalid-scopes
                            - unknown-token
                        friendly: 
                          type: string
                      required: 
                        - type
                        - friendly
                required: 
                  - errors
        "404": 
          description: "Couldn't find the alter"
          content: 
            application/json: 
              schema: 
                type: object
                properties: 
                  type: 
                    type: string
                    enum: 
                      - unknown-alter
                  friendly: 
                    type: string
                    enum: 
                      - "Couldn't find this alter."
                required: 
                  - type
                  - friendly
  "/v1/users/{user}/alters/{alter}/upload-avatar": 
    post: 
      summary: Upload alter avatar
      description: "**You must provide an image in the body.** Upload alter avatar, maximum file size is 1MB. `{user}` can be `@me` to target the current OAuth user."
      security: 
        - oAuth2: 
            - alters:write
      parameters: 
        - name: user
          in: path
          required: true
          description: "`{user}` is a Discord user Snowflake, or `@me`, referencing the current OAuth user."
          schema: 
            type: string
        - name: alter
          in: path
          required: true
          description: "`{alter}` is the alter ID."
          schema: 
            type: string
      responses: 
        "200": 
          description: Success.
          content: 
            application/json: 
              schema: 
                $ref: "#/components/schemas/PAlter"
        "400": 
          description: Client error while processing input.
          content: 
            application/json: 
              schema: 
                type: object
                properties: 
                  errors: 
                    type: array
                    items: 
                      type: object
                      properties: 
                        type: 
                          type: string
                          enum: 
                            - not-matching-oauth
                            - zod
                            - file-too-big
                        friendly: 
                          type: string
                      required: 
                        - type
                        - friendly
                required: 
                  - errors
        "401": 
          description: No access token when authenticating.
          content: 
            application/json: 
              schema: 
                type: object
                properties: 
                  errors: 
                    type: array
                    items: 
                      type: object
                      properties: 
                        type: 
                          type: string
                          enum: 
                            - no-access-token
                            - invalid-scopes
                            - unknown-token
                        friendly: 
                          type: string
                      required: 
                        - type
                        - friendly
                required: 
                  - errors
        "404": 
          description: "Couldn't find the alter"
          content: 
            application/json: 
              schema: 
                type: object
                properties: 
                  type: 
                    type: string
                    enum: 
                      - unknown-alter
                  friendly: 
                    type: string
                    enum: 
                      - "Couldn't find this alter."
                required: 
                  - type
                  - friendly
  "/v1/users/{user}/alters/{alter}/upload-banner": 
    post: 
      summary: Upload alter banner
      description: "**You must provide an image in the body.** Upload alter banner, maximum file size is 1MB. `{user}` can be `@me` to target the current OAuth user."
      security: 
        - oAuth2: 
            - alters:write
      parameters: 
        - name: user
          in: path
          required: true
          description: "`{user}` is a Discord user Snowflake, or `@me`, referencing the current OAuth user."
          schema: 
            type: string
        - name: alter
          in: path
          required: true
          description: "`{alter}` is the alter ID."
          schema: 
            type: string
      responses: 
        "200": 
          description: Success.
          content: 
            application/json: 
              schema: 
                $ref: "#/components/schemas/PAlter"
        "400": 
          description: Client error while processing input.
          content: 
            application/json: 
              schema: 
                type: object
                properties: 
                  errors: 
                    type: array
                    items: 
                      type: object
                      properties: 
                        type: 
                          type: string
                          enum: 
                            - not-matching-oauth
                            - zod
                            - file-too-big
                        friendly: 
                          type: string
                      required: 
                        - type
                        - friendly
                required: 
                  - errors
        "401": 
          description: No access token when authenticating.
          content: 
            application/json: 
              schema: 
                type: object
                properties: 
                  errors: 
                    type: array
                    items: 
                      type: object
                      properties: 
                        type: 
                          type: string
                          enum: 
                            - no-access-token
                            - invalid-scopes
                            - unknown-token
                        friendly: 
                          type: string
                      required: 
                        - type
                        - friendly
                required: 
                  - errors
        "404": 
          description: "Couldn't find the alter"
          content: 
            application/json: 
              schema: 
                type: object
                properties: 
                  type: 
                    type: string
                    enum: 
                      - unknown-alter
                  friendly: 
                    type: string
                    enum: 
                      - "Couldn't find this alter."
                required: 
                  - type
                  - friendly
  "/v1/users/{user}/system/edit": 
    post: 
      summary: Edit system data
      description: "Edit system data. `{user}` can be `@me` to target the current OAuth user."
      security: 
        - oAuth2: 
            - system:write
      parameters: 
        - name: user
          in: path
          required: true
          description: "`{user}` is a Discord user Snowflake, or `@me`, referencing the current OAuth user."
          schema: 
            type: string
      requestBody: 
        content: 
          application/json: 
            schema: 
              type: object
              properties: 
                systemName: 
                  type: string
                  minLength: 1
                  maxLength: 100
                systemDisplayTag: 
                  type: 
                    - string
                    - "null"
                displayTagMap: 
                  type: object
                  additionalProperties: 
                    type: string
                  default: 
                    {}
                  description: "This is a map that shows the association between a Discord server ID and a custom display tag.\n\n```js\n{ \n  \"1444187699924963350\": \"string\"\n}\n```"
                  example: 
                    *example
                systemDescription: 
                  type: string
                  maxLength: 4000
                systemAvatar: 
                  type: 
                    - string
                    - "null"
                systemBanner: 
                  type: 
                    - string
                    - "null"
                systemPronouns: 
                  type: 
                    - string
                    - "null"
                nicknameFormat: 
                  type: 
                    - string
                    - "null"
                latchExpiration: 
                  type: number
                  minimum: 0
                  maximum: 36000000
                public: 
                  type: number
                  minimum: 0
                  description: "This is a bitwise operation-based number which determines the protection flags that are public. By default, everything on PluralBuddy is private.\n\n| Public Flag     | Value                   | Description |\n|-----------------|-------------------------|-------------|\n| NAME            | `1` `(1 << 0)`      | Allows external users to see system name. |\n| DISPLAY_TAG     | `2` `(1 << 1)`      | Allows external users to see system display tag. |\n| DESCRIPTION     | `4` `(1 << 2)`      | Allows external users to see system description. |\n| AVATAR          | `8` `(1 << 3)`      | Allows external users to see system avatar. |\n| BANNER          | `16` `(1 << 4)`     | Allows external users to see system banner. |\n| PRONOUNS        | `32` `(1 << 5)`     | Allows external users to see system pronouns. |\n| ALTERS          | `64` `(1 << 6)`     | Allows external users to see alters inside of the system. |\n| TAGS            | `128` `(1 << 7)`    | Allows external users to see tags inside of the system. |"
                flags: 
                  type: number
                  minimum: 0
                  default: 0
                  description: "This is a bitwise operation-based number which determines certain system settings.\n\n| Public Flag              | Value                   | Description |\n|--------------------------|-------------------------|-------------|\n| KEEP_PROXY_TAGS          | `1` `(1 << 0)`      | All messages sent in the system will maintain their proxy tags. |\n| KEEP_PRONOUNS            | `2` `(1 << 1)`      | Pronouns will be shown in the webhook name of the proxying. |\n| NO_TYPING_STATUS         | `4` `(1 << 2)`      | Typing status from the bot wont be displayed. |\n| PREFER_ACCESSIBLITY      | `8` `(1 << 3)`      | Prefer accessiblity in menus for this system. |\n| LEFT_SIDED_TAG           | `16` `(1 << 4)`     | Display tags will be displayed on the left side of the webhook. |\n| CASE_INSENSITIVE_PROXIES | `32` `(1 << 5)`     | Proxy tags when proxying will be matched case insensitively. |\n| PUBLIC_DEFAULT           | `64` `(1 << 6)`     | All new objects in the system will automatically be created publicly. |"
                disabledGuilds: 
                  type: array
                  items: 
                    type: string
                  default: 
                    []
                disabled: 
                  type: boolean
                  default: false
              default: 
                {}
      responses: 
        "200": 
          description: Success.
          content: 
            application/json: 
              schema: 
                $ref: "#/components/schemas/PSystem"
        "400": 
          description: Client error while processing input.
          content: 
            application/json: 
              schema: 
                type: object
                properties: 
                  errors: 
                    type: array
                    items: 
                      type: object
                      properties: 
                        type: 
                          type: string
                          enum: 
                            - not-matching-oauth
                            - zod
                        friendly: 
                          type: string
                      required: 
                        - type
                        - friendly
                required: 
                  - errors
        "401": 
          description: No access token when authenticating.
          content: 
            application/json: 
              schema: 
                type: object
                properties: 
                  errors: 
                    type: array
                    items: 
                      type: object
                      properties: 
                        type: 
                          type: string
                          enum: 
                            - no-access-token
                            - invalid-scopes
                            - unknown-token
                        friendly: 
                          type: string
                      required: 
                        - type
                        - friendly
                required: 
                  - errors
        "404": 
          description: "Couldn't find the system"
          content: 
            application/json: 
              schema: 
                type: object
                properties: 
                  type: 
                    type: string
                    enum: 
                      - no-system
                  friendly: 
                    type: string
                    enum: 
                      - This user does not have a system.
                required: 
                  - type
                  - friendly
  "/v1/users/{user}/system": 
    get: 
      summary: Get PluralBuddy system
      description: "Get data of a PluralBuddy system. `{user}` can be `@me` to target the current OAuth user."
      security: 
        - oAuth2: 
            - system:read
      parameters: 
        - name: user
          in: path
          required: true
          description: "`{user}` is a Discord user Snowflake, or `@me`, referencing the current OAuth user."
          schema: 
            type: string
      responses: 
        "200": 
          description: Success response. Response with the message.
          content: 
            application/json: 
              schema: 
                type: object
                properties: 
                  data: 
                    $ref: "#/components/schemas/PSystem"
                required: 
                  - data
        "400": 
          description: "@me is the only allowed user for this endpoint."
          content: 
            application/json: 
              schema: 
                type: object
                properties: 
                  errors: 
                    type: array
                    items: 
                      type: object
                      properties: 
                        type: 
                          type: string
                          enum: 
                            - not-matching-oauth
                        friendly: 
                          type: string
                          enum: 
                            - This endpoint requires the user currently logged in via OAuth.
                      required: 
                        - type
                        - friendly
                required: 
                  - errors
        "401": 
          description: Not properly authenticated.
          content: 
            application/json: 
              schema: 
                type: object
                properties: 
                  errors: 
                    type: array
                    items: 
                      type: object
                      properties: 
                        type: 
                          type: string
                          enum: 
                            - no-access-token
                            - invalid-scopes
                            - unknown-token
                        friendly: 
                          type: string
                      required: 
                        - type
                        - friendly
                required: 
                  - errors
    post: 
      summary: Create a system
      description: "Create a system. `{user}` can be `@me` to target the current OAuth user. If there is already another system, this will fail."
      security: 
        - oAuth2: 
            - system:read
      parameters: 
        - name: user
          in: path
          required: true
          description: "`{user}` is a Discord user Snowflake, or `@me`, referencing the current OAuth user."
          schema: 
            type: string
      requestBody: 
        content: 
          application/json: 
            schema: 
              allOf: 
                - type: object
                  properties: 
                    systemName: 
                      type: string
                      minLength: 1
                      maxLength: 100
                    systemDisplayTag: 
                      type: 
                        - string
                        - "null"
                    displayTagMap: 
                      type: object
                      additionalProperties: 
                        type: string
                      default: 
                        {}
                      description: "This is a map that shows the association between a Discord server ID and a custom display tag.\n\n```js\n{ \n  \"1444187699924963350\": \"string\"\n}\n```"
                      example: 
                        *example
                    systemDescription: 
                      type: string
                      maxLength: 4000
                    systemAvatar: 
                      type: 
                        - string
                        - "null"
                    systemBanner: 
                      type: 
                        - string
                        - "null"
                    systemPronouns: 
                      type: 
                        - string
                        - "null"
                    nicknameFormat: 
                      type: 
                        - string
                        - "null"
                    latchExpiration: 
                      type: number
                      minimum: 0
                      maximum: 36000000
                    public: 
                      type: number
                      minimum: 0
                      description: "This is a bitwise operation-based number which determines the protection flags that are public. By default, everything on PluralBuddy is private.\n\n| Public Flag     | Value                   | Description |\n|-----------------|-------------------------|-------------|\n| NAME            | `1` `(1 << 0)`      | Allows external users to see system name. |\n| DISPLAY_TAG     | `2` `(1 << 1)`      | Allows external users to see system display tag. |\n| DESCRIPTION     | `4` `(1 << 2)`      | Allows external users to see system description. |\n| AVATAR          | `8` `(1 << 3)`      | Allows external users to see system avatar. |\n| BANNER          | `16` `(1 << 4)`     | Allows external users to see system banner. |\n| PRONOUNS        | `32` `(1 << 5)`     | Allows external users to see system pronouns. |\n| ALTERS          | `64` `(1 << 6)`     | Allows external users to see alters inside of the system. |\n| TAGS            | `128` `(1 << 7)`    | Allows external users to see tags inside of the system. |"
                    flags: 
                      type: number
                      minimum: 0
                      default: 0
                      description: "This is a bitwise operation-based number which determines certain system settings.\n\n| Public Flag              | Value                   | Description |\n|--------------------------|-------------------------|-------------|\n| KEEP_PROXY_TAGS          | `1` `(1 << 0)`      | All messages sent in the system will maintain their proxy tags. |\n| KEEP_PRONOUNS            | `2` `(1 << 1)`      | Pronouns will be shown in the webhook name of the proxying. |\n| NO_TYPING_STATUS         | `4` `(1 << 2)`      | Typing status from the bot wont be displayed. |\n| PREFER_ACCESSIBLITY      | `8` `(1 << 3)`      | Prefer accessiblity in menus for this system. |\n| LEFT_SIDED_TAG           | `16` `(1 << 4)`     | Display tags will be displayed on the left side of the webhook. |\n| CASE_INSENSITIVE_PROXIES | `32` `(1 << 5)`     | Proxy tags when proxying will be matched case insensitively. |\n| PUBLIC_DEFAULT           | `64` `(1 << 6)`     | All new objects in the system will automatically be created publicly. |"
                    disabledGuilds: 
                      type: array
                      items: 
                        type: string
                      default: 
                        []
                    disabled: 
                      type: boolean
                      default: false
                - type: object
                  properties: 
                    systemName: 
                      type: string
                      minLength: 1
                      maxLength: 100
                  required: 
                    - systemName
      responses: 
        "200": 
          description: Success.
          content: 
            application/json: 
              schema: 
                $ref: "#/components/schemas/PSystem"
        "400": 
          description: Client error while processing input.
          content: 
            application/json: 
              schema: 
                type: object
                properties: 
                  errors: 
                    type: array
                    items: 
                      type: object
                      properties: 
                        type: 
                          type: string
                          enum: 
                            - not-matching-oauth
                            - zod
                            - too-many-alters
                            - duplicate
                        friendly: 
                          type: string
                      required: 
                        - type
                        - friendly
                required: 
                  - errors
        "401": 
          description: No access token when authenticating.
          content: 
            application/json: 
              schema: 
                type: object
                properties: 
                  errors: 
                    type: array
                    items: 
                      type: object
                      properties: 
                        type: 
                          type: string
                          enum: 
                            - no-access-token
                            - invalid-scopes
                            - unknown-token
                        friendly: 
                          type: string
                      required: 
                        - type
                        - friendly
                required: 
                  - errors
  "/v1/users/{user}/system/upload-avatar": 
    post: 
      summary: Upload system avatar
      description: "**You must provide an image in the body.** Upload system avatar, maximum file size is 1MB. `{user}` can be `@me` to target the current OAuth user."
      security: 
        - oAuth2: 
            - system:write
      parameters: 
        - name: user
          in: path
          required: true
          description: "`{user}` is a Discord user Snowflake, or `@me`, referencing the current OAuth user."
          schema: 
            type: string
      responses: 
        "200": 
          description: Success.
          content: 
            application/json: 
              schema: 
                $ref: "#/components/schemas/PSystem"
        "400": 
          description: Client error while processing input.
          content: 
            application/json: 
              schema: 
                type: object
                properties: 
                  errors: 
                    type: array
                    items: 
                      type: object
                      properties: 
                        type: 
                          type: string
                          enum: 
                            - not-matching-oauth
                            - zod
                            - file-too-big
                        friendly: 
                          type: string
                      required: 
                        - type
                        - friendly
                required: 
                  - errors
        "401": 
          description: No access token when authenticating.
          content: 
            application/json: 
              schema: 
                type: object
                properties: 
                  errors: 
                    type: array
                    items: 
                      type: object
                      properties: 
                        type: 
                          type: string
                          enum: 
                            - no-access-token
                            - invalid-scopes
                            - unknown-token
                        friendly: 
                          type: string
                      required: 
                        - type
                        - friendly
                required: 
                  - errors
        "404": 
          description: "Couldn't find the system"
          content: 
            application/json: 
              schema: 
                type: object
                properties: 
                  type: 
                    type: string
                    enum: 
                      - no-system
                  friendly: 
                    type: string
                    enum: 
                      - This user does not have a system.
                required: 
                  - type
                  - friendly
  "/v1/users/{user}/system/upload-banner": 
    post: 
      summary: Upload system banner
      description: "**You must provide an image in the body.** Upload system banner, maximum file size is 1MB. `{user}` can be `@me` to target the current OAuth user."
      security: 
        - oAuth2: 
            - system:write
      parameters: 
        - name: user
          in: path
          required: true
          description: "`{user}` is a Discord user Snowflake, or `@me`, referencing the current OAuth user."
          schema: 
            type: string
      responses: 
        "200": 
          description: Success.
          content: 
            application/json: 
              schema: 
                $ref: "#/components/schemas/PSystem"
        "400": 
          description: Client error while processing input.
          content: 
            application/json: 
              schema: 
                type: object
                properties: 
                  errors: 
                    type: array
                    items: 
                      type: object
                      properties: 
                        type: 
                          type: string
                          enum: 
                            - not-matching-oauth
                            - zod
                            - file-too-big
                        friendly: 
                          type: string
                      required: 
                        - type
                        - friendly
                required: 
                  - errors
        "401": 
          description: No access token when authenticating.
          content: 
            application/json: 
              schema: 
                type: object
                properties: 
                  errors: 
                    type: array
                    items: 
                      type: object
                      properties: 
                        type: 
                          type: string
                          enum: 
                            - no-access-token
                            - invalid-scopes
                            - unknown-token
                        friendly: 
                          type: string
                      required: 
                        - type
                        - friendly
                required: 
                  - errors
        "404": 
          description: "Couldn't find the system"
          content: 
            application/json: 
              schema: 
                type: object
                properties: 
                  type: 
                    type: string
                    enum: 
                      - no-system
                  friendly: 
                    type: string
                    enum: 
                      - This user does not have a system.
                required: 
                  - type
                  - friendly
webhooks: 
  message.create: 
    post: 
      summary: Receive alter creation updates
      description: Receive message creation updates via Svix Webhooks built into PluralBuddy.
      requestBody: 
        content: 
          application/json: 
            schema: 
              type: object
              properties: 
                userId: 
                  type: string
                type: 
                  type: string
                  enum: 
                    - message.create
                message: 
                  type: object
                  properties: 
                    messageId: 
                      type: string
                      examples: 
                        *examples
                    systemId: 
                      type: string
                      examples: 
                        *examples1
                    alterId: 
                      type: number
                      examples: 
                        *examples2
                    createdAt: 
                      type: string
                      format: date-time
                    guildId: 
                      type: string
                      examples: 
                        *examples3
                    channelId: 
                      type: string
                      examples: 
                        *examples4
                    referencedMessage: 
                      type: string
                    expressUserId: 
                      type: string
                  required: 
                    - messageId
                    - systemId
                    - alterId
                    - createdAt
                    - channelId
              required: 
                - userId
                - type
                - message
      responses: 
        {}
  tag.create: 
    post: 
      summary: Receive tag creation updates
      description: Receive tag creation updates via Svix Webhooks built into PluralBuddy.
      requestBody: 
        content: 
          application/json: 
            schema: 
              type: object
              properties: 
                userId: 
                  type: string
                type: 
                  type: string
                  enum: 
                    - tag.create
                tag: 
                  $ref: "#/components/schemas/PTag"
              required: 
                - userId
                - type
                - tag
      responses: 
        {}
  tag.update: 
    post: 
      summary: Receive tag updates
      description: Receive tag updates via Svix Webhooks built into PluralBuddy.
      requestBody: 
        content: 
          application/json: 
            schema: 
              type: object
              properties: 
                userId: 
                  type: string
                type: 
                  type: string
                  enum: 
                    - tag.update
                tag: 
                  $ref: "#/components/schemas/PTag"
              required: 
                - userId
                - type
                - tag
      responses: 
        {}
  alter.create: 
    post: 
      summary: Receive alter creation updates
      description: Receive alter creation updates via Svix Webhooks built into PluralBuddy.
      requestBody: 
        content: 
          application/json: 
            schema: 
              type: object
              properties: 
                userId: 
                  type: string
                type: 
                  type: string
                  enum: 
                    - alter.create
                alter: 
                  $ref: "#/components/schemas/PAlter"
              required: 
                - userId
                - type
                - alter
      responses: 
        {}
  alter.update: 
    post: 
      summary: Receive alter updates
      description: Receive alter updates via Svix Webhooks built into PluralBuddy.
      requestBody: 
        content: 
          application/json: 
            schema: 
              type: object
              properties: 
                userId: 
                  type: string
                type: 
                  type: string
                  enum: 
                    - alter.update
                alter: 
                  $ref: "#/components/schemas/PAlter"
              required: 
                - userId
                - type
                - alter
      responses: 
        {}
  system.update: 
    post: 
      summary: Receive system updates
      description: Receive system updates via Svix Webhooks built into PluralBuddy.
      requestBody: 
        content: 
          application/json: 
            schema: 
              type: object
              properties: 
                userId: 
                  type: string
                type: 
                  type: string
                  enum: 
                    - system.update
                system: 
                  $ref: "#/components/schemas/PSystem"
              required: 
                - userId
                - type
                - system
      responses: 
        {}