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

> ## Agent Instructions
> - Base URLs: models `https://api.aisa.one/v1` (Gemini GenerateContent: `https://api.aisa.one/v1beta`); data APIs `https://api.aisa.one/apis/v1`. The `servers` of each operation in https://aisa.one/openapi.yaml is authoritative.
> - Auth: `Authorization: Bearer $AISA_API_KEY`. Never print, log, or commit the key.
> - MCP (preferred for agents): `https://mcp.aisa.one/mcp`, signed in with OAuth, so there is no key to paste.
> - Agent Skill: `npx skills add AIsa-team/agent-skills --skill aisa`. Fallback with the AIsa CLI: `aisa skills install aisa`.
> - Spending: docs, https://aisa.one/models, https://aisa.one/api, `/v1/models`, and MCP `search`, `list_categories`, `get_details`, `batch_quote`, and the `account` operation are free. Quote the exact calls before running them (MCP `batch_quote`, CLI `aisa quote --json`). If the quote reports `auto_execute_eligible: true`, run it unless the user set a tighter limit or asked only for a quote. Otherwise, tell the user in one message the planned calls, the quoted price, and a total USD budget for the task, then wait for approval. Direct HTTP calls follow the stricter rule at https://aisa.one/docs/get-started/cli.md#direct-http-fallback. Do not make paid calls to test availability. Full rule: https://aisa.one/llms.txt

# Get pricing analytics

> WhatsApp. Message volume and approximate cost for one connected WhatsApp number. Read live from Meta's `pricing_analytics` on the WhatsApp Business Account and scoped to that account's phone number.

Meta's figures are approximate and can lag; Meta bills from its own invoice.

Meta limits how far back and how fine the data goes (for example HALF_HOUR only over short ranges), and answers out-of-range requests with an error.

## 请求规范

* **方法与路径:** GET /apis/v1/social/messaging/whatsapp/pricing-analytics
* **可用状态:** enabled
* **请求 URL 模板:** `https://api.aisa.one/apis/v1/social/messaging/whatsapp/pricing-analytics`
* **connectionId:** query; 必填
* **start:** query; 必填
* **end:** query; 必填
* **granularity:** query; 必填
* **dimensions:** query; 可选
* **metricTypes:** query; 可选
* **pricingTypes:** query; 可选
* **pricingCategories:** query; 可选
* **countryCodes:** query; 可选

[完整 OpenAPI 定义](https://aisa.one/docs/openapi/zh/aisa-messaging.json)

有效请求声明（包括认证和引用的 schema）：

```json theme={null}
{
  "operationId": "get_aisa_messaging_apis_v1_social_messaging_whats_a49313",
  "method": "GET",
  "path": "/apis/v1/social/messaging/whatsapp/pricing-analytics",
  "servers": [
    {
      "url": "https://api.aisa.one"
    }
  ],
  "parameters": [
    {
      "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections.",
      "in": "query",
      "name": "connectionId",
      "required": true,
      "schema": {
        "pattern": "^msc_[0-9A-Za-z]+$",
        "type": "string"
      }
    },
    {
      "description": "Range start, ISO 8601 date or date-time.",
      "in": "query",
      "name": "start",
      "required": true,
      "schema": {
        "format": "date-time",
        "type": "string"
      }
    },
    {
      "description": "Range end, ISO 8601 date or date-time. Must be after start.",
      "in": "query",
      "name": "end",
      "required": true,
      "schema": {
        "format": "date-time",
        "type": "string"
      }
    },
    {
      "description": "Size of each data point. Use DAILY for short or month-to-date ranges.\n\nMeta refuses MONTHLY when the range is too short for a monthly bucket (for example a range that starts at the beginning of the current month and ends today). That is a 400 with `param: granularity` and Meta's reason in `error`.",
      "in": "query",
      "name": "granularity",
      "required": true,
      "schema": {
        "enum": [
          "HALF_HOUR",
          "DAILY",
          "MONTHLY"
        ],
        "type": "string"
      }
    },
    {
      "description": "Comma-separated breakdowns: COUNTRY, PHONE, PRICING_CATEGORY, PRICING_TYPE, TIER. Without it each data point is a total for the interval.",
      "in": "query",
      "name": "dimensions",
      "required": false,
      "schema": {
        "type": "string"
      }
    },
    {
      "description": "Comma-separated: COST, VOLUME. Defaults to both.",
      "in": "query",
      "name": "metricTypes",
      "required": false,
      "schema": {
        "type": "string"
      }
    },
    {
      "description": "Comma-separated filter: REGULAR, FREE_CUSTOMER_SERVICE, FREE_ENTRY_POINT.",
      "in": "query",
      "name": "pricingTypes",
      "required": false,
      "schema": {
        "type": "string"
      }
    },
    {
      "description": "Comma-separated filter of Meta pricing categories, for example MARKETING, MARKETING_LITE, UTILITY, AUTHENTICATION, AUTHENTICATION_INTERNATIONAL, SERVICE, REFERRAL_CONVERSION.",
      "in": "query",
      "name": "pricingCategories",
      "required": false,
      "schema": {
        "type": "string"
      }
    },
    {
      "description": "Comma-separated ISO 3166-1 alpha-2 country codes to filter on.",
      "in": "query",
      "name": "countryCodes",
      "required": false,
      "schema": {
        "type": "string"
      }
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "x-aisa-status": "enabled",
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "scheme": "bearer",
        "type": "http"
      }
    }
  }
}
```

## 费用与请求规则

此操作不另收费。


## OpenAPI

````yaml openapi/zh/aisa-messaging.json GET /apis/v1/social/messaging/whatsapp/pricing-analytics
openapi: 3.1.0
info:
  description: ''
  title: AIsa Messaging
  version: '1'
  x-aisa-capabilities:
    idempotency: Idempotency-Key
    max_price: X-AISA-Max-Price-USD
    quote:
      header: X-AISA-Cost-Mode
      value: quote
  x-aisa-catalogs:
    aisa-messaging:
      description: ''
      title: AIsa Messaging
      x-aisa-capabilities:
        idempotency: Idempotency-Key
        max_price: X-AISA-Max-Price-USD
        quote:
          header: X-AISA-Cost-Mode
          value: quote
      x-aisa-document:
        facts_hash: 3f75dbfba86cc5ac46b20ee9310446322890eeeb034619f5c221a47d6b1064a2
        generator_version: '3'
        protocol_version: '1'
        schema_version: '1'
      x-aisa-plans:
        builder: 1
        display_plan: payg
        payg: 1
        similarweb_payg: 1
        team: 1
        version: e70a0959cd1b93b84ae16dffd7a538273ddb9c1d46277b82823c37ff1b6bc0fb
  x-aisa-configured-paths: []
  x-aisa-document:
    composer_version: '31'
    document_hash: sha256:989b0c03378fa66fa7653d6c34e54850322e6be4bc7d9f0f130ac18a459676eb
    facts_hash: 3f75dbfba86cc5ac46b20ee9310446322890eeeb034619f5c221a47d6b1064a2
    generator_version: '3'
    protocol_version: '1'
    response_pending: []
    schema_version: '1'
  x-aisa-plans:
    builder: 1
    display_plan: payg
    payg: 1
    similarweb_payg: 1
    team: 1
    version: e70a0959cd1b93b84ae16dffd7a538273ddb9c1d46277b82823c37ff1b6bc0fb
  x-aisa-provider: aisa-messaging
servers:
  - url: https://api.aisa.one
security:
  - bearerAuth: []
paths:
  /apis/v1/social/messaging/whatsapp/pricing-analytics:
    get:
      summary: Get pricing analytics
      description: >-
        WhatsApp. Message volume and approximate cost for one connected WhatsApp
        number. Read live from Meta's `pricing_analytics` on the WhatsApp
        Business Account and scoped to that account's phone number.


        Meta's figures are approximate and can lag; Meta bills from its own
        invoice.


        Meta limits how far back and how fine the data goes (for example
        HALF_HOUR only over short ranges), and answers out-of-range requests
        with an error.
      operationId: get_aisa_messaging_apis_v1_social_messaging_whats_a49313
      parameters:
        - description: >-
            Your messaging connection (msc_...), from GET
            /apis/v1/social/messaging/connections.
          in: query
          name: connectionId
          required: true
          schema:
            pattern: ^msc_[0-9A-Za-z]+$
            type: string
        - description: Range start, ISO 8601 date or date-time.
          in: query
          name: start
          required: true
          schema:
            format: date-time
            type: string
        - description: Range end, ISO 8601 date or date-time. Must be after start.
          in: query
          name: end
          required: true
          schema:
            format: date-time
            type: string
        - description: >-
            Size of each data point. Use DAILY for short or month-to-date
            ranges.


            Meta refuses MONTHLY when the range is too short for a monthly
            bucket (for example a range that starts at the beginning of the
            current month and ends today). That is a 400 with `param:
            granularity` and Meta's reason in `error`.
          in: query
          name: granularity
          required: true
          schema:
            enum:
              - HALF_HOUR
              - DAILY
              - MONTHLY
            type: string
        - description: >-
            Comma-separated breakdowns: COUNTRY, PHONE, PRICING_CATEGORY,
            PRICING_TYPE, TIER. Without it each data point is a total for the
            interval.
          in: query
          name: dimensions
          required: false
          schema:
            type: string
        - description: 'Comma-separated: COST, VOLUME. Defaults to both.'
          in: query
          name: metricTypes
          required: false
          schema:
            type: string
        - description: >-
            Comma-separated filter: REGULAR, FREE_CUSTOMER_SERVICE,
            FREE_ENTRY_POINT.
          in: query
          name: pricingTypes
          required: false
          schema:
            type: string
        - description: >-
            Comma-separated filter of Meta pricing categories, for example
            MARKETING, MARKETING_LITE, UTILITY, AUTHENTICATION,
            AUTHENTICATION_INTERNATIONAL, SERVICE, REFERRAL_CONVERSION.
          in: query
          name: pricingCategories
          required: false
          schema:
            type: string
        - description: Comma-separated ISO 3166-1 alpha-2 country codes to filter on.
          in: query
          name: countryCodes
          required: false
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  connectionId:
                    description: >-
                      One of your connections, or null when it is not one of
                      yours.
                    type:
                      - string
                      - 'null'
                  dataPoints:
                    items:
                      properties:
                        cost:
                          description: >-
                            Approximate charge, in the currency of the WABA's
                            payment method.
                          type:
                            - number
                            - 'null'
                        country:
                          description: Set when dimensions includes COUNTRY.
                          type:
                            - string
                            - 'null'
                        end:
                          format: date-time
                          type: string
                        phoneNumber:
                          description: Set when dimensions includes PHONE.
                          type:
                            - string
                            - 'null'
                        pricingCategory:
                          description: Set when dimensions includes PRICING_CATEGORY.
                          type:
                            - string
                            - 'null'
                        pricingType:
                          description: Set when dimensions includes PRICING_TYPE.
                          type:
                            - string
                            - 'null'
                        start:
                          format: date-time
                          type: string
                        tier:
                          description: >-
                            Volume pricing tier. Set when dimensions includes
                            TIER.
                          type:
                            - string
                            - 'null'
                        volume:
                          description: Messages delivered.
                          type:
                            - integer
                            - 'null'
                      required:
                        - start
                        - end
                        - phoneNumber
                        - country
                        - tier
                        - pricingType
                        - pricingCategory
                        - volume
                        - cost
                      type: object
                    type: array
                  end:
                    format: date-time
                    type: string
                  granularity:
                    enum:
                      - HALF_HOUR
                      - DAILY
                      - MONTHLY
                    type: string
                  phoneNumber:
                    description: The number the data is scoped to, digits only.
                    type: string
                  start:
                    format: date-time
                    type: string
                required:
                  - connectionId
                  - phoneNumber
                  - granularity
                  - start
                  - end
                  - dataPoints
                type: object
          description: Success
        default:
          content:
            application/json:
              schema:
                properties:
                  error:
                    properties:
                      code:
                        type:
                          - string
                          - 'null'
                      details:
                        additionalProperties: {}
                        type:
                          - object
                          - 'null'
                      message:
                        type:
                          - string
                          - 'null'
                      param:
                        type:
                          - string
                          - 'null'
                      retryHint:
                        type:
                          - string
                          - 'null'
                      retryable:
                        type:
                          - boolean
                          - 'null'
                      type:
                        type:
                          - string
                          - 'null'
                    type:
                      - object
                      - 'null'
                type: object
          description: Error. The code field is stable; see the error catalog.
components:
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````

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