---
title: "Create a Data Mapping"
method: POST
path: "/v1/ControlPlane/Stores/{storeId}/DataMappings"
tags: ["DataMapping"]
---

# Create a Data Mapping

`POST /v1/ControlPlane/Stores/{storeId}/DataMappings`

Create a new data mapping to connect an external data source to this Memory Store.
For `DATASET_CLOUDAPP` and `DATASET_WAREHOUSE` types, validates that all mapped Trait Groups and traits exist
and that dataset field data types match their respective mapped trait data types.

## Request body

- CreateDataMappingInput — A data mapping connects external data sources to a Memory Store, enabling automatic ingestion and mapping of data to profile traits.
  - `displayName` string, required — Name of the data mapping.
  - `description` string — A human readable description of this resource, up to 512 characters.
  - `isEnabled` boolean — Flag indicating whether the data mapping is active. When true, data will be ingested and mapped according to the configuration. When false, the data mapping will be inactive and no data will be ingested into the Memory Store.
  - `mappingTo` DataMappingToTypes, required — Configuration for mapping data to traits in a Memory Store.
    - `type` 'TRAITS', required — The destination data type, which determines where to write the data and the required configuration parameters.
    - `mappings` MappingTraitItem[], required — The list of field to trait mappings.
      - `expression` string, required — The expression identifying the field/column in the source.
      - `traitGroup` string, required — The name of the Trait Group to map to.
      - `traitName` string, required — The name of the trait within the Trait Group to map to.
  - `mappingFrom` union, required — Details of where to map data items from. Each data mapping from type has its own set of configuration parameters and source specific properties.
    - object — Configuration for mapping from ingress column names provided directly in the request.
      - `type` 'INGRESS', required — The source data type, which determines the source of the data and the required configuration parameters.
      - `columns` string[], required — The list of ingress column names that serve as the source fields.
    - object — Configuration for mapping from a TDI dataset backed by a cloud app (CRM) source.
      - `type` 'DATASET_CLOUDAPP', required — The source data type, which determines the source of the data and the required configuration parameters.
      - `datasetId` string, required — The unique identifier of the TDI dataset to connect.
    - object — Configuration for mapping from a TDI dataset backed by a warehouse source.
      - `type` 'DATASET_WAREHOUSE', required — The source data type, which determines the source of the data and the required configuration parameters.
      - `datasetId` string, required — The unique identifier of the TDI dataset to connect.

## Response `202`

Data mapping creation request accepted.

- object
  - `message` string
  - `statusUrl` string — URI to check operation status.

## Other responses

- `400` — Bad Request
- `404` — Not Found
- `409` — Conflict
- `429` — This error indicates that you have sent too many requests to the API. You should retry according to the `Retry-After` response header.
- `500` — Internal Server Error
- `503` — Service Unavailable

## Changes

> 8 revisions in range; 1 not diffed.

- **2026-08-25** (v1) `49499262215f` — 1 breaking, 1 info
  - removed `#/components/schemas/DataMappingFromCSV, #/components/schemas/DataMappingFromDataSet` from the `mappingFrom` request property `oneOf` list
  - removed `CSV, DATASET` discriminator mapping keys from the `mappingFrom` request property
- **2026-08-13** (v1) `5fb6167593e7` — 2 info
  - added `INGRESS, DATASET_CLOUDAPP, DATASET_WAREHOUSE` discriminator mapping keys to the `mappingFrom` request property
  - added `#/components/schemas/DataMappingFromIngress, #/components/schemas/DataMappingFromCloudAppDataSet, #/components/schemas/DataMappingFromWarehouseDataSet` to the `mappingFrom` request property `oneOf` list
- **2026-08-11** (v1) `b0ed05460bbf` — 8 breaking, 2 warning, 2 info
  - the request property `mappingTo/oneOf[#/components/schemas/DataMappingToTraits]/mappings/items/expression` became required
  - the `displayName` request property's maxLength was decreased to `64`
  - the `code` response property's max was increased from `99999.00` to `999999.00` for the response status `400`
  - the `code` response property's max was increased from `99999.00` to `999999.00` for the response status `404`
  - …8 more

[Change history](https://skmtc.dev/twilio/apis/memory-v1/changes/v1/ControlPlane/Stores/:storeId/DataMappings/post.md)

---

[API](https://skmtc.dev/twilio/apis/memory-v1.md) · [All operations](https://skmtc.dev/twilio/apis/memory-v1/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/twilio/memory-v1/revisions/14b76936cfa3/schema)
