---
title: "Create connection"
method: POST
path: "/api/v2/product-analytics/{entity}/mapping/connection"
tags: ["Rum Audience Management"]
---

# Create connection

`POST /api/v2/product-analytics/{entity}/mapping/connection`

Create a new data connection and its fields for an entity

## Path parameters

- `entity` string, required

## Request body

- CreateConnectionRequest — Request body for creating a new data source connection for an entity.
  - `data` CreateConnectionRequestData — The data object containing the resource type and attributes for creating a new connection.
    - `attributes` CreateConnectionRequestDataAttributes — Attributes defining the data source connection, including join configuration and custom fields.
      - `fields` CreateConnectionRequestDataAttributesFieldsItems[] — List of custom attribute fields to import from the data source.
        - `description` string — Human-readable explanation of what the field represents.
        - `display_name` string — The human-readable label for the field shown in the UI.
        - `groups` string[] — List of group labels used to categorize the field.
        - `id` string, required — The unique identifier for the field within the connection.
        - `source_name` string, required — The name of the column or attribute in the source data system that maps to this field.
        - `type` string, required — The data type of the field (for example, string or number).
      - `join_attribute` string, required — The attribute in the data source used to join records with the entity.
      - `join_type` string, required — The type of join key used to link the data source to the entity (for example, email or user_id).
      - `metadata` object — Additional key-value metadata associated with the connection.
      - `type` string, required — The type of data source connection (for example, ref_table).
    - `id` string — Unique identifier for the new connection resource.
    - `type` 'connection_id', required — Connection id resource type.

## Response `201`

Connection created successfully

## Other responses

- `429` — Too many requests

---

[API](https://skmtc.dev/datadog/apis/api-v2.md) · [All operations](https://skmtc.dev/datadog/apis/api-v2/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/datadog/api-v2/revisions/da68bf029e4c/schema)
