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

# Add User Groups

Use this API to add organization user groups to a specific organization.

# Endpoint

`POST https://api.velt.dev/v1/organizations/usergroups/add`

# Headers

<ParamField header="x-velt-api-key" type="string" required>
  Your API key.
</ParamField>

<ParamField header="x-velt-auth-token" type="string" required>
  Your [Auth Token](/security/auth-tokens).
</ParamField>

# Body

#### Params

<ParamField body="data" type="object" required>
  <Expandable title="properties">
    <ParamField body="organizationId" type="string" required>
      Organization ID
    </ParamField>

    <ParamField body="organizationUserGroups" type="OrganizationUserGroup[]" required>
      Array of Organization User Group objects
    </ParamField>
  </Expandable>
</ParamField>

## **Example Request**

#### Add organization user group in a specific organization

```JSON theme={null}
{
  "data": {
    "organizationId": "yourOrganizationId",
    "organizationUserGroups": [
      {
        "groupId": "engineering",
        "groupName": "Engineering"
      }
    ]
  }
}
```

# Response

#### Success Response

```JSON theme={null}
{
  "result": {
    "status": "success",
    "message": "Organization User Groups added successfully.",
    "data": {
      "yourGroupId": {
        "success": true,
        "id": "77ab6767b022ad0323ba39c24f12cc95",
        "message": "Organization user group added."
      }
    }
  }
}
```

#### Failure Response

```JSON theme={null}
{
  "error": {
    "message": "ERROR_MESSAGE",
    "status": "INVALID_ARGUMENT"
  }
}
```

<ResponseExample>
  ```js theme={null}
  {
    "result": {
      "status": "success",
      "message": "Organization User Groups added successfully.",
      "data": {
        "yourGroupId": {
          "success": true,
          "id": "77ab6767b022ad0323ba39c24f12cc95",
          "message": "Organization user group added."
        }
      }
    }
  }
  ```
</ResponseExample>
