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

# Get message statistics

> Get daily counts of successful sends, failures, deliveries, clicks, and conversions by channel for campaigns and user journeys. Results exclude the current date.

> [!NOTE]
>
> **Data availability**
>
> Check the previous day's data after 7 a.m. KST.

> [!NOTE]
>
> **Aggregation dates**
>
> Daily data is aggregated and reported by the date each event occurs. For example, if a campaign is sent on July 23 and a click occurs on July 24, the send event counts toward July 23 and the click event counts toward July 24.

> [!NOTE]
>
> **Difference from detailed message statistics**
>
> [Detailed message statistics](https://docs.notifly.tech/en/api-reference/get-campaign-statistics-retrieval.md) requires a specific campaign. This API provides daily counts for campaigns and user journeys aggregated over the requested period. If you specify `tags`, the response includes only campaigns that match any of the specified tags and excludes user journeys.


## OpenAPI

````yaml /en/api-reference/openapi.yaml post /v1/projects/{projectId}/statistics
openapi: 3.0.3
info:
  title: Notifly API
  version: 1.0.0
  contact:
    email: contact@notifly.tech
servers:
  - url: https://api.notifly.tech
    description: Notifly API server
security: []
tags:
  - name: catalog
    x-group: Catalogs
paths:
  /v1/projects/{projectId}/statistics:
    post:
      summary: get-campaign-statistics
      operationId: getCampaignStatistics
      parameters:
        - name: projectId
          in: path
          required: true
          schema:
            type: string
          description: Project ID.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - start
                - end
              properties:
                start:
                  type: string
                  format: date
                  description: First date to query in `yyyy-MM-dd` format, in KST.
                end:
                  type: string
                  format: date
                  description: >-
                    Last date to query in `yyyy-MM-dd` format, in KST. The
                    current date is excluded.
                tags:
                  oneOf:
                    - type: array
                      items:
                        type: string
                    - type: string
                  description: >-
                    Campaign tags as an array or a comma-separated string. Any
                    tag may match. The filter excludes user journeys.
            example:
              start: '2025-06-01'
              end: '2025-06-07'
      responses:
        '200':
          description: Statistics retrieved.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/CampaignStatistics'
              example:
                - date: '2025-06-01'
                  resource_type: campaign
                  campaign_id: campaign_example
                  campaign_name: Welcome
                  variant_id: null
                  variant_name: null
                  tags:
                    - summer
                  channel: push-notification
                  channel_subtype: text
                  brand_message_target: null
                  message:
                    title: Welcome
                    body: Hello
                  message_sent: 1500
                  message_failed: 23
                  delivered: 1477
                  click: 234
                  conversion:
                    - name: purchase
                      type: total_count_conversion
                      count: 45
                - date: '2025-06-01'
                  resource_type: user_journey
                  user_journey_id: journey_example
                  user_journey_name: Onboarding
                  user_journey_node_id: node_example
                  user_journey_node_name: Welcome
                  channel: kakao-alimtalk
                  channel_subtype: null
                  brand_message_target: null
                  message: {}
                  message_sent: 892
                  message_failed: 5
                  delivered: null
                  click: 156
                  conversion: []
        '400':
          description: Invalid request parameters, such as an invalid date format or range.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  message:
                    type: string
              example:
                error: InvalidRequest
                message: ...
        '401':
          description: Authentication failed.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
              example:
                error: Unauthorized
        '408':
          description: The request timed out.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
              example:
                error: RequestTimeout
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  message:
                    type: string
              example:
                error: InternalServerError
                message: ...
      security:
        - bearerAuth: []
components:
  schemas:
    CampaignStatistics:
      type: object
      properties:
        date:
          type: string
          format: date
          description: The date of the statistics in `YYYY-MM-DD` format.
        resource_type:
          type: string
          enum:
            - campaign
            - user_journey
          description: The resource type.
        message:
          type: object
          nullable: true
          description: The message content. The structure differs by channel.
        campaign_id:
          type: string
          nullable: true
          description: The campaign ID. Present only for campaign resources.
        campaign_name:
          type: string
          nullable: true
          description: The campaign name. Present only for campaign resources.
        variant_id:
          type: string
          nullable: true
          description: >-
            The campaign’s A/B test variant ID, or null if the campaign row has
            no variant ID.
        variant_name:
          type: string
          nullable: true
          description: >-
            The campaign’s A/B test variant name, or null if the campaign row
            has no variant name.
        tags:
          type: array
          items:
            type: string
          description: The list of campaign tags.
        user_journey_id:
          type: string
          nullable: true
          description: The user journey ID. Present only for user journey resources.
        user_journey_name:
          type: string
          nullable: true
          description: The user journey name. Present only for user journey resources.
        user_journey_node_id:
          type: string
          nullable: true
          description: The user journey node ID. Present only for user journey resources.
        user_journey_node_name:
          type: string
          nullable: true
          description: The user journey node name. Present only for user journey resources.
        channel:
          type: string
          description: The delivery channel information.
        channel_subtype:
          type: string
          nullable: true
          description: Messaging channel subtype.
        brand_message_target:
          type: string
          nullable: true
          description: Kakao Brand Message target.
        message_sent:
          type: integer
          nullable: true
          description: >-
            Successful sends. For popups, impressions. Null when the channel
            does not support the metric.
        message_failed:
          type: integer
          nullable: true
          description: Failed sends. Null when the channel does not support the metric.
        delivered:
          type: integer
          nullable: true
          description: >-
            The number of delivered messages. `null` if the channel does not
            support this metric.
        click:
          type: integer
          nullable: true
          description: >-
            The number of clicked messages. `null` if the channel does not
            support this metric.
        conversion:
          type: array
          items:
            type: object
            properties:
              name:
                type: string
                description: The conversion name.
              type:
                type: string
                description: The conversion type.
              count:
                type: number
                description: Conversion count or total conversion revenue.
          description: The array of conversion data.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Pass the token issued by `POST /authenticate` as a bearer token.

````

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