> ## Documentation Index
> Fetch the complete documentation index at: https://developer.onetrust.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Data Subject Group

Use this API to create a new Data Subject Group.

> 🗒 Things to Know
>
> - Data Subject Groups must contain at least one primary data subject identifier and two data subjects.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Consent & Preferences - Universal Consent & Preference Management (OAS)",
    "version": "1.0",
    "contact": {
      "name": "OneTrust Support",
      "url": "https://my.onetrust.com/s/contactsupport"
    },
    "license": {
      "name": "Apache 2.0",
      "url": "https://www.apache.org/licenses/LICENSE-2.0"
    },
    "description": "The Universal Consent & Preference Management APIs are used to integrate external systems and streamline the flow of data with Universal Consent & Preference Management in the OneTrust Platform."
  },
  "servers": [
    {
      "url": "https://{hostname}",
      "variables": {
        "hostname": {
          "default": "hostname",
          "description": "The OneTrust hostname such as app.onetrust.com, app-eu.onetrust.com, app-de.onetrust.com, app-uk.onetrust.com, app-apac.onetrust.com, trial.onetrust.com, or uat.onetrust.com."
        }
      }
    }
  ],
  "tags": [
    {
      "name": "Data Subject Groups V4",
      "description": "The Data Subjects V4 APIs are used to manage data subject information, preferences, and consent records.",
      "externalDocs": {
        "description": "OpenAPI 3.1.0 - Download Definition",
        "url": "https://developer.onetrust.com/onetrust/openapi/consent-preferences-universal-consent-preference-management-oas.json"
      },
      "x-displayName": "Data Subject Groups V4"
    }
  ],
  "paths": {
    "/rest/api/consent/v4/linkedidentitygroups": {
      "post": {
        "operationId": "createDataSubjectGroupV4",
        "summary": "Create Data Subject Group",
        "description": "Use this API to create a new Data Subject Group.\n\n> 🗒 Things to Know\n>\n> - Data Subject Groups must contain at least one primary data subject identifier and two data subjects.",
        "tags": [
          "Data Subject Groups V4"
        ],
        "x-onetrust": {
          "spec-label": "https://developer.onetrust.com/onetrust/openapi/consent-preferences-universal-consent-preference-management-oas.json"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConsentAPI_LinkedIdentityGroupRequestDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConsentAPI_LinkedIdentityGroupResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests. \nFor more information, see [API Rate Limits](https://developer.onetrust.com/onetrust/reference/rate-limits-overview).",
            "headers": {
              "Retry-After": {
                "schema": {
                  "description": "The number of seconds after which requests will be allowed again.",
                  "format": "int32"
                }
              },
              "ot-period": {
                "schema": {
                  "description": "The unit of time for which the rate limit applies",
                  "enum": [
                    "HOUR",
                    "MINUTE"
                  ]
                }
              },
              "ot-ratelimit-event-id": {
                "schema": {
                  "description": "The unique identifier for the rate-limiting event.",
                  "format": "uuid"
                }
              },
              "ot-request-made": {
                "schema": {
                  "description": "The number of requests made within the specified period.",
                  "format": "int32"
                }
              },
              "ot-requests-allowed": {
                "schema": {
                  "description": "The number of requests allowed within the specified period.",
                  "format": "int32"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        },
        "security": [
          {
            "ConsentAPI_OAUTH2": [
              "CONSENT"
            ]
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "ConsentAPI_LinkedIdentityGroupRequestDto": {
        "type": "object",
        "properties": {
          "groupName": {
            "description": "A user-defined name for the group of linked identities.",
            "type": "string",
            "example": "LIG_1"
          },
          "memberIdentifiers": {
            "description": "A list of all member identifiers that belong to the group.",
            "type": "array",
            "items": {
              "type": "string"
            },
            "example": [
              "user_12345@ot.com",
              "user_67890@ot.com",
              "user_54321@ot.com"
            ]
          },
          "primaryIdentifiers": {
            "description": "A List of all identifiers that are primary identifiers. The members in this list need not be present in member identifiers list as they are mutually exclusive.",
            "type": "array",
            "items": {
              "type": "string"
            },
            "example": [
              "user_primary@ot.com"
            ]
          }
        },
        "required": [
          "groupName",
          "memberIdentifiers",
          "primaryIdentifiers"
        ]
      },
      "ConsentAPI_LinkedIdentityGroupDataSubjectResponseDto": {
        "type": "object",
        "properties": {
          "id": {
            "description": "Unique identifier (UUID) of the data subject",
            "type": "string",
            "format": "uuid",
            "example": "a3f8d56a-b123-4b2a-9eab-12cfea1bc456"
          },
          "identifier": {
            "description": "The original identifier value for the data subject",
            "type": "string",
            "example": "user@example.com"
          },
          "identifierType": {
            "description": "Type of identifier (e.g., EMAIL, PHONE)",
            "type": "string",
            "example": "EMAIL"
          },
          "addedDate": {
            "description": "Date and time when the data subject was added to the group",
            "type": "string",
            "format": "date-time",
            "example": "2024-11-12T10:15:30"
          }
        }
      },
      "ConsentAPI_LinkedIdentityGroupResponseDto": {
        "type": "object",
        "properties": {
          "id": {
            "description": "Unique identifier of the linked identity group",
            "type": "string",
            "example": "123e4567-e89b-12d3-a456-426614174000"
          },
          "createdDate": {
            "description": "Date and time when the group was created",
            "type": "string",
            "format": "date-time",
            "example": "2024-11-12T10:15:30"
          },
          "groupName": {
            "description": "Name of the group",
            "type": "string",
            "example": "UserAccountGroup"
          },
          "primaryDataSubjects": {
            "description": "List of primary data subjects in the group",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ConsentAPI_LinkedIdentityGroupDataSubjectResponseDto"
            }
          },
          "memberDataSubjects": {
            "description": "List of member data subjects in the group",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ConsentAPI_LinkedIdentityGroupDataSubjectResponseDto"
            }
          }
        }
      }
    },
    "securitySchemes": {
      "ConsentAPI_OAUTH2": {
        "type": "oauth2",
        "flows": {
          "clientCredentials": {
            "tokenUrl": "https://{hostname}/api/access/v1/oauth/token",
            "scopes": {
              "CONSENT": "Consent Scope gives the user access to read/write operations",
              "CONSENT_READ": "Consent Read Scope gives the user read-only access"
            }
          }
        }
      }
    }
  },
  "x-readme": {
    "explorer-enabled": false,
    "proxy-enabled": false,
    "metrics-enabled": false
  },
  "x-onetrust": {
    "spec-label": "OpenAPI 3.1.0"
  }
}
```