Matomo Privacy Manager API

The PrivacyManager API lets you manage GDPR workflows, anonymization settings, and privacy compliance controls.

Operations 6

GET /index.php?module=API&method=PrivacyManager.deleteDataSubjects #
GET /index.php?module=API&method=PrivacyManager.exportDataSubjects #
GET /index.php?module=API&method=PrivacyManager.findDataSubjects #
GET /index.php?module=API&method=PrivacyManager.anonymizeSomeRawData #
GET /index.php?module=API&method=PrivacyManager.getAvailableVisitColumnsToAnonymize #
GET /index.php?module=API&method=PrivacyManager.getAvailableLinkVisitActionColumnsToAnonymize #

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/matomo-privacymanager-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

matomo-privacymanager-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Matomo Reporting API for plugin Privacy Manager API
  version: 1.0.0
  description: The PrivacyManager API lets you manage GDPR workflows, anonymization settings, and privacy compliance controls.
servers:
- url: https://demo-proxy.innocraft.cloud/
  description: Current Matomo instance
security:
- MatomoToken: []
tags:
- name: PrivacyManager
  description: The PrivacyManager API lets you manage GDPR workflows, anonymization settings, and privacy compliance controls.
paths:
  /index.php?module=API&method=PrivacyManager.deleteDataSubjects:
    get:
      tags:
      - PrivacyManager
      description: Deletes the requested data subjects from the stored visit data.
      operationId: PrivacyManager.deleteDataSubjects
      parameters:
      - $ref: '#/components/parameters/formatOptional'
      - name: visits
        in: query
        description: Data subject visit descriptors to delete. Each entry must contain `idsite` and `idvisit`.
        required: true
        schema:
          type: array
          items:
            type: string
      responses:
        '200':
          description: 'Deletion counts keyed by storage area (e.g. log table or plugin name).


            Example responses require Super User access. Use Try it out to see a live response.'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/ServerError'
        default:
          $ref: '#/components/responses/DefaultError'
  /index.php?module=API&method=PrivacyManager.exportDataSubjects:
    get:
      tags:
      - PrivacyManager
      description: Exports the requested data subjects from the stored visit data.
      operationId: PrivacyManager.exportDataSubjects
      parameters:
      - $ref: '#/components/parameters/formatOptional'
      - name: visits
        in: query
        description: Data subject visit descriptors to export. Each entry must contain `idsite` and `idvisit`.
        required: true
        schema:
          type: array
          items:
            type: string
      responses:
        '200':
          description: 'Export payload grouped by log table name, each containing an array of row data.


            Example responses require Super User access. Use Try it out to see a live response.'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/ServerError'
        default:
          $ref: '#/components/responses/DefaultError'
  /index.php?module=API&method=PrivacyManager.findDataSubjects:
    get:
      tags:
      - PrivacyManager
      description: Finds data subjects matching a segment across the requested websites. Only returns results for sites that have visitor logs or profiles enabled. Returns at most 401 matching visits.
      operationId: PrivacyManager.findDataSubjects
      parameters:
      - $ref: '#/components/parameters/formatOptional'
      - name: idSite
        in: query
        description: Website ID(s) to query. Accepts comma-separated IDs, "all", numeric IDs as strings, or ["all"].
        required: true
        schema:
          oneOf:
          - type: integer
            example: 1
          - type: string
            example: '1'
          - type: array
            items:
              type: integer
            example: 1
      - name: segment
        in: query
        description: 'Segment expression identifying the data subjects to find. Example: "referrerName==example.com" Supports AND (;) and OR (,) operators.'
        required: true
        schema:
          type: string
          example: countryCode==NZ
      responses:
        '200':
          description: 'Matching visitor details with a reduced column set (identity, device, location, and browser info). Returns an empty array when no sites qualify.


            Example responses require Super User access. Use Try it out to see a live response.'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/ServerError'
        default:
          $ref: '#/components/responses/DefaultError'
  /index.php?module=API&method=PrivacyManager.anonymizeSomeRawData:
    get:
      tags:
      - PrivacyManager
      description: Schedules anonymization of selected raw visit data. The anonymization is queued and processed asynchronously by a scheduled task.
      operationId: PrivacyManager.anonymizeSomeRawData
      parameters:
      - $ref: '#/components/parameters/formatOptional'
      - name: idSites
        in: query
        description: Website ID(s) to anonymize. - Single site ID (e.g. 1) - Multiple site IDs (e.g. [1, 4, 5]) - Comma-separated list ("1,4,5") An empty value or "all" schedules anonymization for all websites.
        required: true
        schema:
          oneOf:
          - type: integer
          - type: string
          - type: array
            items:
              type: integer
        example: '[1,2]'
      - name: date
        in: query
        description: Date or date range to anonymize. 'YYYY-MM-DD', magic keywords (today, yesterday, lastWeek, lastMonth, lastYear), or date range (ie, 'YYYY-MM-DD,YYYY-MM-DD', lastX, previousX).
        required: true
        schema:
          type: string
          example: yesterday
      - name: anonymizeIp
        in: query
        description: '`true` to anonymize visitor IP addresses.'
        required: false
        schema:
          type: boolean
          default: false
      - name: anonymizeLocation
        in: query
        description: '`true` to anonymize stored location data.'
        required: false
        schema:
          type: boolean
          default: false
      - name: anonymizeUserId
        in: query
        description: '`true` to anonymize stored user IDs.'
        required: false
        schema:
          type: boolean
          default: false
      - name: unsetVisitColumns
        in: query
        description: Visit column names to clear during anonymization.
        required: false
        schema:
          type: array
          items:
            type: string
          default: []
      - name: unsetLinkVisitActionColumns
        in: query
        description: Link-visit-action column names to clear during anonymization.
        required: false
        schema:
          type: array
          items:
            type: string
          default: []
      - name: passwordConfirmation
        in: query
        description: Current user password confirmation.
        required: false
        schema:
          type: string
          default: ''
      responses:
        '200':
          $ref: '#/components/responses/GenericSuccess'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/ServerError'
        default:
          $ref: '#/components/responses/DefaultError'
  /index.php?module=API&method=PrivacyManager.getAvailableVisitColumnsToAnonymize:
    get:
      tags:
      - PrivacyManager
      description: Returns visit-log columns that can be anonymized manually.
      operationId: PrivacyManager.getAvailableVisitColumnsToAnonymize
      parameters:
      - $ref: '#/components/parameters/formatOptional'
      responses:
        '200':
          description: 'Available visit columns and their default replacement values.


            Example responses require Super User access. Use Try it out to see a live response.'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/ServerError'
        default:
          $ref: '#/components/responses/DefaultError'
  /index.php?module=API&method=PrivacyManager.getAvailableLinkVisitActionColumnsToAnonymize:
    get:
      tags:
      - PrivacyManager
      description: Returns link-visit-action columns that can be anonymized manually.
      operationId: PrivacyManager.getAvailableLinkVisitActionColumnsToAnonymize
      parameters:
      - $ref: '#/components/parameters/formatOptional'
      responses:
        '200':
          description: 'Available link-visit-action columns and their default replacement values.


            Example responses require Super User access. Use Try it out to see a live response.'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/ServerError'
        default:
          $ref: '#/components/responses/DefaultError'
components:
  schemas:
    GenericSuccessXml:
      description: Generic Matomo success payload in XML.
      required:
      - success
      properties:
        success:
          properties:
            message:
              type: string
              xml:
                attribute: true
              example: ok
          type: object
          xml:
            name: success
      type: object
      xml:
        name: result
      example:
        success:
          message: ok
      additionalProperties: true
    GenericSuccess:
      description: Generic Matomo success payload.
      required:
      - result
      - message
      properties:
        result:
          type: string
          example: success
        message:
          type: string
          example: ok
        code:
          type: integer
          example: '200'
      type: object
      example:
        result: success
        message: ok
      additionalProperties: true
    ErrorXml:
      description: Generic Matomo error payload in XML.
      properties:
        error:
          properties:
            message:
              type: string
              xml:
                attribute: true
              example: There was an error
          type: object
          xml:
            name: error
      type: object
      xml:
        name: result
    Error:
      description: Generic Matomo error payload.
      required:
      - result
      - message
      properties:
        result:
          type: string
          example: error
        message:
          type: string
          example: There was an error
        code:
          type: integer
      type: object
      additionalProperties: true
  responses:
    NotFound:
      description: Resource not found.
      content:
        text/plain:
          schema:
            type: string
          example: 'Error: The method is not available.'
        text/html:
          schema:
            type: string
          example: The method is not available.
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
        application/xml:
          schema:
            $ref: '#/components/schemas/ErrorXml'
    ServerError:
      description: Unexpected server error.
      content:
        text/plain:
          schema:
            type: string
          example: 'Error: There was an error.'
        text/html:
          schema:
            type: string
          example: There was an error.
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
        application/xml:
          schema:
            $ref: '#/components/schemas/ErrorXml'
    Unauthorized:
      description: Authentication failed or missing token.
      content:
        text/plain:
          schema:
            type: string
          example: 'Error: You must be logged in to access this functionality.'
        text/html:
          schema:
            type: string
          example: You must be logged in to access this functionality.
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
        application/xml:
          schema:
            $ref: '#/components/schemas/ErrorXml'
    Forbidden:
      description: Authenticated but not allowed to access the resource.
      content:
        text/plain:
          schema:
            type: string
          example: 'Error: Not authorised.'
        text/html:
          schema:
            type: string
          example: Not authorised.
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
        application/xml:
          schema:
            $ref: '#/components/schemas/ErrorXml'
    DefaultError:
      description: Default error response (any non-2xx).
      content:
        text/plain:
          schema:
            type: string
          example: 'Error: There was an error.'
        text/html:
          schema:
            type: string
          example: There was an error.
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
        application/xml:
          schema:
            $ref: '#/components/schemas/ErrorXml'
    GenericSuccess:
      description: Generic 200 response
      content:
        text/plain:
          schema:
            type: string
          example: Success:ok
        text/html:
          schema:
            type: string
          example: '<!-- Success: ok -->'
        application/json:
          schema:
            $ref: '#/components/schemas/GenericSuccess'
        application/xml:
          schema:
            $ref: '#/components/schemas/GenericSuccessXml'
    BadRequest:
      description: Bad request (validation or missing parameters).
      content:
        text/plain:
          schema:
            type: string
          example: 'Error: There was an error.'
        text/html:
          schema:
            type: string
          example: There was an error.
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
        application/xml:
          schema:
            $ref: '#/components/schemas/ErrorXml'
  parameters:
    formatOptional:
      name: format
      in: query
      description: Response format. Defaults to `xml`. Use `original` to get the original PHP data structure.
      required: false
      schema:
        type: string
        default: xml
        enum:
        - xml
        - json
        - csv
        - tsv
        - html
        - rss
        - original
  securitySchemes:
    MatomoToken:
      type: http
      description: Paste your token generated from Personal > Security. Swagger will send it as a Bearer token.
      scheme: bearer
externalDocs:
  description: Matomo Reporting API developer page
  url: https://developer.matomo.org/api-reference/reporting-api/