> 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/accounts/{accountId}/groups
Content-Type: application/json

Creates one or more groups for the account.

Groups can be used to help manage users by associating users with a group. You can associate a group with a Permission Profile, which sets the user permissions for users in that group without having to set the `userSettings` property for each user. You are not required to set Permission Profiles for a group, but it makes it easier to manage user permissions for a large number of users. You can also use groups with template sharing to limit user access to templates.

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

## Authentication

- `Authorization` header (required) — OAuth 2.0 access token (JWT or auth-code grant). Sent as Authorization: Bearer \<token>.

## 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 position in the result set.
- `groups` (list of group, optional) — A collection group objects containing information about the groups returned.
- `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 returned in this response.
- `startPosition` (string, optional) — Starting position of the current result set.
- `totalSetSize` (string, optional) — The total number of items in the search's result set. It will always be greater than or equal to the value of the `resultSetSize` field.

## Response

### 201

Successful response.

- `endPosition` (string, optional) — The last position in the result set.
- `groups` (list of group, optional) — A collection group objects containing information about the groups returned.
- `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 returned in this response.
- `startPosition` (string, optional) — Starting position of the current result set.
- `totalSetSize` (string, optional) — The total number of items in the search's result set. It will always be greater than or equal to the value of the `resultSetSize` field.

## Errors

### 400 Bad Request Error

Error encountered.

- `errorCode` (string, optional) — An error code associated with the error.
- `message` (string, optional) — A short error message.

## Types

### group

Information about groups.

- `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.
- `groupName` (string, optional) — The name of the group.
- `groupType` (string, optional) — The group type.
- `permissionProfileId` (string, optional) — The ID of the permission profile associated with the group.
- `users` (list of userInfo, optional) — List 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) — An error code associated with the error.
- `message` (string, optional) — A short error message.

### userInfo

- `activationAccessCode` (string, optional)
- `email` (string, optional)
- `errorDetails` (errorDetails, optional) — This object describes errors that occur. It is only valid for responses, and ignored in requests.
- `loginStatus` (string, optional)
- `sendActivationEmail` (string, optional)
- `uri` (string, optional)
- `userId` (string, optional) — The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. **Note**: For the [GET /v2/accounts/\{accountId}/envelopes](https://developers.docusign.com/esign-rest-api/reference/Envelopes/Envelopes/listStatusChanges/#envelopesInformation) method, the `user_id` query parameter is not implemented and should not be used.
- `userName` (string, optional)
- `userStatus` (string, optional) — Status of the user's account. One of: * ActivationRequired * ActivationSent * Active * Closed * Disabled
- `userType` (string, optional)

## Examples

**Request**

```json
{}
```

**Response**

```json
{
  "endPosition": "string",
  "groups": [
    {
      "errorDetails": {
        "errorCode": "string",
        "message": "string"
      },
      "groupId": "string",
      "groupName": "string",
      "groupType": "string",
      "permissionProfileId": "string",
      "users": [
        {
          "activationAccessCode": "string",
          "email": "string",
          "errorDetails": {
            "errorCode": "string",
            "message": "string"
          },
          "loginStatus": "string",
          "sendActivationEmail": "string",
          "uri": "string",
          "userId": "string",
          "userName": "string",
          "userStatus": "string",
          "userType": "string"
        }
      ]
    }
  ],
  "nextUri": "string",
  "previousUri": "string",
  "resultSetSize": "string",
  "startPosition": "string",
  "totalSetSize": "string"
}
```