---
title: "POST /v1/{+parent}/userDataMappings"
method: POST
path: "/v1/{+parent}/userDataMappings"
tags: ["projects"]
---

# POST /v1/{+parent}/userDataMappings

`POST /v1/{+parent}/userDataMappings`

Creates a new User data mapping in the parent consent store.

## Path parameters

- `parent` string, required

## Request body

- UserDataMapping — Maps a resource to the associated user and Attributes.
  - `name` string — Resource name of the User data mapping, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consentStores/{consent_store_id}/userDataMappings/{user_data_mapping_id}`.
  - `userId` string — Required. User's UUID provided by the client.
  - `resourceAttributes` Attribute[] — Attributes of the resource. Only explicitly set attributes are displayed here. Attribute definitions with defaults set implicitly apply to these User data mappings. Attributes listed here must be single valued, that is, exactly one value is specified for the field "values" in each Attribute.
    - `attributeDefinitionId` string — Indicates the name of an attribute defined in the consent store.
    - `values` string[] — Required. The value of the attribute. Must be an acceptable value as defined in the consent store. For example, if the consent store defines "data type" with acceptable values "questionnaire" and "step-count", when the attribute name is data type, this field must contain one of those values.
  - `dataId` string — Required. A unique identifier for the mapped resource.
  - `archived` boolean — Output only. Indicates whether this mapping is archived.
  - `archiveTime` string, google-datetime — Output only. Indicates the time when this mapping was archived.

## Response `200`

Successful response

---

[API](https://skmtc.net/google/apis/healthcare.md) · [All operations](https://skmtc.net/google/apis/healthcare/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/google/healthcare/versions/cdec6fe2315f/schema)
