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

# POST /v1/{+parent}/consentStores

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

Creates a new consent store in the parent dataset. Attempting to create a consent store with the same ID as an existing store fails with an ALREADY_EXISTS error.

## Path parameters

- `parent` string, required

## Query parameters

- `consentStoreId` string

## Request body

- ConsentStore — Represents a consent store.
  - `name` string — Identifier. Resource name of the consent store, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consentStores/{consent_store_id}`. Cannot be changed after creation.
  - `defaultConsentTtl` string, google-duration — Optional. Default time to live for Consents created in this store. Must be at least 24 hours. Updating this field will not affect the expiration time of existing consents.
  - `labels` object — Optional. User-supplied key-value pairs used to organize consent stores. Label keys must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: \p{Ll}\p{Lo}{0,62}. Label values must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63}. No more than 64 labels can be associated with a given store. For more information: https://cloud.google.com/healthcare/docs/how-tos/labeling-resources
  - `enableConsentCreateOnUpdate` boolean — Optional. If `true`, UpdateConsent creates the Consent if it does not already exist. If unspecified, defaults to `false`.

## 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)
