> You are reading the Docusign Developer Documentation. For clean Markdown of any page, append .md to the page URL.
>
> Documentation indexes by section:
> - APIs and SDKs: https://docusign.docs.buildwithfern.com/docs/llms.txt
> - Platform 101: https://docusign.docs.buildwithfern.com/platform/llms.txt
> - Extension Apps: https://docusign.docs.buildwithfern.com/extension-apps/llms.txt
> - Docusign CLI: https://docusign.docs.buildwithfern.com/docusign-cli/llms.txt
>
> Authentication (OAuth, JWT Grant, M2M): https://docusign.docs.buildwithfern.com/platform/auth
> Webhooks and Connect: https://docusign.docs.buildwithfern.com/platform/webhooks
>
> OpenAPI specifications: https://docusign.docs.buildwithfern.com/openapi.json
> MCP server: https://docusign.docs.buildwithfern.com/_mcp/server

# Create groups

POST https://demo.docusign.net/restapi/v2.1/accounts/{accountId}/groups
Content-Type: application/json

Creates one or more groups for the account.

Groups help you manage users.
For example, you can use groups
to limit user access to templates.

This endpoint uses only
the `groupName` property in the request body.
All other properties are ignored.

Example request:

```json
{
  "groups": [
    { "groupName": "montagues" },
    { "groupName": "capulets" },
    { "groupName": "nobles"}
  ]
}
```

Reference: https://developers.docusign.com/docs/esign-rest-api/reference/usergroups/groups/create

## Authentication

- `Authorization` header (required) (prefixed with ` Bearer  `) — OAuth 2.0 access token (JWT or auth-code grant). Sent as `Authorization: Bearer <token>` on every request except `GET /v2.1` and `GET /service_information`, which are public discovery endpoints.

## Servers

- `https://demo.docusign.net/restapi` (Demo, default)
- `https://www.docusign.net/restapi` (Production)

## Request

### Path parameters

- `accountId` (string, required) — The external account number (int) or account ID Guid.

### Body (application/json)

This endpoint expects a groupInformation.

- `endPosition` (string, optional) — The last index position in the result set.
- `groups` (list of group, optional) — A collection group objects containing information about the groups.
- `nextUri` (string, optional) — The URI for the next chunk of records based on the search request. It is `null` if this is the last set of results for the search.
- `previousUri` (string, optional) — The URI for the prior chunk of records based on the search request. It is `null` if this is the first set of results for the search.
- `resultSetSize` (string, optional) — The number of results in this response. Because you can filter which entries are included in the response, this value is always less than or equal to the `totalSetSize`.
- `startPosition` (string, optional) — The starting index position of the current result set.
- `totalSetSize` (string, optional) — The total number of items in the result set. This value is always greater than or equal to the value of `resultSetSize`.

## Response

### 201

Successful response.

- `endPosition` (string, optional) — The last index position in the result set.
- `groups` (list of group, optional) — A collection group objects containing information about the groups.
- `nextUri` (string, optional) — The URI for the next chunk of records based on the search request. It is `null` if this is the last set of results for the search.
- `previousUri` (string, optional) — The URI for the prior chunk of records based on the search request. It is `null` if this is the first set of results for the search.
- `resultSetSize` (string, optional) — The number of results in this response. Because you can filter which entries are included in the response, this value is always less than or equal to the `totalSetSize`.
- `startPosition` (string, optional) — The starting index position of the current result set.
- `totalSetSize` (string, optional) — The total number of items in the result set. This value is always greater than or equal to the value of `resultSetSize`.

## Errors

### 400 Bad Request Error

Error encountered.

- `errorCode` (string, optional) — The code associated with the error condition.
- `message` (string, optional) — A brief message describing the error condition.

## Types

### group

This object contains information about a group.

- `accessType` (string, optional)
- `dsGroupId` (string, optional) — Reserved for Docusign.
- `errorDetails` (errorDetails, optional) — This object describes errors that occur. It is only valid for responses, and ignored in requests.
- `groupId` (string, optional) — The Docusign group ID for the group. This is a read-only property.
- `groupName` (string, optional) — The name of the group.
- `groupType` (string, optional) — The group type.
- `isManagedByScim` (boolean, optional)
- `lastModifiedOn` (string, optional)
- `permissionProfileId` (string, optional) — This field is deprecated.
- `userGroupType` (string, optional)
- `users` (list of userInfo, optional) — A list of the users in the group. This property is not used by [Groups: list](/docs/esign-rest-api/reference/usergroups/groups/list/). To get a list of users see [GroupUsers: list](/docs/esign-rest-api/reference/usergroups/groupusers/list/)
- `usersCount` (string, optional) — The total number of users in the group.

### errorDetails

This object describes errors that occur. It is only valid for responses, and ignored in requests.

- `errorCode` (string, optional) — The code associated with the error condition.
- `message` (string, optional) — A brief message describing the error condition.

### userInfo

- `accountId` (string, optional) — The account ID associated with the envelope.
- `accountName` (string, optional) — The name on the account.
- `activationAccessCode` (string, optional) — Access code provided to the user to activate the account.
- `email` (string, optional) — The user's email address.
- `errorDetails` (errorDetails, optional) — This object describes errors that occur. It is only valid for responses, and ignored in requests.
- `ipAddress` (string, optional)
- `loginStatus` (string, optional) — When **true,** indicates that the user is logged in. This is a read-only property.
- `membershipId` (string, optional) — The user's membership ID.
- `sendActivationEmail` (string, optional) — This field is no longer supported for most accounts. To create an eSignature user without sending an activation email, use the Admin API by following [these steps](/docs/admin-api/how-to/create-active-user/).
- `uri` (string, optional) — A URI containing the user ID.
- `userId` (string, optional) — The ID of the user to access.
- `userName` (string, optional) — The name of the user.
- `userStatus` (string, optional) — Status of the user's account. One of: - `ActivationRequired` - `ActivationSent` - `Active` - `Closed` - `Disabled`
- `userType` (string, optional) — The type of user, for example `CompanyUser`.

## Examples

**Request**

```json
{
  "endPosition": "sample string 1",
  "groups": [
    {
      "accessType": "sample string 1",
      "dsGroupId": "sample string 2",
      "errorDetails": {
        "errorCode": "sample string 1",
        "message": "sample string 2"
      },
      "groupId": "sample string 3",
      "groupName": "sample string 4",
      "groupType": "sample string 5",
      "isManagedByScim": true,
      "lastModifiedOn": "sample string 6",
      "permissionProfileId": "sample string 7",
      "userGroupType": "sample string 8",
      "users": [
        {
          "accountId": "sample string 1",
          "accountName": "sample string 2",
          "activationAccessCode": "sample string 3",
          "email": "sample string 4",
          "ipAddress": "sample string 5",
          "loginStatus": "sample string 6",
          "membershipId": "sample string 7",
          "sendActivationEmail": "sample string 8",
          "uri": "sample string 9",
          "userId": "sample string 10",
          "userName": "sample string 11",
          "userStatus": "sample string 12",
          "userType": "sample string 13"
        }
      ],
      "usersCount": "sample string 9"
    }
  ],
  "nextUri": "sample string 2",
  "previousUri": "sample string 3",
  "resultSetSize": "sample string 4",
  "startPosition": "sample string 5",
  "totalSetSize": "sample string 6"
}
```

**Response**

```json
{
  "endPosition": "sample string 1",
  "groups": [
    {
      "accessType": "sample string 1",
      "dsGroupId": "sample string 2",
      "errorDetails": {
        "errorCode": "sample string 1",
        "message": "sample string 2"
      },
      "groupId": "sample string 3",
      "groupName": "sample string 4",
      "groupType": "sample string 5",
      "isManagedByScim": true,
      "lastModifiedOn": "sample string 6",
      "permissionProfileId": "sample string 7",
      "userGroupType": "sample string 8",
      "users": [
        {
          "accountId": "sample string 1",
          "accountName": "sample string 2",
          "activationAccessCode": "sample string 3",
          "email": "sample string 4",
          "ipAddress": "sample string 5",
          "loginStatus": "sample string 6",
          "membershipId": "sample string 7",
          "sendActivationEmail": "sample string 8",
          "uri": "sample string 9",
          "userId": "sample string 10",
          "userName": "sample string 11",
          "userStatus": "sample string 12",
          "userType": "sample string 13"
        }
      ],
      "usersCount": "sample string 9"
    }
  ],
  "nextUri": "sample string 2",
  "previousUri": "sample string 3",
  "resultSetSize": "sample string 4",
  "startPosition": "sample string 5",
  "totalSetSize": "sample string 6"
}
```