---
title: "Share document group template"
method: POST
path: "/v2/document-group-templates/{document_group_template_id}/roles"
---

# Share document group template

`POST /v2/document-group-templates/{document_group_template_id}/roles`

## Request

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

This endpoint allows API users to share a document group template with a user by email, assigning them a specified role. If the user does not have an account, one is created automatically.

**Notes**

* **Viewer** - can view, download, and make copies of documents in a document group template; **sender** - can view, download, make copies, invite to sign, and manage document invites.
* Only the owner of the document group template can share it.
* A document group template can be shared only once with the same user. Attempting to share again (even with a different role) returns an error.
* The user receives an email notification about the shared template.
* If the user does not exist in the system, a new account is created automatically.

## Request body

- object
  - `role` string, required: Role to assign. Allowed values: `viewer`, `sender`.
  - `email` string, required: Email address of the user to share with.
  - `message` string: Custom message to include in the notification email.

## Response `200`

Document group template successfully shared.

- object
  - `id` string: Unique identifier of the user.
  - `role` string: User's role in the document group template (e.g., `viewer`, `sender`).
  - `email` string: Email address of the user.

## Other responses

- `400`: Bad request. Possible errors: * Document group template not found. * You can't share document to yourself. * Entity can only be shared once. * Email validation errors. * Role validation errors. * Message validation errors.
- `403`: Forbidden. You don't have access to the document group template.
- `404`: Incorrect document group template ID format (not a 40-character hex string).

---

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