---
title: "Create org group memberships"
method: POST
path: "/api/v2/org_group_memberships"
tags: ["Org Groups"]
---

# Create org group memberships

`POST /api/v2/org_group_memberships`

## Request

- Base URL: `https://api.datadoghq.com`
- URL: `https://api.datadoghq.com/api/v2/org_group_memberships`
- 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`
- TypeScript: <https://skmtc.dev/datadog/apis/datadog-api-v2-collection/docs/api/v2/org_group_memberships/post.ts> (a function with typed inputs; its response is checked against the schema)

Add a batch of organizations to an existing organization group. This operation is not supported for organization groups with `group_type` set to `config_management`. This is an atomic operation: either all organizations are added or none are. Each request must include between 1 and 100 organizations. Each organization must be identified by a unique `org_uuid` and `org_site` pair, and must be in the same site as the requesting organization. The requesting organization must own the organization group.

## Request body

- OrgGroupMembershipCreateRequest: Request to add organizations to an org group.
  - `data` OrgGroupMembershipCreateData, required: Data for adding organizations to an org group.
    - `attributes` OrgGroupMembershipCreateAttributes, required: Attributes for adding organizations to an org group.
      - `orgs` GlobalOrgIdentifier[], required: List of organizations to add. Each request must include between 1 and 100 organizations. Each `org_uuid` and `org_site` pair must be unique.
        - `org_site` string, required: The site of the organization.
        - `org_uuid` string, uuid, required: The UUID of the organization.
    - `relationships` OrgGroupMembershipCreateRelationships, required: Relationships for adding organizations to an org group.
      - `org_group` OrgGroupRelationshipToOne, required: Relationship to a single org group.
        - `data` OrgGroupRelationshipToOneData, required: A reference to an org group.
          - `id` string, uuid, required: The ID of the org group.
          - `type` 'org_groups', required: Org groups resource type.
    - `type` 'org_group_memberships', required: Org group memberships resource type.

## Response `201`

Created

## 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/3f70db624329?raw)
