---
title: "Create Data Export destination"
method: POST
path: "/api/v2/destinations/{projectKey}/{environmentKey}"
tags: ["Data Export destinations"]
---

# Create Data Export destination

`POST /api/v2/destinations/{projectKey}/{environmentKey}`

Create a new Data Export destination.

In the `config` request body parameter, the fields required depend on the type of Data Export destination.

<details>
<summary>Click to expand <code>config</code> parameter details</summary>

#### Azure Event Hubs

To create a Data Export destination with a `kind` of `azure-event-hubs`, the `config` object requires the following fields:

* `namespace`: The Event Hub Namespace name
* `name`: The Event Hub name
* `policyName`: The shared access signature policy name. You can find your policy name in the settings of your Azure Event Hubs Namespace.
* `policyKey`: The shared access signature key. You can find your policy key in the settings of your Azure Event Hubs Namespace.

#### Google Cloud Pub/Sub

To create a Data Export destination with a `kind` of `google-pubsub`, the `config` object requires the following fields:

* `project`: The Google PubSub project ID for the project to publish to
* `topic`: The Google PubSub topic ID for the topic to publish to

#### Amazon Kinesis

To create a Data Export destination with a `kind` of `kinesis`, the `config` object requires the following fields:

* `region`: The Kinesis stream's AWS region key
* `roleArn`: The Amazon Resource Name (ARN) of the AWS role that will be writing to Kinesis
* `streamName`: The name of the Kinesis stream that LaunchDarkly is sending events to. This is not the ARN of the stream.

#### mParticle

To create a Data Export destination with a `kind` of `mparticle`, the `config` object requires the following fields:

* `apiKey`: The mParticle API key
* `secret`: The mParticle API secret
* `userIdentity`: The type of identifier you use to identify your end users in mParticle
* `anonymousUserIdentity`: The type of identifier you use to identify your anonymous end users in mParticle

#### Segment

To create a Data Export destination with a `kind` of `segment`, the `config` object requires the following fields:

* `writeKey`: The Segment write key. This is used to authenticate LaunchDarkly's calls to Segment.

#### Snowflake

To create a Data Export destination with a `kind` of `snowflake-v2`, the `config` object requires the following fields:

* `publicKey`: The `publicKey` is returned as part of the [Generate Snowflake destination key pair](https://launchdarkly.com/docs/api/data-export-destinations/post-generate-warehouse-destination-key-pair) response. It is the `public_key` field.
* `snowflakeHostAddress`: Your Snowflake account URL.

</details>

## Path parameters

- `projectKey` string, string, required — The project key
- `environmentKey` string, string, required — The environment key

## Request body

- DestinationPost
  - `name` string — A human-readable name for your Data Export destination
  - `kind` 'google-pubsub' | 'kinesis' | 'mparticle' | 'segment' | 'azure-event-hubs' | 'snowflake-v2' | 'databricks' | 'bigquery' | 'redshift' — The type of Data Export destination
  - `config` string — An object with the configuration parameters required for the destination type
  - `on` boolean — Whether the export is on. Displayed as the integration status in the LaunchDarkly UI.

## Response `201`

Destination response

- Destination
  - `_id` string — The ID of this Data Export destination
  - `_links` object — The location and content type of related resources
  - `name` string — A human-readable name for your Data Export destination
  - `kind` 'google-pubsub' | 'kinesis' | 'mparticle' | 'segment' | 'azure-event-hubs' | 'snowflake-v2' | 'databricks' | 'bigquery' | 'redshift' — The type of Data Export destination
  - `version` number
  - `config` string — An object with the configuration parameters required for the destination type
  - `on` boolean — Whether the export is on, that is, the status of the integration
  - `_access` Access
    - `denied` AccessDenied[], required
      - `action` string, required
      - `reason` AccessDeniedReason, required
        - `resources` string[] — Resource specifier strings
        - `notResources` string[] — Targeted resources are the resources NOT in this list. The <code>resources</code> and <code>notActions</code> fields must be empty to use this field.
        - `actions` ActionSpecifier[] — Actions to perform on a resource
        - `notActions` ActionSpecifier[] — Targeted actions are the actions NOT in this list. The <code>actions</code> and <code>notResources</code> fields must be empty to use this field.
        - `effect` 'allow' | 'deny', required — Whether this statement should allow or deny actions on the resources.
        - `role_name` string
    - `allowed` AccessAllowedRep[], required
      - `action` string, required
      - `reason` AccessAllowedReason, required
        - `resources` string[] — Resource specifier strings
        - `notResources` string[] — Targeted resources are the resources NOT in this list. The <code>resources</code> and <code>notActions</code> fields must be empty to use this field.
        - `actions` ActionSpecifier[] — Actions to perform on a resource
        - `notActions` ActionSpecifier[] — Targeted actions are the actions NOT in this list. The <code>actions</code> and <code>notResources</code> fields must be empty to use this field.
        - `effect` 'allow' | 'deny', required — Whether this statement should allow or deny actions on the resources.
        - `role_name` string

## Other responses

- `400` — Invalid request
- `401` — Invalid access token
- `403` — Forbidden
- `409` — Status conflict
- `429` — Rate limited

---

[API](https://skmtc.net/launchdarkly/apis/launchdarkly-rest-api.md) · [All operations](https://skmtc.net/launchdarkly/apis/launchdarkly-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/launchdarkly/launchdarkly-rest-api/versions/69c5c9aafe78/schema)
