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

# Custom enrichments

> Custom enrichments let you push external context about mentions into PeakMetrics,
attached to individual mentions and used alongside all other mention metadata
across the platform. Once written, enrichment values feed into narrative analysis,
workspace summaries, and notifications, and are available through the customer
API and the MCP server.

This endpoint returns all custom enrichments provisioned for your team. Each
custom enrichment includes its `enrichment_id` (used when pushing values), display
`name`, `type`, and a `constraints` object.

If your team has no custom enrichments yet, an empty array is returned. Create one
with `POST /customEnrichments`.




## OpenAPI

````yaml /api/api_docs.yaml get /customEnrichments
openapi: 3.1.0
info:
  title: PeakMetrics API
  description: >
    The PeakMetrics API provides programmatic access to narrative intelligence
    data.


    Access millions of mentions across news, social media, and online platforms,
    enriched with custom AI-powered

    smart categories and over 50 metadata properties. The API enables you to

    identify, analyze, and act on emerging narratives in real-time.
  version: 2.0.0
servers:
  - url: https://api.peakmetrics.com
    description: Main (production) server
security:
  - BearerAuth: []
tags:
  - name: Authorization
  - name: Workspaces
  - name: Explore
    description: >
      Run an ad-hoc [Explore](/help/get-started-with-peakmetrics/explore) query
      without creating a workspace, and get back Volume Over Time (`POST
      /explore/analytics/timeline`) or a Channel, Language, or Domain
      distribution (`POST /explore/analytics/distribution`).


      Both endpoints use the same Bearer JWT authentication as the rest of the
      API and take their parameters as a JSON body.


      ### Rate limits and quota


      - **5 queries per user per minute**, shared across both Explore endpoints.
      The minute is a fixed window of 60 seconds from the first request in the
      window. Exceeding it returns a `429` with `error: "rate_limited"` and
      `retryAfterSeconds`.

      - **1,000 queries per user per endpoint per month.** Each endpoint has its
      own monthly allowance, which resets at the start of each calendar month
      (UTC). Exceeding it returns a `429` with `error: "quota_exceeded"` and
      `retryAfterSeconds` set to the time until the reset.


      Every request counts toward the per-minute limit; only successful (`200`)
      requests count toward the monthly quota.


      Both limits are shared with the Explore tools in the [PeakMetrics MCP
      server](/mcp/capabilities), so queries your AI assistant runs there count
      toward the same totals.
  - name: Folders
  - name: Channels
  - name: Locations
    description: >
      PeakMetrics resolves a normalized location on mentions across every
      channel, using a

      six-level taxonomy: `region`, `subregion`, `country`, `state`, `county`,
      and `city`.

      `state` and `county` are United States only.


      Look locations up with `GET /locations`, read a mention's resolved
      location from the

      `location` object on `GET /workspaces/{workspaceId}/mentions`, filter the
      mentions,

      timeline, or distribution endpoints with the `locations.<level>`
      parameters, and

      break counts down with the matching `locations.<level>` `group_by` values.
  - name: Custom Channels
  - name: Custom Enrichments
    description: >
      Custom enrichments let you push external context about mentions into
      PeakMetrics,

      attached to individual mentions and used alongside all other mention
      metadata across

      the platform. Once written, enrichment values feed into narrative
      analysis, workspace

      summaries, and notifications, and are available through the customer API
      and the MCP

      server.


      Your team manages its own custom enrichments through the API: create one
      with

      `POST /customEnrichments`, list them with `GET /customEnrichments`, rename
      one or

      replace its option list with `PUT /customEnrichments/{enrichmentId}`,
      retire one with

      `DELETE /customEnrichments/{enrichmentId}`, and push values for individual
      mentions

      with `PUT /mentions/customEnrichments`.
paths:
  /customEnrichments:
    get:
      tags:
        - Custom Enrichments
      summary: Custom enrichments
      description: >
        Custom enrichments let you push external context about mentions into
        PeakMetrics,

        attached to individual mentions and used alongside all other mention
        metadata

        across the platform. Once written, enrichment values feed into narrative
        analysis,

        workspace summaries, and notifications, and are available through the
        customer

        API and the MCP server.


        This endpoint returns all custom enrichments provisioned for your team.
        Each

        custom enrichment includes its `enrichment_id` (used when pushing
        values), display

        `name`, `type`, and a `constraints` object.


        If your team has no custom enrichments yet, an empty array is returned.
        Create one

        with `POST /customEnrichments`.
      responses:
        '200':
          description: A JSON array of custom enrichment definitions
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    enrichment_id:
                      type: integer
                      description: >-
                        The unique identifier for the custom enrichment. Use
                        this value as `enrichment_id` when pushing values via
                        `PUT /mentions/customEnrichments`.
                      example: 1681
                    name:
                      type: string
                      description: The human-readable name of the custom enrichment.
                      example: Disinformation Analysis
                    type:
                      type: string
                      enum:
                        - categorical
                        - multivalue_categorical
                        - integer
                      description: >
                        The data type of the enrichment's `value`.


                        - `categorical` — a single string value per mention.
                        `constraints.enum`
                          lists categories seen so far, but any string is accepted (new
                          categories are auto-registered up to 5000 per enrichment).
                        - `multivalue_categorical` — several string values per
                        mention on one
                          field. Same open-ended option set as `categorical` (new categories
                          auto-register, same 5000 cap), except the `PUT` value is an **array**
                          of strings rather than a single string, and the array fully replaces
                          the mention's values for the field (see Replace semantics).
                        - `integer` — values are integers. `constraints.enum` is
                        always `[]`.
                          Integer enrichments cannot be used in filters or aggregations.
                      example: categorical
                    constraints:
                      type: object
                      description: |
                        Type-specific constraints on the enrichment's value.
                      properties:
                        enum:
                          type: array
                          description: >
                            For `categorical` and `multivalue_categorical`
                            enrichments, the

                            list of category values recorded so far. For
                            `integer`

                            enrichments, always an empty array `[]`.
                          items:
                            type: string
                          example:
                            - Uncorroborated
                            - Substantiated
                            - Mixed
              examples:
                categorical:
                  summary: A categorical custom enrichment
                  value:
                    - enrichment_id: 1681
                      name: Disinformation Analysis
                      type: categorical
                      constraints:
                        enum:
                          - Uncorroborated
                          - Substantiated
                          - Mixed
                multivalue:
                  summary: A multi-value categorical custom enrichment
                  value:
                    - enrichment_id: 4821
                      name: Themes
                      type: multivalue_categorical
                      constraints:
                        enum:
                          - Pricing
                          - Support
                          - Reliability
                integer:
                  summary: An integer custom enrichment
                  value:
                    - enrichment_id: 3019
                      name: Relevance Score
                      type: integer
                      constraints:
                        enum: []
                mixed:
                  summary: Categorical and integer enrichments together
                  value:
                    - enrichment_id: 1681
                      name: Disinformation Analysis
                      type: categorical
                      constraints:
                        enum:
                          - Uncorroborated
                          - Substantiated
                          - Mixed
                    - enrichment_id: 3019
                      name: Relevance Score
                      type: integer
                      constraints:
                        enum: []
        '401':
          description: Missing or invalid access token.
      security:
        - BearerAuth: []
components:
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````

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