---
title: "Remove access to template"
url: "https://docs.signnow.com/docs/template/operations/delete-v2-templates-template_id-roles-user_id"
type: "endpoint"
section: "template"
slug: "template/operations/delete-v2-templates-template_id-roles-user_id"
method: "DELETE"
path: "/v2/templates/{template_id}/roles/{user_id}"
operation_id: "delete-v2-templates-template_id-roles-user_id"
authorization: "bearer"
---

# Remove access to template

`DELETE /v2/templates/{template_id}/roles/{user_id}`

This endpoint allows a user to revoke access to a specific template. 

**Note**: The template owner can revoke access for all users with whom the template was shared. A user with whom the template was shared can only revoke their own access to the template.


## Authorization

bearer

## Path Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `template_id` | string | Yes | ID of the template. |
| `user_id` | string | Yes | ID of the user. |

## Responses

### 204

Access removed.

### 400

- User with `user_id` doesn't have access to the template.
- You are not the template owner.
- The entity owners cannot remove access from themselves.

**Example** (`Example 1`)

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

**Example** (`Entity owner`)

```json
{
  "errors": [
    {
      "code": 12029022,
      "message": "Entity owner can't unshare it from himself."
    }
  ]
}
```

**Example** (`Not a template owner`)

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

**Example** (`user_id doesn't have access`)

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

### 404

- Incorrect `template_id`.
- Incorrect `user_id`.

**Example** (`Example 1`)

```json
{
  "404": "Unable to find a route to match the URI: v2/templates/8f050906ff0b40f8ae40eb9d82540d28ec86576d/roles/39656a89512a42e6b156b4f5558f3c73c5dc15d5"
}
```

**Example** (`Incorrect user_id`)

```json
{
  "404": "Unable to find a route to match the URI: v2/templates/8f050906ff0b40f8ae40eb9d82540d28ec86576d/roles/2274bf6278644e981584543275cdc0c88d67d45"
}
```

**Example** (`Incorrect template_id`)

```json
{
  "404": "Unable to find a route to match the URI: v2/templates/8f050906ff0b40f8ae40eb9d82540d28ec86576/roles/39656a89512a42e6b156b4f5558f3c73c5dc15d5"
}
```

## Code Examples

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

### cURL

```bash
curl -X DELETE \
  "https://api.signnow.com/v2/templates/{template_id}/roles/{user_id}" \
  -H "Authorization: Bearer $SIGNNOW_ACCESS_TOKEN"
```

---
*Full reference: https://docs.signnow.com/docs/template/operations/delete-v2-templates-template_id-roles-user_id*
