> ## Documentation Index
> Fetch the complete documentation index at: https://help.gowindmill.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create or replace a custom stat definition

> Creates or updates a custom stat definition owned by the caller's workspace, keyed by the stat identifier. Supply all required fields on every call: omitted optional display fields reset to null, and displayAsPercent resets to false. The aggregation type can change only before any values have been recorded for this definition. A later type change returns 409 without changing the definition or its values; create a new definition for the new type. Display edits and same-type saves remain available. This route defines a stat; it does not write employee stat values. Global Windmill-managed definitions are never modified; an identifier that matches a global stat creates a separate definition belonging to this workspace.



## OpenAPI

````yaml https://api.gowindmill.com/api/v2/openapi.json put /c/{companyId}/stats/metadata
openapi: 3.1.0
info:
  title: Windmill API
  version: 2.0.0
  description: >-
    Use the Windmill API to integrate your systems, automate workflows, and
    build applications on your organization's data. Authenticate with an API key
    or OAuth access token. Each request uses the authenticated user's
    permissions within the selected workspace.
servers:
  - url: https://api.gowindmill.com/api/v2
security:
  - bearerAuth: []
paths:
  /c/{companyId}/stats/metadata:
    put:
      tags:
        - Stats
      summary: Create or replace a custom stat definition
      description: >-
        Creates or updates a custom stat definition owned by the caller's
        workspace, keyed by the stat identifier. Supply all required fields on
        every call: omitted optional display fields reset to null, and
        displayAsPercent resets to false. The aggregation type can change only
        before any values have been recorded for this definition. A later type
        change returns 409 without changing the definition or its values; create
        a new definition for the new type. Display edits and same-type saves
        remain available. This route defines a stat; it does not write employee
        stat values. Global Windmill-managed definitions are never modified; an
        identifier that matches a global stat creates a separate definition
        belonging to this workspace.
      operationId: stats.metadata.upsert
      parameters:
        - schema:
            type: string
            minLength: 1
            maxLength: 128
            description: >-
              Company ID. A URL slug is also accepted. The caller must have
              access to this company.
            title: Company ID
            example: company-acme
          required: true
          description: >-
            Company ID. A URL slug is also accepted. The caller must have access
            to this company.
          name: companyId
          in: path
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpsertStatMetadataRequest'
      responses:
        '200':
          description: The created or updated stat definition
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpsertStatMetadataResponse'
        '400':
          description: Bad request or request validation failed
          content:
            application/json:
              schema:
                anyOf:
                  - type: object
                    properties:
                      error:
                        type: object
                        properties:
                          code:
                            type: string
                            enum:
                              - BAD_REQUEST
                          message:
                            type: string
                          requestId:
                            type: string
                        required:
                          - code
                          - message
                          - requestId
                    required:
                      - error
                  - type: object
                    properties:
                      error:
                        type: object
                        properties:
                          code:
                            type: string
                            enum:
                              - VALIDATION_ERROR
                          message:
                            type: string
                          requestId:
                            type: string
                          details:
                            type: array
                            items:
                              type: object
                              properties:
                                path:
                                  type: array
                                  items:
                                    anyOf:
                                      - type: string
                                      - type: number
                                message:
                                  type: string
                              required:
                                - path
                                - message
                        required:
                          - code
                          - message
                          - requestId
                          - details
                    required:
                      - error
        '401':
          description: >-
            Authentication is missing or invalid. Send a valid API key or OAuth
            access token in the Authorization: Bearer <TOKEN> header before
            retrying.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        enum:
                          - UNAUTHORIZED
                      message:
                        type: string
                      requestId:
                        type: string
                    required:
                      - code
                      - message
                      - requestId
                required:
                  - error
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        enum:
                          - FORBIDDEN
                      message:
                        type: string
                      requestId:
                        type: string
                    required:
                      - code
                      - message
                      - requestId
                required:
                  - error
        '404':
          description: Not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        enum:
                          - NOT_FOUND
                      message:
                        type: string
                      requestId:
                        type: string
                    required:
                      - code
                      - message
                      - requestId
                required:
                  - error
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        enum:
                          - CONFLICT
                      message:
                        type: string
                      requestId:
                        type: string
                      details:
                        type: array
                        items:
                          type: object
                          properties:
                            path:
                              type: array
                              items:
                                anyOf:
                                  - type: string
                                  - type: number
                            message:
                              type: string
                            resourceId:
                              type: string
                          required:
                            - path
                            - message
                        description: >-
                          Request fields that caused the conflict, when the
                          operation identifies them. resourceId names the
                          existing resource that conflicts.
                    required:
                      - code
                      - message
                      - requestId
                required:
                  - error
        '429':
          description: >-
            The API-client request budget is exhausted. API keys allow 500
            requests per minute per key; OAuth clients allow 500 per minute per
            client and workspace. Reads and writes share the budget. One HTTP
            request counts once, including bulk requests. Wait for the
            Retry-After delay before retrying.
          headers:
            Retry-After:
              description: Number of seconds to wait before retrying the request.
              required: true
              schema:
                type: integer
                minimum: 0
                example: 42
            RateLimit:
              description: >-
                Current request budget: limit is the maximum count, remaining is
                the unused count, and reset is seconds until the window resets,
                not a timestamp.
              required: true
              schema:
                type: string
                example: limit=500, remaining=0, reset=42
            RateLimit-Policy:
              description: >-
                Request limit and window length in seconds, formatted as
                <limit>;w=<seconds>.
              required: true
              schema:
                type: string
                example: 500;w=60
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        enum:
                          - RATE_LIMITED
                      message:
                        type: string
                      requestId:
                        type: string
                    required:
                      - code
                      - message
                      - requestId
                required:
                  - error
      security:
        - bearerAuth: []
components:
  schemas:
    UpsertStatMetadataRequest:
      type: object
      properties:
        stat:
          type: string
          minLength: 1
          maxLength: 100
          pattern: ^[a-z0-9]+(-[a-z0-9]+)*$
          description: >-
            Identifier of the workspace custom stat to create or update. The
            write is scoped to the caller's workspace; global Windmill
            definitions are never modified.
          title: Stat identifier
          example: custom-items-completed
        valueType:
          type: string
          enum:
            - COUNT
            - AGGREGATE
            - AVERAGE
          description: >-
            Aggregation type. It can change only before values have been
            recorded for this definition. Changing it afterward returns 409;
            create a new definition for the new type.
          title: Value type
          example: COUNT
        label:
          type: string
          minLength: 1
          maxLength: 200
          description: Display name of the stat, from 1 to 200 characters.
          title: Label
          example: Items completed
        unitSingular:
          type: string
          minLength: 1
          maxLength: 100
          description: Singular display unit for the value, from 1 to 100 characters.
          title: Unit
          example: item
        shortLabel:
          type: string
          maxLength: 100
          description: >-
            Compact display name, up to 100 characters. Resets to null when
            omitted.
          title: Short label
          example: Completed
        description:
          type: string
          maxLength: 1000
          description: >-
            What the stat measures, up to 1,000 characters. Resets to null when
            omitted.
          title: Description
          example: Number of completed work items.
        unitPlural:
          type: string
          maxLength: 100
          description: >-
            Plural display unit, up to 100 characters. Resets to null when
            omitted.
          title: Plural unit
          example: items
        denominatorUnitSingular:
          type: string
          maxLength: 100
          description: >-
            Denominator display unit, up to 100 characters. Resets to null when
            omitted.
          title: Denominator unit
          example: item
        displayAsPercent:
          type: boolean
          description: >-
            Whether clients should display a percentage. Resets to false when
            omitted.
          title: Display as percentage
          example: false
        icon:
          type: object
          properties:
            icon:
              type: string
              enum:
                - ACTIVITY
                - AI
                - ALERT
                - ALERT_TRIANGLE
                - ANALYTICS
                - ANONYMOUS
                - ANTENNA_BARS_1
                - ANTENNA_BARS_2
                - ANTENNA_BARS_3
                - ANTENNA_BARS_4
                - ANTENNA_BARS_5
                - ARROW_DOWN
                - ARROW_LEFT
                - ARROW_NARROW_UP_DASHED
                - ARROW_RIGHT
                - ARROW_TO_DOWN_LINE
                - ARROW_TO_UP_LINE
                - ARROW_UP
                - BELL_OFF
                - BELL_RING
                - BOT
                - BUILDING
                - CALENDAR
                - CALENDAR_PAUSE
                - CARD
                - CARET_UP_FILLED
                - CHANNEL
                - CHECK
                - CHECK_CIRCLE_FILLED
                - CHECKS
                - CHEVRON_DOWN
                - CHEVRON_DOWN_PIXEL
                - CHEVRON_RIGHT
                - CHOOSE_STATS
                - CLICK
                - CLOCK
                - CLOCK_FILLED
                - CODE
                - COG
                - COLUMNS
                - COMPANY
                - COMPARISON
                - COPY
                - COST
                - DATABASE
                - DEBUG
                - DEEP_DIVE
                - DELEGATED_ACCESS
                - DELIVERY
                - DEVICE_DESKTOP_ANALYTICS
                - DISCONNECT
                - DOCUMENT
                - DOCUMENT_TEMPLATE
                - DOT
                - EDIT
                - EMAIL
                - EMPLOYEE
                - EMPLOYEES
                - ERROR
                - EXTERNAL_LINK
                - EYE
                - FEATURE_INDETERMINATE
                - FEATURE_OFF
                - FEATURE_ON
                - FEATURES
                - FEEDBACK
                - FEEDBACK_GIVEN
                - FEEDBACK_RECEIVED
                - FILTER
                - FLAG
                - FLAME
                - FULL_SCREEN
                - GLOBE
                - GRID_DOTS
                - GROUPS
                - HAMBURGER
                - HAPPY
                - HEALTH
                - HELP_SQUARE_ROUNDED
                - HERO_NUMBER
                - HIGHLIGHTS
                - HOME
                - HOME_GRID
                - INBOX
                - IMPACT
                - INFO_CIRCLE
                - INTEGRATIONS
                - KEY
                - KNOWLEDGE
                - KEYBOARD_DOUBLE_ARROW_RIGHT
                - KEYBOARD_SINGLE_ARROW_RIGHT
                - LAYOUT_COLUMNS
                - LAYOUT_ROWS
                - LEADERBOARD
                - LIGHTNING_BOLT
                - LIST_SEARCH
                - LIGHT_BULB
                - LINK
                - LINKED_IN
                - LOADING
                - LOCK
                - LOGOUT
                - MAILBOX
                - MAPPING
                - MEETINGS
                - MEDAL
                - COMPANY_VALUES
                - MERGE
                - MEGAPHONE
                - MESSAGES
                - MICROPHONE
                - MOON
                - NEW_ACTIVITY
                - NEW_TAB
                - NOTES
                - NOTIFICATIONS
                - ONE_ON_ONE
                - ORG_CHART
                - ORGS
                - PAINT_BRUSH
                - PANEL_LEFT_CLOSE
                - PANEL_LEFT_OPEN
                - PANEL_RIGHT_CLOSE
                - PAUSE
                - PAUSE_FILLED
                - PAPER_CLIP
                - PENCIL_BOLT
                - PERFORMANCE
                - PLAY
                - PERSON
                - PERSON_CHECK
                - PERSON_MULTIPLE_CHECK
                - PIGGY_BANK
                - PIN
                - PIN_FILLED
                - PINNED_OFF
                - PLAY_CIRCLE
                - PLUS
                - PLUS_CIRCLE
                - PROGRESS_CHECK
                - PULSE
                - PUZZLED
                - RECAPS
                - RECEIPT_DOLLAR
                - RECORDING
                - RECORDING_NOT_FOUND
                - REFRESH
                - RELATIONSHIP_DIRECT_MANAGER
                - RELATIONSHIP_DIRECT_REPORT
                - RELATIONSHIP_PEER
                - RELATIONSHIP_SKIP_LEVEL_MANAGER
                - RELATIONSHIP_SKIP_LEVEL_REPORT
                - REPEAT
                - REPORT
                - REVIEWS
                - REVIEW_SELF
                - REVIEW_UPWARD
                - REVIEW_MANAGER
                - REVIEW_PEER
                - ROBOT_FACE
                - ROCKET
                - ROUTINES
                - SAD
                - SAVED_VIEW
                - SEARCH
                - SEND
                - SETTINGS
                - SHIELD
                - SHOUTOUT
                - SMILE_PLUS
                - SMS
                - SQUARE_ROUNDED_PLUS
                - SPINNER
                - SPINNER_LINE
                - STAR
                - STAR_FILLED
                - STATS
                - SUMMARY
                - SUN
                - SUPERPOWERS
                - SUPPORT
                - SURVEY
                - SWITCH
                - SYNC_INTEGRATION
                - TABLE
                - TAG
                - TEAM
                - TELESCOPE
                - TERMINAL
                - TEST
                - THREE_DOTS_VERTICAL
                - THUMBS_UP
                - TIME_SPENT
                - TRENDING_DOWN
                - TRENDING_UP
                - TRASH
                - TWITTER
                - USER
                - USER_CIRCLE
                - USER_PLUS
                - USERS_GROUP
                - WINDY
                - WINDY_CHAT
                - WINDY_CHAT_PLUS
                - WRENCH
                - X
                - X_CIRCLE_FILLED
                - YOUTUBE
              description: Standard icon name.
              title: Icon
            isBadge:
              type: boolean
              description: Whether clients should render the icon as a badge.
              title: Badge
              example: false
          required:
            - icon
          description: Display icon for the stat. Resets to null when omitted.
          title: Icon
      required:
        - stat
        - valueType
        - label
        - unitSingular
      title: Custom stat definition request
      description: Complete display configuration for a workspace custom stat.
      example:
        stat: custom-items-completed
        valueType: COUNT
        label: Items completed
        unitSingular: item
        unitPlural: items
    UpsertStatMetadataResponse:
      type: object
      properties:
        statMetadata:
          allOf:
            - $ref: '#/components/schemas/StatMetadata'
            - description: The created or updated stat definition.
      required:
        - statMetadata
      title: Custom stat definition response
    StatMetadata:
      type: object
      properties:
        id:
          type: string
          description: >-
            Opaque stat definition ID. Use it in the ids filter when searching
            definitions.
          title: Stat definition ID
          example: 11111111-1111-4111-8111-111111111111
        createdAt:
          type: string
          description: Creation time as an ISO 8601 timestamp.
          title: Created at
          example: '2026-01-01T10:00:00.000Z'
        updatedAt:
          type: string
          description: Last update time as an ISO 8601 timestamp.
          title: Updated at
          example: '2026-01-01T10:00:00.000Z'
        archivedAt:
          type:
            - string
            - 'null'
          description: >-
            Archive time as an ISO 8601 timestamp, or null while the definition
            is active.
          title: Archived at
          example: null
        stat:
          type: string
          minLength: 1
          maxLength: 100
          pattern: ^[a-z0-9]+(-[a-z0-9]+)*$
          description: >-
            Kebab-case identifier of a global Windmill stat or a workspace
            custom stat. Discover identifiers with POST
            /c/{companyId}/stats/metadata/search.
          title: Stat identifier
          example: code-prs-merged
        valueType:
          type: string
          enum:
            - COUNT
            - AGGREGATE
            - AVERAGE
          description: >-
            How stat values aggregate over a period: COUNT sums event counts,
            AGGREGATE sums measured values and counts a denominator, AVERAGE is
            a denominator-weighted per-unit ratio.
          title: Value type
          example: COUNT
        disabled:
          type: boolean
          description: >-
            True when the definition is turned off. Search excludes disabled
            definitions unless includeDisabled is true.
          title: Disabled
          example: false
        isGlobal:
          type: boolean
          description: >-
            True for global Windmill-managed definitions shared by every
            workspace. False for definitions owned by this workspace.
          title: Global definition
          example: true
        label:
          type: string
          description: Display name of the stat.
          title: Label
          example: Pull requests merged
        shortLabel:
          type:
            - string
            - 'null'
          description: Compact display name for dense layouts, or null when unset.
          title: Short label
          example: PRs merged
        description:
          type:
            - string
            - 'null'
          description: Explanation of what the stat measures, or null when unset.
          title: Description
          example: Number of pull requests merged.
        displayAsPercent:
          type: boolean
          description: >-
            Whether clients should display the value as a percentage; does not
            alter values.
          title: Display as percentage
          example: false
        unitSingular:
          type: string
          description: Singular display unit for the value.
          title: Unit
          example: pull request
        unitPlural:
          type:
            - string
            - 'null'
          description: Plural display unit for the value, or null when unset.
          title: Plural unit
          example: pull requests
        denominatorUnitSingular:
          type:
            - string
            - 'null'
          description: Singular display unit for the denominator, or null when unset.
          title: Denominator unit
          example: null
        relatedStatTypes:
          type: array
          items:
            type: string
          description: Identifiers of related stats that give context for this stat.
          title: Related stat identifiers
          example: []
        relatedData:
          type: array
          items:
            type: string
          description: >-
            Related data categories linked to the stat, such as "MEETING" or
            "AI".
          title: Related data categories
          example: []
        icon:
          anyOf:
            - type: object
              properties:
                icon:
                  type: string
                  enum:
                    - ACTIVITY
                    - AI
                    - ALERT
                    - ALERT_TRIANGLE
                    - ANALYTICS
                    - ANONYMOUS
                    - ANTENNA_BARS_1
                    - ANTENNA_BARS_2
                    - ANTENNA_BARS_3
                    - ANTENNA_BARS_4
                    - ANTENNA_BARS_5
                    - ARROW_DOWN
                    - ARROW_LEFT
                    - ARROW_NARROW_UP_DASHED
                    - ARROW_RIGHT
                    - ARROW_TO_DOWN_LINE
                    - ARROW_TO_UP_LINE
                    - ARROW_UP
                    - BELL_OFF
                    - BELL_RING
                    - BOT
                    - BUILDING
                    - CALENDAR
                    - CALENDAR_PAUSE
                    - CARD
                    - CARET_UP_FILLED
                    - CHANNEL
                    - CHECK
                    - CHECK_CIRCLE_FILLED
                    - CHECKS
                    - CHEVRON_DOWN
                    - CHEVRON_DOWN_PIXEL
                    - CHEVRON_RIGHT
                    - CHOOSE_STATS
                    - CLICK
                    - CLOCK
                    - CLOCK_FILLED
                    - CODE
                    - COG
                    - COLUMNS
                    - COMPANY
                    - COMPARISON
                    - COPY
                    - COST
                    - DATABASE
                    - DEBUG
                    - DEEP_DIVE
                    - DELEGATED_ACCESS
                    - DELIVERY
                    - DEVICE_DESKTOP_ANALYTICS
                    - DISCONNECT
                    - DOCUMENT
                    - DOCUMENT_TEMPLATE
                    - DOT
                    - EDIT
                    - EMAIL
                    - EMPLOYEE
                    - EMPLOYEES
                    - ERROR
                    - EXTERNAL_LINK
                    - EYE
                    - FEATURE_INDETERMINATE
                    - FEATURE_OFF
                    - FEATURE_ON
                    - FEATURES
                    - FEEDBACK
                    - FEEDBACK_GIVEN
                    - FEEDBACK_RECEIVED
                    - FILTER
                    - FLAG
                    - FLAME
                    - FULL_SCREEN
                    - GLOBE
                    - GRID_DOTS
                    - GROUPS
                    - HAMBURGER
                    - HAPPY
                    - HEALTH
                    - HELP_SQUARE_ROUNDED
                    - HERO_NUMBER
                    - HIGHLIGHTS
                    - HOME
                    - HOME_GRID
                    - INBOX
                    - IMPACT
                    - INFO_CIRCLE
                    - INTEGRATIONS
                    - KEY
                    - KNOWLEDGE
                    - KEYBOARD_DOUBLE_ARROW_RIGHT
                    - KEYBOARD_SINGLE_ARROW_RIGHT
                    - LAYOUT_COLUMNS
                    - LAYOUT_ROWS
                    - LEADERBOARD
                    - LIGHTNING_BOLT
                    - LIST_SEARCH
                    - LIGHT_BULB
                    - LINK
                    - LINKED_IN
                    - LOADING
                    - LOCK
                    - LOGOUT
                    - MAILBOX
                    - MAPPING
                    - MEETINGS
                    - MEDAL
                    - COMPANY_VALUES
                    - MERGE
                    - MEGAPHONE
                    - MESSAGES
                    - MICROPHONE
                    - MOON
                    - NEW_ACTIVITY
                    - NEW_TAB
                    - NOTES
                    - NOTIFICATIONS
                    - ONE_ON_ONE
                    - ORG_CHART
                    - ORGS
                    - PAINT_BRUSH
                    - PANEL_LEFT_CLOSE
                    - PANEL_LEFT_OPEN
                    - PANEL_RIGHT_CLOSE
                    - PAUSE
                    - PAUSE_FILLED
                    - PAPER_CLIP
                    - PENCIL_BOLT
                    - PERFORMANCE
                    - PLAY
                    - PERSON
                    - PERSON_CHECK
                    - PERSON_MULTIPLE_CHECK
                    - PIGGY_BANK
                    - PIN
                    - PIN_FILLED
                    - PINNED_OFF
                    - PLAY_CIRCLE
                    - PLUS
                    - PLUS_CIRCLE
                    - PROGRESS_CHECK
                    - PULSE
                    - PUZZLED
                    - RECAPS
                    - RECEIPT_DOLLAR
                    - RECORDING
                    - RECORDING_NOT_FOUND
                    - REFRESH
                    - RELATIONSHIP_DIRECT_MANAGER
                    - RELATIONSHIP_DIRECT_REPORT
                    - RELATIONSHIP_PEER
                    - RELATIONSHIP_SKIP_LEVEL_MANAGER
                    - RELATIONSHIP_SKIP_LEVEL_REPORT
                    - REPEAT
                    - REPORT
                    - REVIEWS
                    - REVIEW_SELF
                    - REVIEW_UPWARD
                    - REVIEW_MANAGER
                    - REVIEW_PEER
                    - ROBOT_FACE
                    - ROCKET
                    - ROUTINES
                    - SAD
                    - SAVED_VIEW
                    - SEARCH
                    - SEND
                    - SETTINGS
                    - SHIELD
                    - SHOUTOUT
                    - SMILE_PLUS
                    - SMS
                    - SQUARE_ROUNDED_PLUS
                    - SPINNER
                    - SPINNER_LINE
                    - STAR
                    - STAR_FILLED
                    - STATS
                    - SUMMARY
                    - SUN
                    - SUPERPOWERS
                    - SUPPORT
                    - SURVEY
                    - SWITCH
                    - SYNC_INTEGRATION
                    - TABLE
                    - TAG
                    - TEAM
                    - TELESCOPE
                    - TERMINAL
                    - TEST
                    - THREE_DOTS_VERTICAL
                    - THUMBS_UP
                    - TIME_SPENT
                    - TRENDING_DOWN
                    - TRENDING_UP
                    - TRASH
                    - TWITTER
                    - USER
                    - USER_CIRCLE
                    - USER_PLUS
                    - USERS_GROUP
                    - WINDY
                    - WINDY_CHAT
                    - WINDY_CHAT_PLUS
                    - WRENCH
                    - X
                    - X_CIRCLE_FILLED
                    - YOUTUBE
                isBadge:
                  type: boolean
              required:
                - icon
            - type: object
              properties:
                imageUrl:
                  type:
                    - string
                    - 'null'
                fallbackIcon:
                  type: string
                  enum:
                    - ACTIVITY
                    - AI
                    - ALERT
                    - ALERT_TRIANGLE
                    - ANALYTICS
                    - ANONYMOUS
                    - ANTENNA_BARS_1
                    - ANTENNA_BARS_2
                    - ANTENNA_BARS_3
                    - ANTENNA_BARS_4
                    - ANTENNA_BARS_5
                    - ARROW_DOWN
                    - ARROW_LEFT
                    - ARROW_NARROW_UP_DASHED
                    - ARROW_RIGHT
                    - ARROW_TO_DOWN_LINE
                    - ARROW_TO_UP_LINE
                    - ARROW_UP
                    - BELL_OFF
                    - BELL_RING
                    - BOT
                    - BUILDING
                    - CALENDAR
                    - CALENDAR_PAUSE
                    - CARD
                    - CARET_UP_FILLED
                    - CHANNEL
                    - CHECK
                    - CHECK_CIRCLE_FILLED
                    - CHECKS
                    - CHEVRON_DOWN
                    - CHEVRON_DOWN_PIXEL
                    - CHEVRON_RIGHT
                    - CHOOSE_STATS
                    - CLICK
                    - CLOCK
                    - CLOCK_FILLED
                    - CODE
                    - COG
                    - COLUMNS
                    - COMPANY
                    - COMPARISON
                    - COPY
                    - COST
                    - DATABASE
                    - DEBUG
                    - DEEP_DIVE
                    - DELEGATED_ACCESS
                    - DELIVERY
                    - DEVICE_DESKTOP_ANALYTICS
                    - DISCONNECT
                    - DOCUMENT
                    - DOCUMENT_TEMPLATE
                    - DOT
                    - EDIT
                    - EMAIL
                    - EMPLOYEE
                    - EMPLOYEES
                    - ERROR
                    - EXTERNAL_LINK
                    - EYE
                    - FEATURE_INDETERMINATE
                    - FEATURE_OFF
                    - FEATURE_ON
                    - FEATURES
                    - FEEDBACK
                    - FEEDBACK_GIVEN
                    - FEEDBACK_RECEIVED
                    - FILTER
                    - FLAG
                    - FLAME
                    - FULL_SCREEN
                    - GLOBE
                    - GRID_DOTS
                    - GROUPS
                    - HAMBURGER
                    - HAPPY
                    - HEALTH
                    - HELP_SQUARE_ROUNDED
                    - HERO_NUMBER
                    - HIGHLIGHTS
                    - HOME
                    - HOME_GRID
                    - INBOX
                    - IMPACT
                    - INFO_CIRCLE
                    - INTEGRATIONS
                    - KEY
                    - KNOWLEDGE
                    - KEYBOARD_DOUBLE_ARROW_RIGHT
                    - KEYBOARD_SINGLE_ARROW_RIGHT
                    - LAYOUT_COLUMNS
                    - LAYOUT_ROWS
                    - LEADERBOARD
                    - LIGHTNING_BOLT
                    - LIST_SEARCH
                    - LIGHT_BULB
                    - LINK
                    - LINKED_IN
                    - LOADING
                    - LOCK
                    - LOGOUT
                    - MAILBOX
                    - MAPPING
                    - MEETINGS
                    - MEDAL
                    - COMPANY_VALUES
                    - MERGE
                    - MEGAPHONE
                    - MESSAGES
                    - MICROPHONE
                    - MOON
                    - NEW_ACTIVITY
                    - NEW_TAB
                    - NOTES
                    - NOTIFICATIONS
                    - ONE_ON_ONE
                    - ORG_CHART
                    - ORGS
                    - PAINT_BRUSH
                    - PANEL_LEFT_CLOSE
                    - PANEL_LEFT_OPEN
                    - PANEL_RIGHT_CLOSE
                    - PAUSE
                    - PAUSE_FILLED
                    - PAPER_CLIP
                    - PENCIL_BOLT
                    - PERFORMANCE
                    - PLAY
                    - PERSON
                    - PERSON_CHECK
                    - PERSON_MULTIPLE_CHECK
                    - PIGGY_BANK
                    - PIN
                    - PIN_FILLED
                    - PINNED_OFF
                    - PLAY_CIRCLE
                    - PLUS
                    - PLUS_CIRCLE
                    - PROGRESS_CHECK
                    - PULSE
                    - PUZZLED
                    - RECAPS
                    - RECEIPT_DOLLAR
                    - RECORDING
                    - RECORDING_NOT_FOUND
                    - REFRESH
                    - RELATIONSHIP_DIRECT_MANAGER
                    - RELATIONSHIP_DIRECT_REPORT
                    - RELATIONSHIP_PEER
                    - RELATIONSHIP_SKIP_LEVEL_MANAGER
                    - RELATIONSHIP_SKIP_LEVEL_REPORT
                    - REPEAT
                    - REPORT
                    - REVIEWS
                    - REVIEW_SELF
                    - REVIEW_UPWARD
                    - REVIEW_MANAGER
                    - REVIEW_PEER
                    - ROBOT_FACE
                    - ROCKET
                    - ROUTINES
                    - SAD
                    - SAVED_VIEW
                    - SEARCH
                    - SEND
                    - SETTINGS
                    - SHIELD
                    - SHOUTOUT
                    - SMILE_PLUS
                    - SMS
                    - SQUARE_ROUNDED_PLUS
                    - SPINNER
                    - SPINNER_LINE
                    - STAR
                    - STAR_FILLED
                    - STATS
                    - SUMMARY
                    - SUN
                    - SUPERPOWERS
                    - SUPPORT
                    - SURVEY
                    - SWITCH
                    - SYNC_INTEGRATION
                    - TABLE
                    - TAG
                    - TEAM
                    - TELESCOPE
                    - TERMINAL
                    - TEST
                    - THREE_DOTS_VERTICAL
                    - THUMBS_UP
                    - TIME_SPENT
                    - TRENDING_DOWN
                    - TRENDING_UP
                    - TRASH
                    - TWITTER
                    - USER
                    - USER_CIRCLE
                    - USER_PLUS
                    - USERS_GROUP
                    - WINDY
                    - WINDY_CHAT
                    - WINDY_CHAT_PLUS
                    - WRENCH
                    - X
                    - X_CIRCLE_FILLED
                    - YOUTUBE
                cropToCircle:
                  type: boolean
              required:
                - imageUrl
            - type: object
              properties:
                emoji:
                  type: string
                color:
                  type: string
              required:
                - emoji
                - color
            - type: object
              properties:
                color:
                  type: string
              required:
                - color
            - type: object
              properties:
                integrationId:
                  type: string
              required:
                - integrationId
            - type: object
              properties:
                employee:
                  type: object
                  properties:
                    name:
                      type:
                        - string
                        - 'null'
                    avatarUrl:
                      type:
                        - string
                        - 'null'
                    primaryEmail:
                      type:
                        - string
                        - 'null'
                    emails:
                      type:
                        - array
                        - 'null'
                      items:
                        type: string
                  required:
                    - name
                    - avatarUrl
                    - primaryEmail
              required:
                - employee
            - type: 'null'
          description: Display icon, or null when unset.
          title: Icon
        requiresMatchingIntegration:
          $ref: '#/components/schemas/StatRequiresMatchingIntegration'
      required:
        - id
        - createdAt
        - updatedAt
        - archivedAt
        - stat
        - valueType
        - disabled
        - isGlobal
        - label
        - shortLabel
        - description
        - displayAsPercent
        - unitSingular
        - unitPlural
        - denominatorUnitSingular
        - relatedStatTypes
        - relatedData
        - icon
        - requiresMatchingIntegration
      description: A stat definition available to the workspace.
      title: Stat definition
    StatRequiresMatchingIntegration:
      type:
        - object
        - 'null'
      properties:
        type:
          type: string
          enum:
            - AI_AGENT
            - CALENDAR
            - CHAT
            - CODE_REPOSITORY
            - CRM
            - CUSTOMER_SUPPORT
            - DESIGN
            - DOCUMENT_MANAGEMENT
            - EMAIL
            - HRIS
            - MEETING
            - PROJECT_MANAGEMENT
            - RECORDING
            - VIRTUAL_OFFICE
          description: >-
            Integration type the workspace must have connected for the stat to
            apply.
          title: Integration type
        integrationIds:
          type: array
          items:
            type: string
          description: >-
            Specific integration IDs; the workspace must have one of them
            connected.
          title: Integration IDs
          example:
            - integration-code
      description: >-
        Integration requirement for the stat, or null when the stat has no
        requirement.
      title: Integration requirement
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Use an API key or OAuth access token. Enter only the token in the
        authorization dialog; requests send it as `Authorization: Bearer
        <TOKEN>`.


        Create an API key in your workspace's **Settings → API keys**. Keys
        start with `wm_api_` and only work in the workspace where they were
        created. Read-only keys can read data; creating, updating, or deleting
        data requires a read-write key.


        ```http

        Authorization: Bearer wm_api_example

        ```


        OAuth access tokens are issued for connected Windmill applications.


        ```http

        Authorization: Bearer <OAUTH_ACCESS_TOKEN>

        ```


        Both token types use the authenticated user's workspace permissions.
        Each endpoint's permission requirements and the sharing settings of the
        requested items still apply.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.