---
title: "Create Org Connection"
method: POST
path: "/api/v2/org_connections"
tags: ["Org Connections"]
---

# Create Org Connection

`POST /api/v2/org_connections`

## Request

- Base URL: `https://api.datadoghq.com`
- URL: `https://api.datadoghq.com/api/v2/org_connections`
- Auth: one of:
  - API key in header `DD-API-KEY` and API key in header `DD-APPLICATION-KEY`
  - OAuth 2
    - Authorization code: `/oauth2/v1/authorize`
    - Token URL: `/oauth2/v1/token` scopes: `org_connections_write`

Create a new org connection between the current org and a target org.

## Request body

- OrgConnectionCreateRequest: Request to create an org connection.
  - `data` OrgConnectionCreate, required: Org connection creation data.
    - `attributes` OrgConnectionCreateAttributes, required: Attributes for creating an org connection.
      - `connection_types` OrgConnectionTypeEnum[], required: List of connection types to establish.
    - `relationships` OrgConnectionCreateRelationships, required: Relationships for org connection creation.
      - `sink_org` OrgConnectionOrgRelationship, required: Org relationship.
        - `data` OrgConnectionOrgRelationshipData: The definition of `OrgConnectionOrgRelationshipData` object.
          - `id` string: Org UUID.
          - `name` string: Org name.
          - `type` 'orgs': The type of the organization relationship.
    - `type` 'org_connection', required: Org connection type.

## Response `200`

OK

- OrgConnectionResponse: Response containing a single org connection.
  - `data` OrgConnection, required: An org connection.
    - `attributes` OrgConnectionAttributes, required: Org connection attributes.
      - `connection_types` OrgConnectionTypeEnum[], required: List of connection types.
      - `created_at` string, date-time, required: Timestamp when the connection was created.
    - `id` string, uuid, required: The unique identifier of the org connection.
    - `relationships` OrgConnectionRelationships, required: Related organizations and user.
      - `created_by` OrgConnectionUserRelationship: User relationship.
        - `data` OrgConnectionUserRelationshipData: The data for a user relationship.
          - `id` string: User UUID.
          - `name` string: User name.
          - `type` 'users': The type of the user relationship.
      - `sink_org` OrgConnectionOrgRelationship: Org relationship.
        - `data` OrgConnectionOrgRelationshipData: The definition of `OrgConnectionOrgRelationshipData` object.
          - `id` string: Org UUID.
          - `name` string: Org name.
          - `type` 'orgs': The type of the organization relationship.
      - `source_org` OrgConnectionOrgRelationship: Org relationship.
        - `data` OrgConnectionOrgRelationshipData: The definition of `OrgConnectionOrgRelationshipData` object.
          - `id` string: Org UUID.
          - `name` string: Org name.
          - `type` 'orgs': The type of the organization relationship.
    - `type` 'org_connection', required: Org connection type.

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not Found
- `409`: Conflict
- `429`: Too many requests

---

[API](https://skmtc.dev/datadog/apis/datadog-api-v2-collection.md) - [All operations](https://skmtc.dev/datadog/apis/datadog-api-v2-collection/llms.txt) - [OpenAPI document](https://skmtc.dev/datadog/apis/datadog-api-v2-collection/revisions/da68bf029e4c?raw)
