Skip to content

Add rich menu summary and daily report to the Insight API#128

Merged
mokuzon merged 1 commit into
mainfrom
add-richmenu-report-insight-api
Jul 1, 2026
Merged

Add rich menu summary and daily report to the Insight API#128
mokuzon merged 1 commit into
mainfrom
add-richmenu-report-insight-api

Conversation

@kiruto

@kiruto kiruto commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds two endpoints to the Insight API for the impression and click statistics of rich menus created via the Messaging API:

Method Path
GET /v2/bot/insight/richmenu/{richMenuId}/summary
GET /v2/bot/insight/richmenu/{richMenuId}/daily

summary returns metrics aggregated over the whole period; daily returns per-day metrics.

Why

These endpoints let developers retrieve impression and click statistics for rich menus they create through the Messaging API (POST /v2/bot/richmenu), using the standard public Messaging API surface — the same kind of insight already offered for messages and followers.

Details

Common to both endpoints:

  • Authorized with a channel access token (Bearer).
  • Query parameters from and to, both inclusive, format yyyyMMdd, time zone UTC+9. from must be within the most recent 3 years.
  • Impression metrics are aggregated for the whole rich menu; click metrics are aggregated per tappable area. Each area is expressed by bounds (top-left x, y, width, height).
  • metricsFrom / metricsTo (the period actually covered) and the per-day date are returned as yyyyMMdd strings (JST), consistent with the from / to request parameters.
  • When the total number of unique clicks in the period is below the privacy threshold, only richMenuId is returned and the other fields are omitted.

Per-endpoint period limit:

  • summary: to can be up to 396 days after from.
  • daily: to can be up to 99 days after from.

Example — summary

GET /v2/bot/insight/richmenu/{richMenuId}/summary?from=20260213&to=20260215

{
  "richMenuId": "richmenu-0123456789abcdef0123456789abcdef",
  "metricsFrom": "20260213",
  "metricsTo": "20260215",
  "impression": {
    "metrics": { "count": 567, "uniqueUsers": 300 }
  },
  "clicks": [
    {
      "bounds": { "x": 0, "y": 0, "width": 400, "height": 250 },
      "metrics": { "count": 123, "uniqueUsers": 45 }
    },
    {
      "bounds": { "x": 400, "y": 0, "width": 400, "height": 250 },
      "metrics": { "count": 45, "uniqueUsers": 24 }
    }
  ]
}

Example — daily

GET /v2/bot/insight/richmenu/{richMenuId}/daily?from=20260213&to=20260215

{
  "richMenuId": "richmenu-0123456789abcdef0123456789abcdef",
  "metricsFrom": "20260213",
  "metricsTo": "20260215",
  "impression": {
    "metrics": [
      { "date": "20260213", "count": 300, "uniqueUsers": 191 },
      { "date": "20260214", "count": 267, "uniqueUsers": 222 }
    ]
  },
  "clicks": [
    {
      "bounds": { "x": 0, "y": 0, "width": 400, "height": 250 },
      "metrics": [
        { "date": "20260213", "count": 45, "uniqueUsers": 22 },
        { "date": "20260214", "count": 78, "uniqueUsers": 35 }
      ]
    }
  ]
}

Below the privacy threshold

{ "richMenuId": "richmenu-0123456789abcdef0123456789abcdef" }

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@CLAassistant

CLAassistant commented Jun 30, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@github-actions

Copy link
Copy Markdown

JAVA

You can check generated code in java

Check the diff here

@github-actions

Copy link
Copy Markdown

NODEJS

You can check generated code in nodejs

Check the diff here

@github-actions

Copy link
Copy Markdown

PHP

You can check generated code in php

Check the diff here

@github-actions

Copy link
Copy Markdown

PYTHON

You can check generated code in python

Check the diff here

@github-actions

Copy link
Copy Markdown

GO

You can check generated code in go

Check the diff here

@github-actions

Copy link
Copy Markdown

RUBY

You can check generated code in ruby

Check the diff here

@kiruto kiruto marked this pull request as ready for review June 30, 2026 06:21
@mokuzon mokuzon added this pull request to the merge queue Jul 1, 2026
Merged via the queue into main with commit e9e0a88 Jul 1, 2026
24 checks passed
@mokuzon mokuzon deleted the add-richmenu-report-insight-api branch July 1, 2026 05:10
mokuzon pushed a commit to line/line-bot-sdk-php that referenced this pull request Jul 1, 2026
…ceGroupFailedType` emum (#857)

line/line-openapi#128
line/line-openapi#124

---------

Co-authored-by: github-actions <github-actions@github.com>
mokuzon pushed a commit to line/line-bot-sdk-java that referenced this pull request Jul 1, 2026
…ceGroupFailedType` emum (#1925)

line/line-openapi#128
line/line-openapi#124

Co-authored-by: github-actions <github-actions@github.com>
mokuzon pushed a commit to line/line-bot-sdk-go that referenced this pull request Jul 1, 2026
…ceGroupFailedType` emum (#708)

line/line-openapi#128
line/line-openapi#124

Co-authored-by: github-actions <github-actions@github.com>
mokuzon pushed a commit to line/line-bot-sdk-python that referenced this pull request Jul 1, 2026
…ceGroupFailedType` emum (#1027)

line/line-openapi#128
line/line-openapi#124

Co-authored-by: github-actions <github-actions@github.com>
mokuzon pushed a commit to line/line-bot-sdk-nodejs that referenced this pull request Jul 1, 2026
…ceGroupFailedType` emum (#1689)

line/line-openapi#128
line/line-openapi#124

Co-authored-by: github-actions <github-actions@github.com>
mokuzon pushed a commit to line/line-bot-sdk-ruby that referenced this pull request Jul 1, 2026
…ceGroupFailedType` emum (#849)

line/line-openapi#128
line/line-openapi#124

Co-authored-by: github-actions <github-actions@github.com>
@4geru

This comment was marked as off-topic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants