Sending Defaults CallBack
Update User Sending Default
Overview
Configures account-level default sending parameters that apply to all SMTP users unless
overridden. These defaults include:
- Default from address
- Default from name
- Default reply-to address
- Tracking preferences
- Email footer content
Setting strong defaults:
- Ensures consistency across all sending
- Provides fallbacks when specific values aren't provided
- Simplifies integration for new applications
- Maintains branding standards
Endpoint Details
| HTTP Method | POST |
|---|---|
| Endpoint Path | /v2/settings/updateUserSendingDefault |
| API Version | Bulk API (v2.0) |
| Content-Type | application/json |
Request Parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| owner_id | String | Yes | Your unique SendClean account identifier | user_12345 |
Request Example
Below is a complete example of the request body. Replace placeholder values with your actual credentials and data.
{
"admin_id": "{{admin_id}}",
"owner_id": "{USER_ID}",
"track_opens": "Y",
"unsubscribe": "Y",
"track_clicks": "both",
"html_to_plaintext": "Y",
"plaintext_to_html": "Y",
"tracking_domain": "",
"return_path_domain": "",
"spf_dkim_domain": ""
}Response Format
Successful Response:
{
"status": "success",
"code": 200,
"message": "Email queued successfully",
"data": {
"message_id": "msg_abc123xyz",
"queued_at": "2026-04-17T10:30:00Z",
"recipients": 1
}
}Common Errors & Troubleshooting
401 - Unauthorized: Authentication credentials are missing or invalid
Solution: Verify owner_id and token are correct. Ensure they match your account credentials exactly with no extra whitespace.
500 - Internal server error: Unexpected server error occurred
Solution: Retry the request after a brief delay. If error persists, contact SendClean support with the request details and timestamp.
Implementation Examples
Python (requests):
import requests
import jsonurl = "https://api.sendclean.com/v2/settings/updateUserSendingDefault"
payload =:
{
"admin_id": "{{admin_id}}",
"owner_id": "{USER_ID}",
"track_opens": "Y",
"unsubscribe": "Y",
"track_clicks": "both",
"html_to_plaintext": "Y",
"plaintext_to_html": "Y",
"tracking_domain": "",
"return_path_domain": "",
"spf_dkim_domain": ""
}headers =:
{
"Content-Type": "application/json"
}response = requests.post(url, json=payload, headers=headers)
if response.status_code == 200:
result = response.json()
print("Success:", result)
else:
print("Error:", response.status_code, response.text)
curl -X POST \
https://api.sendclean.com/v2/settings/updateUserSendingDefault \
-H 'Content-Type: application/json' \
-d '{
"admin_id": "{{admin_id}}",
"owner_id": "{USER_ID}",
"track_opens": "Y",
"unsubscribe": "Y",
"track_clicks": "both",
"html_to_plaintext": "Y",
"plaintext_to_html": "Y",
"tracking_domain": "",
"return_path_domain": "",
"spf_dkim_domain": ""
}'const axios = require('axios');
const url = 'https://api.sendclean.com/v2/settings/updateUserSendingDefault';
const payload = {
"admin_id":"{{admin_id}}",
"owner_id":"{USER_ID}",
"track_opens": "Y",
"unsubscribe": "Y",
"track_clicks":"both",
"html_to_plaintext": "Y",
"plaintext_to_html": "Y",
"tracking_domain": "",
"return_path_domain": "",
"spf_dkim_domain":""
};
axios.post(url, payload, {
headers: {
'Content-Type': 'application/json'
}
})
.then(response => {
console.log('Success:', response.data);
})
.catch(error => {
console.error('Error:', error.response ? error.response.data : error.message);
});<?php
$url = 'https://api.sendclean.com/v2/settings/updateUserSendingDefault';
$payload = json_decode('{
"admin_id":"{{admin_id}}",
"owner_id":"{USER_ID}",
"track_opens": "Y",
"unsubscribe": "Y",
"track_clicks":"both",
"html_to_plaintext": "Y",
"plaintext_to_html": "Y",
"tracking_domain": "",
"return_path_domain": "",
"spf_dkim_domain":""
}', true);
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($payload));
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Content-Type: application/json'
]);
$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
if ($httpCode == 200) {
$result = json_decode($response, true);
print_r($result);
} else {
echo "Error: $httpCode - $response";
}
?>Update Smtp Sending Default
Overview
Sets sending defaults specific to an individual SMTP user. These override account-level
defaults and take precedence for emails sent through this SMTP user.
Use SMTP-specific defaults for:
- Different brands or business units
- Separating transactional from marketing defaults
- Application-specific configurations
- Testing different sending strategies
Endpoint Details
| HTTP Method | POST |
|---|---|
| Endpoint Path | /v2/settings/updateSmtpSendingDefault |
| API Version | Bulk API (v2.0) |
| Content-Type | application/json |
Request Parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| owner_id | String | Yes | Your unique SendClean account identifier | user_12345 |
Request Example
Below is a complete example of the request body. Replace placeholder values with your actual credentials and data.
{
"owner_id": "{{owner_id}}",
"track_opens": "Y",
"unsubscribe": "Y",
"track_clicks": "both",
"html_to_plaintext": "Y",
"plaintext_to_html": "Y",
"tracking_domain": "",
"return_path_domain": "",
"spf_dkim_domain": "",
"smtp": "{{smtp_user_name}}"
}Response Format
Successful Response:
{
"status": "success",
"code": 200,
"message": "Email queued successfully",
"data": {
"message_id": "msg_abc123xyz",
"queued_at": "2026-04-17T10:30:00Z",
"recipients": 1
}
}Common Errors & Troubleshooting
401 - Unauthorized: Authentication credentials are missing or invalid
Solution: Verify owner_id and token are correct. Ensure they match your account credentials exactly with no extra whitespace.
500 - Internal server error: Unexpected server error occurred
Solution: Retry the request after a brief delay. If error persists, contact SendClean support with the request details and timestamp.
Implementation Examples
Python (requests):
import requests
import jsonurl = "https://api.sendclean.com/v2/settings/updateSmtpSendingDefault"
payload =:
{
"owner_id": "{{owner_id}}",
"track_opens": "Y",
"unsubscribe": "Y",
"track_clicks": "both",
"html_to_plaintext": "Y",
"plaintext_to_html": "Y",
"tracking_domain": "",
"return_path_domain": "",
"spf_dkim_domain": "",
"smtp": "{{smtp_user_name}}"
}headers =:
{
"Content-Type": "application/json"
}response = requests.post(url, json=payload, headers=headers)
if response.status_code == 200:
result = response.json()
print("Success:", result)
else:
print("Error:", response.status_code, response.text)
curl -X POST \
https://api.sendclean.com/v2/settings/updateSmtpSendingDefault \
-H 'Content-Type: application/json' \
-d '{
"owner_id": "{{owner_id}}",
"track_opens": "Y",
"unsubscribe": "Y",
"track_clicks": "both",
"html_to_plaintext": "Y",
"plaintext_to_html": "Y",
"tracking_domain": "",
"return_path_domain": "",
"spf_dkim_domain": "",
"smtp": "{{smtp_user_name}}"
}'const axios = require('axios');
const url = 'https://api.sendclean.com/v2/settings/updateSmtpSendingDefault';
const payload = {
"owner_id":"{{owner_id}}",
"track_opens": "Y",
"unsubscribe": "Y",
"track_clicks":"both",
"html_to_plaintext": "Y",
"plaintext_to_html": "Y",
"tracking_domain": "",
"return_path_domain": "",
"spf_dkim_domain":"",
"smtp":"{{smtp_user_name}}"
};
axios.post(url, payload, {
headers: {
'Content-Type': 'application/json'
}
})
.then(response => {
console.log('Success:', response.data);
})
.catch(error => {
console.error('Error:', error.response ? error.response.data : error.message);
});<?php
$url = 'https://api.sendclean.com/v2/settings/updateSmtpSendingDefault';
$payload = json_decode('{
"owner_id":"{{owner_id}}",
"track_opens": "Y",
"unsubscribe": "Y",
"track_clicks":"both",
"html_to_plaintext": "Y",
"plaintext_to_html": "Y",
"tracking_domain": "",
"return_path_domain": "",
"spf_dkim_domain":"",
"smtp":"{{smtp_user_name}}"
}', true);
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($payload));
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Content-Type: application/json'
]);
$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
if ($httpCode == 200) {
$result = json_decode($response, true);
print_r($result);
} else {
echo "Error: $httpCode - $response";
}
?>Updated 2 months ago