---
title: "Unshare document from all users"
method: DELETE
path: "/v2/documents/{document_id}/roles"
---

# Unshare document from all users

`DELETE /v2/documents/{document_id}/roles`

## Request

- Base URL: `https://api.signnow.com`
- URL: `https://api.signnow.com/v2/documents/{document_id}/roles`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/signnow/apis/signnow-api/docs/v2/documents/:document_id/roles/delete.ts> (a function with typed inputs; its response is checked against the schema)

This endpoint allows API users to remove sharing access for all users from the document.

**Notes**

* Only the owner of the document can perform this action.
* All shared users are removed.

## Response `204`

All users successfully unshared. No content returned.

## Other responses

- `400`: Bad request. Possible errors: * Document not found.
- `401`: Incorrect or missing bearer token.
- `403`: User is not the document owner.

---

[API](https://skmtc.dev/signnow/apis/signnow-api.md) - [All operations](https://skmtc.dev/signnow/apis/signnow-api/llms.txt) - [OpenAPI document](https://skmtc.dev/signnow/apis/signnow-api/revisions/1c9c30a6142b?raw)
