---
title: "Set mapping"
method: PUT
path: "/api/mappings"
tags: ["Mappings"]
---

# Set mapping

`PUT /api/mappings`

## Request

- Base URL: `https://dregs.com`
- URL: `https://dregs.com/api/mappings`
- Auth: HTTP bearer

Create or update a mapping at the given scope. Uniqueness is on (scope, kind, source).

## Query parameters

- `scope` 'global' | 'customer', required

## Request body

- V1SetMappingRequest
  - `kind` 'IDENTITY_FIELD' | 'EVENT_TYPE'
  - `source` string
  - `target` string
  - `description` string

## Response `200`

Mapping saved

## Other responses

- `400`: Target is not a valid canonical value for the given kind

---

[API](https://skmtc.dev/dregs/apis/dregs-api.md) · [All operations](https://skmtc.dev/dregs/apis/dregs-api/llms.txt) · [OpenAPI document](https://skmtc.dev/dregs/apis/dregs-api/revisions/ea71f8c1eed4?raw)
