# `DocuSign.Api.TemplateRecipients`
[🔗](https://github.com/neilberkman/docusign_elixir/blob/v3.4.0/lib/docusign/api/template_recipients.ex#L5)

API calls for all endpoints tagged `TemplateRecipients`.

# `recipients_delete_template_recipient`

```elixir
@spec recipients_delete_template_recipient(
  DocuSign.Connection.t(),
  String.t(),
  String.t(),
  String.t(),
  keyword()
) :: {:ok, DocuSign.Model.Recipients.t()} | {:error, Req.Response.t()}
```

Deletes the specified recipient file from a template.
Deletes the specified recipient file from the specified template.

### Parameters

- `connection` (DocuSign.Connection): Connection to server
- `account_id` (String.t): The external account number (int) or account ID GUID.
- `recipient_id` (String.t): A local reference used to map recipients to other objects, such as specific document tabs.  A `recipientId` must be either an integer or a GUID, and the `recipientId` must be unique within an envelope.  For example, many envelopes assign the first recipient a `recipientId` of `1`. 
- `template_id` (String.t): The ID of the template.
- `opts` (keyword): Optional parameters
  - `:body` (TemplateRecipients): 

### Returns

- `{:ok, DocuSign.Model.Recipients.t}` on success
- `{:error, Req.Response.t}` on failure

# `recipients_delete_template_recipients`

```elixir
@spec recipients_delete_template_recipients(
  DocuSign.Connection.t(),
  String.t(),
  String.t(),
  keyword()
) ::
  {:ok, DocuSign.Model.Recipients.t()} | {:error, Req.Response.t()}
```

Deletes recipients from a template.
Deletes one or more recipients from a template. Recipients to be deleted are listed in the request, with the `recipientId` being used as the key for deleting recipients.

### Parameters

- `connection` (DocuSign.Connection): Connection to server
- `account_id` (String.t): The external account number (int) or account ID GUID.
- `template_id` (String.t): The ID of the template.
- `opts` (keyword): Optional parameters
  - `:body` (TemplateRecipients): 

### Returns

- `{:ok, DocuSign.Model.Recipients.t}` on success
- `{:error, Req.Response.t}` on failure

# `recipients_get_template_recipients`

```elixir
@spec recipients_get_template_recipients(
  DocuSign.Connection.t(),
  String.t(),
  String.t(),
  keyword()
) ::
  {:ok, DocuSign.Model.Recipients.t()} | {:error, Req.Response.t()}
```

Gets recipient information from a template.
Retrieves the information for all recipients in the specified template.

### Parameters

- `connection` (DocuSign.Connection): Connection to server
- `account_id` (String.t): The external account number (int) or account ID GUID.
- `template_id` (String.t): The ID of the template.
- `opts` (keyword): Optional parameters
  - `:include_anchor_tab_locations` (String.t):  When **true** and `include_tabs` is set to **true,** all tabs with anchor tab properties are included in the response. 
  - `:include_extended` (String.t):  When **true,** the extended properties are included in the response. 
  - `:include_tabs` (String.t): When **true,** the tab information associated with the recipient is included in the response.

### Returns

- `{:ok, DocuSign.Model.Recipients.t}` on success
- `{:error, Req.Response.t}` on failure

# `recipients_post_template_recipients`

```elixir
@spec recipients_post_template_recipients(
  DocuSign.Connection.t(),
  String.t(),
  String.t(),
  keyword()
) ::
  {:ok, DocuSign.Model.Recipients.t()} | {:error, Req.Response.t()}
```

Adds tabs for a recipient.
Adds one or more recipients to a template.

### Parameters

- `connection` (DocuSign.Connection): Connection to server
- `account_id` (String.t): The external account number (int) or account ID GUID.
- `template_id` (String.t): The ID of the template.
- `opts` (keyword): Optional parameters
  - `:resend_envelope` (String.t): When **true,** resends the envelope to the recipients that you specify in the request body. Use this parameter to resend the envelope to a recipient who deleted the original email notification.  **Note:** Correcting an envelope is a different process. Docusign always resends an envelope when you correct it, regardless of the value that you enter here.
  - `:body` (TemplateRecipients): 

### Returns

- `{:ok, DocuSign.Model.Recipients.t}` on success
- `{:error, Req.Response.t}` on failure

# `recipients_put_template_recipients`

```elixir
@spec recipients_put_template_recipients(
  DocuSign.Connection.t(),
  String.t(),
  String.t(),
  keyword()
) ::
  {:ok, DocuSign.Model.RecipientsUpdateSummary.t()} | {:error, Req.Response.t()}
```

Updates recipients in a template.
Updates recipients in a template.   You can edit the following properties: `email`, `userName`, `routingOrder`, `faxNumber`, `deliveryMethod`, `accessCode`, and `requireIdLookup`.

### Parameters

- `connection` (DocuSign.Connection): Connection to server
- `account_id` (String.t): The external account number (int) or account ID GUID.
- `template_id` (String.t): The ID of the template.
- `opts` (keyword): Optional parameters
  - `:resend_envelope` (String.t): When **true,** resends the envelope to the recipients that you specify in the request body. Use this parameter to resend the envelope to a recipient who deleted the original email notification.  **Note:** Correcting an envelope is a different process. Docusign always resends an envelope when you correct it, regardless of the value that you enter here.
  - `:body` (TemplateRecipients): 

### Returns

- `{:ok, DocuSign.Model.RecipientsUpdateSummary.t}` on success
- `{:error, Req.Response.t}` on failure

# `views_post_template_recipient_preview`

```elixir
@spec views_post_template_recipient_preview(
  DocuSign.Connection.t(),
  String.t(),
  String.t(),
  keyword()
) ::
  {:ok, DocuSign.Model.ViewUrl.t()} | {:error, Req.Response.t()}
```

Creates a template recipient preview.
This method returns a URL for a template recipient preview  in the Docusign UI that you can embed in your application. You use this method to enable the sender to preview the recipients' experience.  For more information, see [Preview and Send](https://support.docusign.com/s/document-item?bundleId=ulp1643236876813&topicId=oeg1578456408976.html).

### Parameters

- `connection` (DocuSign.Connection): Connection to server
- `account_id` (String.t): The external account number (int) or account ID GUID.
- `template_id` (String.t): The ID of the template.
- `opts` (keyword): Optional parameters
  - `:body` (RecipientPreviewRequest): 

### Returns

- `{:ok, DocuSign.Model.ViewUrl.t}` on success
- `{:error, Req.Response.t}` on failure

---

*Consult [api-reference.md](api-reference.md) for complete listing*
