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

# Get Decision Engine Message Stats

> Get the state and send statistics of a message in a flow



## OpenAPI

````yaml https://api.hightouch.io/api/swagger.json get /decision-engine/flow/{flowId}/messages/{messageId}/stats
openapi: 3.0.0
info:
  title: Hightouch API
  version: 1.0.0
  description: Hightouch Public Rest API to access syncs, models, sources and destinations
  contact:
    name: Hightouch
    url: https://hightouch.com
servers:
  - url: https://api.hightouch.com/api/v1
security: []
paths:
  /decision-engine/flow/{flowId}/messages/{messageId}/stats:
    get:
      summary: Get Decision Engine Message Stats
      description: Get the state and send statistics of a message in a flow
      operationId: GetMessageStats
      parameters:
        - description: The UUID of the flow
          in: path
          name: flowId
          required: true
          schema:
            type: string
        - description: The UUID of the message
          in: path
          name: messageId
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/DecisionEngineMessageStats'
                  - $ref: '#/components/schemas/ValidateErrorJSON'
                  - $ref: '#/components/schemas/InternalServerError'
                nullable: true
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not found
      security:
        - bearerAuth: []
components:
  schemas:
    DecisionEngineMessageStats:
      description: State and send statistics of a message in a flow
      properties:
        messageId:
          type: string
        state:
          $ref: '#/components/schemas/DecisionEngineFlowMessageState'
        sends:
          $ref: '#/components/schemas/DecisionEngineMessageSends'
          description: >-
            Absent until the flow's aggregation job has produced statistics for
            the message
      required:
        - messageId
        - state
      type: object
      additionalProperties: false
    ValidateErrorJSON:
      properties:
        message:
          type: string
          enum:
            - Validation failed
          nullable: false
        details:
          properties: {}
          additionalProperties: {}
          type: object
      required:
        - message
        - details
      type: object
      additionalProperties: false
    InternalServerError:
      type: string
      enum:
        - Internal Server Error
      nullable: false
    DecisionEngineFlowMessageState:
      description: The state of a message within a flow
      properties:
        enabled:
          type: boolean
          description: Whether the flow can recommend this message
        status:
          $ref: '#/components/schemas/DecisionEngineFlowMessageStatus'
        disabledAt:
          type: string
          format: date-time
        audienceSize:
          type: number
          format: double
          description: >-
            Number of users in the flow audience who are eligible for the
            message
        audienceSizeComputedAt:
          type: string
          format: date-time
      required:
        - enabled
        - status
      type: object
      additionalProperties: false
    DecisionEngineMessageSends:
      description: |-
        Send statistics of a message in a flow. They come from the latest
        aggregation job of the flow, so they can lag recent sends.
      properties:
        totalSends:
          type: number
          format: double
        totalSkippedSends:
          type: number
          format: double
        totalUniqueUsersSkippedSends:
          type: number
          format: double
        totalSendsForUsersInAudience:
          type: number
          format: double
        uniqueUsersInAudienceWithSend:
          type: number
          format: double
        numUsersInAudienceEligible:
          type: number
          format: double
        sendShareLast7Days:
          type: number
          format: double
          description: >-
            Percent (0 to 100) of the flow's sends in the last 7 days that used
            this message
        sendsByDay:
          items:
            $ref: '#/components/schemas/DecisionEngineSendsByDay'
          type: array
        skippedSendsByDay:
          items:
            $ref: '#/components/schemas/DecisionEngineSendsByDay'
          type: array
      required:
        - totalSends
        - totalSkippedSends
        - totalUniqueUsersSkippedSends
        - totalSendsForUsersInAudience
        - uniqueUsersInAudienceWithSend
        - numUsersInAudienceEligible
        - sendShareLast7Days
        - sendsByDay
        - skippedSendsByDay
      type: object
      additionalProperties: false
    DecisionEngineFlowMessageStatus:
      type: string
      enum:
        - draft
        - enabled
        - disabled
    DecisionEngineSendsByDay:
      properties:
        date:
          type: string
          description: Day in YYYY-MM-DD format
        count:
          type: number
          format: double
      required:
        - date
        - count
      type: object
      additionalProperties: false
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: Bearer

````