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

# POST /v1/{+parent}/attributeDefinitions

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

Creates a new Attribute definition in the parent consent store.

## Path parameters

- `parent` string, required

## Query parameters

- `attributeDefinitionId` string

## Request body

- AttributeDefinition — A client-defined consent attribute.
  - `consentDefaultValues` string[] — Optional. Default values of the attribute in Consents. If no default values are specified, it defaults to an empty value.
  - `name` string — Identifier. Resource name of the Attribute definition, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consentStores/{consent_store_id}/attributeDefinitions/{attribute_definition_id}`. Cannot be changed after creation.
  - `description` string — Optional. A description of the attribute.
  - `allowedValues` string[] — Required. Possible values for the attribute. The number of allowed values must not exceed 500. An empty list is invalid. The list can only be expanded after creation.
  - `category` 'CATEGORY_UNSPECIFIED' | 'RESOURCE' | 'REQUEST' — Required. The category of the attribute. The value of this field cannot be changed after creation.
  - `dataMappingDefaultValue` string — Optional. Default value of the attribute in User data mappings. If no default value is specified, it defaults to an empty value. This field is only applicable to attributes of the category `RESOURCE`.

## 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/revisions/cdec6fe2315f/schema)
