---
title: "Update document group template role"
url: "https://docs.signnow.com/docs/document-group-template/operations/update-document-group-template-role"
type: "endpoint"
section: "document-group-template"
slug: "document-group-template/operations/update-document-group-template-role"
method: "PUT"
path: "/v2/document-group-templates/{document_group_template_id}/roles/{user_id}"
operation_id: "update-document-group-template-role"
authorization: "bearer"
---

# Update document group template role

`PUT /v2/document-group-templates/{document_group_template_id}/roles/{user_id}`

This endpoint allows the owner of a document group template to change the role of a user who already has sharing access.

**Notes**

* Only the owner of the document group template can change roles.
* The user must already have a role assigned (i.e., the template must be shared with them first).

## Authorization

bearer

## Path Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `document_group_template_id` | string | Yes | Document group template ID. |
| `user_id` | string | Yes | ID of the user whose role is being changed. |

## Request Body

**Schema**

```json
{
  "type": "object",
  "required": [
    "role"
  ],
  "properties": {
    "role": {
      "type": "string",
      "example": "sender",
      "description": "New role to assign. Allowed values: `viewer`, `sender`."
    }
  }
}
```

**Example** (`application/json`)

```json
{
  "role": "sender"
}
```

## Responses

### 200

Role successfully updated.

**Example** (`Example 1`)

```json
{
  "id": "def456abc123def456abc123def456abc123defg",
  "role": "sender",
  "email": "user@example.com"
}
```

**Example** (`application/json`)

```json
{
  "id": "def456abc123def456abc123def456abc123defg",
  "role": "sender",
  "email": "user@example.com"
}
```

### 400

Bad request. Possible errors:

* Document group template not found.
* User role not found.
* Role validation errors.

**Example** (`Example 1`)

```json
{
  "errors": [
    {
      "code": 12029025,
      "message": "Document group template not found."
    }
  ]
}
```

**Example** (`Role is required`)

```json
{
  "errors": [
    {
      "code": 12029004,
      "message": "Role is required."
    }
  ]
}
```

**Example** (`Role must be string`)

```json
{
  "errors": [
    {
      "code": 12029005,
      "message": "Role must be string."
    }
  ]
}
```

**Example** (`User role not found`)

```json
{
  "errors": [
    {
      "code": 12029011,
      "message": "User role not found."
    }
  ]
}
```

**Example** (`Incorrect role value`)

```json
{
  "errors": [
    {
      "code": 12030014,
      "message": "Field `role` value should be one of [\"viewer\", \"sender\"], value: [\"...\"] given."
    }
  ]
}
```

**Example** (`Document group template not found`)

```json
{
  "errors": [
    {
      "code": 12029025,
      "message": "Document group template not found."
    }
  ]
}
```

### 401

Incorrect or missing bearer token.

**Example** (`Example 1`)

```json
{
  "errors": {
    "code": 1537,
    "message": "invalid_token"
  }
}
```

**Example** (`Unauthorized`)

```json
{
  "code": 1537,
  "error": "invalid_token"
}
```

### 403

Forbidden. You don't have access to the document group template.

**Example** (`Example 1`)

```json
{
  "errors": [
    {
      "code": 12029012,
      "message": "You don't have access to the entity."
    }
  ]
}
```

**Example** (`Forbidden`)

```json
{
  "errors": [
    {
      "code": 12029012,
      "message": "You don't have access to the entity."
    }
  ]
}
```

## Code Examples

> Replace `$SIGNNOW_ACCESS_TOKEN` and any `{placeholder}` values before running.

### cURL

```bash
curl -X PUT \
  "https://api.signnow.com/v2/document-group-templates/{document_group_template_id}/roles/{user_id}" \
  -H "Authorization: Bearer $SIGNNOW_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"role": "sender"}'
```

---
*Full reference: https://docs.signnow.com/docs/document-group-template/operations/update-document-group-template-role*
