Skip to main content
PATCH
/
v1
/
customer_notification_protocol
Update
curl --request PATCH \
  --url https://{defaultHost}/v1/customer_notification_protocol \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "customer_notification_protocol": {
    "from_name": "Support Team",
    "reply_to_email": "support@example.com"
  }
}
'
import requests

url = "https://{defaultHost}/v1/customer_notification_protocol"

payload = { "customer_notification_protocol": {
"from_name": "Support Team",
"reply_to_email": "support@example.com"
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
customer_notification_protocol: {from_name: 'Support Team', reply_to_email: 'support@example.com'}
})
};

fetch('https://{defaultHost}/v1/customer_notification_protocol', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://{defaultHost}/v1/customer_notification_protocol",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'customer_notification_protocol' => [
'from_name' => 'Support Team',
'reply_to_email' => 'support@example.com'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

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

func main() {

url := "https://{defaultHost}/v1/customer_notification_protocol"

payload := strings.NewReader("{\n \"customer_notification_protocol\": {\n \"from_name\": \"Support Team\",\n \"reply_to_email\": \"support@example.com\"\n }\n}")

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

req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")

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

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

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.patch("https://{defaultHost}/v1/customer_notification_protocol")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"customer_notification_protocol\": {\n \"from_name\": \"Support Team\",\n \"reply_to_email\": \"support@example.com\"\n }\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://{defaultHost}/v1/customer_notification_protocol")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"customer_notification_protocol\": {\n \"from_name\": \"Support Team\",\n \"reply_to_email\": \"support@example.com\"\n }\n}"

response = http.request(request)
puts response.read_body
{
  "id": "6d857dd0-d367-49c7-9b9b-8204b4cc0d90",
  "object": "customer_notification_protocol",
  "free_order_enabled": true,
  "from_name": "Support Team",
  "notifications_enabled": true,
  "order_enabled": true,
  "payment_failure_enabled": true,
  "purchase_enabled": true,
  "refund_enabled": true,
  "reply_to_email": "support@example.com",
  "subscription_cancellation_enabled": false,
  "subscription_reminder_enabled": false,
  "subscription_renewal_enabled": false,
  "upsell_accepted_enabled": true,
  "created_at": 1782485818,
  "updated_at": 1782485818
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
customer_notification_protocol
object

Response

200 - application/json

Success

id
string | null

The UUID of the specific object.

object
string

A string describing the object type returned.

free_order_enabled
boolean

Whether or not order confirmation and subscription renewal emails will be sent to customers when the order is free.

notifications_enabled
boolean

Whether or not any notifications should be sent to customers. If false no notifications will be sent to customers and all other settings will be ignored.

order_enabled
boolean

Whether or not order confirmation emails will be sent to customers.

payment_failure_enabled
boolean

Whether or not subscription dunning emails will be sent to customers.

purchase_enabled
boolean

Whether or not product access emails will be sent to customers.

refund_enabled
boolean

Whether or not refund emails will be sent to customers.

subscription_cancellation_enabled
boolean

Whether or not subscription cancellation emails will be sent to customers.

subscription_reminder_enabled
boolean

Whether or not subscription reminder emails will be sent to customers.

subscription_renewal_enabled
boolean

Whether or not subscription renewal emails will be sent to customers.

from_name
string | null

The from name to use when sending emails to customers.

reply_to_email
string | null

The reply-to email address to use when sending emails to customers.

upsell_accepted_enabled
boolean

Whether or not post purchase offer accepted emails will be sent to customers.

created_at
integer | null

Time at which the object was created. Measured in seconds since the Unix epoch.

updated_at
integer | null

Time at which the object was last updated. Measured in seconds since the Unix epoch.