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

# POST /v1/{+parent}/dataExchanges

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

Creates a new data exchange.

## Path parameters

- `parent` string, required

## Query parameters

- `dataExchangeId` string

## Request body

- DataExchange — A data exchange is a container that lets you share data. Along with the descriptive information about the data exchange, it contains listings that reference shared datasets.
  - `documentation` string — Optional. Documentation describing the data exchange.
  - `icon` string, byte — Optional. Base64 encoded image representing the data exchange. Max Size: 3.0MiB Expected image dimensions are 512x512 pixels, however the API only performs validation on size of the encoded data. Note: For byte fields, the content of the fields are base64-encoded (which increases the size of the data by 33-36%) when using JSON on the wire.
  - `logLinkedDatasetQueryUserEmail` boolean — Optional. By default, false. If true, the DataExchange has an email sharing mandate enabled.
  - `displayName` string — Required. Human-readable display name of the data exchange. The display name must contain only Unicode letters, numbers (0-9), underscores (_), dashes (-), spaces ( ), ampersands (&) and must not start or end with spaces. Default value is an empty string. Max length: 63 bytes.
  - `name` string — Output only. The resource name of the data exchange. e.g. `projects/myproject/locations/us/dataExchanges/123`.
  - `primaryContact` string — Optional. Email or URL of the primary point of contact of the data exchange. Max Length: 1000 bytes.
  - `listingCount` integer — Output only. Number of listings contained in the data exchange.
  - `description` string — Optional. Description of the data exchange. The description must not contain Unicode non-characters as well as C0 and C1 control codes except tabs (HT), new lines (LF), carriage returns (CR), and page breaks (FF). Default value is an empty string. Max length: 2000 bytes.
  - `sharingEnvironmentConfig` SharingEnvironmentConfig — Sharing environment is a behavior model for sharing data within a data exchange. This option is configurable for a data exchange.
    - `defaultExchangeConfig` DefaultExchangeConfig — Default Analytics Hub data exchange, used for secured data sharing.
    - `dcrExchangeConfig` DcrExchangeConfig — Data Clean Room (DCR), used for privacy-safe and secured data sharing.
      - `singleSelectedResourceSharingRestriction` boolean — Output only. If True, this DCR restricts the contributors to sharing only a single resource in a Listing. And no two resources should have the same IDs. So if a contributor adds a view with a conflicting name, the CreateListing API will reject the request. if False, the data contributor can publish an entire dataset (as before). This is not configurable, and by default, all new DCRs will have the restriction set to True.
      - `singleLinkedDatasetPerCleanroom` boolean — Output only. If True, when subscribing to this DCR, it will create only one linked dataset containing all resources shared within the cleanroom. If False, when subscribing to this DCR, it will create 1 linked dataset per listing. This is not configurable, and by default, all new DCRs will have the restriction set to True.
  - `discoveryType` 'DISCOVERY_TYPE_UNSPECIFIED' | 'DISCOVERY_TYPE_PRIVATE' | 'DISCOVERY_TYPE_PUBLIC' — Optional. Type of discovery on the discovery page for all the listings under this exchange. Updating this field also updates (overwrites) the discovery_type field for all the listings under this exchange.

## Response `200`

Successful response

---

[API](https://skmtc.dev/google/apis/analyticshub.md) · [All operations](https://skmtc.dev/google/apis/analyticshub/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/google/analyticshub/revisions/64724ad4013d/schema)
