Automattic Stats API

The stats API from Automattic — 43 operation(s) for stats.

Operations 43

GET /sites/{site}/stats Get a site's stats #
GET /sites/{site}/stats/archives View a site's archives #
GET /sites/{site}/stats/clicks View a site's outbound clicks #
GET /sites/{site}/stats/clicks/emails/summary View the total number of email clicks for each post. #
GET /sites/{site}/stats/clicks/emails/{post_id} View chart stats related to email clicks by period. #
GET /sites/{site}/stats/clicks/emails/{post_id}/client View email clicks by client. #
GET /sites/{site}/stats/clicks/emails/{post_id}/country View email clicks by country. #
GET /sites/{site}/stats/clicks/emails/{post_id}/device View email clicks by device. #
GET /sites/{site}/stats/clicks/emails/{post_id}/rate View email clicks rate by post. Returns mock data. #
GET /sites/{site}/stats/comment-followers View a site's comment followers #
GET /sites/{site}/stats/comments View a site's top comment authors and most-commented posts #
GET /sites/{site}/stats/country-views View a site's views by country #
GET /sites/{site}/stats/devices/{device_property_name} Fetch site's Device properties statistics. #
GET /sites/{site}/stats/emails/summary View the total number of email opens and clicks for each post. #
GET /sites/{site}/stats/file-downloads View a site's file downloads #
GET /sites/{site}/stats/followers View a site's followers #
GET /sites/{site}/stats/highlights View highlight metrics from the last seven days. #
GET /sites/{site}/stats/location-views/{geo_mode} View a site's views by country, region and city #
GET /sites/{site}/stats/opens/emails/summary View the total number of email opens for each post. #
GET /sites/{site}/stats/opens/emails/{post_id} View multiple stats related to email opens by post. #
GET /sites/{site}/stats/opens/emails/{post_id}/client View email opens stats by client. #
GET /sites/{site}/stats/opens/emails/{post_id}/country View email opens stats by country. #
GET /sites/{site}/stats/opens/emails/{post_id}/device View email opens stats by device. #
GET /sites/{site}/stats/opens/emails/{post_id}/rate View email opens rate by post. #
GET /sites/{site}/stats/post/{post_id} View a post's views #
GET /sites/{site}/stats/publicize View a site's publicize follower counts #
GET /sites/{site}/stats/referrers View a site's referrers #
GET /sites/{site}/stats/referrers/spam List referrers marked as spam #
POST /sites/{site}/stats/referrers/spam/delete Unreport a referrer as spam #
POST /sites/{site}/stats/referrers/spam/new Report a referrer as spam #
GET /sites/{site}/stats/search-terms View search terms used to find the site #
GET /sites/{site}/stats/streak Get stats for Calendar Heatmap. Returns data with each post timestamp. #
GET /sites/{site}/stats/summary View a site's summarized views, visitors, likes and comments #
GET /sites/{site}/stats/tags View a site's views by tags and categories #
GET /sites/{site}/stats/top-authors View a site's top authors #
GET /sites/{site}/stats/top-posts View a site's top posts and pages by views #
GET /sites/{site}/stats/utm/{utm_param_name} Fetch site's UTM param statistics. #
GET /sites/{site}/stats/utm/{utm_param_name}/top_posts Fetch top posts for a given UTM parameter value. #
GET /sites/{site}/stats/video-plays View a site's video plays #
GET /sites/{site}/stats/video/{post_id} View the details of a single video #
GET /sites/{site}/stats/views/posts View the total number of views for each post. #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/automattic-stats-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

automattic-stats-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: WordPress.com REST API v1.1 Stats API
  version: v1.1
  description: 'The WordPress.com REST API, operated by Automattic. Derived by API Evangelist from Automattic''s own self-describing help document at https://public-api.wordpress.com/rest/v1.1/help (Accept: application/json), which publishes every endpoint''s method, path, description, path/query/body parameters and response fields. Security schemes come from https://public-api.wordpress.com/.well-known/openid-configuration. The error envelope was observed live.'
  termsOfService: https://wordpress.com/tos/
  contact:
    name: WordPress.com Developer Resources
    url: https://developer.wordpress.com/docs/api/
  x-derived-from: https://public-api.wordpress.com/rest/v1.1/help
  x-derived-by: API Evangelist enrichment pipeline
servers:
- url: https://public-api.wordpress.com/rest/v1.1
security:
- bearerAuth: []
tags:
- name: stats
paths:
  /sites/{site}/stats:
    get:
      operationId: getSitesBySiteStats
      summary: Get a site's stats
      description: Get a site's stats
      tags:
      - stats
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  date:
                    type: string
                    description: The most-recent day for which stats are returned
                  stats:
                    type: array
                    items: {}
                    description: Stats about the requested site
                  visits:
                    type: array
                    items: {}
                    description: Visits to the requested site
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Authorization required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      parameters:
      - name: site
        in: path
        required: true
        schema:
          type: string
        description: The site's id or domain
      - name: context
        in: query
        required: false
        schema:
          type: string
          enum:
          - display
          - edit
        description: 'display: (default) Formats the output as HTML for display.  Shortcodes are parsed, paragraph tags are added, etc..; edit: Formats the output for editing.  Shortcodes are left unparsed, significant whitespace is kept, etc..'
      - name: http_envelope
        in: query
        required: false
        schema:
          type: boolean
        description: 'false: (default); true: Some environments (like in-browser JavaScript or Flash) block or divert responses with a non-200 HTTP status code.  Setting this parameter will force the HTTP status code to always be 200.  The JSON response is wrapped in an "envelope" containing the "real" HTTP status code and headers.'
      - name: pretty
        in: query
        required: false
        schema:
          type: boolean
        description: 'false: (default); true: Output pretty JSON'
      - name: meta
        in: query
        required: false
        schema:
          type: string
        description: 'Optional. Loads data from the endpoints found in the ''meta'' part of the response. Comma-separated list. Example: meta=site,likes'
      - name: fields
        in: query
        required: false
        schema:
          type: string
        description: 'Optional. Returns specified fields only. Comma-separated list. Example: fields=ID,title'
      - name: callback
        in: query
        required: false
        schema:
          type: string
        description: An optional JSONP callback function.
  /sites/{site}/stats/archives:
    get:
      operationId: getSitesBySiteStatsArchives
      summary: View a site's archives
      description: View a site's archives
      tags:
      - stats
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  date:
                    type: string
                    description: The most-recent day for which stats are returned
                  days:
                    type: array
                    items: {}
                    description: An array of days and the views of archives pages on those days (omitted when summarize=true)
                  summary:
                    type: object
                    description: Summary of archives page views over the specified period (omitted when summarize=false)
                  period:
                    type: string
                    description: The period represented in the stats returned
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Authorization required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      parameters:
      - name: site
        in: path
        required: true
        schema:
          type: string
        description: The site's id or domain
      - name: context
        in: query
        required: false
        schema:
          type: string
          enum:
          - display
          - edit
        description: 'display: (default) Formats the output as HTML for display.  Shortcodes are parsed, paragraph tags are added, etc..; edit: Formats the output for editing.  Shortcodes are left unparsed, significant whitespace is kept, etc..'
      - name: http_envelope
        in: query
        required: false
        schema:
          type: boolean
        description: 'false: (default); true: Some environments (like in-browser JavaScript or Flash) block or divert responses with a non-200 HTTP status code.  Setting this parameter will force the HTTP status code to always be 200.  The JSON response is wrapped in an "envelope" containing the "real" HTTP status code and headers.'
      - name: pretty
        in: query
        required: false
        schema:
          type: boolean
        description: 'false: (default); true: Output pretty JSON'
      - name: meta
        in: query
        required: false
        schema:
          type: string
        description: 'Optional. Loads data from the endpoints found in the ''meta'' part of the response. Comma-separated list. Example: meta=site,likes'
      - name: fields
        in: query
        required: false
        schema:
          type: string
        description: 'Optional. Returns specified fields only. Comma-separated list. Example: fields=ID,title'
      - name: callback
        in: query
        required: false
        schema:
          type: string
        description: An optional JSONP callback function.
      - name: num
        in: query
        required: false
        schema:
          type: integer
        description: 'Number of periods to include in the results Default: 1.'
      - name: period
        in: query
        required: false
        schema:
          type: string
          enum:
          - day
          - week
          - month
          - year
        description: 'day: (default) The output will return results over the past [num] days; week: The output will return results over the past [num] weeks; month: The output will return results over the past [num] months; year: The output will return results over the past [num] years'
      - name: date
        in: query
        required: false
        schema:
          type: string
        description: The most recent day to include in results
      - name: start_date
        in: query
        required: false
        schema:
          type: string
        description: the start date to calculate days included in results
      - name: max
        in: query
        required: false
        schema:
          type: integer
        description: 'The maximum number of results to return Default: 10.'
      - name: offset
        in: query
        required: false
        schema:
          type: integer
        description: The offset, in hours, from GMT for which to fetch results. If omitted, defaults to site's offset
      - name: summarize
        in: query
        required: false
        schema:
          type: boolean
        description: Return summary data instead of detailed period data
      - name: skip_archives
        in: query
        required: false
        schema:
          type: boolean
        description: Skip home/archives pages from the results
      - name: migrate_archive_homepage
        in: query
        required: false
        schema:
          type: boolean
        description: Migrate archive homepage views to update the Home page / Archive display
  /sites/{site}/stats/clicks:
    get:
      operationId: getSitesBySiteStatsClicks
      summary: View a site's outbound clicks
      description: View a site's outbound clicks
      tags:
      - stats
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  date:
                    type: string
                    description: The most-recent day for which stats are returned
                  days:
                    type: array
                    items: {}
                    description: An array of days and the clicks that occurred on those days (omitted when summarize=true)
                  summary:
                    type: object
                    description: Summary of clicks that occured over the specified period  (omitted when summarize=false)
                  period:
                    type: string
                    description: The period represented in the stats returned
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Authorization required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      parameters:
      - name: site
        in: path
        required: true
        schema:
          type: string
        description: The site's id or domain
      - name: context
        in: query
        required: false
        schema:
          type: string
          enum:
          - display
          - edit
        description: 'display: (default) Formats the output as HTML for display.  Shortcodes are parsed, paragraph tags are added, etc..; edit: Formats the output for editing.  Shortcodes are left unparsed, significant whitespace is kept, etc..'
      - name: http_envelope
        in: query
        required: false
        schema:
          type: boolean
        description: 'false: (default); true: Some environments (like in-browser JavaScript or Flash) block or divert responses with a non-200 HTTP status code.  Setting this parameter will force the HTTP status code to always be 200.  The JSON response is wrapped in an "envelope" containing the "real" HTTP status code and headers.'
      - name: pretty
        in: query
        required: false
        schema:
          type: boolean
        description: 'false: (default); true: Output pretty JSON'
      - name: meta
        in: query
        required: false
        schema:
          type: string
        description: 'Optional. Loads data from the endpoints found in the ''meta'' part of the response. Comma-separated list. Example: meta=site,likes'
      - name: fields
        in: query
        required: false
        schema:
          type: string
        description: 'Optional. Returns specified fields only. Comma-separated list. Example: fields=ID,title'
      - name: callback
        in: query
        required: false
        schema:
          type: string
        description: An optional JSONP callback function.
      - name: num
        in: query
        required: false
        schema:
          type: integer
        description: 'Number of periods to include in the results Default: 1.'
      - name: period
        in: query
        required: false
        schema:
          type: string
          enum:
          - day
          - week
          - month
          - year
        description: 'day: (default) The output will return results over the past [num] days; week: The output will return results over the past [num] weeks; month: The output will return results over the past [num] months; year: The output will return results over the past [num] years'
      - name: date
        in: query
        required: false
        schema:
          type: string
        description: The most recent day to include in results
      - name: start_date
        in: query
        required: false
        schema:
          type: string
        description: the start date to calculate days included in results
      - name: max
        in: query
        required: false
        schema:
          type: integer
        description: 'The maximum number of results to return Default: 10.'
      - name: offset
        in: query
        required: false
        schema:
          type: integer
        description: The offset, in hours, from GMT for which to fetch results. If omitted, defaults to site's offset
      - name: summarize
        in: query
        required: false
        schema:
          type: boolean
        description: Return summary data instead of detailed period data
  /sites/{site}/stats/clicks/emails/summary:
    get:
      operationId: getSitesBySiteStatsClicksEmailsSummary
      summary: View the total number of email clicks for each post.
      description: View the total number of email clicks for each post.
      tags:
      - stats
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  date:
                    type: string
                    description: The most-recent day for which stats are returned
                  period:
                    type: string
                    description: The period for which stats are returned
                  posts:
                    type: array
                    items: {}
                    description: An array of posts with the total views for each post
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Authorization required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      parameters:
      - name: site
        in: path
        required: true
        schema:
          type: string
        description: The site's id or domain.
      - name: context
        in: query
        required: false
        schema:
          type: string
          enum:
          - display
          - edit
        description: 'display: (default) Formats the output as HTML for display.  Shortcodes are parsed, paragraph tags are added, etc..; edit: Formats the output for editing.  Shortcodes are left unparsed, significant whitespace is kept, etc..'
      - name: http_envelope
        in: query
        required: false
        schema:
          type: boolean
        description: 'false: (default); true: Some environments (like in-browser JavaScript or Flash) block or divert responses with a non-200 HTTP status code.  Setting this parameter will force the HTTP status code to always be 200.  The JSON response is wrapped in an "envelope" containing the "real" HTTP status code and headers.'
      - name: pretty
        in: query
        required: false
        schema:
          type: boolean
        description: 'false: (default); true: Output pretty JSON'
      - name: meta
        in: query
        required: false
        schema:
          type: string
        description: 'Optional. Loads data from the endpoints found in the ''meta'' part of the response. Comma-separated list. Example: meta=site,likes'
      - name: fields
        in: query
        required: false
        schema:
          type: string
        description: 'Optional. Returns specified fields only. Comma-separated list. Example: fields=ID,title'
      - name: callback
        in: query
        required: false
        schema:
          type: string
        description: An optional JSONP callback function.
      - name: quantity
        in: query
        required: false
        schema:
          type: integer
        description: 'Number of periods to include in the results Default: 10.'
      - name: period
        in: query
        required: false
        schema:
          type: string
          enum:
          - hour
          - day
          - week
          - month
          - year
          - alltime
        description: 'hour: (default) The output will return results over the past [num] hours; day: The output will return results over the past [num] days; week: The output will return results over the past [num] weeks; month: The output will return results over the past [num] months; year: The output will return results over the past [num] years; alltime: The output will return results from all time'
      - name: date
        in: query
        required: false
        schema:
          type: string
        description: The most recent day to include in results, accepts Y-m-d format
  /sites/{site}/stats/clicks/emails/{post_id}:
    get:
      operationId: getSitesBySiteStatsClicksEmailsByPostId
      summary: View chart stats related to email clicks by period.
      description: View chart stats related to email clicks by period.
      tags:
      - stats
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    description: An object containing the clicks.
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Authorization required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      parameters:
      - name: site
        in: path
        required: true
        schema:
          type: string
        description: The site's id or domain.
      - name: post_id
        in: path
        required: true
        schema:
          type: integer
        description: The post's id
      - name: context
        in: query
        required: false
        schema:
          type: string
          enum:
          - display
          - edit
        description: 'display: (default) Formats the output as HTML for display.  Shortcodes are parsed, paragraph tags are added, etc..; edit: Formats the output for editing.  Shortcodes are left unparsed, significant whitespace is kept, etc..'
      - name: http_envelope
        in: query
        required: false
        schema:
          type: boolean
        description: 'false: (default); true: Some environments (like in-browser JavaScript or Flash) block or divert responses with a non-200 HTTP status code.  Setting this parameter will force the HTTP status code to always be 200.  The JSON response is wrapped in an "envelope" containing the "real" HTTP status code and headers.'
      - name: pretty
        in: query
        required: false
        schema:
          type: boolean
        description: 'false: (default); true: Output pretty JSON'
      - name: meta
        in: query
        required: false
        schema:
          type: string
        description: 'Optional. Loads data from the endpoints found in the ''meta'' part of the response. Comma-separated list. Example: meta=site,likes'
      - name: fields
        in: query
        required: false
        schema:
          type: string
        description: 'Optional. Returns specified fields only. Comma-separated list. Example: fields=ID,title'
      - name: callback
        in: query
        required: false
        schema:
          type: string
        description: An optional JSONP callback function.
      - name: quantity
        in: query
        required: false
        schema:
          type: integer
        description: Number of periods to include in the results
      - name: period
        in: query
        required: false
        schema:
          type: string
          enum:
          - hour
          - day
        description: 'hour: (default) The output will return results over the next [quantity] hours; day: The output will return results over the next [quantity] days'
      - name: date
        in: query
        required: false
        schema:
          type: string
        description: The most recent day to include in results, accepts Y-m-d or Y-m-d\Th:00:00
  /sites/{site}/stats/clicks/emails/{post_id}/client:
    get:
      operationId: getSitesBySiteStatsClicksEmailsByPostIdClient
      summary: View email clicks by client.
      description: View email clicks by client.
      tags:
      - stats
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  clients:
                    type: object
                    description: An object containing the email clicks by client.
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Authorization required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      parameters:
      - name: site
        in: path
        required: true
        schema:
          type: string
        description: The site's id or domain.
      - name: post_id
        in: path
        required: true
        schema:
          type: integer
        description: The post's id
      - name: context
        in: query
        required: false
        schema:
          type: string
          enum:
          - display
          - edit
        description: 'display: (default) Formats the output as HTML for display.  Shortcodes are parsed, paragraph tags are added, etc..; edit: Formats the output for editing.  Shortcodes are left unparsed, significant whitespace is kept, etc..'
      - name: http_envelope
        in: query
        required: false
        schema:
          type: boolean
        description: 'false: (default); true: Some environments (like in-browser JavaScript or Flash) block or divert responses with a non-200 HTTP status code.  Setting this parameter will force the HTTP status code to always be 200.  The JSON response is wrapped in an "envelope" containing the "real" HTTP status code and headers.'
      - name: pretty
        in: query
        required: false
        schema:
          type: boolean
        description: 'false: (default); true: Output pretty JSON'
      - name: meta
        in: query
        required: false
        schema:
          type: string
        description: 'Optional. Loads data from the endpoints found in the ''meta'' part of the response. Comma-separated list. Example: meta=site,likes'
      - name: fields
        in: query
        required: false
        schema:
          type: string
        description: 'Optional. Returns specified fields only. Comma-separated list. Example: fields=ID,title'
      - name: callback
        in: query
        required: false
        schema:
          type: string
        description: An optional JSONP callback function.
  /sites/{site}/stats/clicks/emails/{post_id}/country:
    get:
      operationId: getSitesBySiteStatsClicksEmailsByPostIdCountry
      summary: View email clicks by country.
      description: View email clicks by country.
      tags:
      - stats
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  countries:
                    type: object
                    description: An object containing the email clicks by country.
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Authorization required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      parameters:
      - name: site
        in: path
        required: true
        schema:
          type: string
        description: The site's id or domain.
      - name: post_id
        in: path
        required: true
        schema:
          type: integer
        description: The post's id
      - name: context
        in: query
        required: false
        schema:
          type: string
          enum:
          - display
          - edit
        description: 'display: (default) Formats the output as HTML for display.  Shortcodes are parsed, paragraph tags are added, etc..; edit: Formats the output for editing.  Shortcodes are left unparsed, significant whitespace is kept, etc..'
      - name: http_envelope
        in: query
        required: false
        schema:
          type: boolean
        description: 'false: (default); true: Some environments (like in-browser JavaScript or Flash) block or divert responses with a non-200 HTTP status code.  Setting this parameter will force the HTTP status code to always be 200.  The JSON response is wrapped in an "envelope" containing the "real" HTTP status code and headers.'
      - name: pretty
        in: query
        required: false
        schema:
          type: boolean
        description: 'false: (default); true: Output pretty JSON'
      - name: meta
        in: query
        required: false
        schema:
          type: string
        description: 'Optional. Loads data from the endpoints found in the ''meta'' part of the response. Comma-separated list. Example: meta=site,likes'
      - name: fields
        in: query
        required: false
        schema:
          type: string
        description: 'Optional. Returns specified fields only. Comma-separated list. Example: fields=ID,title'
      - name: callback
        in: query
        required: false
        schema:
          type: string
        description: An optional JSONP callback function.
  /sites/{site}/stats/clicks/emails/{post_id}/device:
    get:
      operationId: getSitesBySiteStatsClicksEmailsByPostIdDevice
      summary: View email clicks by device.
      description: View email clicks by device.
      tags:
      - stats
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  devices:
                    type: object
                    description: An object containing the email clicks by device.
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Authorization required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      parameters:
      - name: site
        in: path
        required: true
        schema:
          type: string
        description: The site's id or domain.
      - name: post_id
        in: path
        required: true
        schema:
          type: integer
        description: The post's id
      - name: context
        in: query
        required: false
        schema:
          type: string
          enum:
          - display
          - edit
        description: 'display: (default) Formats the output as HTML for display.  Shortcodes are parsed, paragraph tags are added, etc..; edit: Formats the output for editing.  Shortcodes are left unparsed, significant whitespace is kept, etc..'
      - name: http_envelope
        in: query
        required: false
        schema:
          type: boolean
        description: 'false: (default); true: Some environments (like in-browser JavaScript or Flash) block or divert responses with a non-200 HTTP status code.  Setting this parameter will force the HTTP status code to always be 200.  The JSON response is wrapped in an "envelope" containing the "real" HTTP status code and headers.'
      - name: pretty
        in: query
        required: false
        schema:
          type: boolean
        description: 'false: (default); true: Output pretty JSON'
      - name: meta
        in: query
        required: false
        schema:
          type: string
        description: 'Optional. Loads data from the endpoints found in the ''meta'' part of the response. Comma-separated list. Example: meta=site,likes'
      - name: fields
        in: query
        required: false
        schema:
          type: string
        description: 'Optional. Returns specified fields only. Comma-separated list. Example: fields=ID,title'
      - name: callback
        in: query
        required: false
        schema:
          ty

# --- truncated at 32 KB (177 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/automattic/refs/heads/main/openapi/automattic-stats-api-openapi.yml