> 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 or update multiple user authorizations

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

Create or update multiple user authorizations in a single request. The body of the request is a list of userAuthorizationSomething objects. To create a new authorization, specify the `agentUser` and `permission` fields, with the optional `startDate` and `endDate` fields. To update an existing authorization, specify the `authorizationId` field and the `startDate` and/or `endDate` fields.

For example, to create a new authorization and update the end date of an existing authorization, your request body might look like this:

```json
{
  "authorizations": [
    {
      "agentUser": {
        "userId": "1470ff66-xxxx-xxxx-xxxx-8c46f140da37",
        "accountId": "230546a7-xxxx-xxxx-xxxx-af205d5494ad"
      },
      "permission": "manage"
    },
    {
      "authorizationId": "b73ac983-xxxx-xxxx-xxxx-b3c0ea5b09d3",
      "endDate": "2023-05-09T21:36:27.0000000+00:00"
    }
  ]
}
```

The principal user is specified by the `userId` path parameter. To call this endpoint, you must be an account administrator or the principal user.

**Note:** To create an authorization with signing permission, the `AllowDelegationSigning` setting must be enabled on the account. If you share signing access, the agent user will receive an email notification. Each principal user can only share signing permission with one agent user.

Reference: https://developers.docusign.com/docs/esign-rest-api/reference/accounts/authorizations/createuserauthorizations

## 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.
- `userId` (string, required) — The ID of the principal user.

### Body (application/json)

This endpoint expects an userAuthorizationsRequest.

- `authorizations` (list of userAuthorizationCreateRequestWithId, optional) — The list of user authorizations to create and/or update.
- `sendNotification` (string, optional)

## Response

### 201

Successful response.

- `results` (list of userAuthorizationWithStatus, optional)

## 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

### userAuthorizationCreateRequestWithId

A user authorizations to create or update.

- `agentUser` (authorizationUser, optional)
- `authorizationId` (string, optional) — The ID of the user authorization. This property is required to update an existing authorization.
- `endDate` (string, optional) — The UTC DateTime to end the authorization. The default value is the max UTC value: `9999-12-31T23:59:59.0000000+00:00`.
- `permission` (string, optional) — The [permission level](/docs/esign-rest-api/esign101/concepts/envelopes/share-access-to-mailbox-or-envelopes) to grant the agent. Valid values: - `Send` - `Manage` - `Sign` - `Edit` This property is required.
- `startDate` (string, optional) — The UTC DateTime to initiate the authorization. The default value is the current date and time.
- `taskSource` (string, optional)
- `taskType` (string, optional)

### userAuthorizationWithStatus

- `authorization` (userAuthorization, optional) — A complex object describing a user authorization.
- `errorMessage` (string, optional)
- `success` (string, optional)

### authorizationUser

- `accountId` (string, optional) — The account ID.
- `email` (string, optional) — The email address of the authorization user.
- `name` (string, optional) — The name of the authorization user.
- `userId` (string, optional) — The ID of the authorization user.

### userAuthorization

A complex object describing a user authorization.

- `agentUser` (authorizationUser, optional)
- `authorizationId` (string, optional) — The ID of the user authorization.
- `created` (string, optional) — The UTC DateTime when the workspace user authorization was created.
- `createdBy` (string, optional) — The name and email of the user who created the authorization, in the following format: `[Francis Beagle email@example.com]`
- `endDate` (string, optional) — The UTC DateTime at which the authorization will expire.
- `modified` (string, optional) — The UTC DateTime when the workspace user authorization was last updated.
- `modifiedBy` (string, optional) — The name and email of the user who created the authorization, in the following format: `[Francis Beagle email@example.com]`
- `permission` (string, optional) — The [permission level](/docs/esign-rest-api/esign101/concepts/envelopes/share-access-to-mailbox-or-envelopes) to grant the agent. Valid values: - `Send` - `Manage` - `Sign` - `Edit` This property is required.
- `principalUser` (authorizationUser, optional)
- `startDate` (string, optional) — The UTC DateTime at which the authorization will start.
- `taskSource` (string, optional)
- `taskType` (string, optional)

## Examples

**Request**

```json
{
  "authorizations": [
    {
      "agentUser": {
        "accountId": "sample string 1",
        "email": "sample string 2",
        "name": "sample string 3",
        "userId": "sample string 4"
      },
      "authorizationId": "sample string 1",
      "endDate": "sample string 2",
      "permission": "sample string 3",
      "startDate": "sample string 4",
      "taskSource": "sample string 5",
      "taskType": "sample string 6"
    }
  ],
  "sendNotification": "sample string 1"
}
```

**Response**

```json
{
  "results": [
    {
      "authorization": {
        "agentUser": {
          "accountId": "sample string 1",
          "email": "sample string 2",
          "name": "sample string 3",
          "userId": "sample string 4"
        },
        "authorizationId": "sample string 1",
        "created": "sample string 2",
        "createdBy": "sample string 3",
        "endDate": "sample string 4",
        "modified": "sample string 5",
        "modifiedBy": "sample string 6",
        "permission": "sample string 7",
        "startDate": "sample string 8",
        "taskSource": "sample string 9",
        "taskType": "sample string 10"
      },
      "errorMessage": "sample string 1",
      "success": "sample string 2"
    }
  ]
}
```