> 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.

# Modify account settings

POST https://api.hellosign.com/v3/account/settings
Content-Type: application/json

account_id is an optional query parameter and defaults to the authenticated account. A team admin can specify another account on a team they administer.

Reference: https://developers.hellosign.com/api/account/settings-update

## Authentication

- `Authorization` header (basic auth, required) — Use your API key with HTTP Basic authentication in the form `Basic <api_key>`. 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

### Query parameters

- `account_id` (string, optional) — Optional account ID. Defaults to the authenticated account. A team admin can specify another account on a team they administer.

### Body (application/json)

This endpoint expects an AccountSettingsUpdateRequest.

- `set` (AccountSettingsUpdateRequestSet, optional) — Values to store, keyed by setting name. A name in `set` cannot also appear in `unset`.
- `unset` (list of enum, optional) — Any setting that can be set can also be unset. Unset clears the stored value so it is inherited. A listed name cannot also be set or locked in the same request.
  - Allowed values: `company`, `custom_signing_redirect_enabled`, `custom_signing_redirect_url`, `custom_tagline`, `date_format`, `is_signature_reminders_enabled`, `request_email_from`, `request_email_signature`, `required_signature_types`, `should_enable_tamper_proof`, `should_include_distinct_pdfs`, `should_offer_signer_access_code`, `should_offer_signer_sms_authentication`, `should_remove_document_id`, `is_notify_on_sign_enabled`, `is_notify_on_view_enabled`, `should_autocomplete`, `should_include_requested_pdfs`, `should_include_requested_pdfs_for_others`, `should_include_sent_doc_pdfs`, `should_include_sent_doc_pdfs_for_others`, `should_send_daily_summary`, `should_send_embedded_signature_conf_emails`, `should_send_ordered_sr_email`, `should_send_outbound_conf_emails`, `template_link_signature_emails_enabled`

## Response

### 200

successful operation

- `account_id` (string, required)
- `settings` (AccountSettingsResponseSettings, required)
- `warnings` (list of WarningResponse, optional) — A list of warnings.

## Errors

### 400 Client Request Error

failed_operation

- `error` (ErrorResponseError, required) — Contains information about an error that occurred.

## Types

### AccountSettingsUpdateRequestSet

Values to store, keyed by setting name. A name in `set` cannot also appear in `unset`.

- `company` (string, optional) — Company name associated with this account or team.
- `custom_signing_redirect_enabled` (boolean, optional) — Whether signers are redirected to a custom webpage after they sign. Setting this to `false` clears the stored custom signing redirect URL override, reverting it to the inherited value. A URL supplied in the same update is ignored.
- `custom_signing_redirect_url` (string, optional) — Webpage where signers are redirected after they sign, when custom redirects are enabled.
- `custom_tagline` (string, optional) — Company tagline shown with the account or team branding.
- `date_format` (enum, optional) — Default date format in the editor and in the audit trail. Senders can still choose a different format for an individual date field.
  - Allowed values: `MM/DD/YYYY`, `DD/MM/YYYY`, `YYYY/MM/DD`
- `is_signature_reminders_enabled` (boolean, optional) — Whether reminder emails are sent to signers 3 days and 7 days after a signature request is sent.
- `request_email_from` (string, optional) — Name shown in the From field of signature request emails. When unset, each user's first and last name is shown.
- `request_email_signature` (string, optional) — Text appended to the end of signature request emails.
- `required_signature_types` (list of enum, optional) — Signature creation methods a signer is allowed to use.
  - Allowed values: `draw`, `phone`, `type`, `upload`
- `should_enable_tamper_proof` (boolean, optional) — Whether a tamper-proof seal is applied to sent signature requests.
- `should_include_distinct_pdfs` (boolean, optional) — Whether completed documents remain as separate PDF files instead of being merged into one PDF.
- `should_offer_signer_access_code` (boolean, optional) — Whether senders can require a custom access code before a signer can open a document.
- `should_offer_signer_sms_authentication` (boolean, optional) — Whether senders can require a text-message verification code before a signer can open a document.
- `should_remove_document_id` (boolean, optional) — Whether the document ID is removed from all pages of sent documents.
- `is_notify_on_sign_enabled` (boolean, optional) — Whether to notify the account when someone signs a document it sent.
- `is_notify_on_view_enabled` (boolean, optional) — Whether to notify the account when someone opens a document it sent.
- `should_autocomplete` (boolean, optional) — Whether values entered in text fields are saved and suggested for future signature requests.
- `should_include_requested_pdfs` (boolean, optional) — Whether to email the account a PDF copy when a signature request it sent is completed.
- `should_include_requested_pdfs_for_others` (boolean, optional) — Whether to email a PDF copy to the other signers and CC recipients when a signature request is completed.
- `should_include_sent_doc_pdfs` (boolean, optional) — Whether to email the account a PDF copy when it sends a document.
- `should_include_sent_doc_pdfs_for_others` (boolean, optional) — Whether to email recipients a PDF copy, instead of only a link, when the account sends a document.
- `should_send_daily_summary` (boolean, optional) — Whether to send the account a daily email summarizing outstanding signature requests.
- `should_send_embedded_signature_conf_emails` (boolean, optional) — Whether to notify the account when it signs a document on a third-party site.
- `should_send_ordered_sr_email` (boolean, optional) — Whether to notify all parties when an ordered signature request starts.
- `should_send_outbound_conf_emails` (boolean, optional) — Whether to notify the account when it signs and sends a document.
- `template_link_signature_emails_enabled` (boolean, optional) — Whether to notify the account when someone signs a document sent by its team through a template link.

### AccountSettingsResponseSettings

- `company` (SettingResponse, required) — Company name associated with this account or team.
- `custom_signing_redirect_enabled` (SettingResponse, required) — Whether signers are redirected to a custom webpage after they sign. Setting this to `false` clears the stored custom signing redirect URL override, reverting it to the inherited value. A URL supplied in the same update is ignored.
- `custom_signing_redirect_url` (SettingResponse, required) — Webpage where signers are redirected after they sign, when custom redirects are enabled.
- `custom_tagline` (SettingResponse, required) — Company tagline shown with the account or team branding.
- `date_format` (SettingResponse, required) — Default date format in the editor and in the audit trail. Senders can still choose a different format for an individual date field.
- `is_signature_reminders_enabled` (SettingResponse, required) — Whether reminder emails are sent to signers 3 days and 7 days after a signature request is sent.
- `request_email_from` (SettingResponse, required) — Name shown in the From field of signature request emails. When unset, each user's first and last name is shown.
- `request_email_signature` (SettingResponse, required) — Text appended to the end of signature request emails.
- `required_signature_types` (SettingResponse, required) — Signature creation methods a signer is allowed to use.
- `should_enable_tamper_proof` (SettingResponse, required) — Whether a tamper-proof seal is applied to sent signature requests.
- `should_include_distinct_pdfs` (SettingResponse, required) — Whether completed documents remain as separate PDF files instead of being merged into one PDF.
- `should_offer_signer_access_code` (SettingResponse, required) — Whether senders can require a custom access code before a signer can open a document.
- `should_offer_signer_sms_authentication` (SettingResponse, required) — Whether senders can require a text-message verification code before a signer can open a document.
- `should_remove_document_id` (SettingResponse, required) — Whether the document ID is removed from all pages of sent documents.
- `is_notify_on_sign_enabled` (SettingResponse, required) — Whether to notify the account when someone signs a document it sent.
- `is_notify_on_view_enabled` (SettingResponse, required) — Whether to notify the account when someone opens a document it sent.
- `should_autocomplete` (SettingResponse, required) — Whether values entered in text fields are saved and suggested for future signature requests.
- `should_include_requested_pdfs` (SettingResponse, required) — Whether to email the account a PDF copy when a signature request it sent is completed.
- `should_include_requested_pdfs_for_others` (SettingResponse, required) — Whether to email a PDF copy to the other signers and CC recipients when a signature request is completed.
- `should_include_sent_doc_pdfs` (SettingResponse, required) — Whether to email the account a PDF copy when it sends a document.
- `should_include_sent_doc_pdfs_for_others` (SettingResponse, required) — Whether to email recipients a PDF copy, instead of only a link, when the account sends a document.
- `should_send_daily_summary` (SettingResponse, required) — Whether to send the account a daily email summarizing outstanding signature requests.
- `should_send_embedded_signature_conf_emails` (SettingResponse, required) — Whether to notify the account when it signs a document on a third-party site.
- `should_send_ordered_sr_email` (SettingResponse, required) — Whether to notify all parties when an ordered signature request starts.
- `should_send_outbound_conf_emails` (SettingResponse, required) — Whether to notify the account when it signs and sends a document.
- `template_link_signature_emails_enabled` (SettingResponse, required) — Whether to notify the account when someone signs a document sent by its team through a template link.

### WarningResponse

A list of warnings.

- `warning_msg` (string, required) — Warning message
- `warning_name` (string, required) — Warning name

### ErrorResponseError

Contains information about an error that occurred.

- `error_msg` (string, required) — Message describing an error.
- `error_name` (string, required) — Name of the error. See the `x-error-codes` catalog in openapi file for a complete list of possible error codes with detailed information including HTTP status codes, causes, remediation steps, and retry guidance.
- `error_path` (string, optional) — Path at which an error occurred.

### SettingResponse

- `value` (any, required, nullable) — Current value of the setting. Null when the setting has no value.
- `is_inherited` (boolean, required)
- `source` (enum, required)
  - Allowed values: `account`, `team`, `parent_team`, `default`
- `type` (enum, required)
  - Allowed values: `boolean`, `integer`, `string`, `array`
- `writable` (boolean, required)
- `lock` (SettingLockResponse, required)

### SettingLockResponse

- `mode` (enum, required) — Who can change a locked team setting. Every property in `lock` accepts these values. `organization_admins` prevents subteams and accounts from overriding the value. `team_admins` lets admins of that team and its subteams set their own value. `members` lets each account set its own value.
  - Allowed values: `organization_admins`, `team_admins`, `members`
- `source` (enum, required)
  - Allowed values: `team`, `parent_team`, `default`

## Examples

**Request**

```json
{}
```

**Response**

```json
{
  "account_id": "string",
  "settings": {
    "company": {
      "value": null,
      "is_inherited": true,
      "source": "account",
      "type": "boolean",
      "writable": true,
      "lock": {
        "mode": "organization_admins",
        "source": "team"
      }
    },
    "custom_signing_redirect_enabled": {
      "value": null,
      "is_inherited": true,
      "source": "account",
      "type": "boolean",
      "writable": true,
      "lock": {
        "mode": "organization_admins",
        "source": "team"
      }
    },
    "custom_signing_redirect_url": {
      "value": null,
      "is_inherited": true,
      "source": "account",
      "type": "boolean",
      "writable": true,
      "lock": {
        "mode": "organization_admins",
        "source": "team"
      }
    },
    "custom_tagline": {
      "value": null,
      "is_inherited": true,
      "source": "account",
      "type": "boolean",
      "writable": true,
      "lock": {
        "mode": "organization_admins",
        "source": "team"
      }
    },
    "date_format": {
      "value": null,
      "is_inherited": true,
      "source": "account",
      "type": "boolean",
      "writable": true,
      "lock": {
        "mode": "organization_admins",
        "source": "team"
      }
    },
    "is_signature_reminders_enabled": {
      "value": null,
      "is_inherited": true,
      "source": "account",
      "type": "boolean",
      "writable": true,
      "lock": {
        "mode": "organization_admins",
        "source": "team"
      }
    },
    "request_email_from": {
      "value": null,
      "is_inherited": true,
      "source": "account",
      "type": "boolean",
      "writable": true,
      "lock": {
        "mode": "organization_admins",
        "source": "team"
      }
    },
    "request_email_signature": {
      "value": null,
      "is_inherited": true,
      "source": "account",
      "type": "boolean",
      "writable": true,
      "lock": {
        "mode": "organization_admins",
        "source": "team"
      }
    },
    "required_signature_types": {
      "value": null,
      "is_inherited": true,
      "source": "account",
      "type": "boolean",
      "writable": true,
      "lock": {
        "mode": "organization_admins",
        "source": "team"
      }
    },
    "should_enable_tamper_proof": {
      "value": null,
      "is_inherited": true,
      "source": "account",
      "type": "boolean",
      "writable": true,
      "lock": {
        "mode": "organization_admins",
        "source": "team"
      }
    },
    "should_include_distinct_pdfs": {
      "value": null,
      "is_inherited": true,
      "source": "account",
      "type": "boolean",
      "writable": true,
      "lock": {
        "mode": "organization_admins",
        "source": "team"
      }
    },
    "should_offer_signer_access_code": {
      "value": null,
      "is_inherited": true,
      "source": "account",
      "type": "boolean",
      "writable": true,
      "lock": {
        "mode": "organization_admins",
        "source": "team"
      }
    },
    "should_offer_signer_sms_authentication": {
      "value": null,
      "is_inherited": true,
      "source": "account",
      "type": "boolean",
      "writable": true,
      "lock": {
        "mode": "organization_admins",
        "source": "team"
      }
    },
    "should_remove_document_id": {
      "value": null,
      "is_inherited": true,
      "source": "account",
      "type": "boolean",
      "writable": true,
      "lock": {
        "mode": "organization_admins",
        "source": "team"
      }
    },
    "is_notify_on_sign_enabled": {
      "value": null,
      "is_inherited": true,
      "source": "account",
      "type": "boolean",
      "writable": true,
      "lock": {
        "mode": "organization_admins",
        "source": "team"
      }
    },
    "is_notify_on_view_enabled": {
      "value": null,
      "is_inherited": true,
      "source": "account",
      "type": "boolean",
      "writable": true,
      "lock": {
        "mode": "organization_admins",
        "source": "team"
      }
    },
    "should_autocomplete": {
      "value": null,
      "is_inherited": true,
      "source": "account",
      "type": "boolean",
      "writable": true,
      "lock": {
        "mode": "organization_admins",
        "source": "team"
      }
    },
    "should_include_requested_pdfs": {
      "value": null,
      "is_inherited": true,
      "source": "account",
      "type": "boolean",
      "writable": true,
      "lock": {
        "mode": "organization_admins",
        "source": "team"
      }
    },
    "should_include_requested_pdfs_for_others": {
      "value": null,
      "is_inherited": true,
      "source": "account",
      "type": "boolean",
      "writable": true,
      "lock": {
        "mode": "organization_admins",
        "source": "team"
      }
    },
    "should_include_sent_doc_pdfs": {
      "value": null,
      "is_inherited": true,
      "source": "account",
      "type": "boolean",
      "writable": true,
      "lock": {
        "mode": "organization_admins",
        "source": "team"
      }
    },
    "should_include_sent_doc_pdfs_for_others": {
      "value": null,
      "is_inherited": true,
      "source": "account",
      "type": "boolean",
      "writable": true,
      "lock": {
        "mode": "organization_admins",
        "source": "team"
      }
    },
    "should_send_daily_summary": {
      "value": null,
      "is_inherited": true,
      "source": "account",
      "type": "boolean",
      "writable": true,
      "lock": {
        "mode": "organization_admins",
        "source": "team"
      }
    },
    "should_send_embedded_signature_conf_emails": {
      "value": null,
      "is_inherited": true,
      "source": "account",
      "type": "boolean",
      "writable": true,
      "lock": {
        "mode": "organization_admins",
        "source": "team"
      }
    },
    "should_send_ordered_sr_email": {
      "value": null,
      "is_inherited": true,
      "source": "account",
      "type": "boolean",
      "writable": true,
      "lock": {
        "mode": "organization_admins",
        "source": "team"
      }
    },
    "should_send_outbound_conf_emails": {
      "value": null,
      "is_inherited": true,
      "source": "account",
      "type": "boolean",
      "writable": true,
      "lock": {
        "mode": "organization_admins",
        "source": "team"
      }
    },
    "template_link_signature_emails_enabled": {
      "value": null,
      "is_inherited": true,
      "source": "account",
      "type": "boolean",
      "writable": true,
      "lock": {
        "mode": "organization_admins",
        "source": "team"
      }
    }
  },
  "warnings": [
    {
      "warning_msg": "string",
      "warning_name": "string"
    }
  ]
}
```

**SDK Code**

```php PHP
<?php

namespace Dropbox\SignSandbox;

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

use Dropbox;

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

$account_settings_update_request = (new Dropbox\Sign\Model\AccountSettingsUpdateRequest())
    ->setSet([
        'date_format' => Dropbox\Sign\Model\DateFormat::MM_DD_YYYY,
        'required_signature_types' => [
            Dropbox\Sign\Model\RequiredSignatureType::DRAW,
            Dropbox\Sign\Model\RequiredSignatureType::TYPE,
        ],
        'should_enable_tamper_proof' => false,
    ])
    ->setUnset(['company']);

try {
    $response = (new Dropbox\Sign\Api\AccountApi(config: $config))->accountSettingsUpdate(
        account_settings_update_request: $account_settings_update_request,
    );

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

```

```csharp C#
using System;
using System.Collections.Generic;

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

namespace Dropbox.SignSandbox;

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

        var accountSettingsUpdateRequest = new AccountSettingsUpdateRequest(
            set: new Dictionary<string, Object>()
            {
                { "date_format", DateFormat.MMDDYYYY },
                {
                    "required_signature_types",
                    new List<RequiredSignatureType>()
                    {
                        RequiredSignatureType.Draw,
                        RequiredSignatureType.Type,
                    }
                },
                { "should_enable_tamper_proof", false },
            },
            unset: new List<string>() { "company" }
        );

        try
        {
            var response = new AccountApi(config).AccountSettingsUpdate(
                accountSettingsUpdateRequest: accountSettingsUpdateRequest
            );

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

```

```typescript TypeScript
import api from "@dropbox/sign"
import models from "@dropbox/sign"

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

const accountSettingsUpdateRequest: models.AccountSettingsUpdateRequest = {
  set: {
    date_format: models.DateFormat.MmDdYyyy,
    required_signature_types: [
      models.RequiredSignatureType.Draw,
      models.RequiredSignatureType.Type,
    ],
    should_enable_tamper_proof: false,
  },
  unset: ["company"],
};

apiCaller.accountSettingsUpdate(
  accountSettingsUpdateRequest,
).then(response => {
  console.log(response.body);
}).catch(error => {
  console.log("Exception when calling AccountApi#accountSettingsUpdate:");
  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.AccountApi;
import com.dropbox.sign.auth.HttpBasicAuth;
import com.dropbox.sign.model.AccountSettingsUpdateRequest;
import com.dropbox.sign.model.DateFormat;
import com.dropbox.sign.model.RequiredSignatureType;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class AccountSettingsUpdateExample
{
    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");

        Map<String, Object> set = new HashMap<>();
        set.put("date_format", DateFormat.MM_DD_YYYY);
        set.put("required_signature_types", List.of(
            RequiredSignatureType.DRAW,
            RequiredSignatureType.TYPE
        ));
        set.put("should_enable_tamper_proof", false);

        var accountSettingsUpdateRequest = new AccountSettingsUpdateRequest()
            .set(set)
            .unset(List.of("company"));

        try
        {
            var response = new AccountApi(config).accountSettingsUpdate(
                accountSettingsUpdateRequest
            );

            System.out.println(response);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccountApi#accountSettingsUpdate");
            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 "dropbox-sign"

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

account_settings_update_request = Dropbox::Sign::AccountSettingsUpdateRequest.new
account_settings_update_request.set = {
    "date_format" => Dropbox::Sign::DateFormat::MM_DD_YYYY,
    "required_signature_types" => [
        Dropbox::Sign::RequiredSignatureType::DRAW,
        Dropbox::Sign::RequiredSignatureType::TYPE,
    ],
    "should_enable_tamper_proof" => false,
}
account_settings_update_request.unset = ["company"]

begin
    response = Dropbox::Sign::AccountApi.new.account_settings_update(
        account_settings_update_request,
    )

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

```

```python Python
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:
    account_settings_update_request = models.AccountSettingsUpdateRequest(
        set={
            "date_format": models.DateFormat.MM_SLASH_DD_SLASH_YYYY,
            "required_signature_types": [
                models.RequiredSignatureType.DRAW,
                models.RequiredSignatureType.TYPE,
            ],
            "should_enable_tamper_proof": False,
        },
        unset=["company"],
    )

    try:
        response = api.AccountApi(api_client).account_settings_update(
            account_settings_update_request=account_settings_update_request,
        )

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

```

```go
package main

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

func main() {

	url := "https://api.hellosign.com/v3/account/settings?account_id=ab55cd14a97219e36b5ff5fe23f2f9329b0c1e97"

	payload := strings.NewReader("{}")

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

	req.SetBasicAuth("<api_key>", "")
	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
import Foundation

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

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

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.hellosign.com/v3/account/settings?account_id=ab55cd14a97219e36b5ff5fe23f2f9329b0c1e97")! 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()
```