Dregs Mappings API

Manage mappings from customer-supplied names to canonical fields and event types

Operations 4

GET /api/mappings List mappings #
PUT /api/mappings Set mapping #
GET /api/mappings/discovery Discovery payload for the Settings → Mappings UI #
DELETE /api/mappings/{id} Delete mapping #

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/dregs-com:dregs-com-mappings-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

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

dregs-com-mappings-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Dregs Mappings API
  description: 'Customer REST API for sending events and reading fraud scores, identities, devices, escalations, channels, datasets, and mappings.


    Authenticate with a secret key created in the dashboard under Settings > Credentials (security scheme secretKey). Send it as a Bearer token: Authorization: Bearer sk_... The key acts as an admin of that credential''s team. POST /api/events and GET /api/devices/{fingerprint} also accept the credential''s public key (security scheme publicKey, Bearer pk_...). Public keys may be embedded in a browser. Secret keys must not.


    This document is the curated public surface. Dashboard sign-in, billing, team administration, and trainer tools are not included.'
  version: '1.0'
servers:
- url: https://dregs.com
  description: Dregs API
security:
- secretKey: []
tags:
- name: Mappings
  description: Manage mappings from customer-supplied names to canonical fields and event types
paths:
  /api/mappings:
    get:
      tags:
      - Mappings
      summary: List mappings
      description: List mappings for one kind at the given scope. Customer scope is the team's own mappings. Global scope is the shared defaults.
      operationId: listMappings
      parameters:
      - name: scope
        in: query
        required: true
        schema:
          type: string
          enum:
          - global
          - customer
      - name: kind
        in: query
        required: true
        schema:
          type: string
          enum:
          - IDENTITY_FIELD
          - EVENT_TYPE
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/V1Mapping'
      security:
      - secretKey: []
    put:
      tags:
      - Mappings
      summary: Set mapping
      description: Create or update a mapping at the given scope. Uniqueness is on (scope, kind, source).
      operationId: setMapping
      parameters:
      - name: scope
        in: query
        required: true
        schema:
          type: string
          enum:
          - global
          - customer
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/V1SetMappingRequest'
        required: true
      responses:
        '200':
          description: Mapping saved
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/V1Mapping'
        '400':
          description: Target is not a valid canonical value for the given kind
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/V1Mapping'
      security:
      - secretKey: []
  /api/mappings/discovery:
    get:
      tags:
      - Mappings
      summary: Discovery payload for the Settings → Mappings UI
      description: Returns, per mapping kind, one row per customer source — the union of sources we've seen in the customer's ingested data and sources the customer has already mapped. Each row carries the current customer mapping (if any) and a recommended canonical (if a global mapping matches the source by exact or variant rule).
      operationId: getMappingDiscovery
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/V1Discovery'
      security:
      - secretKey: []
  /api/mappings/{id}:
    delete:
      tags:
      - Mappings
      summary: Delete mapping
      description: Delete a mapping. Requires the admin role. Deleting a customer mapping makes that source fall back to the global default.
      operationId: deleteMapping
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: integer
          format: int64
      - name: scope
        in: query
        required: true
        schema:
          type: string
          enum:
          - global
          - customer
      responses:
        '204':
          description: Mapping deleted
        '404':
          description: Mapping not found
      security:
      - secretKey: []
components:
  schemas:
    V1Discovery:
      type: object
      properties:
        kinds:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/V1KindDiscovery'
    V1SourceRow:
      type: object
      properties:
        source:
          type: string
        seen:
          type: boolean
        seenCount:
          type: integer
          format: int64
        mappingId:
          type: integer
          format: int64
        canonical:
          type: string
        description:
          type: string
        recommendation:
          type: string
    V1CanonicalDescriptor:
      type: object
      properties:
        value:
          type: string
        label:
          type: string
        description:
          type: string
    V1KindDiscovery:
      type: object
      properties:
        sources:
          type: array
          items:
            $ref: '#/components/schemas/V1SourceRow'
        canonicals:
          type: array
          items:
            $ref: '#/components/schemas/V1CanonicalDescriptor'
    V1SetMappingRequest:
      type: object
      properties:
        kind:
          type: string
          enum:
          - IDENTITY_FIELD
          - EVENT_TYPE
        source:
          type: string
        target:
          type: string
        description:
          type: string
    V1Mapping:
      type: object
      properties:
        id:
          type: integer
          format: int64
        scope:
          type: string
          enum:
          - global
          - customer
        kind:
          type: string
          enum:
          - IDENTITY_FIELD
          - EVENT_TYPE
        source:
          type: string
        target:
          type: string
        description:
          type: string
  securitySchemes:
    secretKey:
      type: http
      description: Customer secret key from Settings > Credentials, sent as a Bearer token. The token value starts with sk_. It acts as an admin of that credential's team for every operation in this document. MCP tokens (dmcp_) are refused. Prefer the publicKey scheme on operations that accept a pk_ key.
      scheme: bearer
      bearerFormat: sk_
    publicKey:
      type: http
      description: Customer public key from Settings > Credentials, sent as a Bearer token. The token value starts with pk_. Accepted only by POST /api/events and GET /api/devices/{fingerprint}. It may be embedded in a browser. It cannot call the other operations in this document.
      scheme: bearer
      bearerFormat: pk_