> 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 user authorization

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

Creates an authorization allowing one user to send and/or manage envelopes on behalf of another user.

The _agent_ user acts on behalf of the _principal_ user. The principal user is specified by the `userId` path parameter. The agent user is specified in the request body. Each principal user can only share signing permission with one agent user.

Specify in the request the level of access to share with the agent user. If you share signing access, the agent user will receive an email notification.

To call this endpoint:

- You must be an account administrator or you must be the principal user.
- The agent user and principal user must belong to the same account.
- At least one of the following account settings must be enabled: `AllowDelegatedSigning`, `AllowManagingEnvelopesOnBehalfOfOthers`, `AllowEditingEnvelopesOnBehalfOfOthers`, `AllowSendingEnvelopesOnBehalfOfOthers`. These settings correspond to the level of access you can set for the authorization.

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

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

- `agentUser` (authorizationUser, optional)
- `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)

## Response

### 201

Successful response.

- `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)

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

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

## Examples

**Request**

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

**Response**

```json
{
  "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"
}
```