---
title: "Update Org Connection"
method: PATCH
path: "/api/v2/org_connections/{connection_id}"
tags: ["Org Connections"]
---

# Update Org Connection

`PATCH /api/v2/org_connections/{connection_id}`

## Request

- Base URL: `https://api.datadoghq.com`
- URL: `https://api.datadoghq.com/api/v2/org_connections/{connection_id}`
- 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`

Update an existing org connection.

## Path parameters

- `connection_id` string, uuid, required

## Request body

- OrgConnectionUpdateRequest: Request to update an org connection.
  - `data` OrgConnectionUpdate, required: Org connection update data.
    - `attributes` OrgConnectionUpdateAttributes, required: Attributes for updating an org connection.
      - `connection_types` OrgConnectionTypeEnum[], required: Updated list of connection types.
    - `id` string, uuid, required: The unique identifier of the org connection.
    - `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
- `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)
