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

# Export frozen monthly statements

> Export the MCP monthly statements read with basis_note: frozen totals per month, newest first. An account-bound key sees Meta's lines only for its account.



## OpenAPI

````yaml https://plainrouter.com/openapi.json get /workspaces/{workspace}/admin/monthly-statements
openapi: 3.1.0
info:
  title: Plainrouter Conversion API
  version: 0.5.0
  description: Plainrouter public Signals Conversion API.
servers:
  - url: https://plainrouter.com/api/v1
    description: Production
security:
  - workspaceSecret: []
paths:
  /workspaces/{workspace}/admin/monthly-statements:
    get:
      tags:
        - SignalsExport
      summary: Export frozen monthly statements
      description: >-
        Export the MCP monthly statements read with basis_note: frozen totals
        per month, newest first. An account-bound key sees Meta's lines only for
        its account.
      operationId: get_monthly_statements
      parameters:
        - name: workspace
          in: path
          required: true
          description: The workspace ID
          schema:
            type: integer
        - name: from
          in: query
          description: First month to return, as YYYY-MM.
          schema:
            type:
              - string
              - 'null'
            pattern: ^\d{4}-\d{2}$
        - name: to
          in: query
          description: Last month to return, as YYYY-MM.
          schema:
            type:
              - string
              - 'null'
            pattern: ^\d{4}-\d{2}$
        - name: limit
          in: query
          description: Maximum statements to return, newest first.
          schema:
            type: integer
            default: 12
            minimum: 1
            maximum: 24
      responses:
        '200':
          description: The same public read as the MCP tool, including basis_note.
          content:
            application/json:
              schema:
                type: object
                properties:
                  basis_note:
                    type: string
                    description: >-
                      Explains the different counting bases; returned verbatim
                      from the MCP read.
                  note:
                    type: string
                  statements:
                    type: array
                    items:
                      type: object
                      properties:
                        month:
                          type: string
                        version:
                          type: integer
                        timezone:
                          type: string
                        frozen_at:
                          type: string
                        definition_version:
                          type: string
                        conversion_events:
                          type: array
                          items:
                            type: string
                        counted:
                          type: object
                          properties:
                            arrivals:
                              type: integer
                            conversions:
                              type: integer
                            journeys:
                              type: object
                              properties:
                                model:
                                  type: string
                                lookback_days:
                                  type: integer
                                kinds:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      kind:
                                        type: string
                                      conversions:
                                        type: integer
                                      unattributed:
                                        type: integer
                                      channels:
                                        type: array
                                        items:
                                          type: object
                                          properties:
                                            channel:
                                              type: string
                                            appeared_in:
                                              type: integer
                                            earned:
                                              type: string
                                            earned_value:
                                              type: array
                                              items:
                                                type: object
                                                properties:
                                                  currency:
                                                    type:
                                                      - string
                                                      - 'null'
                                                  amount:
                                                    type: string
                                                required:
                                                  - currency
                                                  - amount
                                          required:
                                            - channel
                                            - appeared_in
                                            - earned
                                            - earned_value
                                    required:
                                      - kind
                                      - conversions
                                      - unattributed
                                      - channels
                              required:
                                - model
                                - lookback_days
                                - kinds
                          required:
                            - arrivals
                            - conversions
                            - journeys
                        meta:
                          type:
                            - object
                            - 'null'
                          properties:
                            spend:
                              type: array
                              items:
                                type: object
                                properties:
                                  currency:
                                    type:
                                      - string
                                      - 'null'
                                  amount:
                                    type: string
                                required:
                                  - currency
                                  - amount
                            impressions:
                              type: integer
                            clicks:
                              type: integer
                            inline_link_clicks:
                              type: integer
                            purchases:
                              type: string
                            purchase_value:
                              type: array
                              items:
                                type: object
                                properties:
                                  currency:
                                    type:
                                      - string
                                      - 'null'
                                  amount:
                                    type: string
                                required:
                                  - currency
                                  - amount
                            days_with_figures:
                              type: integer
                            revisions:
                              type: object
                              properties:
                                count:
                                  type: integer
                              required:
                                - count
                            changes_by_source:
                              type: array
                              items:
                                type: object
                                properties:
                                  source:
                                    type: string
                                  changes:
                                    type: integer
                                required:
                                  - source
                                  - changes
                          required:
                            - spend
                            - impressions
                            - clicks
                            - inline_link_clicks
                            - purchases
                            - purchase_value
                            - days_with_figures
                            - revisions
                            - changes_by_source
                        meta_note:
                          type:
                            - string
                            - 'null'
                        meta_blanked_at:
                          type:
                            - string
                            - 'null'
                        meta_blanked_reason:
                          type:
                            - string
                            - 'null'
                        coverage:
                          type: object
                          properties:
                            kept_from:
                              type: string
                            timezone:
                              type: string
                            record_starts:
                              type: object
                              properties:
                                counted:
                                  type: object
                                  properties:
                                    date:
                                      type:
                                        - string
                                        - 'null'
                                    reason:
                                      type:
                                        - string
                                        - 'null'
                                  required:
                                    - date
                                    - reason
                                meta_spend:
                                  type: object
                                  properties:
                                    date:
                                      type:
                                        - string
                                        - 'null'
                                    reason:
                                      type:
                                        - string
                                        - 'null'
                                  required:
                                    - date
                                    - reason
                                meta_changes:
                                  type: object
                                  properties:
                                    date:
                                      type:
                                        - string
                                        - 'null'
                                    reason:
                                      type:
                                        - string
                                        - 'null'
                                  required:
                                    - date
                                    - reason
                                revenue:
                                  type:
                                    - object
                                    - 'null'
                                  properties:
                                    date:
                                      type:
                                        - string
                                        - 'null'
                                    reason:
                                      type:
                                        - string
                                        - 'null'
                                  required:
                                    - date
                                    - reason
                              required:
                                - counted
                                - meta_spend
                                - meta_changes
                                - revenue
                            meta:
                              type:
                                - object
                                - 'null'
                              properties:
                                account_id:
                                  type: integer
                                other_account_ids:
                                  type: array
                                  items:
                                    type: integer
                                note:
                                  type: string
                                revisable:
                                  type: object
                                  properties:
                                    from:
                                      type: string
                                    to:
                                      type: string
                                  required:
                                    - from
                                    - to
                                unread_days:
                                  type: object
                                  properties:
                                    dates:
                                      type: array
                                      items:
                                        type: string
                                    count:
                                      type: integer
                                    capped:
                                      type: boolean
                                  required:
                                    - dates
                                    - count
                                    - capped
                                activity:
                                  type:
                                    - object
                                    - 'null'
                                  properties:
                                    last_error_code:
                                      type:
                                        - string
                                        - 'null'
                                    gap_window:
                                      type:
                                        - object
                                        - 'null'
                                      properties:
                                        from:
                                          type: string
                                        to:
                                          type: string
                                      required:
                                        - from
                                        - to
                                  required:
                                    - last_error_code
                                    - gap_window
                                untagged_spend:
                                  type: object
                                  properties:
                                    basis_points:
                                      type:
                                        - integer
                                        - 'null'
                                    reason:
                                      type:
                                        - string
                                        - 'null'
                                    window:
                                      type: object
                                      properties:
                                        from:
                                          type: string
                                        to:
                                          type: string
                                        timezone:
                                          type: string
                                      required:
                                        - from
                                        - to
                                        - timezone
                                    note:
                                      type: string
                                  required:
                                    - basis_points
                                    - reason
                                    - window
                                    - note
                              required:
                                - account_id
                                - other_account_ids
                                - note
                                - revisable
                                - unread_days
                                - activity
                                - untagged_spend
                            meta_reason:
                              type:
                                - string
                                - 'null'
                            not_recorded:
                              type: array
                              items:
                                type: string
                            note:
                              type: string
                            counted_record:
                              type: object
                              properties:
                                started_at:
                                  type:
                                    - string
                                    - 'null'
                                covers:
                                  type: string
                                note:
                                  type: string
                              required:
                                - started_at
                                - covers
                                - note
                          required:
                            - kept_from
                            - timezone
                            - record_starts
                            - meta
                            - meta_reason
                            - not_recorded
                            - note
                            - counted_record
                        counted_hash:
                          type: string
                        meta_hash:
                          type:
                            - string
                            - 'null'
                      required:
                        - month
                        - version
                        - timezone
                        - frozen_at
                        - definition_version
                        - conversion_events
                        - counted
                        - meta
                        - meta_note
                        - meta_blanked_at
                        - meta_blanked_reason
                        - coverage
                        - counted_hash
                        - meta_hash
                    maxItems: 24
                  has_more:
                    type: boolean
                required:
                  - basis_note
                  - note
                  - statements
                  - has_more
        '401':
          description: >-
            Workspace read key missing, revoked, expired or no longer valid for
            its issuer.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        '403':
          description: >-
            The key lacks the operation scope, ability or current workspace
            role.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        '404':
          description: Workspace or account not found or outside the key binding.
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/ErrorMessage'
                  - $ref: '#/components/schemas/ApiRouteNotFound'
        '422':
          description: Invalid input or journey continuation cursor.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
      security:
        - workspaceExportKey: []
components:
  schemas:
    ErrorMessage:
      type: object
      properties:
        message:
          type: string
      required:
        - message
      title: ErrorMessage
    ApiRouteNotFound:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              enum:
                - api_route_not_found
            message:
              type: string
            resolution:
              type: string
          required:
            - code
            - message
            - resolution
        request:
          type: object
          properties:
            method:
              type: string
            path:
              type: string
          required:
            - method
            - path
        resources:
          type: object
          properties:
            documentation:
              type: string
            openapi:
              type: string
          required:
            - documentation
            - openapi
      required:
        - error
        - request
        - resources
      title: ApiRouteNotFound
    ValidationError:
      type: object
      properties:
        message:
          type: string
        errors:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
      required:
        - message
        - errors
      title: ValidationError
  securitySchemes:
    workspaceSecret:
      type: http
      description: >-
        Per-workspace Server secret. It authenticates only the Signals workspace
        represented by the credential.
      scheme: bearer
    workspaceExportKey:
      type: http
      description: >-
        Workspace read key whose stored grant explicitly names the operation.
        Existing grants are not expanded. A Reporting key reads only arrivals,
        CAC by channel and monthly statements here.
      scheme: bearer

````

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