Update handwritten-card workspace defaults
Saves preferences and optional governance atomically. Changing/clearing auto_reload also requires raw access_payment_gateways. Partner-owned test-mode changes run after commit and return provider_mode_sync; failed, unknown or pending reconciliation outcomes do not roll back saved defaults. Managed practice/live state is controlled by Gratona. Requires the configured Handwrytten feature (normally handwrytten_mailings). Requires permission: one of account, manage_settings, mailings_manage, access_account_settings (raw capability).
curl --request PUT \
--url https://api.gratona.com/v1/admin/handwrytten/preferences \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"account_mode": "hys_managed",
"api_key": "Api Key",
"default_card_catalog_item_id": 1,
"default_card_vendor_id": "Default Card Vendor Id",
"default_font_label": "Default Font Label",
"default_insert_vendor_id": "Default Insert Vendor Id",
"default_sender_address": {
"first_name": "Example",
"last_name": "Example",
"name": "Example",
"address1": "Example",
"address2": "Example",
"street": "Example",
"address_line2": "Example",
"city": "Example",
"state": "Example",
"province": "Example",
"zip": "Example",
"postal_code": "Example",
"country": "Example",
"country_code": "Example",
"country_id": 1
},
"default_return_address": {
"first_name": "Example",
"last_name": "Example",
"name": "Example",
"address1": "Example",
"address2": "Example",
"street": "Example",
"address_line2": "Example",
"city": "Example",
"state": "Example",
"province": "Example",
"zip": "Example",
"postal_code": "Example",
"country": "Example",
"country_code": "Example",
"country_id": 1
},
"default_signer_user_id": 1,
"estimated_monthly_volume": 1,
"low_credit_threshold": 1,
"test_mode": true,
"saved_preferences": {
"low_balance_threshold_cents": 1,
"auto_reload": {
"enabled": true,
"threshold_cents": 1,
"pack_key": "postal-mail-50"
}
},
"governance": {
"monthly_cap_cents": 1,
"per_user_monthly_cap_cents": 1,
"low_balance_threshold_cents": 1,
"require_approval_over_cents": 1,
"require_director_for_inserts": true,
"enforce_suppression": true,
"household_dedupe": true,
"require_cass_verification": true,
"outcome_window_days": 1,
"program_caps": [
"<unknown>"
],
"campaign_caps": [
"<unknown>"
]
}
}
'import requests
url = "https://api.gratona.com/v1/admin/handwrytten/preferences"
payload = {
"account_mode": "hys_managed",
"api_key": "Api Key",
"default_card_catalog_item_id": 1,
"default_card_vendor_id": "Default Card Vendor Id",
"default_font_label": "Default Font Label",
"default_insert_vendor_id": "Default Insert Vendor Id",
"default_sender_address": {
"first_name": "Example",
"last_name": "Example",
"name": "Example",
"address1": "Example",
"address2": "Example",
"street": "Example",
"address_line2": "Example",
"city": "Example",
"state": "Example",
"province": "Example",
"zip": "Example",
"postal_code": "Example",
"country": "Example",
"country_code": "Example",
"country_id": 1
},
"default_return_address": {
"first_name": "Example",
"last_name": "Example",
"name": "Example",
"address1": "Example",
"address2": "Example",
"street": "Example",
"address_line2": "Example",
"city": "Example",
"state": "Example",
"province": "Example",
"zip": "Example",
"postal_code": "Example",
"country": "Example",
"country_code": "Example",
"country_id": 1
},
"default_signer_user_id": 1,
"estimated_monthly_volume": 1,
"low_credit_threshold": 1,
"test_mode": True,
"saved_preferences": {
"low_balance_threshold_cents": 1,
"auto_reload": {
"enabled": True,
"threshold_cents": 1,
"pack_key": "postal-mail-50"
}
},
"governance": {
"monthly_cap_cents": 1,
"per_user_monthly_cap_cents": 1,
"low_balance_threshold_cents": 1,
"require_approval_over_cents": 1,
"require_director_for_inserts": True,
"enforce_suppression": True,
"household_dedupe": True,
"require_cass_verification": True,
"outcome_window_days": 1,
"program_caps": ["<unknown>"],
"campaign_caps": ["<unknown>"]
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
account_mode: 'hys_managed',
api_key: 'Api Key',
default_card_catalog_item_id: 1,
default_card_vendor_id: 'Default Card Vendor Id',
default_font_label: 'Default Font Label',
default_insert_vendor_id: 'Default Insert Vendor Id',
default_sender_address: {
first_name: 'Example',
last_name: 'Example',
name: 'Example',
address1: 'Example',
address2: 'Example',
street: 'Example',
address_line2: 'Example',
city: 'Example',
state: 'Example',
province: 'Example',
zip: 'Example',
postal_code: 'Example',
country: 'Example',
country_code: 'Example',
country_id: 1
},
default_return_address: {
first_name: 'Example',
last_name: 'Example',
name: 'Example',
address1: 'Example',
address2: 'Example',
street: 'Example',
address_line2: 'Example',
city: 'Example',
state: 'Example',
province: 'Example',
zip: 'Example',
postal_code: 'Example',
country: 'Example',
country_code: 'Example',
country_id: 1
},
default_signer_user_id: 1,
estimated_monthly_volume: 1,
low_credit_threshold: 1,
test_mode: true,
saved_preferences: {
low_balance_threshold_cents: 1,
auto_reload: {enabled: true, threshold_cents: 1, pack_key: 'postal-mail-50'}
},
governance: {
monthly_cap_cents: 1,
per_user_monthly_cap_cents: 1,
low_balance_threshold_cents: 1,
require_approval_over_cents: 1,
require_director_for_inserts: true,
enforce_suppression: true,
household_dedupe: true,
require_cass_verification: true,
outcome_window_days: 1,
program_caps: ['<unknown>'],
campaign_caps: ['<unknown>']
}
})
};
fetch('https://api.gratona.com/v1/admin/handwrytten/preferences', 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://api.gratona.com/v1/admin/handwrytten/preferences",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'account_mode' => 'hys_managed',
'api_key' => 'Api Key',
'default_card_catalog_item_id' => 1,
'default_card_vendor_id' => 'Default Card Vendor Id',
'default_font_label' => 'Default Font Label',
'default_insert_vendor_id' => 'Default Insert Vendor Id',
'default_sender_address' => [
'first_name' => 'Example',
'last_name' => 'Example',
'name' => 'Example',
'address1' => 'Example',
'address2' => 'Example',
'street' => 'Example',
'address_line2' => 'Example',
'city' => 'Example',
'state' => 'Example',
'province' => 'Example',
'zip' => 'Example',
'postal_code' => 'Example',
'country' => 'Example',
'country_code' => 'Example',
'country_id' => 1
],
'default_return_address' => [
'first_name' => 'Example',
'last_name' => 'Example',
'name' => 'Example',
'address1' => 'Example',
'address2' => 'Example',
'street' => 'Example',
'address_line2' => 'Example',
'city' => 'Example',
'state' => 'Example',
'province' => 'Example',
'zip' => 'Example',
'postal_code' => 'Example',
'country' => 'Example',
'country_code' => 'Example',
'country_id' => 1
],
'default_signer_user_id' => 1,
'estimated_monthly_volume' => 1,
'low_credit_threshold' => 1,
'test_mode' => true,
'saved_preferences' => [
'low_balance_threshold_cents' => 1,
'auto_reload' => [
'enabled' => true,
'threshold_cents' => 1,
'pack_key' => 'postal-mail-50'
]
],
'governance' => [
'monthly_cap_cents' => 1,
'per_user_monthly_cap_cents' => 1,
'low_balance_threshold_cents' => 1,
'require_approval_over_cents' => 1,
'require_director_for_inserts' => true,
'enforce_suppression' => true,
'household_dedupe' => true,
'require_cass_verification' => true,
'outcome_window_days' => 1,
'program_caps' => [
'<unknown>'
],
'campaign_caps' => [
'<unknown>'
]
]
]),
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://api.gratona.com/v1/admin/handwrytten/preferences"
payload := strings.NewReader("{\n \"account_mode\": \"hys_managed\",\n \"api_key\": \"Api Key\",\n \"default_card_catalog_item_id\": 1,\n \"default_card_vendor_id\": \"Default Card Vendor Id\",\n \"default_font_label\": \"Default Font Label\",\n \"default_insert_vendor_id\": \"Default Insert Vendor Id\",\n \"default_sender_address\": {\n \"first_name\": \"Example\",\n \"last_name\": \"Example\",\n \"name\": \"Example\",\n \"address1\": \"Example\",\n \"address2\": \"Example\",\n \"street\": \"Example\",\n \"address_line2\": \"Example\",\n \"city\": \"Example\",\n \"state\": \"Example\",\n \"province\": \"Example\",\n \"zip\": \"Example\",\n \"postal_code\": \"Example\",\n \"country\": \"Example\",\n \"country_code\": \"Example\",\n \"country_id\": 1\n },\n \"default_return_address\": {\n \"first_name\": \"Example\",\n \"last_name\": \"Example\",\n \"name\": \"Example\",\n \"address1\": \"Example\",\n \"address2\": \"Example\",\n \"street\": \"Example\",\n \"address_line2\": \"Example\",\n \"city\": \"Example\",\n \"state\": \"Example\",\n \"province\": \"Example\",\n \"zip\": \"Example\",\n \"postal_code\": \"Example\",\n \"country\": \"Example\",\n \"country_code\": \"Example\",\n \"country_id\": 1\n },\n \"default_signer_user_id\": 1,\n \"estimated_monthly_volume\": 1,\n \"low_credit_threshold\": 1,\n \"test_mode\": true,\n \"saved_preferences\": {\n \"low_balance_threshold_cents\": 1,\n \"auto_reload\": {\n \"enabled\": true,\n \"threshold_cents\": 1,\n \"pack_key\": \"postal-mail-50\"\n }\n },\n \"governance\": {\n \"monthly_cap_cents\": 1,\n \"per_user_monthly_cap_cents\": 1,\n \"low_balance_threshold_cents\": 1,\n \"require_approval_over_cents\": 1,\n \"require_director_for_inserts\": true,\n \"enforce_suppression\": true,\n \"household_dedupe\": true,\n \"require_cass_verification\": true,\n \"outcome_window_days\": 1,\n \"program_caps\": [\n \"<unknown>\"\n ],\n \"campaign_caps\": [\n \"<unknown>\"\n ]\n }\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.gratona.com/v1/admin/handwrytten/preferences")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"account_mode\": \"hys_managed\",\n \"api_key\": \"Api Key\",\n \"default_card_catalog_item_id\": 1,\n \"default_card_vendor_id\": \"Default Card Vendor Id\",\n \"default_font_label\": \"Default Font Label\",\n \"default_insert_vendor_id\": \"Default Insert Vendor Id\",\n \"default_sender_address\": {\n \"first_name\": \"Example\",\n \"last_name\": \"Example\",\n \"name\": \"Example\",\n \"address1\": \"Example\",\n \"address2\": \"Example\",\n \"street\": \"Example\",\n \"address_line2\": \"Example\",\n \"city\": \"Example\",\n \"state\": \"Example\",\n \"province\": \"Example\",\n \"zip\": \"Example\",\n \"postal_code\": \"Example\",\n \"country\": \"Example\",\n \"country_code\": \"Example\",\n \"country_id\": 1\n },\n \"default_return_address\": {\n \"first_name\": \"Example\",\n \"last_name\": \"Example\",\n \"name\": \"Example\",\n \"address1\": \"Example\",\n \"address2\": \"Example\",\n \"street\": \"Example\",\n \"address_line2\": \"Example\",\n \"city\": \"Example\",\n \"state\": \"Example\",\n \"province\": \"Example\",\n \"zip\": \"Example\",\n \"postal_code\": \"Example\",\n \"country\": \"Example\",\n \"country_code\": \"Example\",\n \"country_id\": 1\n },\n \"default_signer_user_id\": 1,\n \"estimated_monthly_volume\": 1,\n \"low_credit_threshold\": 1,\n \"test_mode\": true,\n \"saved_preferences\": {\n \"low_balance_threshold_cents\": 1,\n \"auto_reload\": {\n \"enabled\": true,\n \"threshold_cents\": 1,\n \"pack_key\": \"postal-mail-50\"\n }\n },\n \"governance\": {\n \"monthly_cap_cents\": 1,\n \"per_user_monthly_cap_cents\": 1,\n \"low_balance_threshold_cents\": 1,\n \"require_approval_over_cents\": 1,\n \"require_director_for_inserts\": true,\n \"enforce_suppression\": true,\n \"household_dedupe\": true,\n \"require_cass_verification\": true,\n \"outcome_window_days\": 1,\n \"program_caps\": [\n \"<unknown>\"\n ],\n \"campaign_caps\": [\n \"<unknown>\"\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gratona.com/v1/admin/handwrytten/preferences")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"account_mode\": \"hys_managed\",\n \"api_key\": \"Api Key\",\n \"default_card_catalog_item_id\": 1,\n \"default_card_vendor_id\": \"Default Card Vendor Id\",\n \"default_font_label\": \"Default Font Label\",\n \"default_insert_vendor_id\": \"Default Insert Vendor Id\",\n \"default_sender_address\": {\n \"first_name\": \"Example\",\n \"last_name\": \"Example\",\n \"name\": \"Example\",\n \"address1\": \"Example\",\n \"address2\": \"Example\",\n \"street\": \"Example\",\n \"address_line2\": \"Example\",\n \"city\": \"Example\",\n \"state\": \"Example\",\n \"province\": \"Example\",\n \"zip\": \"Example\",\n \"postal_code\": \"Example\",\n \"country\": \"Example\",\n \"country_code\": \"Example\",\n \"country_id\": 1\n },\n \"default_return_address\": {\n \"first_name\": \"Example\",\n \"last_name\": \"Example\",\n \"name\": \"Example\",\n \"address1\": \"Example\",\n \"address2\": \"Example\",\n \"street\": \"Example\",\n \"address_line2\": \"Example\",\n \"city\": \"Example\",\n \"state\": \"Example\",\n \"province\": \"Example\",\n \"zip\": \"Example\",\n \"postal_code\": \"Example\",\n \"country\": \"Example\",\n \"country_code\": \"Example\",\n \"country_id\": 1\n },\n \"default_signer_user_id\": 1,\n \"estimated_monthly_volume\": 1,\n \"low_credit_threshold\": 1,\n \"test_mode\": true,\n \"saved_preferences\": {\n \"low_balance_threshold_cents\": 1,\n \"auto_reload\": {\n \"enabled\": true,\n \"threshold_cents\": 1,\n \"pack_key\": \"postal-mail-50\"\n }\n },\n \"governance\": {\n \"monthly_cap_cents\": 1,\n \"per_user_monthly_cap_cents\": 1,\n \"low_balance_threshold_cents\": 1,\n \"require_approval_over_cents\": 1,\n \"require_director_for_inserts\": true,\n \"enforce_suppression\": true,\n \"household_dedupe\": true,\n \"require_cass_verification\": true,\n \"outcome_window_days\": 1,\n \"program_caps\": [\n \"<unknown>\"\n ],\n \"campaign_caps\": [\n \"<unknown>\"\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"account_mode": "hys_managed",
"partner_owned_setup_enabled": true,
"account_connected": true,
"status": "Example",
"test_mode": true,
"default_card_catalog_item_id": 42,
"default_signer_user_id": 42,
"default_card_vendor_id": "Example",
"default_font_label": "Example",
"default_insert_vendor_id": "Example",
"catalog_sync_status": "Example",
"catalog_sync_error": "Example",
"default_sender_address_json": {
"first_name": "Example",
"last_name": "Example",
"name": "Example",
"address1": "Example",
"address2": "Example",
"street": "Example",
"address_line2": "Example",
"city": "Example",
"state": "Example",
"province": "Example",
"zip": "Example",
"postal_code": "Example",
"country": "Example",
"country_code": "Example",
"country_id": 1
},
"default_return_address_json": {
"first_name": "Example",
"last_name": "Example",
"name": "Example",
"address1": "Example",
"address2": "Example",
"street": "Example",
"address_line2": "Example",
"city": "Example",
"state": "Example",
"province": "Example",
"zip": "Example",
"postal_code": "Example",
"country": "Example",
"country_code": "Example",
"country_id": 1
},
"estimated_monthly_volume": 100,
"low_credit_threshold": 100,
"catalog_synced_at": "2026-10-20T12:00:00Z",
"saved_preferences_json": {}
},
"governance": {
"id": 100,
"client_id": 100,
"monthly_cap_cents": 100,
"per_user_monthly_cap_cents": 100,
"low_balance_threshold_cents": 100,
"require_approval_over_cents": 100,
"outcome_window_days": 100,
"updated_by_user_id": 100,
"require_director_for_inserts": true,
"enforce_suppression": true,
"household_dedupe": true,
"require_cass_verification": true,
"program_caps_json": {},
"campaign_caps_json": {},
"created_at": "2026-10-20T12:00:00Z",
"updated_at": "2026-10-20T12:00:00Z"
},
"provider_mode_sync": {
"status": "synced",
"test_mode": true,
"provider_confirmed_test_mode": true,
"message": "Example"
}
}{
"message": "Unauthorized",
"status": "error"
}{
"errors": {},
"status": "error",
"message": "The given data was invalid."
}Authorizations
Passport bearer token authentication for legacy admin sessions.
Body
Validated request fields for this operation.
Account mode. Validation: nullable, string; allowed values: hys_managed, partner_owned.
hys_managed, partner_owned, null "hys_managed"
Api key. Validation: nullable, string.
"Api Key"
Default card catalog item id. Validation: nullable, integer.
1
Default card vendor id. Validation: nullable, string, max:128.
128"Default Card Vendor Id"
Default font label. Validation: nullable, string, max:191.
191"Default Font Label"
Default insert vendor id. Validation: nullable, string, max:128.
128"Default Insert Vendor Id"
Postal address snapshot. Country representations must agree with the active catalog; state/province is required for supported countries that require it.
Show child attributes
Show child attributes
Postal address snapshot. Country representations must agree with the active catalog; state/province is required for supported countries that require it.
Show child attributes
Show child attributes
Default signer user id. Validation: nullable, integer.
1
Estimated monthly volume. Validation: nullable, integer, min:0.
x >= 01
Low credit threshold. Validation: nullable, integer, min:0.
x >= 01
Test mode. Validation: nullable, boolean.
true
Saved preferences. Validation: nullable, array.
Show child attributes
Show child attributes
Governance. Validation: nullable, array.
Show child attributes
Show child attributes
Response
Operation result.
Customer preference projection; provider keys, account identities and raw readiness are omitted.
Show child attributes
Show child attributes
Workspace spending/approval rules. Omitted updates preserve existing values; defaults enforce suppression and household deduplication, require approval above zero cents and observe a 60-day outcome window.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
curl --request PUT \
--url https://api.gratona.com/v1/admin/handwrytten/preferences \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"account_mode": "hys_managed",
"api_key": "Api Key",
"default_card_catalog_item_id": 1,
"default_card_vendor_id": "Default Card Vendor Id",
"default_font_label": "Default Font Label",
"default_insert_vendor_id": "Default Insert Vendor Id",
"default_sender_address": {
"first_name": "Example",
"last_name": "Example",
"name": "Example",
"address1": "Example",
"address2": "Example",
"street": "Example",
"address_line2": "Example",
"city": "Example",
"state": "Example",
"province": "Example",
"zip": "Example",
"postal_code": "Example",
"country": "Example",
"country_code": "Example",
"country_id": 1
},
"default_return_address": {
"first_name": "Example",
"last_name": "Example",
"name": "Example",
"address1": "Example",
"address2": "Example",
"street": "Example",
"address_line2": "Example",
"city": "Example",
"state": "Example",
"province": "Example",
"zip": "Example",
"postal_code": "Example",
"country": "Example",
"country_code": "Example",
"country_id": 1
},
"default_signer_user_id": 1,
"estimated_monthly_volume": 1,
"low_credit_threshold": 1,
"test_mode": true,
"saved_preferences": {
"low_balance_threshold_cents": 1,
"auto_reload": {
"enabled": true,
"threshold_cents": 1,
"pack_key": "postal-mail-50"
}
},
"governance": {
"monthly_cap_cents": 1,
"per_user_monthly_cap_cents": 1,
"low_balance_threshold_cents": 1,
"require_approval_over_cents": 1,
"require_director_for_inserts": true,
"enforce_suppression": true,
"household_dedupe": true,
"require_cass_verification": true,
"outcome_window_days": 1,
"program_caps": [
"<unknown>"
],
"campaign_caps": [
"<unknown>"
]
}
}
'import requests
url = "https://api.gratona.com/v1/admin/handwrytten/preferences"
payload = {
"account_mode": "hys_managed",
"api_key": "Api Key",
"default_card_catalog_item_id": 1,
"default_card_vendor_id": "Default Card Vendor Id",
"default_font_label": "Default Font Label",
"default_insert_vendor_id": "Default Insert Vendor Id",
"default_sender_address": {
"first_name": "Example",
"last_name": "Example",
"name": "Example",
"address1": "Example",
"address2": "Example",
"street": "Example",
"address_line2": "Example",
"city": "Example",
"state": "Example",
"province": "Example",
"zip": "Example",
"postal_code": "Example",
"country": "Example",
"country_code": "Example",
"country_id": 1
},
"default_return_address": {
"first_name": "Example",
"last_name": "Example",
"name": "Example",
"address1": "Example",
"address2": "Example",
"street": "Example",
"address_line2": "Example",
"city": "Example",
"state": "Example",
"province": "Example",
"zip": "Example",
"postal_code": "Example",
"country": "Example",
"country_code": "Example",
"country_id": 1
},
"default_signer_user_id": 1,
"estimated_monthly_volume": 1,
"low_credit_threshold": 1,
"test_mode": True,
"saved_preferences": {
"low_balance_threshold_cents": 1,
"auto_reload": {
"enabled": True,
"threshold_cents": 1,
"pack_key": "postal-mail-50"
}
},
"governance": {
"monthly_cap_cents": 1,
"per_user_monthly_cap_cents": 1,
"low_balance_threshold_cents": 1,
"require_approval_over_cents": 1,
"require_director_for_inserts": True,
"enforce_suppression": True,
"household_dedupe": True,
"require_cass_verification": True,
"outcome_window_days": 1,
"program_caps": ["<unknown>"],
"campaign_caps": ["<unknown>"]
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
account_mode: 'hys_managed',
api_key: 'Api Key',
default_card_catalog_item_id: 1,
default_card_vendor_id: 'Default Card Vendor Id',
default_font_label: 'Default Font Label',
default_insert_vendor_id: 'Default Insert Vendor Id',
default_sender_address: {
first_name: 'Example',
last_name: 'Example',
name: 'Example',
address1: 'Example',
address2: 'Example',
street: 'Example',
address_line2: 'Example',
city: 'Example',
state: 'Example',
province: 'Example',
zip: 'Example',
postal_code: 'Example',
country: 'Example',
country_code: 'Example',
country_id: 1
},
default_return_address: {
first_name: 'Example',
last_name: 'Example',
name: 'Example',
address1: 'Example',
address2: 'Example',
street: 'Example',
address_line2: 'Example',
city: 'Example',
state: 'Example',
province: 'Example',
zip: 'Example',
postal_code: 'Example',
country: 'Example',
country_code: 'Example',
country_id: 1
},
default_signer_user_id: 1,
estimated_monthly_volume: 1,
low_credit_threshold: 1,
test_mode: true,
saved_preferences: {
low_balance_threshold_cents: 1,
auto_reload: {enabled: true, threshold_cents: 1, pack_key: 'postal-mail-50'}
},
governance: {
monthly_cap_cents: 1,
per_user_monthly_cap_cents: 1,
low_balance_threshold_cents: 1,
require_approval_over_cents: 1,
require_director_for_inserts: true,
enforce_suppression: true,
household_dedupe: true,
require_cass_verification: true,
outcome_window_days: 1,
program_caps: ['<unknown>'],
campaign_caps: ['<unknown>']
}
})
};
fetch('https://api.gratona.com/v1/admin/handwrytten/preferences', 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://api.gratona.com/v1/admin/handwrytten/preferences",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'account_mode' => 'hys_managed',
'api_key' => 'Api Key',
'default_card_catalog_item_id' => 1,
'default_card_vendor_id' => 'Default Card Vendor Id',
'default_font_label' => 'Default Font Label',
'default_insert_vendor_id' => 'Default Insert Vendor Id',
'default_sender_address' => [
'first_name' => 'Example',
'last_name' => 'Example',
'name' => 'Example',
'address1' => 'Example',
'address2' => 'Example',
'street' => 'Example',
'address_line2' => 'Example',
'city' => 'Example',
'state' => 'Example',
'province' => 'Example',
'zip' => 'Example',
'postal_code' => 'Example',
'country' => 'Example',
'country_code' => 'Example',
'country_id' => 1
],
'default_return_address' => [
'first_name' => 'Example',
'last_name' => 'Example',
'name' => 'Example',
'address1' => 'Example',
'address2' => 'Example',
'street' => 'Example',
'address_line2' => 'Example',
'city' => 'Example',
'state' => 'Example',
'province' => 'Example',
'zip' => 'Example',
'postal_code' => 'Example',
'country' => 'Example',
'country_code' => 'Example',
'country_id' => 1
],
'default_signer_user_id' => 1,
'estimated_monthly_volume' => 1,
'low_credit_threshold' => 1,
'test_mode' => true,
'saved_preferences' => [
'low_balance_threshold_cents' => 1,
'auto_reload' => [
'enabled' => true,
'threshold_cents' => 1,
'pack_key' => 'postal-mail-50'
]
],
'governance' => [
'monthly_cap_cents' => 1,
'per_user_monthly_cap_cents' => 1,
'low_balance_threshold_cents' => 1,
'require_approval_over_cents' => 1,
'require_director_for_inserts' => true,
'enforce_suppression' => true,
'household_dedupe' => true,
'require_cass_verification' => true,
'outcome_window_days' => 1,
'program_caps' => [
'<unknown>'
],
'campaign_caps' => [
'<unknown>'
]
]
]),
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://api.gratona.com/v1/admin/handwrytten/preferences"
payload := strings.NewReader("{\n \"account_mode\": \"hys_managed\",\n \"api_key\": \"Api Key\",\n \"default_card_catalog_item_id\": 1,\n \"default_card_vendor_id\": \"Default Card Vendor Id\",\n \"default_font_label\": \"Default Font Label\",\n \"default_insert_vendor_id\": \"Default Insert Vendor Id\",\n \"default_sender_address\": {\n \"first_name\": \"Example\",\n \"last_name\": \"Example\",\n \"name\": \"Example\",\n \"address1\": \"Example\",\n \"address2\": \"Example\",\n \"street\": \"Example\",\n \"address_line2\": \"Example\",\n \"city\": \"Example\",\n \"state\": \"Example\",\n \"province\": \"Example\",\n \"zip\": \"Example\",\n \"postal_code\": \"Example\",\n \"country\": \"Example\",\n \"country_code\": \"Example\",\n \"country_id\": 1\n },\n \"default_return_address\": {\n \"first_name\": \"Example\",\n \"last_name\": \"Example\",\n \"name\": \"Example\",\n \"address1\": \"Example\",\n \"address2\": \"Example\",\n \"street\": \"Example\",\n \"address_line2\": \"Example\",\n \"city\": \"Example\",\n \"state\": \"Example\",\n \"province\": \"Example\",\n \"zip\": \"Example\",\n \"postal_code\": \"Example\",\n \"country\": \"Example\",\n \"country_code\": \"Example\",\n \"country_id\": 1\n },\n \"default_signer_user_id\": 1,\n \"estimated_monthly_volume\": 1,\n \"low_credit_threshold\": 1,\n \"test_mode\": true,\n \"saved_preferences\": {\n \"low_balance_threshold_cents\": 1,\n \"auto_reload\": {\n \"enabled\": true,\n \"threshold_cents\": 1,\n \"pack_key\": \"postal-mail-50\"\n }\n },\n \"governance\": {\n \"monthly_cap_cents\": 1,\n \"per_user_monthly_cap_cents\": 1,\n \"low_balance_threshold_cents\": 1,\n \"require_approval_over_cents\": 1,\n \"require_director_for_inserts\": true,\n \"enforce_suppression\": true,\n \"household_dedupe\": true,\n \"require_cass_verification\": true,\n \"outcome_window_days\": 1,\n \"program_caps\": [\n \"<unknown>\"\n ],\n \"campaign_caps\": [\n \"<unknown>\"\n ]\n }\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.gratona.com/v1/admin/handwrytten/preferences")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"account_mode\": \"hys_managed\",\n \"api_key\": \"Api Key\",\n \"default_card_catalog_item_id\": 1,\n \"default_card_vendor_id\": \"Default Card Vendor Id\",\n \"default_font_label\": \"Default Font Label\",\n \"default_insert_vendor_id\": \"Default Insert Vendor Id\",\n \"default_sender_address\": {\n \"first_name\": \"Example\",\n \"last_name\": \"Example\",\n \"name\": \"Example\",\n \"address1\": \"Example\",\n \"address2\": \"Example\",\n \"street\": \"Example\",\n \"address_line2\": \"Example\",\n \"city\": \"Example\",\n \"state\": \"Example\",\n \"province\": \"Example\",\n \"zip\": \"Example\",\n \"postal_code\": \"Example\",\n \"country\": \"Example\",\n \"country_code\": \"Example\",\n \"country_id\": 1\n },\n \"default_return_address\": {\n \"first_name\": \"Example\",\n \"last_name\": \"Example\",\n \"name\": \"Example\",\n \"address1\": \"Example\",\n \"address2\": \"Example\",\n \"street\": \"Example\",\n \"address_line2\": \"Example\",\n \"city\": \"Example\",\n \"state\": \"Example\",\n \"province\": \"Example\",\n \"zip\": \"Example\",\n \"postal_code\": \"Example\",\n \"country\": \"Example\",\n \"country_code\": \"Example\",\n \"country_id\": 1\n },\n \"default_signer_user_id\": 1,\n \"estimated_monthly_volume\": 1,\n \"low_credit_threshold\": 1,\n \"test_mode\": true,\n \"saved_preferences\": {\n \"low_balance_threshold_cents\": 1,\n \"auto_reload\": {\n \"enabled\": true,\n \"threshold_cents\": 1,\n \"pack_key\": \"postal-mail-50\"\n }\n },\n \"governance\": {\n \"monthly_cap_cents\": 1,\n \"per_user_monthly_cap_cents\": 1,\n \"low_balance_threshold_cents\": 1,\n \"require_approval_over_cents\": 1,\n \"require_director_for_inserts\": true,\n \"enforce_suppression\": true,\n \"household_dedupe\": true,\n \"require_cass_verification\": true,\n \"outcome_window_days\": 1,\n \"program_caps\": [\n \"<unknown>\"\n ],\n \"campaign_caps\": [\n \"<unknown>\"\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gratona.com/v1/admin/handwrytten/preferences")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"account_mode\": \"hys_managed\",\n \"api_key\": \"Api Key\",\n \"default_card_catalog_item_id\": 1,\n \"default_card_vendor_id\": \"Default Card Vendor Id\",\n \"default_font_label\": \"Default Font Label\",\n \"default_insert_vendor_id\": \"Default Insert Vendor Id\",\n \"default_sender_address\": {\n \"first_name\": \"Example\",\n \"last_name\": \"Example\",\n \"name\": \"Example\",\n \"address1\": \"Example\",\n \"address2\": \"Example\",\n \"street\": \"Example\",\n \"address_line2\": \"Example\",\n \"city\": \"Example\",\n \"state\": \"Example\",\n \"province\": \"Example\",\n \"zip\": \"Example\",\n \"postal_code\": \"Example\",\n \"country\": \"Example\",\n \"country_code\": \"Example\",\n \"country_id\": 1\n },\n \"default_return_address\": {\n \"first_name\": \"Example\",\n \"last_name\": \"Example\",\n \"name\": \"Example\",\n \"address1\": \"Example\",\n \"address2\": \"Example\",\n \"street\": \"Example\",\n \"address_line2\": \"Example\",\n \"city\": \"Example\",\n \"state\": \"Example\",\n \"province\": \"Example\",\n \"zip\": \"Example\",\n \"postal_code\": \"Example\",\n \"country\": \"Example\",\n \"country_code\": \"Example\",\n \"country_id\": 1\n },\n \"default_signer_user_id\": 1,\n \"estimated_monthly_volume\": 1,\n \"low_credit_threshold\": 1,\n \"test_mode\": true,\n \"saved_preferences\": {\n \"low_balance_threshold_cents\": 1,\n \"auto_reload\": {\n \"enabled\": true,\n \"threshold_cents\": 1,\n \"pack_key\": \"postal-mail-50\"\n }\n },\n \"governance\": {\n \"monthly_cap_cents\": 1,\n \"per_user_monthly_cap_cents\": 1,\n \"low_balance_threshold_cents\": 1,\n \"require_approval_over_cents\": 1,\n \"require_director_for_inserts\": true,\n \"enforce_suppression\": true,\n \"household_dedupe\": true,\n \"require_cass_verification\": true,\n \"outcome_window_days\": 1,\n \"program_caps\": [\n \"<unknown>\"\n ],\n \"campaign_caps\": [\n \"<unknown>\"\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"account_mode": "hys_managed",
"partner_owned_setup_enabled": true,
"account_connected": true,
"status": "Example",
"test_mode": true,
"default_card_catalog_item_id": 42,
"default_signer_user_id": 42,
"default_card_vendor_id": "Example",
"default_font_label": "Example",
"default_insert_vendor_id": "Example",
"catalog_sync_status": "Example",
"catalog_sync_error": "Example",
"default_sender_address_json": {
"first_name": "Example",
"last_name": "Example",
"name": "Example",
"address1": "Example",
"address2": "Example",
"street": "Example",
"address_line2": "Example",
"city": "Example",
"state": "Example",
"province": "Example",
"zip": "Example",
"postal_code": "Example",
"country": "Example",
"country_code": "Example",
"country_id": 1
},
"default_return_address_json": {
"first_name": "Example",
"last_name": "Example",
"name": "Example",
"address1": "Example",
"address2": "Example",
"street": "Example",
"address_line2": "Example",
"city": "Example",
"state": "Example",
"province": "Example",
"zip": "Example",
"postal_code": "Example",
"country": "Example",
"country_code": "Example",
"country_id": 1
},
"estimated_monthly_volume": 100,
"low_credit_threshold": 100,
"catalog_synced_at": "2026-10-20T12:00:00Z",
"saved_preferences_json": {}
},
"governance": {
"id": 100,
"client_id": 100,
"monthly_cap_cents": 100,
"per_user_monthly_cap_cents": 100,
"low_balance_threshold_cents": 100,
"require_approval_over_cents": 100,
"outcome_window_days": 100,
"updated_by_user_id": 100,
"require_director_for_inserts": true,
"enforce_suppression": true,
"household_dedupe": true,
"require_cass_verification": true,
"program_caps_json": {},
"campaign_caps_json": {},
"created_at": "2026-10-20T12:00:00Z",
"updated_at": "2026-10-20T12:00:00Z"
},
"provider_mode_sync": {
"status": "synced",
"test_mode": true,
"provider_confirmed_test_mode": true,
"message": "Example"
}
}{
"message": "Unauthorized",
"status": "error"
}{
"errors": {},
"status": "error",
"message": "The given data was invalid."
}