Skip to content

Settings API Documentation

System settings management endpoints for configuring Octeth application settings and testing email delivery configurations.

Test Email Sending Configuration

POST /api.php

API Usage Notes

  • Authentication required: Admin API Key
  • Legacy endpoint access via /api.php only (no v1 REST alias configured)

Request Body Parameters:

ParameterTypeRequiredDescription
CommandStringYesAPI command: settings.emailsendingtest
SessionIDStringNoSession ID obtained from login
APIKeyStringNoAdmin API key for authentication
SendMethodStringNoEmail sending method: SMTP, LocalMTA, PHPMail, PowerMTA, or SaveToDisk
SendMethodSMTPHostStringNoSMTP server hostname (required for SMTP method)
SendMethodSMTPPortIntegerNoSMTP server port (required for SMTP method)
SendMethodSMTPSecureStringNoSMTP encryption: ssl, tls, or empty string
SendMethodSMTPAuthStringNoSMTP authentication enabled: true or false
SendMethodSMTPUsernameStringNoSMTP username (required if auth is enabled)
SendMethodSMTPPasswordStringNoSMTP password (required if auth is enabled)
SendMethodSMTPTimeoutIntegerNoSMTP connection timeout in seconds
SendMethodLocalMTAPathStringNoLocal MTA path (required for LocalMTA method)
SendMethodPowerMTADirStringNoPowerMTA directory path (required for PowerMTA method)
SendMethodSaveToDiskDirStringNoSave to disk directory path (required for SaveToDisk method)
MailEngineStringNoMail engine: phpmailer or swiftmailer
bash
curl -X POST https://example.com/api.php \
  -H "Content-Type: application/json" \
  -d '{
    "Command": "settings.emailsendingtest",
    "SessionID": "your-admin-session-id",
    "SendMethod": "SMTP",
    "SendMethodSMTPHost": "smtp.example.com",
    "SendMethodSMTPPort": 587,
    "SendMethodSMTPSecure": "tls",
    "SendMethodSMTPAuth": "true",
    "SendMethodSMTPUsername": "smtp-user@example.com",
    "SendMethodSMTPPassword": "smtp-password",
    "SendMethodSMTPTimeout": 30,
    "MailEngine": "phpmailer"
  }'
json
{
  "Success": true,
  "ErrorCode": 0
}
json
{
  "Success": false,
  "ErrorCode": 1,
  "EmailSettingsErrorMessage": "SMTP connect() failed"
}
txt
0: Success
1: Email sending test failed (check EmailSettingsErrorMessage for details)
2: Invalid enum value (SendMethod, SendMethodSMTPSecure, SendMethodSMTPAuth, or MailEngine)
NOT AVAILABLE IN DEMO MODE: Endpoint disabled in demo mode

Get System Settings

POST /api.php

API Usage Notes

  • Authentication required: Admin API Key (privilege Settings)
  • Legacy endpoint access via /api.php only (no v1 REST alias configured)
  • Read counterpart of settings.update. Column names come from the oempro_config row itself, so a column added in a later version appears here without a client change.

Request Body Parameters:

ParameterTypeRequiredDescription
CommandStringYesAPI command: settings.get
SessionIDStringNoSession ID obtained from login
APIKeyStringNoAdmin API key for authentication
KeysStringNoComma-separated list of oempro_config column names and/or runtime option names to return (case-insensitive). Unknown names are an error. Omit for everything.

Response:

  • Settings: the oempro_config row keyed by column name (all columns except ConfigID). Values are typed the way the application types them at bootstrap: the stored strings true and false come back as JSON booleans, everything else as stored. Secrets (*_PASSWORD, S3_SECRET_KEY, and every other key matching the system.getsettings sensitive-key rule) are returned as the literal ***REDACTED*** when set, and as "" when empty. Sending that literal back to settings.update is refused (ErrorCode 13): omit the field to keep the stored secret.
  • RuntimeOptions: the oempro_options keys settings.update can write, in their decoded shapes: SeedList, AliasList, RelayDomains, PreHeaderTextTemplate, EmailDeliverySubscriberSnapshot, DefaultCustomFieldsForNewLists, FailedWebhookHandler, LimitUtilizationWebhook, Stripo_PluginId, Stripo_SecretKey, Stripo_APIKey, Unlayer_ProjectId, Unlayer_APIKey, MediaUploadStatus, MediaLibraryAllowedFileTypes (strings, null when never saved); ListFreshnessThresholds ({Active, SlowingDown, Stale} integers, defaulted like the Preferences screen); FailedWebhookHandlerSettings ({FailThreshold, DisableForXSeconds, CallWebhookURL}); LimitUtilizationWebhookSettings ({WebhookURL, NotifyTransitions{OKToWarning, WarningToExceeded, OKToExceeded, ExceededToWarning, WarningToOK, ExceededToOK}}); PreventUserLoginFromAlienIPs and DisableUserPasswordReset (booleans). Secrets are redacted the same way.
bash
curl -X POST https://example.com/api.php \
  -H "Content-Type: application/json" \
  -d '{
    "Command": "settings.get",
    "APIKey": "your-admin-api-key",
    "Keys": "PRODUCT_NAME,SEND_METHOD_SMTP_PASSWORD,ListFreshnessThresholds"
  }'
json
{
  "Success": true,
  "ErrorCode": 0,
  "Settings": {
    "PRODUCT_NAME": "Octeth",
    "SEND_METHOD_SMTP_PASSWORD": "***REDACTED***"
  },
  "RuntimeOptions": {
    "ListFreshnessThresholds": {"Active": 14, "SlowingDown": 45, "Stale": 90}
  }
}
json
{
  "Success": false,
  "ErrorCode": 1,
  "ErrorText": "Unknown setting key(s): PRODUCT_NAM",
  "UnknownKeys": ["PRODUCT_NAM"]
}
txt
0: Success
1: One or more Keys are not a config column or a runtime option (see UnknownKeys)
2: The configuration row could not be read

Update System Settings

POST /api.php

API Usage Notes

  • Authentication required: Admin API Key
  • Legacy endpoint access via /api.php only (no v1 REST alias configured)

Request Body Parameters:

All parameters are optional. Only provide the settings you want to update.

Behavior change (v5.9.3, #2345)

Omitted parameters are now left unchanged. In earlier versions, a partial settings.update unconditionally overwrote DisableUserPasswordReset, MediaUploadStatus, and MediaLibraryAllowedFileTypes even when they were not sent. Updating only, say, SystemEmailFromName therefore silently re-enabled user password reset and blanked the media-upload settings. These three fields are now written only when included in the request.

Partial updates, null and the redaction marker

  • Omitted parameters are left unchanged. A JSON null value is treated as omitted (a silent no-op); to clear a setting send the empty string "".
  • settings.get returns secrets as the literal ***REDACTED***. Sending that literal as a value is refused with ErrorCode 13. Omit the field to keep the stored secret.
  • DEFAULT_LANGUAGE and USER_SIGNUP_LANGUAGE must name an installed language pack (system.languages.get), USER_SIGNUP_GROUPID / USER_SIGNUP_GROUPIDS must name existing user groups, and DEFAULT_THEMEID must name an existing theme. Empty values are still accepted.
ParameterTypeRequiredDescription
CommandStringYesAPI command: settings.update
SessionIDStringNoSession ID obtained from login
APIKeyStringNoAdmin API key for authentication
SystemEmailFromNameStringNoDefault sender name for system emails
SystemEmailFromEmailStringNoDefault sender email address (email validation)
SystemEmailReplyToNameStringNoDefault reply-to name
SystemEmailReplyToEmailStringNoDefault reply-to email address (email validation)
AlertRecipientEmailStringNoEmail address for system alerts (email validation)
ReportAbuseEmailStringNoEmail address for abuse reports (email validation)
XComplaintsToStringNoX-Complaints-To header value (email or @%sender_domain%)
MediaUploadMethodStringNoMedia upload method: file, database, or s3
MediaUploadStatusStringNoMedia upload status
MediaLibraryAllowedFileTypesStringNoAllowed file types for media library
S3EnabledStringNoEnable S3 storage: true or false
S3AccessIDStringNoAWS S3 access key ID
S3SecretKeyStringNoAWS S3 secret access key
S3BucketStringNoAWS S3 bucket name
S3MediaLibraryPathStringNoS3 path for media library
S3URLStringNoS3 bucket URL
LoadBalanceStatusStringNoEnable load balancing: true or false
LoadBalanceEmailsIntegerNoNumber of emails for load balancing
LoadBalanceSleepIntegerNoSleep interval for load balancing
UserSignupEnabledStringNoEnable user signup: true or false
UserSignupFieldsStringNoUser signup form fields
UserSignupReputationStringNoUser signup reputation: Trusted or Untrusted
UserSignupLanguageStringNoDefault language for new users
DefaultLanguageStringNoSystem default language
UserSignupGroupIDIntegerNoDefault user group ID for signups
UserSignupGroupIDsStringNoMultiple user group IDs for signups
DefaultThemeIDIntegerNoDefault theme ID
PaymentCurrencyStringNoPayment currency code
PaymentTaxPercentNumberNoTax percentage for payments
PaymentReceiptEmailSubjectStringNoPayment receipt email subject
PaymentReceiptEmailMessageStringNoPayment receipt email message
EnabledPluginsStringNoComma-separated codes of the plugins to mark enabled. Every code must be installed (see admin.plugins.get) and no code may repeat. This only writes the column: it does NOT run the plugins' enable_<code>() / disable_<code>() lifecycle hooks (table creation, option seeding, teardown). Use admin.plugin.enable / admin.plugin.disable to enable or disable a plugin.
SendMethodStringNoEmail sending method: SMTP, LocalMTA, PHPMail, PowerMTA, or SaveToDisk
SendMethodLocalMTAPathStringNoLocal MTA path
SendMethodPowerMTAVMTAStringNoPowerMTA VMTA name
SendMethodPowerMTADirStringNoPowerMTA directory path
SendMethodSaveToDiskDirStringNoSave to disk directory path
SendMethodSMTPHostStringNoSMTP server hostname
SendMethodSMTPPortIntegerNoSMTP server port
SendMethodSMTPSecureStringNoSMTP encryption: ssl, tls, or empty string
SendMethodSMTPAuthStringNoSMTP authentication: true or false
SendMethodSMTPUsernameStringNoSMTP username
SendMethodSMTPPasswordStringNoSMTP password
SendMethodSMTPTimeoutIntegerNoSMTP timeout in seconds
SendMethodSMTPDebugStringNoSMTP debug mode
SendMethodSMTPKeepAliveStringNoSMTP keep-alive setting
SendMethodSMTPMsgConnIntegerNoSMTP messages per connection
ImportMaxFilesizeIntegerNoMaximum file size for imports (bytes)
AttachmentMaxFilesizeIntegerNoMaximum attachment file size (bytes)
MediaMaxFilesizeIntegerNoMaximum media file size (bytes)
XMailerStringNoX-Mailer header value
MailEngineStringNoMail engine: phpmailer or swiftmailer
GoogleAnalyticsSourceStringNoGoogle Analytics source parameter
GoogleAnalyticsMediumStringNoGoogle Analytics medium parameter
ForwardToFriendHeaderStringNoForward-to-friend email header
ForwardToFriendFooterStringNoForward-to-friend email footer
ReportAbuseFriendHeaderStringNoReport abuse email header
ReportAbuseFriendFooterStringNoReport abuse email footer
UserSignupHeaderStringNoUser signup email header
UserSignupFooterStringNoUser signup email footer
ProductNameStringNoProduct name for branding
DefaultSubscriberAreaLogoutURLStringNoSubscriber area logout redirect URL
POP3BounceStatusStringNoEnable POP3 bounce processing: Enabled or Disabled
POP3BounceHostStringNoPOP3 bounce server hostname
POP3BouncePortIntegerNoPOP3 bounce server port
POP3BounceUsernameStringNoPOP3 bounce username
POP3BouncePasswordStringNoPOP3 bounce password
POP3BounceSSLStringNoPOP3 bounce SSL: Yes or No
POP3FBLStatusStringNoEnable POP3 FBL processing: Enabled or Disabled
POP3FBLHostStringNoPOP3 FBL server hostname
POP3FBLPortIntegerNoPOP3 FBL server port
POP3FBLUsernameStringNoPOP3 FBL username
POP3FBLPasswordStringNoPOP3 FBL password
POP3FBLSSLStringNoPOP3 FBL SSL: Yes or No
POP3RequestsStatusStringNoEnable POP3 request processing: Enabled or Disabled
POP3RequestsHostStringNoPOP3 requests server hostname
POP3RequestsPortIntegerNoPOP3 requests server port
POP3RequestsUsernameStringNoPOP3 requests username
POP3RequestsPasswordStringNoPOP3 requests password
POP3RequestsSSLStringNoPOP3 requests SSL: Yes or No
SendBounceNotificationEmailStringNoEmail address for bounce notifications
RebrandedProductLogoStringNoCustom product logo
RebrandedProductLogoTypeStringNoProduct logo type
PayPalExpressStatusStringNoPayPal Express status: Enabled or Disabled
PayPalExpressBusinessNameStringNoPayPal business name
PayPalExpressPurchaseDescriptionStringNoPayPal purchase description
PayPalExpressCurrencyStringNoPayPal currency code
DisplayTriggerSendEngineLinkStringNoDisplay send engine link: Yes or No
DefaultOptinEmailSubjectStringNoDefault opt-in confirmation email subject
DefaultOptinEmailBodyStringNoDefault opt-in confirmation email body (must include %Link:Confirm%)
UserareaFooterStringNoUser area footer content
ForbiddenFromAddressesStringNoForbidden sender email addresses
RunCronInUserAreaStringNoRun cron in user area: true or false
CentralizedSenderDomainStringNoCentralized sender domain
PaymentCreditsGatewayURLStringNoPayment credits gateway URL
AdminAllowedIPStringNoAllowed IP addresses for admin access
RateLimitExceedSlackWebhookURLStringNoSlack webhook for rate limit alerts
RateLimitExceedNotificationIntervalIntegerNoRate limit notification interval
DisableUserPasswordResetStringNoDisable user password reset: true or false
DisplayOriginalLogoStringNoDisplay original logo: Yes or No
FBLIncomingEmailAddressStringNoFBL incoming email address
UnsubscribeIncomingEmailAddressStringNoUnsubscribe incoming email address
BounceForwardToStringNoBounce forward-to email address
ThresholdSoftBounceDetectionIntegerNoSoft bounce detection threshold
BounceCatchAllDomainStringNoBounce catch-all domain
S2STrackerParamStringNoS2S postback tracker parameter name (1 to 20 characters: letters, digits, _, -)
S2SChannelParamStringNoS2S postback conversion channel parameter name (same rule)
S2SValueParamStringNoS2S postback conversion value parameter name (same rule)
S2SUnitParamStringNoS2S postback conversion unit parameter name (same rule)
SeedListStringNoNewline-separated seed addresses; every non-blank line must be a valid email address
AliasListStringNoNewline-separated alias list (bounce server)
RelayDomainsStringNoNewline-separated relay domains (bounce server)
PreHeaderTextTemplateStringNoPre-header text template
EmailDeliverySubscriberSnapshotStringNoEnabled or Disabled
ListFreshnessThresholdsObjectNo{Active, SlowingDown, Stale} in days; normalised so that Active >= 1 and Active < SlowingDown < Stale (each later value is raised to previous + 1 if needed); missing keys take the defaults 14 / 45 / 90. Also accepted as a JSON string.
DefaultCustomFieldsForNewListsStringNoDefault custom fields for new lists
FailedWebhookHandlerStringNoEnabled or Disabled
FailedWebhookHandlerSettingsObjectNo{FailThreshold (int >= 1, default 3), DisableForXSeconds (int >= 0, default 3600), CallWebhookURL (URL or empty)}. Also accepted as a JSON string.
LimitUtilizationWebhookStringNoEnabled or Disabled. When the effective value is Enabled, at least one NotifyTransitions flag must be true (the request value, else the stored one)
LimitUtilizationWebhookSettingsObjectNo{WebhookURL (URL or empty), NotifyTransitions{OKToWarning, WarningToExceeded, OKToExceeded, ExceededToWarning, WarningToOK, ExceededToOK}}; flags accept true/false, 1/0, "true"/"false"; missing flags are false. Also accepted as a JSON string.
PreventUserLoginFromAlienIPsBooleanNotrue stores the flag, false removes it (the stored representation the Security screen uses)
Stripo_PluginIdStringNoStripo plugin id. When the effective plugin id / secret key pair is non-empty (request value, else stored), the pair is verified live against Stripo before saving
Stripo_SecretKeyStringNoStripo secret key (see above)
Stripo_APIKeyStringNoStripo per-account API key list as a JSON-encoded STRING (a nested object is refused, because request keys are lowercased). Must be valid JSON and must fit the storage column (issue #1311). Empty clears.
Unlayer_ProjectIdStringNoUnlayer project id
Unlayer_APIKeyStringNoUnlayer API key
bash
curl -X POST https://example.com/api.php \
  -H "Content-Type: application/json" \
  -d '{
    "Command": "settings.update",
    "SessionID": "your-admin-session-id",
    "SystemEmailFromName": "My Company",
    "SystemEmailFromEmail": "noreply@mycompany.com",
    "SendMethod": "SMTP",
    "SendMethodSMTPHost": "smtp.example.com",
    "SendMethodSMTPPort": 587,
    "SendMethodSMTPSecure": "tls",
    "SendMethodSMTPAuth": "true",
    "SendMethodSMTPUsername": "smtp-user@example.com",
    "SendMethodSMTPPassword": "smtp-password",
    "UserSignupEnabled": "true",
    "UserSignupEnabled": "true"
  }'
json
{
  "Success": true,
  "ErrorCode": 0
}
json
{
  "Success": false,
  "ErrorCode": 1
}
txt
0: Success
1: Invalid email address
2: Invalid enum value (MediaUploadMethod, S3Enabled, LoadBalanceStatus, UserSignupEnabled, UserSignupReputation, SendMethod, SendMethodSMTPSecure, SendMethodSMTPAuth, MailEngine, or RunCronInUserArea)
3: PreviewMyEmail API connection error
6: POP3/IMAP connection failed (check EmailSettingsErrorMessage for details)
7: Default opt-in email body missing required %Link:Confirm% tag
8: DEFAULT_LANGUAGE / USER_SIGNUP_LANGUAGE is not an installed language pack
9: USER_SIGNUP_GROUPID / USER_SIGNUP_GROUPIDS names a user group that does not exist (or is not an id list)
10: DEFAULT_THEMEID does not name an existing theme
11: An S2S parameter name is empty, longer than 20 characters, or contains characters other than letters, digits, underscore and dash
12: SeedList contains an invalid email address (see InvalidEntries)
13: A value is the redaction marker ***REDACTED*** (omit the field to keep the stored value)
14: ListFreshnessThresholds is not an object
15: FailedWebhookHandlerSettings is invalid (see ErrorText)
16: LimitUtilizationWebhookSettings is invalid, or the webhook is Enabled with no NotifyTransitions flag set
17: Stripo rejected the plugin id / secret key pair
18: Stripo_APIKey is not a JSON-encoded string
19: Stripo_APIKey exceeds the storage column capacity (see ErrorText)
20: EnabledPlugins names a plugin that is not installed
21: EnabledPlugins lists a plugin more than once
NOT AVAILABLE IN DEMO MODE: Endpoint disabled in demo mode

Get Delivery Routes

POST /api.php

API Usage Notes

  • Authentication required: Admin API Key (privilege Settings)
  • Legacy endpoint access via /api.php only (no v1 REST alias configured)
  • The recipient MX to delivery-server routing map (admin Settings > Delivery Routes). Each entry's Pattern is either an exact MX host name or a PCRE pattern (the delivery workers try preg_match first, then an exact comparison). Entries are an ordered list: the first match wins.

Request Body Parameters:

ParameterTypeRequiredDescription
CommandStringYesAPI command: deliveryroutes.get
SessionIDStringNoSession ID obtained from login
APIKeyStringNoAdmin API key for authentication
bash
curl -X POST https://example.com/api.php \
  -H "Content-Type: application/json" \
  -d '{"Command": "deliveryroutes.get", "APIKey": "your-admin-api-key"}'
json
{
  "Success": true,
  "ErrorCode": 0,
  "Routes": [
    {"Pattern": "/\\.google\\.com$/i", "DeliveryServerID": 3},
    {"Pattern": "mx1.example.net", "DeliveryServerID": 5}
  ],
  "TotalRoutes": 2
}
json
{
  "Success": false,
  "ErrorCode": 99998
}
txt
0: Success

Update Delivery Routes

POST /api.php

API Usage Notes

  • Authentication required: Admin API Key (privilege Settings)
  • Legacy endpoint access via /api.php only (no v1 REST alias configured)
  • Replaces the WHOLE routing map. Send the complete list every time; an empty list clears it. Order is significant.
  • Pattern values are stored verbatim. Do not send the map as a JSON object keyed by pattern: request object keys are lowercased, which would rewrite a PCRE pattern.
  • Written through the cached options writer, so the delivery workers pick the change up immediately.

Request Body Parameters:

ParameterTypeRequiredDescription
CommandStringYesAPI command: deliveryroutes.update
SessionIDStringNoSession ID obtained from login
APIKeyStringNoAdmin API key for authentication
RoutesArrayYesOrdered list of {Pattern, DeliveryServerID} objects (or a JSON string encoding one). Pattern: non-empty, no whitespace. DeliveryServerID: an existing delivery server. Patterns must be unique.
bash
curl -X POST https://example.com/api.php \
  -H "Content-Type: application/json" \
  -d '{
    "Command": "deliveryroutes.update",
    "APIKey": "your-admin-api-key",
    "Routes": [
      {"Pattern": "/\\.google\\.com$/i", "DeliveryServerID": 3},
      {"Pattern": "mx1.example.net", "DeliveryServerID": 5}
    ]
  }'
json
{
  "Success": true,
  "ErrorCode": 0,
  "Routes": [
    {"Pattern": "/\\.google\\.com$/i", "DeliveryServerID": 3},
    {"Pattern": "mx1.example.net", "DeliveryServerID": 5}
  ],
  "TotalRoutes": 2
}
json
{
  "Success": false,
  "ErrorCode": 5,
  "ErrorText": "Routes[2]: delivery server 99 does not exist."
}
txt
0: Success
1: Routes is missing
2: Routes is not a list of objects (also: an element that is not a {Pattern, DeliveryServerID} object; the {"pattern": id} map shape is only accepted when Routes is sent as a JSON string, since nested object keys are lowercased on the way in)
3: A Pattern is empty or contains whitespace
4: A DeliveryServerID is not a positive integer
5: A DeliveryServerID does not exist
6: A Pattern appears more than once
NOT AVAILABLE IN DEMO MODE: Endpoint disabled in demo mode

Get SMS Settings

POST /api.php

API Usage Notes

  • Authentication required: Admin API Key (privilege SMS)
  • Legacy endpoint access via /api.php only (no v1 REST alias configured)
  • The three settings of admin Settings > SMS.

Request Body Parameters:

ParameterTypeRequiredDescription
CommandStringYesAPI command: sms.settings.get
SessionIDStringNoSession ID obtained from login
APIKeyStringNoAdmin API key for authentication
bash
curl -X POST https://example.com/api.php \
  -H "Content-Type: application/json" \
  -d '{"Command": "sms.settings.get", "APIKey": "your-admin-api-key"}'
json
{
  "Success": true,
  "ErrorCode": 0,
  "SmsSettings": {
    "FrequencyLimits": {"Daily": 5, "Weekly": 10, "Monthly": 20, "Yearly": 100},
    "ForbiddenWords": "word1\nword2",
    "FrequencyWhitelistedNumbers": "+15551234567"
  }
}
json
{
  "Success": false,
  "ErrorCode": 99998
}
txt
0: Success

Update SMS Settings

POST /api.php

API Usage Notes

  • Authentication required: Admin API Key (privilege SMS)
  • Legacy endpoint access via /api.php only (no v1 REST alias configured)
  • Partial update: omitted parameters are left unchanged. At least one must be sent.

Request Body Parameters:

ParameterTypeRequiredDescription
CommandStringYesAPI command: sms.settings.update
SessionIDStringNoSession ID obtained from login
APIKeyStringNoAdmin API key for authentication
FrequencyLimitsObjectNo{Daily, Weekly, Monthly, Yearly}, all four required, non-negative integers. Also accepted as a JSON string.
ForbiddenWordsStringNoNewline-separated forbidden words
FrequencyWhitelistedNumbersStringNoNewline-separated numbers exempt from the frequency limits
bash
curl -X POST https://example.com/api.php \
  -H "Content-Type: application/json" \
  -d '{
    "Command": "sms.settings.update",
    "APIKey": "your-admin-api-key",
    "FrequencyLimits": {"Daily": 5, "Weekly": 10, "Monthly": 20, "Yearly": 100},
    "ForbiddenWords": "word1\nword2"
  }'
json
{
  "Success": true,
  "ErrorCode": 0,
  "UpdatedKeys": ["sms_frequency_limits", "sms_forbidden_words"]
}
json
{
  "Success": false,
  "ErrorCode": 1,
  "ErrorText": "FrequencyLimits: Yearly must be a non-negative integer"
}
txt
0: Success
1: FrequencyLimits is invalid (see ErrorText)
2: ForbiddenWords / FrequencyWhitelistedNumbers is not a string
3: Nothing to update
NOT AVAILABLE IN DEMO MODE: Endpoint disabled in demo mode

List Email Headers

POST /api.php

API Usage Notes

  • Authentication required: Admin API Key (privilege Settings)
  • Legacy endpoint access via /api.php only (no v1 REST alias configured)
  • System-wide custom email headers (admin Settings > Email Delivery > Headers). DeliveryServerID 0 means the header applies on every delivery server.

Request Body Parameters:

ParameterTypeRequiredDescription
CommandStringYesAPI command: emailheaders.get
SessionIDStringNoSession ID obtained from login
APIKeyStringNoAdmin API key for authentication
bash
curl -X POST https://example.com/api.php \
  -H "Content-Type: application/json" \
  -d '{"Command": "emailheaders.get", "APIKey": "your-admin-api-key"}'
json
{
  "Success": true,
  "ErrorCode": 0,
  "EmailHeaders": [
    {"HeaderID": 1, "Name": "X-Campaign-Source", "Value": "octeth", "EmailType": "campaign", "DeliveryServerID": 0}
  ],
  "TotalEmailHeaders": 1
}
json
{
  "Success": false,
  "ErrorCode": 99998
}
txt
0: Success

Create Email Header

POST /api.php

API Usage Notes

  • Authentication required: Admin API Key (privilege Settings)
  • Legacy endpoint access via /api.php only (no v1 REST alias configured)

Request Body Parameters:

ParameterTypeRequiredDescription
CommandStringYesAPI command: emailheader.create
SessionIDStringNoSession ID obtained from login
APIKeyStringNoAdmin API key for authentication
NameStringYesHeader field name: letters, digits and the punctuation !#$%&'*+.^_~-, plus the backtick and the vertical bar (RFC 5322 field-name characters)
ValueStringYesHeader value, one line
EmailTypeStringNoall (default), campaign, autoresponder or transactional
DeliveryServerIDIntegerNoRestrict the header to one delivery server; 0 (default) applies it everywhere
bash
curl -X POST https://example.com/api.php \
  -H "Content-Type: application/json" \
  -d '{
    "Command": "emailheader.create",
    "APIKey": "your-admin-api-key",
    "Name": "X-Campaign-Source",
    "Value": "octeth",
    "EmailType": "campaign"
  }'
json
{
  "Success": true,
  "ErrorCode": 0,
  "EmailHeader": {"HeaderID": 7, "Name": "X-Campaign-Source", "Value": "octeth", "EmailType": "campaign", "DeliveryServerID": 0}
}
json
{
  "Success": false,
  "ErrorCode": 5,
  "ErrorText": "EmailType must be one of all, campaign, autoresponder, transactional."
}
txt
0: Success
1: Name is missing
2: Value is missing
3: Name is not a valid header field name
4: Value is empty or spans more than one line
5: EmailType is not one of the four values
6: DeliveryServerID is not a non-negative integer
7: DeliveryServerID does not exist
NOT AVAILABLE IN DEMO MODE: Endpoint disabled in demo mode

Delete Email Headers

POST /api.php

API Usage Notes

  • Authentication required: Admin API Key (privilege Settings)
  • Legacy endpoint access via /api.php only (no v1 REST alias configured)
  • Ids that do not exist are reported in MissingHeaderIDs; the others are still deleted.

Request Body Parameters:

ParameterTypeRequiredDescription
CommandStringYesAPI command: emailheaders.delete
SessionIDStringNoSession ID obtained from login
APIKeyStringNoAdmin API key for authentication
HeaderIDsStringYesComma-separated header ids (an array is also accepted)
bash
curl -X POST https://example.com/api.php \
  -H "Content-Type: application/json" \
  -d '{"Command": "emailheaders.delete", "APIKey": "your-admin-api-key", "HeaderIDs": "7,8"}'
json
{
  "Success": true,
  "ErrorCode": 0,
  "DeletedHeaderIDs": [7],
  "MissingHeaderIDs": [8]
}
json
{
  "Success": false,
  "ErrorCode": 2,
  "ErrorText": "HeaderIDs must be a comma-separated list of positive integers."
}
txt
0: Success
1: HeaderIDs is missing
2: HeaderIDs is not a list of positive integers
NOT AVAILABLE IN DEMO MODE: Endpoint disabled in demo mode

Any questions? Contact us.