Mappings
Manage destination and source mappings. List mappings for a destination or source, create mappings from templates, edit field mappings and condition logic, reorder priority, and configure the destination default mapping.
Use this page to list, create, edit, and reorder the mappings on a destination or source.
A mapping binds inbound events to a destination, with optional field-level transforms and a condition tree that gates when the mapping fires. Each parent entity (destination or source) has its mappings sorted by priority; the first matching mapping in priority order is what runs.
Where this fits in the dispatch flow
Mappings run after the allow-list and governance stages:
Configuration changes at any stage take effect once you publish a new version.
An event must pass Allowed Events (matched + the destination listed) and Data Governance (no category gating it) before any mapping fires. A mapping describes how the event is shaped for one destination. By then, the whether has already been decided upstream.
Two ways to create a mapping
POST /rest/v1/mappings accepts two body shapes. Pick one:
- Quick-create:
{ allowedEventId, destinationId }. Binds an existing allowed event to a destination. Returns the mapping with an emptymappings[]; follow up withPATCHto populate field bindings. - From a template:
{ entityId, templateId, mappings?, logic?, isEnabled?, name?, insertAfterIdx? }. Creates a complete mapping in one request. Discover the validtemplateIdandmappings[].propertyvalues withGET /rest/v1/mappings/templates?entityId={destinationOrSourceId}.
Discovery endpoints
These endpoints describe what a mapping can send:
GET /rest/v1/mappings/templates?entityId={id}: every mapping template available for a destination or source, with full property descriptors (property,kind,required, validoptions, suggestedmodificationOptions). TheisDefault: trueentry is the destination's built-in default template.GET /rest/v1/mappings/default-variables: platform-provided dot-paths you can reference in a mappingmapvalue (e.g.visitor.email,event.request_context.ip).GET /rest/v1/mappings/custom-variables: account-specific variables sampled from the last 14 days of events. An empty list means no custom event properties have been seen yet.GET /rest/v1/mappings/modifications: the labelled list of values accepted onmappings[].modification(hashing, casing, URL truncation).
Default mappings
A destination's default mapping is the catch-all that runs when no other mapping on the destination matches. Each destination has at most one. Default mappings cannot carry custom logic, and their mappings[] is always replaced wholesale on write.
GET /rest/v1/default-mappings: every stored default mapping for the account.GET /rest/v1/default-mappings/{destinationId}: the default mapping for one destination. Returns an emptymappings[]when no default has been written yet.PUT /rest/v1/default-mappings/{destinationId}: create or replace the default mapping for a destination.
Renaming an event for one destination
Some destinations let you send an allowed event under a different name without changing the event everywhere else. Check entities[].capabilities.supportsRenamedEvents in GET /rest/v1/destinations/types for the destination's type. A rename applies once the allowed event is enabled for that destination. Preview works either way, so you can check which events a rename affects before enabling the event.
- Preview with
GET /rest/v1/mappings/rename-preview?destinationId={destinationId}&allowedEventId={allowedEventId}. The response reportswillCascade, themapperNameof any existing mapper, and everyaffectedEventNamesentry. - Set the name with
PUT /rest/v1/mappings/rename:
{
"destinationId": "00000000-0000-0000-0000-000000000000",
"allowedEventId": "11111111-1111-1111-1111-111111111111",
"renamedEventName": "Purchase",
"confirmCascade": false
}When willCascade is true, the event shares a mapper with other allowed events and the rename applies to all of them. Review affectedEventNames, then send confirmCascade: true.
Send renamedEventName: null to clear the rename. Clearing deletes the rename mapper, including any other property mappings it carried. Publish a new version to activate either change.
Updating and reordering
PATCH /rest/v1/mappings/{id} is patch-only: only the fields you send are changed. mappings[] is replaced wholesale when sent. Flip isEnabled: false to pause a mapping without other edits.
POST /rest/v1/mappings/reorder reassigns priority for a set of mappings on a single parent entity. Send { uuids: [...] } with the mapping ids in their new order, where index 0 becomes the highest-priority mapping.
Edits don't take effect until you publish a new version. See Versions for the publish flow.
GET/rest/v1/mappings
Ours Privacy API key
In: header
Query Parameters
Maximum number of mappings to return. Defaults to 1000; values below 1 are clamped to 1 and values above 1000 are clamped to 1000. Most accounts can fetch the full list in one request.
Opaque pagination cursor from pagination.nextCursor in the previous response. Do not decode or modify it. Malformed cursors return 400 Bad Request.
Filter mappings by their parent entity id. Must be a destination id or source id.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/rest/v1/mappings?entityId=00000000-0000-0000-0000-000000000000"{ "entities": [ { "id": "string", "name": "string", "updatedAt": "string", "isEnabled": true, "templateName": "string", "templateId": "string", "destinationId": "string", "sourceId": "string", "isDefaultMapping": true, "priority": 0, "mappings": [ { "property": "string", "map": "string", "modification": "CamelCase" } ], "logic": { "AND": [ { "property1": "string", "property2": "string" } ], "OR": [ { "property1": "string", "property2": "string" } ], "NOT": { "property1": "string", "property2": "string" }, "condition": { "property": "string", "operator": "Is", "value": "string" } } } ], "pagination": { "nextCursor": "string", "hasMore": true }}POST/rest/v1/mappings
Ours Privacy API key
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Two body shapes are accepted, distinguished by which keys are sent. Quick-create — { allowedEventId, destinationId }. Template fat-create — { entityId, templateId, mappings?, logic?, isEnabled?, name?, insertAfterIdx? }. Sending neither, both, or an incomplete pair returns 400 with a message telling you which variant to complete.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/rest/v1/mappings" \ -H "Content-Type: application/json" \ -d '{}'{ "id": "string", "name": "string", "updatedAt": "string", "isEnabled": true, "templateName": "string", "templateId": "string", "destinationId": "string", "sourceId": "string", "isDefaultMapping": true, "priority": 0, "mappings": [ { "property": "string", "map": "string", "modification": "CamelCase" } ], "logic": { "AND": [ { "property1": "string", "property2": "string" } ], "OR": [ { "property1": "string", "property2": "string" } ], "NOT": { "property1": "string", "property2": "string" }, "condition": { "property": "string", "operator": "Is", "value": "string" } }}GET/rest/v1/mappings/{id}
Ours Privacy API key
In: header
Path Parameters
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/rest/v1/mappings/string"{ "id": "string", "name": "string", "updatedAt": "string", "isEnabled": true, "templateName": "string", "templateId": "string", "destinationId": "string", "sourceId": "string", "isDefaultMapping": true, "priority": 0, "mappings": [ { "property": "string", "map": "string", "modification": "CamelCase" } ], "logic": { "AND": [ { "property1": "string", "property2": "string" } ], "OR": [ { "property1": "string", "property2": "string" } ], "NOT": { "property1": "string", "property2": "string" }, "condition": { "property": "string", "operator": "Is", "value": "string" } }}PATCH/rest/v1/mappings/{id}
Ours Privacy API key
In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X PATCH "https://example.com/rest/v1/mappings/string" \ -H "Content-Type: application/json" \ -d '{}'{ "id": "string", "name": "string", "updatedAt": "string", "isEnabled": true, "templateName": "string", "templateId": "string", "destinationId": "string", "sourceId": "string", "isDefaultMapping": true, "priority": 0, "mappings": [ { "property": "string", "map": "string", "modification": "CamelCase" } ], "logic": { "AND": [ { "property1": "string", "property2": "string" } ], "OR": [ { "property1": "string", "property2": "string" } ], "NOT": { "property1": "string", "property2": "string" }, "condition": { "property": "string", "operator": "Is", "value": "string" } }}DELETE/rest/v1/mappings/{id}
Ours Privacy API key
In: header
Path Parameters
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X DELETE "https://example.com/rest/v1/mappings/string"truePOST/rest/v1/mappings/reorder
Ours Privacy API key
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Reassign priority for the supplied mappings. The position in uuids becomes the new priority order: index 0 is highest priority.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/rest/v1/mappings/reorder" \ -H "Content-Type: application/json" \ -d '{ "uuids": [ "string" ] }'{ "entities": [ { "id": "string", "name": "string", "updatedAt": "string", "isEnabled": true, "templateName": "string", "templateId": "string", "destinationId": "string", "sourceId": "string", "isDefaultMapping": true, "priority": 0, "mappings": [ { "property": "string", "map": "string", "modification": "CamelCase" } ], "logic": { "AND": [ { "property1": "string", "property2": "string" } ], "OR": [ { "property1": "string", "property2": "string" } ], "NOT": { "property1": "string", "property2": "string" }, "condition": { "property": "string", "operator": "Is", "value": "string" } } } ]}GET/rest/v1/mappings/rename-preview
Ours Privacy API key
In: header
Query Parameters
Destination id. Discover renaming support through GET /rest/v1/destinations/types.
uuidAllowed event id to preview for this destination.
uuidResponse Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/rest/v1/mappings/rename-preview?destinationId=497f6eca-6276-4993-bfeb-53cbbbba6f08&allowedEventId=497f6eca-6276-4993-bfeb-53cbbbba6f08"{ "willCascade": true, "mapperName": "string", "affectedEventNames": [ "string" ]}PUT/rest/v1/mappings/rename
Ours Privacy API key
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X PUT "https://example.com/rest/v1/mappings/rename" \ -H "Content-Type: application/json" \ -d '{ "destinationId": "d0a0ebc7-d6b4-4f3c-a5af-5761a8148e3a", "allowedEventId": "41eea0eb-9b0d-42ba-b882-c9d9fc676ce1", "renamedEventName": "string" }'{ "id": "string", "name": "string", "updatedAt": "string", "isEnabled": true, "templateName": "string", "templateId": "string", "destinationId": "string", "sourceId": "string", "isDefaultMapping": true, "priority": 0, "mappings": [ { "property": "string", "map": "string", "modification": "CamelCase" } ], "logic": { "AND": [ { "property1": "string", "property2": "string" } ], "OR": [ { "property1": "string", "property2": "string" } ], "NOT": { "property1": "string", "property2": "string" }, "condition": { "property": "string", "operator": "Is", "value": "string" } }}GET/rest/v1/mappings/templates
Ours Privacy API key
In: header
Query Parameters
Destination or source id. Required.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/rest/v1/mappings/templates?entityId=00000000-0000-0000-0000-000000000000"{ "entities": [ { "id": "string", "name": "string", "description": "string", "isDefault": true, "mappings": [ { "property": "string", "label": "string", "description": "string", "kind": "Array", "isPII": true, "required": true, "map": "string", "modification": "CamelCase", "modificationOptions": [ "CamelCase" ], "options": [ { "label": "string", "value": "string" } ], "suggestedOptions": [ { "label": "string", "value": "string" } ] } ] } ]}GET/rest/v1/mappings/default-variables
Ours Privacy API key
In: header
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/rest/v1/mappings/default-variables"{ "entities": [ { "path": "string", "name": "string", "examples": [ "string" ], "popularity": 0, "advancedInfo": "string" } ]}GET/rest/v1/mappings/custom-variables
Ours Privacy API key
In: header
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/rest/v1/mappings/custom-variables"{ "entities": [ { "path": "string", "name": "string", "examples": [ "string" ], "popularity": 0, "advancedInfo": "string" } ]}GET/rest/v1/mappings/modifications
Ours Privacy API key
In: header
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/rest/v1/mappings/modifications"{ "entities": [ { "value": "CamelCase", "label": "string", "description": "string" } ]}GET/rest/v1/default-mappings
Ours Privacy API key
In: header
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/rest/v1/default-mappings"{ "entities": [ { "id": "string", "name": "string", "updatedAt": "string", "isEnabled": true, "templateName": "string", "templateId": "string", "destinationId": "string", "sourceId": "string", "isDefaultMapping": true, "priority": 0, "mappings": [ { "property": "string", "map": "string", "modification": "CamelCase" } ], "logic": { "AND": [ { "property1": "string", "property2": "string" } ], "OR": [ { "property1": "string", "property2": "string" } ], "NOT": { "property1": "string", "property2": "string" }, "condition": { "property": "string", "operator": "Is", "value": "string" } } } ]}GET/rest/v1/default-mappings/{id}
Ours Privacy API key
In: header
Path Parameters
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/rest/v1/default-mappings/string"{ "id": "string", "name": "string", "updatedAt": "string", "isEnabled": true, "templateName": "string", "templateId": "string", "destinationId": "string", "sourceId": "string", "isDefaultMapping": true, "priority": 0, "mappings": [ { "property": "string", "map": "string", "modification": "CamelCase" } ], "logic": { "AND": [ { "property1": "string", "property2": "string" } ], "OR": [ { "property1": "string", "property2": "string" } ], "NOT": { "property1": "string", "property2": "string" }, "condition": { "property": "string", "operator": "Is", "value": "string" } }}PUT/rest/v1/default-mappings/{id}
Ours Privacy API key
In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Upsert the default mapping for a destination. Default mappings cannot have custom logic (the resolver rejects it), so the field is intentionally omitted here.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X PUT "https://example.com/rest/v1/default-mappings/string" \ -H "Content-Type: application/json" \ -d '{ "mappings": [ { "property": "string", "map": "string" } ] }'{ "id": "string", "name": "string", "updatedAt": "string", "isEnabled": true, "templateName": "string", "templateId": "string", "destinationId": "string", "sourceId": "string", "isDefaultMapping": true, "priority": 0, "mappings": [ { "property": "string", "map": "string", "modification": "CamelCase" } ], "logic": { "AND": [ { "property1": "string", "property2": "string" } ], "OR": [ { "property1": "string", "property2": "string" } ], "NOT": { "property1": "string", "property2": "string" }, "condition": { "property": "string", "operator": "Is", "value": "string" } }}How is this guide?

