> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://developers.hellosign.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developers.hellosign.com/_mcp/server.

# Bulk Send with Template

POST https://api.hellosign.com/v3/signature_request/bulk_send_with_template
Content-Type: application/json

Creates BulkSendJob which sends up to 250 SignatureRequests in bulk based off of the provided Template(s) specified with the `template_ids` parameter.

**NOTE:** Only available for Standard plan and higher.

Reference: https://developers.hellosign.com/api/signature-request/bulk-send-with-template

## Authentication

- `Authorization` header (basic auth, required) — Your API key can be used to make calls to the Dropbox Sign API. See [Authentication](/api/reference/authentication) for more information. ✅ Supported by Try it console (calls sent in `test_mode` only).
- `Authorization` header (bearer token, required) — You can use an Access Token issued through an OAuth flow to send calls to the Dropbox Sign API from your app. The access scopes required by this endpoint are listed in the gray box above. See [Authentication](/api/reference/authentication) for more information. ❌ **Not supported** by Try it console.

## Request

### Body (application/json)

- `template_ids` (list of string, required) — Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used.
- `signer_file` (string, optional) — `signer_file` is a CSV file defining values and options for signer fields. Required unless a `signer_list` is used, you may not use both. The CSV can have the following columns: - `name`: the name of the signer filling the role of RoleName - `email_address`: email address of the signer filling the role of RoleName - `pin`: the 4- to 12-character access code that will secure this signer's signature page (optional) - `sms_phone_number`: An E.164 formatted phone number that will receive a code via SMS to access this signer's signature page. (optional) By using the feature, you agree you are responsible for obtaining a signer's consent to receive text messages from Dropbox Sign related to this signature request and confirm you have obtained such consent from all signers prior to enabling SMS delivery for this signature request. [Learn more](https://faq.hellosign.com/hc/en-us/articles/15815316468877-Dropbox-Sign-SMS-tools-add-on). **NOTE:** Not available in test mode and requires a Standard plan or higher. - `*_field`: any column with a _field" suffix will be treated as a custom field (optional) You may only specify field values here, any other options should be set in the custom_fields request parameter. Example CSV: ``` name, email_address, pin, company_field George, george@example.com, d79a3td, ABC Corp Mary, mary@example.com, gd9as5b, 123 LLC ```
- `signer_list` (list of object, optional) — `signer_list` is an array defining values and options for signer fields. Required unless a `signer_file` is used, you may not use both.
  - `custom_fields` (list of object, optional) — An array of custom field values.
    - `name` (string, required) — The name of the custom field. Must be the field's `name` or `api_id`.
    - `value` (string, required) — The value of the custom field.
  - `signers` (list of object, optional) — Add Signers to your Templated-based Signature Request. Allows the requester to specify editor options when a preparing a document. Currently only templates with a single role are supported. All signers must have the same `role` value.
    - `role` (string, required) — Must match an existing role in chosen Template(s). It's case-sensitive.
    - `name` (string, required) — The name of the signer.
    - `email_address` (string, required) — The email address of the signer.
    - `pin` (string, optional) — The 4- to 12-character access code that will secure this signer's signature page.
    - `sms_phone_number` (string, optional) — An E.164 formatted phone number. By using the feature, you agree you are responsible for obtaining a signer's consent to receive text messages from Dropbox Sign related to this signature request and confirm you have obtained such consent from all signers prior to enabling SMS delivery for this signature request. [Learn more](https://faq.hellosign.com/hc/en-us/articles/15815316468877-Dropbox-Sign-SMS-tools-add-on). **NOTE:** Not available in test mode and requires a Standard plan or higher.
    - `sms_phone_number_type` (enum, optional) — Specifies the feature used with the `sms_phone_number`. Default `authentication`. If `authentication`, signer is sent a verification code via SMS that is required to access the document. If `delivery`, a link to complete the signature request is delivered via SMS (_and_ email).
      - Allowed values: `authentication`, `delivery`
- `allow_decline` (boolean, optional, default: false) — Allows signers to decline to sign a document if `true`. Defaults to `false`.
- `ccs` (list of object, optional) — Add CC email recipients. Required when a CC role exists for the Template.
  - `role` (string, required) — Must match an existing CC role in chosen Template(s). Multiple CC recipients cannot share the same CC role.
  - `email_address` (string, required) — The email address of the CC recipient.
- `client_id` (string, optional) — The client id of the API App you want to associate with this request. Used to apply the branding and callback url defined for the app.
- `custom_fields` (list of object, optional) — When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests. Pre-filled data can be used with "send-once" signature requests by adding merge fields with `form_fields_per_document` or [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values back with `custom_fields` together in one API call. For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template.
  - `name` (string, required) — The name of a custom field. When working with pre-filled data, the custom field's name must have a matching merge field name or the field will remain empty on the document during signing.
  - `editor` (string, optional) — Used to create editable merge fields. When the value matches a role passed in with `signers`, that role can edit the data that was pre-filled to that field. This field is optional, but required when this custom field object is set to `required = true`. **NOTE:** Editable merge fields are only supported for single signer requests (or the first signer in ordered signature requests). If used when there are multiple signers in an unordered signature request, the editor value is ignored and the field won't be editable.
  - `required` (boolean, optional, default: false) — Used to set an editable merge field when working with pre-filled data. When `true`, the custom field must specify a signer role in `editor`.
  - `value` (string, optional) — The string that resolves (aka "pre-fills") to the merge field on the final document(s) used for signing.
- `message` (string, optional) — The custom message in the email that will be sent to the signers.
- `metadata` (map from string to any, optional) — Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long.
- `signing_redirect_url` (string, optional) — The URL you want signers redirected to after they successfully sign.
- `subject` (string, optional) — The subject in the email that will be sent to the signers.
- `test_mode` (boolean, optional, default: false) — Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`.
- `title` (string, optional) — The title you want to assign to the SignatureRequest.

## Response

### 200

successful operation

- `bulk_send_job` (object, required) — Contains information about the BulkSendJob such as when it was created and how many signature requests are queued.
  - `bulk_send_job_id` (string, optional, nullable) — The id of the BulkSendJob.
  - `total` (integer, optional) — The total amount of Signature Requests queued for sending.
  - `is_creator` (boolean, optional) — True if you are the owner of this BulkSendJob, false if it's been shared with you by a team member.
  - `created_at` (integer, optional) — Time that the BulkSendJob was created.
- `warnings` (list of object, optional) — A list of warnings.
  - `warning_msg` (string, required) — Warning message
  - `warning_name` (string, required) — Warning name

## Examples

### Send Signature Request With Template

**Request**

```json
undefined
```

**Response**

```json
{
  "bulk_send_job": {
    "bulk_send_job_id": "4bce667844dc3711d05e7aa4a1b5a6b64b738b2b",
    "total": 1,
    "is_creator": true,
    "created_at": 1532640962
  }
}
```

**SDK Code**

```php PHP
<?php

namespace Dropbox\SignSandbox;

require_once __DIR__ . '/../vendor/autoload.php';

use SplFileObject;
use Dropbox;

$config = Dropbox\Sign\Configuration::getDefaultConfiguration();
$config->setUsername("YOUR_API_KEY");
// $config->setAccessToken("YOUR_ACCESS_TOKEN");

$signer_list_2_custom_fields_1 = (new Dropbox\Sign\Model\SubBulkSignerListCustomField())
    ->setName("company")
    ->setValue("123 LLC");

$signer_list_2_custom_fields = [
    $signer_list_2_custom_fields_1,
];

$signer_list_2_signers_1 = (new Dropbox\Sign\Model\SubSignatureRequestTemplateSigner())
    ->setRole("Client")
    ->setName("Mary")
    ->setEmailAddress("mary@example.com")
    ->setPin("gd9as5b");

$signer_list_2_signers = [
    $signer_list_2_signers_1,
];

$signer_list_1_custom_fields_1 = (new Dropbox\Sign\Model\SubBulkSignerListCustomField())
    ->setName("company")
    ->setValue("ABC Corp");

$signer_list_1_custom_fields = [
    $signer_list_1_custom_fields_1,
];

$signer_list_1_signers_1 = (new Dropbox\Sign\Model\SubSignatureRequestTemplateSigner())
    ->setRole("Client")
    ->setName("George")
    ->setEmailAddress("george@example.com")
    ->setPin("d79a3td");

$signer_list_1_signers = [
    $signer_list_1_signers_1,
];

$signer_list_1 = (new Dropbox\Sign\Model\SubBulkSignerList())
    ->setCustomFields($signer_list_1_custom_fields)
    ->setSigners($signer_list_1_signers);

$signer_list_2 = (new Dropbox\Sign\Model\SubBulkSignerList())
    ->setCustomFields($signer_list_2_custom_fields)
    ->setSigners($signer_list_2_signers);

$signer_list = [
    $signer_list_1,
    $signer_list_2,
];

$ccs_1 = (new Dropbox\Sign\Model\SubCC())
    ->setRole("Accounting")
    ->setEmailAddress("accounting@example.com");

$ccs = [
    $ccs_1,
];

$signature_request_bulk_send_with_template_request = (new Dropbox\Sign\Model\SignatureRequestBulkSendWithTemplateRequest())
    ->setTemplateIds([
        "c26b8a16784a872da37ea946b9ddec7c1e11dff6",
    ])
    ->setMessage("Glad we could come to an agreement.")
    ->setSubject("Purchase Order")
    ->setTestMode(true)
    ->setSignerList($signer_list)
    ->setCcs($ccs);

try {
    $response = (new Dropbox\Sign\Api\SignatureRequestApi(config: $config))->signatureRequestBulkSendWithTemplate(
        signature_request_bulk_send_with_template_request: $signature_request_bulk_send_with_template_request,
    );

    print_r($response);
} catch (Dropbox\Sign\ApiException $e) {
    echo "Exception when calling SignatureRequestApi#signatureRequestBulkSendWithTemplate: {$e->getMessage()}";
}

```

```csharp C#
using System;
using System.Collections.Generic;
using System.IO;
using System.Text.Json;

using Dropbox.Sign.Api;
using Dropbox.Sign.Client;
using Dropbox.Sign.Model;

namespace Dropbox.SignSandbox;

public class SignatureRequestBulkSendWithTemplateExample
{
    public static void Run()
    {
        var config = new Configuration();
        config.Username = "YOUR_API_KEY";
        // config.AccessToken = "YOUR_ACCESS_TOKEN";

        var signerList2CustomFields1 = new SubBulkSignerListCustomField(
            name: "company",
            value: "123 LLC"
        );

        var signerList2CustomFields = new List<SubBulkSignerListCustomField>
        {
            signerList2CustomFields1,
        };

        var signerList2Signers1 = new SubSignatureRequestTemplateSigner(
            role: "Client",
            name: "Mary",
            emailAddress: "mary@example.com",
            pin: "gd9as5b"
        );

        var signerList2Signers = new List<SubSignatureRequestTemplateSigner>
        {
            signerList2Signers1,
        };

        var signerList1CustomFields1 = new SubBulkSignerListCustomField(
            name: "company",
            value: "ABC Corp"
        );

        var signerList1CustomFields = new List<SubBulkSignerListCustomField>
        {
            signerList1CustomFields1,
        };

        var signerList1Signers1 = new SubSignatureRequestTemplateSigner(
            role: "Client",
            name: "George",
            emailAddress: "george@example.com",
            pin: "d79a3td"
        );

        var signerList1Signers = new List<SubSignatureRequestTemplateSigner>
        {
            signerList1Signers1,
        };

        var signerList1 = new SubBulkSignerList(
            customFields: signerList1CustomFields,
            signers: signerList1Signers
        );

        var signerList2 = new SubBulkSignerList(
            customFields: signerList2CustomFields,
            signers: signerList2Signers
        );

        var signerList = new List<SubBulkSignerList>
        {
            signerList1,
            signerList2,
        };

        var ccs1 = new SubCC(
            role: "Accounting",
            emailAddress: "accounting@example.com"
        );

        var ccs = new List<SubCC>
        {
            ccs1,
        };

        var signatureRequestBulkSendWithTemplateRequest = new SignatureRequestBulkSendWithTemplateRequest(
            templateIds: [
                "c26b8a16784a872da37ea946b9ddec7c1e11dff6",
            ],
            message: "Glad we could come to an agreement.",
            subject: "Purchase Order",
            testMode: true,
            signerList: signerList,
            ccs: ccs
        );

        try
        {
            var response = new SignatureRequestApi(config).SignatureRequestBulkSendWithTemplate(
                signatureRequestBulkSendWithTemplateRequest: signatureRequestBulkSendWithTemplateRequest
            );

            Console.WriteLine(response);
        }
        catch (ApiException e)
        {
            Console.WriteLine("Exception when calling SignatureRequestApi#SignatureRequestBulkSendWithTemplate: " + e.Message);
            Console.WriteLine("Status Code: " + e.ErrorCode);
            Console.WriteLine(e.StackTrace);
        }
    }
}

```

```typescript TypeScript
import * as fs from 'fs';
import api from "@dropbox/sign"
import models from "@dropbox/sign"

const apiCaller = new api.SignatureRequestApi();
apiCaller.username = "YOUR_API_KEY";
// apiCaller.accessToken = "YOUR_ACCESS_TOKEN";

const signerList2CustomFields1: models.SubBulkSignerListCustomField = {
  name: "company",
  value: "123 LLC",
};

const signerList2CustomFields = [
  signerList2CustomFields1,
];

const signerList2Signers1: models.SubSignatureRequestTemplateSigner = {
  role: "Client",
  name: "Mary",
  emailAddress: "mary@example.com",
  pin: "gd9as5b",
};

const signerList2Signers = [
  signerList2Signers1,
];

const signerList1CustomFields1: models.SubBulkSignerListCustomField = {
  name: "company",
  value: "ABC Corp",
};

const signerList1CustomFields = [
  signerList1CustomFields1,
];

const signerList1Signers1: models.SubSignatureRequestTemplateSigner = {
  role: "Client",
  name: "George",
  emailAddress: "george@example.com",
  pin: "d79a3td",
};

const signerList1Signers = [
  signerList1Signers1,
];

const signerList1: models.SubBulkSignerList = {
  customFields: signerList1CustomFields,
  signers: signerList1Signers,
};

const signerList2: models.SubBulkSignerList = {
  customFields: signerList2CustomFields,
  signers: signerList2Signers,
};

const signerList = [
  signerList1,
  signerList2,
];

const ccs1: models.SubCC = {
  role: "Accounting",
  emailAddress: "accounting@example.com",
};

const ccs = [
  ccs1,
];

const signatureRequestBulkSendWithTemplateRequest: models.SignatureRequestBulkSendWithTemplateRequest = {
  templateIds: [
    "c26b8a16784a872da37ea946b9ddec7c1e11dff6",
  ],
  message: "Glad we could come to an agreement.",
  subject: "Purchase Order",
  testMode: true,
  signerList: signerList,
  ccs: ccs,
};

apiCaller.signatureRequestBulkSendWithTemplate(
  signatureRequestBulkSendWithTemplateRequest,
).then(response => {
  console.log(response.body);
}).catch(error => {
  console.log("Exception when calling SignatureRequestApi#signatureRequestBulkSendWithTemplate:");
  console.log(error.body);
});

```

```java Java
package com.dropbox.sign_sandbox;

import com.dropbox.sign.ApiException;
import com.dropbox.sign.Configuration;
import com.dropbox.sign.api.*;
import com.dropbox.sign.auth.*;
import com.dropbox.sign.JSON;
import com.dropbox.sign.model.*;

import java.io.File;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.OffsetDateTime;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;

public class SignatureRequestBulkSendWithTemplateExample
{
    public static void main(String[] args)
    {
        var config = Configuration.getDefaultApiClient();
        ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY");
        // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN");

        var signerList2CustomFields1 = new SubBulkSignerListCustomField();
        signerList2CustomFields1.name("company");
        signerList2CustomFields1.value("123 LLC");

        var signerList2CustomFields = new ArrayList<SubBulkSignerListCustomField>(List.of (
            signerList2CustomFields1
        ));

        var signerList2Signers1 = new SubSignatureRequestTemplateSigner();
        signerList2Signers1.role("Client");
        signerList2Signers1.name("Mary");
        signerList2Signers1.emailAddress("mary@example.com");
        signerList2Signers1.pin("gd9as5b");

        var signerList2Signers = new ArrayList<SubSignatureRequestTemplateSigner>(List.of (
            signerList2Signers1
        ));

        var signerList1CustomFields1 = new SubBulkSignerListCustomField();
        signerList1CustomFields1.name("company");
        signerList1CustomFields1.value("ABC Corp");

        var signerList1CustomFields = new ArrayList<SubBulkSignerListCustomField>(List.of (
            signerList1CustomFields1
        ));

        var signerList1Signers1 = new SubSignatureRequestTemplateSigner();
        signerList1Signers1.role("Client");
        signerList1Signers1.name("George");
        signerList1Signers1.emailAddress("george@example.com");
        signerList1Signers1.pin("d79a3td");

        var signerList1Signers = new ArrayList<SubSignatureRequestTemplateSigner>(List.of (
            signerList1Signers1
        ));

        var signerList1 = new SubBulkSignerList();
        signerList1.customFields(signerList1CustomFields);
        signerList1.signers(signerList1Signers);

        var signerList2 = new SubBulkSignerList();
        signerList2.customFields(signerList2CustomFields);
        signerList2.signers(signerList2Signers);

        var signerList = new ArrayList<SubBulkSignerList>(List.of (
            signerList1,
            signerList2
        ));

        var ccs1 = new SubCC();
        ccs1.role("Accounting");
        ccs1.emailAddress("accounting@example.com");

        var ccs = new ArrayList<SubCC>(List.of (
            ccs1
        ));

        var signatureRequestBulkSendWithTemplateRequest = new SignatureRequestBulkSendWithTemplateRequest();
        signatureRequestBulkSendWithTemplateRequest.templateIds(List.of (
            "c26b8a16784a872da37ea946b9ddec7c1e11dff6"
        ));
        signatureRequestBulkSendWithTemplateRequest.message("Glad we could come to an agreement.");
        signatureRequestBulkSendWithTemplateRequest.subject("Purchase Order");
        signatureRequestBulkSendWithTemplateRequest.testMode(true);
        signatureRequestBulkSendWithTemplateRequest.signerList(signerList);
        signatureRequestBulkSendWithTemplateRequest.ccs(ccs);

        try
        {
            var response = new SignatureRequestApi(config).signatureRequestBulkSendWithTemplate(
                signatureRequestBulkSendWithTemplateRequest
            );

            System.out.println(response);
        } catch (ApiException e) {
            System.err.println("Exception when calling SignatureRequestApi#signatureRequestBulkSendWithTemplate");
            System.err.println("Status code: " + e.getCode());
            System.err.println("Reason: " + e.getResponseBody());
            System.err.println("Response headers: " + e.getResponseHeaders());
            e.printStackTrace();
        }
    }
}

```

```ruby Ruby
require "json"
require "dropbox-sign"

Dropbox::Sign.configure do |config|
    config.username = "YOUR_API_KEY"
    # config.access_token = "YOUR_ACCESS_TOKEN"
end

signer_list_2_custom_fields_1 = Dropbox::Sign::SubBulkSignerListCustomField.new
signer_list_2_custom_fields_1.name = "company"
signer_list_2_custom_fields_1.value = "123 LLC"

signer_list_2_custom_fields = [
    signer_list_2_custom_fields_1,
]

signer_list_2_signers_1 = Dropbox::Sign::SubSignatureRequestTemplateSigner.new
signer_list_2_signers_1.role = "Client"
signer_list_2_signers_1.name = "Mary"
signer_list_2_signers_1.email_address = "mary@example.com"
signer_list_2_signers_1.pin = "gd9as5b"

signer_list_2_signers = [
    signer_list_2_signers_1,
]

signer_list_1_custom_fields_1 = Dropbox::Sign::SubBulkSignerListCustomField.new
signer_list_1_custom_fields_1.name = "company"
signer_list_1_custom_fields_1.value = "ABC Corp"

signer_list_1_custom_fields = [
    signer_list_1_custom_fields_1,
]

signer_list_1_signers_1 = Dropbox::Sign::SubSignatureRequestTemplateSigner.new
signer_list_1_signers_1.role = "Client"
signer_list_1_signers_1.name = "George"
signer_list_1_signers_1.email_address = "george@example.com"
signer_list_1_signers_1.pin = "d79a3td"

signer_list_1_signers = [
    signer_list_1_signers_1,
]

signer_list_1 = Dropbox::Sign::SubBulkSignerList.new
signer_list_1.custom_fields = signer_list_1_custom_fields
signer_list_1.signers = signer_list_1_signers

signer_list_2 = Dropbox::Sign::SubBulkSignerList.new
signer_list_2.custom_fields = signer_list_2_custom_fields
signer_list_2.signers = signer_list_2_signers

signer_list = [
    signer_list_1,
    signer_list_2,
]

ccs_1 = Dropbox::Sign::SubCC.new
ccs_1.role = "Accounting"
ccs_1.email_address = "accounting@example.com"

ccs = [
    ccs_1,
]

signature_request_bulk_send_with_template_request = Dropbox::Sign::SignatureRequestBulkSendWithTemplateRequest.new
signature_request_bulk_send_with_template_request.template_ids = [
    "c26b8a16784a872da37ea946b9ddec7c1e11dff6",
]
signature_request_bulk_send_with_template_request.message = "Glad we could come to an agreement."
signature_request_bulk_send_with_template_request.subject = "Purchase Order"
signature_request_bulk_send_with_template_request.test_mode = true
signature_request_bulk_send_with_template_request.signer_list = signer_list
signature_request_bulk_send_with_template_request.ccs = ccs

begin
    response = Dropbox::Sign::SignatureRequestApi.new.signature_request_bulk_send_with_template(
        signature_request_bulk_send_with_template_request,
    )

    p response
rescue Dropbox::Sign::ApiError => e
    puts "Exception when calling SignatureRequestApi#signature_request_bulk_send_with_template: #{e}"
end

```

```python Python
import json
from datetime import date, datetime
from pprint import pprint

from dropbox_sign import ApiClient, ApiException, Configuration, api, models

configuration = Configuration(
    username="YOUR_API_KEY",
    # access_token="YOUR_ACCESS_TOKEN",
)

with ApiClient(configuration) as api_client:
    signer_list_2_custom_fields_1 = models.SubBulkSignerListCustomField(
        name="company",
        value="123 LLC",
    )

    signer_list_2_custom_fields = [
        signer_list_2_custom_fields_1,
    ]

    signer_list_2_signers_1 = models.SubSignatureRequestTemplateSigner(
        role="Client",
        name="Mary",
        email_address="mary@example.com",
        pin="gd9as5b",
    )

    signer_list_2_signers = [
        signer_list_2_signers_1,
    ]

    signer_list_1_custom_fields_1 = models.SubBulkSignerListCustomField(
        name="company",
        value="ABC Corp",
    )

    signer_list_1_custom_fields = [
        signer_list_1_custom_fields_1,
    ]

    signer_list_1_signers_1 = models.SubSignatureRequestTemplateSigner(
        role="Client",
        name="George",
        email_address="george@example.com",
        pin="d79a3td",
    )

    signer_list_1_signers = [
        signer_list_1_signers_1,
    ]

    signer_list_1 = models.SubBulkSignerList(
        custom_fields=signer_list_1_custom_fields,
        signers=signer_list_1_signers,
    )

    signer_list_2 = models.SubBulkSignerList(
        custom_fields=signer_list_2_custom_fields,
        signers=signer_list_2_signers,
    )

    signer_list = [
        signer_list_1,
        signer_list_2,
    ]

    ccs_1 = models.SubCC(
        role="Accounting",
        email_address="accounting@example.com",
    )

    ccs = [
        ccs_1,
    ]

    signature_request_bulk_send_with_template_request = models.SignatureRequestBulkSendWithTemplateRequest(
        template_ids=[
            "c26b8a16784a872da37ea946b9ddec7c1e11dff6",
        ],
        message="Glad we could come to an agreement.",
        subject="Purchase Order",
        test_mode=True,
        signer_list=signer_list,
        ccs=ccs,
    )

    try:
        response = api.SignatureRequestApi(api_client).signature_request_bulk_send_with_template(
            signature_request_bulk_send_with_template_request=signature_request_bulk_send_with_template_request,
        )

        pprint(response)
    except ApiException as e:
        print("Exception when calling SignatureRequestApi#signature_request_bulk_send_with_template: %s\n" % e)

```

```go Send Signature Request With Template
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.hellosign.com/v3/signature_request/bulk_send_with_template"

	req, _ := http.NewRequest("POST", url, nil)

	req.SetBasicAuth("<apiKey>", "")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```swift Send Signature Request With Template
import Foundation

let credentials = Data("<apiKey>:".utf8).base64EncodedString()

let headers = [
  "Authorization": "Basic \(credentials)",
  "Content-Type": "application/json"
]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.hellosign.com/v3/signature_request/bulk_send_with_template")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Default Example

**Request**

```json
{
  "template_ids": [
    "c26b8a16784a872da37ea946b9ddec7c1e11dff6"
  ],
  "signer_list": [
    {
      "custom_fields": [
        {
          "name": "company",
          "value": "ABC Corp"
        }
      ],
      "signers": [
        {
          "role": "Client",
          "name": "George",
          "email_address": "george@example.com",
          "pin": "d79a3td"
        }
      ]
    },
    {
      "custom_fields": [
        {
          "name": "company",
          "value": "123 LLC"
        }
      ],
      "signers": [
        {
          "role": "Client",
          "name": "Mary",
          "email_address": "mary@example.com",
          "pin": "gd9as5b"
        }
      ]
    }
  ],
  "ccs": [
    {
      "role": "Accounting",
      "email_address": "accounting@example.com"
    }
  ],
  "message": "Glad we could come to an agreement.",
  "subject": "Purchase Order",
  "test_mode": true
}
```

**Response**

```json
{
  "bulk_send_job": {
    "bulk_send_job_id": "4bce667844dc3711d05e7aa4a1b5a6b64b738b2b",
    "total": 1,
    "is_creator": true,
    "created_at": 1532640962
  }
}
```

**SDK Code**

```php PHP
<?php

namespace Dropbox\SignSandbox;

require_once __DIR__ . '/../vendor/autoload.php';

use SplFileObject;
use Dropbox;

$config = Dropbox\Sign\Configuration::getDefaultConfiguration();
$config->setUsername("YOUR_API_KEY");
// $config->setAccessToken("YOUR_ACCESS_TOKEN");

$signer_list_2_custom_fields_1 = (new Dropbox\Sign\Model\SubBulkSignerListCustomField())
    ->setName("company")
    ->setValue("123 LLC");

$signer_list_2_custom_fields = [
    $signer_list_2_custom_fields_1,
];

$signer_list_2_signers_1 = (new Dropbox\Sign\Model\SubSignatureRequestTemplateSigner())
    ->setRole("Client")
    ->setName("Mary")
    ->setEmailAddress("mary@example.com")
    ->setPin("gd9as5b");

$signer_list_2_signers = [
    $signer_list_2_signers_1,
];

$signer_list_1_custom_fields_1 = (new Dropbox\Sign\Model\SubBulkSignerListCustomField())
    ->setName("company")
    ->setValue("ABC Corp");

$signer_list_1_custom_fields = [
    $signer_list_1_custom_fields_1,
];

$signer_list_1_signers_1 = (new Dropbox\Sign\Model\SubSignatureRequestTemplateSigner())
    ->setRole("Client")
    ->setName("George")
    ->setEmailAddress("george@example.com")
    ->setPin("d79a3td");

$signer_list_1_signers = [
    $signer_list_1_signers_1,
];

$signer_list_1 = (new Dropbox\Sign\Model\SubBulkSignerList())
    ->setCustomFields($signer_list_1_custom_fields)
    ->setSigners($signer_list_1_signers);

$signer_list_2 = (new Dropbox\Sign\Model\SubBulkSignerList())
    ->setCustomFields($signer_list_2_custom_fields)
    ->setSigners($signer_list_2_signers);

$signer_list = [
    $signer_list_1,
    $signer_list_2,
];

$ccs_1 = (new Dropbox\Sign\Model\SubCC())
    ->setRole("Accounting")
    ->setEmailAddress("accounting@example.com");

$ccs = [
    $ccs_1,
];

$signature_request_bulk_send_with_template_request = (new Dropbox\Sign\Model\SignatureRequestBulkSendWithTemplateRequest())
    ->setTemplateIds([
        "c26b8a16784a872da37ea946b9ddec7c1e11dff6",
    ])
    ->setMessage("Glad we could come to an agreement.")
    ->setSubject("Purchase Order")
    ->setTestMode(true)
    ->setSignerList($signer_list)
    ->setCcs($ccs);

try {
    $response = (new Dropbox\Sign\Api\SignatureRequestApi(config: $config))->signatureRequestBulkSendWithTemplate(
        signature_request_bulk_send_with_template_request: $signature_request_bulk_send_with_template_request,
    );

    print_r($response);
} catch (Dropbox\Sign\ApiException $e) {
    echo "Exception when calling SignatureRequestApi#signatureRequestBulkSendWithTemplate: {$e->getMessage()}";
}

```

```csharp C#
using System;
using System.Collections.Generic;
using System.IO;
using System.Text.Json;

using Dropbox.Sign.Api;
using Dropbox.Sign.Client;
using Dropbox.Sign.Model;

namespace Dropbox.SignSandbox;

public class SignatureRequestBulkSendWithTemplateExample
{
    public static void Run()
    {
        var config = new Configuration();
        config.Username = "YOUR_API_KEY";
        // config.AccessToken = "YOUR_ACCESS_TOKEN";

        var signerList2CustomFields1 = new SubBulkSignerListCustomField(
            name: "company",
            value: "123 LLC"
        );

        var signerList2CustomFields = new List<SubBulkSignerListCustomField>
        {
            signerList2CustomFields1,
        };

        var signerList2Signers1 = new SubSignatureRequestTemplateSigner(
            role: "Client",
            name: "Mary",
            emailAddress: "mary@example.com",
            pin: "gd9as5b"
        );

        var signerList2Signers = new List<SubSignatureRequestTemplateSigner>
        {
            signerList2Signers1,
        };

        var signerList1CustomFields1 = new SubBulkSignerListCustomField(
            name: "company",
            value: "ABC Corp"
        );

        var signerList1CustomFields = new List<SubBulkSignerListCustomField>
        {
            signerList1CustomFields1,
        };

        var signerList1Signers1 = new SubSignatureRequestTemplateSigner(
            role: "Client",
            name: "George",
            emailAddress: "george@example.com",
            pin: "d79a3td"
        );

        var signerList1Signers = new List<SubSignatureRequestTemplateSigner>
        {
            signerList1Signers1,
        };

        var signerList1 = new SubBulkSignerList(
            customFields: signerList1CustomFields,
            signers: signerList1Signers
        );

        var signerList2 = new SubBulkSignerList(
            customFields: signerList2CustomFields,
            signers: signerList2Signers
        );

        var signerList = new List<SubBulkSignerList>
        {
            signerList1,
            signerList2,
        };

        var ccs1 = new SubCC(
            role: "Accounting",
            emailAddress: "accounting@example.com"
        );

        var ccs = new List<SubCC>
        {
            ccs1,
        };

        var signatureRequestBulkSendWithTemplateRequest = new SignatureRequestBulkSendWithTemplateRequest(
            templateIds: [
                "c26b8a16784a872da37ea946b9ddec7c1e11dff6",
            ],
            message: "Glad we could come to an agreement.",
            subject: "Purchase Order",
            testMode: true,
            signerList: signerList,
            ccs: ccs
        );

        try
        {
            var response = new SignatureRequestApi(config).SignatureRequestBulkSendWithTemplate(
                signatureRequestBulkSendWithTemplateRequest: signatureRequestBulkSendWithTemplateRequest
            );

            Console.WriteLine(response);
        }
        catch (ApiException e)
        {
            Console.WriteLine("Exception when calling SignatureRequestApi#SignatureRequestBulkSendWithTemplate: " + e.Message);
            Console.WriteLine("Status Code: " + e.ErrorCode);
            Console.WriteLine(e.StackTrace);
        }
    }
}

```

```typescript TypeScript
import * as fs from 'fs';
import api from "@dropbox/sign"
import models from "@dropbox/sign"

const apiCaller = new api.SignatureRequestApi();
apiCaller.username = "YOUR_API_KEY";
// apiCaller.accessToken = "YOUR_ACCESS_TOKEN";

const signerList2CustomFields1: models.SubBulkSignerListCustomField = {
  name: "company",
  value: "123 LLC",
};

const signerList2CustomFields = [
  signerList2CustomFields1,
];

const signerList2Signers1: models.SubSignatureRequestTemplateSigner = {
  role: "Client",
  name: "Mary",
  emailAddress: "mary@example.com",
  pin: "gd9as5b",
};

const signerList2Signers = [
  signerList2Signers1,
];

const signerList1CustomFields1: models.SubBulkSignerListCustomField = {
  name: "company",
  value: "ABC Corp",
};

const signerList1CustomFields = [
  signerList1CustomFields1,
];

const signerList1Signers1: models.SubSignatureRequestTemplateSigner = {
  role: "Client",
  name: "George",
  emailAddress: "george@example.com",
  pin: "d79a3td",
};

const signerList1Signers = [
  signerList1Signers1,
];

const signerList1: models.SubBulkSignerList = {
  customFields: signerList1CustomFields,
  signers: signerList1Signers,
};

const signerList2: models.SubBulkSignerList = {
  customFields: signerList2CustomFields,
  signers: signerList2Signers,
};

const signerList = [
  signerList1,
  signerList2,
];

const ccs1: models.SubCC = {
  role: "Accounting",
  emailAddress: "accounting@example.com",
};

const ccs = [
  ccs1,
];

const signatureRequestBulkSendWithTemplateRequest: models.SignatureRequestBulkSendWithTemplateRequest = {
  templateIds: [
    "c26b8a16784a872da37ea946b9ddec7c1e11dff6",
  ],
  message: "Glad we could come to an agreement.",
  subject: "Purchase Order",
  testMode: true,
  signerList: signerList,
  ccs: ccs,
};

apiCaller.signatureRequestBulkSendWithTemplate(
  signatureRequestBulkSendWithTemplateRequest,
).then(response => {
  console.log(response.body);
}).catch(error => {
  console.log("Exception when calling SignatureRequestApi#signatureRequestBulkSendWithTemplate:");
  console.log(error.body);
});

```

```java Java
package com.dropbox.sign_sandbox;

import com.dropbox.sign.ApiException;
import com.dropbox.sign.Configuration;
import com.dropbox.sign.api.*;
import com.dropbox.sign.auth.*;
import com.dropbox.sign.JSON;
import com.dropbox.sign.model.*;

import java.io.File;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.OffsetDateTime;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;

public class SignatureRequestBulkSendWithTemplateExample
{
    public static void main(String[] args)
    {
        var config = Configuration.getDefaultApiClient();
        ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY");
        // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN");

        var signerList2CustomFields1 = new SubBulkSignerListCustomField();
        signerList2CustomFields1.name("company");
        signerList2CustomFields1.value("123 LLC");

        var signerList2CustomFields = new ArrayList<SubBulkSignerListCustomField>(List.of (
            signerList2CustomFields1
        ));

        var signerList2Signers1 = new SubSignatureRequestTemplateSigner();
        signerList2Signers1.role("Client");
        signerList2Signers1.name("Mary");
        signerList2Signers1.emailAddress("mary@example.com");
        signerList2Signers1.pin("gd9as5b");

        var signerList2Signers = new ArrayList<SubSignatureRequestTemplateSigner>(List.of (
            signerList2Signers1
        ));

        var signerList1CustomFields1 = new SubBulkSignerListCustomField();
        signerList1CustomFields1.name("company");
        signerList1CustomFields1.value("ABC Corp");

        var signerList1CustomFields = new ArrayList<SubBulkSignerListCustomField>(List.of (
            signerList1CustomFields1
        ));

        var signerList1Signers1 = new SubSignatureRequestTemplateSigner();
        signerList1Signers1.role("Client");
        signerList1Signers1.name("George");
        signerList1Signers1.emailAddress("george@example.com");
        signerList1Signers1.pin("d79a3td");

        var signerList1Signers = new ArrayList<SubSignatureRequestTemplateSigner>(List.of (
            signerList1Signers1
        ));

        var signerList1 = new SubBulkSignerList();
        signerList1.customFields(signerList1CustomFields);
        signerList1.signers(signerList1Signers);

        var signerList2 = new SubBulkSignerList();
        signerList2.customFields(signerList2CustomFields);
        signerList2.signers(signerList2Signers);

        var signerList = new ArrayList<SubBulkSignerList>(List.of (
            signerList1,
            signerList2
        ));

        var ccs1 = new SubCC();
        ccs1.role("Accounting");
        ccs1.emailAddress("accounting@example.com");

        var ccs = new ArrayList<SubCC>(List.of (
            ccs1
        ));

        var signatureRequestBulkSendWithTemplateRequest = new SignatureRequestBulkSendWithTemplateRequest();
        signatureRequestBulkSendWithTemplateRequest.templateIds(List.of (
            "c26b8a16784a872da37ea946b9ddec7c1e11dff6"
        ));
        signatureRequestBulkSendWithTemplateRequest.message("Glad we could come to an agreement.");
        signatureRequestBulkSendWithTemplateRequest.subject("Purchase Order");
        signatureRequestBulkSendWithTemplateRequest.testMode(true);
        signatureRequestBulkSendWithTemplateRequest.signerList(signerList);
        signatureRequestBulkSendWithTemplateRequest.ccs(ccs);

        try
        {
            var response = new SignatureRequestApi(config).signatureRequestBulkSendWithTemplate(
                signatureRequestBulkSendWithTemplateRequest
            );

            System.out.println(response);
        } catch (ApiException e) {
            System.err.println("Exception when calling SignatureRequestApi#signatureRequestBulkSendWithTemplate");
            System.err.println("Status code: " + e.getCode());
            System.err.println("Reason: " + e.getResponseBody());
            System.err.println("Response headers: " + e.getResponseHeaders());
            e.printStackTrace();
        }
    }
}

```

```ruby Ruby
require "json"
require "dropbox-sign"

Dropbox::Sign.configure do |config|
    config.username = "YOUR_API_KEY"
    # config.access_token = "YOUR_ACCESS_TOKEN"
end

signer_list_2_custom_fields_1 = Dropbox::Sign::SubBulkSignerListCustomField.new
signer_list_2_custom_fields_1.name = "company"
signer_list_2_custom_fields_1.value = "123 LLC"

signer_list_2_custom_fields = [
    signer_list_2_custom_fields_1,
]

signer_list_2_signers_1 = Dropbox::Sign::SubSignatureRequestTemplateSigner.new
signer_list_2_signers_1.role = "Client"
signer_list_2_signers_1.name = "Mary"
signer_list_2_signers_1.email_address = "mary@example.com"
signer_list_2_signers_1.pin = "gd9as5b"

signer_list_2_signers = [
    signer_list_2_signers_1,
]

signer_list_1_custom_fields_1 = Dropbox::Sign::SubBulkSignerListCustomField.new
signer_list_1_custom_fields_1.name = "company"
signer_list_1_custom_fields_1.value = "ABC Corp"

signer_list_1_custom_fields = [
    signer_list_1_custom_fields_1,
]

signer_list_1_signers_1 = Dropbox::Sign::SubSignatureRequestTemplateSigner.new
signer_list_1_signers_1.role = "Client"
signer_list_1_signers_1.name = "George"
signer_list_1_signers_1.email_address = "george@example.com"
signer_list_1_signers_1.pin = "d79a3td"

signer_list_1_signers = [
    signer_list_1_signers_1,
]

signer_list_1 = Dropbox::Sign::SubBulkSignerList.new
signer_list_1.custom_fields = signer_list_1_custom_fields
signer_list_1.signers = signer_list_1_signers

signer_list_2 = Dropbox::Sign::SubBulkSignerList.new
signer_list_2.custom_fields = signer_list_2_custom_fields
signer_list_2.signers = signer_list_2_signers

signer_list = [
    signer_list_1,
    signer_list_2,
]

ccs_1 = Dropbox::Sign::SubCC.new
ccs_1.role = "Accounting"
ccs_1.email_address = "accounting@example.com"

ccs = [
    ccs_1,
]

signature_request_bulk_send_with_template_request = Dropbox::Sign::SignatureRequestBulkSendWithTemplateRequest.new
signature_request_bulk_send_with_template_request.template_ids = [
    "c26b8a16784a872da37ea946b9ddec7c1e11dff6",
]
signature_request_bulk_send_with_template_request.message = "Glad we could come to an agreement."
signature_request_bulk_send_with_template_request.subject = "Purchase Order"
signature_request_bulk_send_with_template_request.test_mode = true
signature_request_bulk_send_with_template_request.signer_list = signer_list
signature_request_bulk_send_with_template_request.ccs = ccs

begin
    response = Dropbox::Sign::SignatureRequestApi.new.signature_request_bulk_send_with_template(
        signature_request_bulk_send_with_template_request,
    )

    p response
rescue Dropbox::Sign::ApiError => e
    puts "Exception when calling SignatureRequestApi#signature_request_bulk_send_with_template: #{e}"
end

```

```python Python
import json
from datetime import date, datetime
from pprint import pprint

from dropbox_sign import ApiClient, ApiException, Configuration, api, models

configuration = Configuration(
    username="YOUR_API_KEY",
    # access_token="YOUR_ACCESS_TOKEN",
)

with ApiClient(configuration) as api_client:
    signer_list_2_custom_fields_1 = models.SubBulkSignerListCustomField(
        name="company",
        value="123 LLC",
    )

    signer_list_2_custom_fields = [
        signer_list_2_custom_fields_1,
    ]

    signer_list_2_signers_1 = models.SubSignatureRequestTemplateSigner(
        role="Client",
        name="Mary",
        email_address="mary@example.com",
        pin="gd9as5b",
    )

    signer_list_2_signers = [
        signer_list_2_signers_1,
    ]

    signer_list_1_custom_fields_1 = models.SubBulkSignerListCustomField(
        name="company",
        value="ABC Corp",
    )

    signer_list_1_custom_fields = [
        signer_list_1_custom_fields_1,
    ]

    signer_list_1_signers_1 = models.SubSignatureRequestTemplateSigner(
        role="Client",
        name="George",
        email_address="george@example.com",
        pin="d79a3td",
    )

    signer_list_1_signers = [
        signer_list_1_signers_1,
    ]

    signer_list_1 = models.SubBulkSignerList(
        custom_fields=signer_list_1_custom_fields,
        signers=signer_list_1_signers,
    )

    signer_list_2 = models.SubBulkSignerList(
        custom_fields=signer_list_2_custom_fields,
        signers=signer_list_2_signers,
    )

    signer_list = [
        signer_list_1,
        signer_list_2,
    ]

    ccs_1 = models.SubCC(
        role="Accounting",
        email_address="accounting@example.com",
    )

    ccs = [
        ccs_1,
    ]

    signature_request_bulk_send_with_template_request = models.SignatureRequestBulkSendWithTemplateRequest(
        template_ids=[
            "c26b8a16784a872da37ea946b9ddec7c1e11dff6",
        ],
        message="Glad we could come to an agreement.",
        subject="Purchase Order",
        test_mode=True,
        signer_list=signer_list,
        ccs=ccs,
    )

    try:
        response = api.SignatureRequestApi(api_client).signature_request_bulk_send_with_template(
            signature_request_bulk_send_with_template_request=signature_request_bulk_send_with_template_request,
        )

        pprint(response)
    except ApiException as e:
        print("Exception when calling SignatureRequestApi#signature_request_bulk_send_with_template: %s\n" % e)

```

```go Default Example
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.hellosign.com/v3/signature_request/bulk_send_with_template"

	payload := strings.NewReader("{\n  \"template_ids\": [\n    \"c26b8a16784a872da37ea946b9ddec7c1e11dff6\"\n  ],\n  \"signer_list\": [\n    {\n      \"custom_fields\": [\n        {\n          \"name\": \"company\",\n          \"value\": \"ABC Corp\"\n        }\n      ],\n      \"signers\": [\n        {\n          \"role\": \"Client\",\n          \"name\": \"George\",\n          \"email_address\": \"george@example.com\",\n          \"pin\": \"d79a3td\"\n        }\n      ]\n    },\n    {\n      \"custom_fields\": [\n        {\n          \"name\": \"company\",\n          \"value\": \"123 LLC\"\n        }\n      ],\n      \"signers\": [\n        {\n          \"role\": \"Client\",\n          \"name\": \"Mary\",\n          \"email_address\": \"mary@example.com\",\n          \"pin\": \"gd9as5b\"\n        }\n      ]\n    }\n  ],\n  \"ccs\": [\n    {\n      \"role\": \"Accounting\",\n      \"email_address\": \"accounting@example.com\"\n    }\n  ],\n  \"message\": \"Glad we could come to an agreement.\",\n  \"subject\": \"Purchase Order\",\n  \"test_mode\": true\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.SetBasicAuth("<apiKey>", "")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```swift Default Example
import Foundation

let credentials = Data("<apiKey>:".utf8).base64EncodedString()

let headers = [
  "Authorization": "Basic \(credentials)",
  "Content-Type": "application/json"
]
let parameters = [
  "template_ids": ["c26b8a16784a872da37ea946b9ddec7c1e11dff6"],
  "signer_list": [
    [
      "custom_fields": [
        [
          "name": "company",
          "value": "ABC Corp"
        ]
      ],
      "signers": [
        [
          "role": "Client",
          "name": "George",
          "email_address": "george@example.com",
          "pin": "d79a3td"
        ]
      ]
    ],
    [
      "custom_fields": [
        [
          "name": "company",
          "value": "123 LLC"
        ]
      ],
      "signers": [
        [
          "role": "Client",
          "name": "Mary",
          "email_address": "mary@example.com",
          "pin": "gd9as5b"
        ]
      ]
    ]
  ],
  "ccs": [
    [
      "role": "Accounting",
      "email_address": "accounting@example.com"
    ]
  ],
  "message": "Glad we could come to an agreement.",
  "subject": "Purchase Order",
  "test_mode": true
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.hellosign.com/v3/signature_request/bulk_send_with_template")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```