Back to Collection Items
func chilkatTest() {
// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
let http = CkoHttp()
var success: Bool
// Use this online tool to generate code from sample JSON: Generate Code to Create JSON
// The following JSON is sent in the request body.
// {
// "replyEmailAddressOverride": "sample string 1",
// "replyEmailNameOverride": "sample string 2",
// "bccEmailAddresses": [
// {
// "bccEmailAddressId": "sample string 1",
// "email": "sample string 2"
// }
// ]
// }
let json = CkoJsonObject()
json.UpdateString("replyEmailAddressOverride", value: "sample string 1")
json.UpdateString("replyEmailNameOverride", value: "sample string 2")
json.UpdateString("bccEmailAddresses[0].bccEmailAddressId", value: "sample string 1")
json.UpdateString("bccEmailAddresses[0].email", value: "sample string 2")
// Adds the "Authorization: Bearer {{accessToken}}" header.
http.AuthToken = "{{accessToken}}"
http.SetRequestHeader("Accept", value: "application/json")
var resp: CkoHttpResponse? = http.PostJson3("https://domain.com/v2.1/accounts/{{accountId}}/envelopes/{{envelopeId}}/email_settings", contentType: "application/json", json: json)
if http.LastMethodSuccess == false {
print("\(http.LastErrorText)")
return
}
print("\(resp!.StatusCode.intValue)")
print("\(resp!.BodyStr)")
resp = nil
}
Curl Command
curl -X POST
-H "Accept: application/json"
-H "Authorization: Bearer {{accessToken}}"
-d '{
"replyEmailAddressOverride": "sample string 1",
"replyEmailNameOverride": "sample string 2",
"bccEmailAddresses": [
{
"bccEmailAddressId": "sample string 1",
"email": "sample string 2"
}
]
}'
https://domain.com/v2.1/accounts/{{accountId}}/envelopes/{{envelopeId}}/email_settings
Postman Collection Item JSON
{
"name": "Adds email setting overrides to an envelope.",
"request": {
"method": "POST",
"header": [
{
"key": "Accept",
"value": "application/json"
},
{
"key": "Authorization",
"value": "Bearer {{accessToken}}"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"replyEmailAddressOverride\": \"sample string 1\",\n \"replyEmailNameOverride\": \"sample string 2\",\n \"bccEmailAddresses\": [\n {\n \"bccEmailAddressId\": \"sample string 1\",\n \"email\": \"sample string 2\"\n }\n ]\n}"
},
"url": {
"raw": "{{baseUrl}}/v2.1/accounts/{{accountId}}/envelopes/{{envelopeId}}/email_settings",
"host": [
"{{baseUrl}}"
],
"path": [
"v2.1",
"accounts",
"{{accountId}}",
"envelopes",
"{{envelopeId}}",
"email_settings"
],
"variable": [
{
"key": "accountId",
"value": "{{accountId}}",
"type": "string"
},
{
"key": "envelopeId",
"value": "{{envelopeId}}",
"type": "string"
}
]
},
"description": "Adds email override settings, changing the email address to reply to an email address, name, or the BCC for email archive information, for the envelope. Note that adding email settings will only affect email communications that occur after the addition was made.\n\n### Important: The BCC Email address feature is designed to provide a copy of all email communications for external archiving purposes. DocuSign recommends that envelopes sent using the BCC for Email Archive feature, including the BCC Email Override option, include additional signer authentication options. To send a copy of the envelope to a recipient who does not need to sign, use a Carbon Copies or Certified Deliveries Recipient Type."
},
"response": [
]
}