Skip to content

Rebranding API Documentation

Theme and white-label rebranding endpoints for customizing the Octeth interface appearance, logos, and product branding.

Create a Theme

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: theme.create
SessionIDStringNoSession ID obtained from admin login
APIKeyStringNoAdmin API key for authentication
TemplateStringYesTemplate code (must match an installed template)
ThemeNameStringYesName for the new theme
ProductNameStringNoCustom product name for white-label branding
ThemeSettingsStringNoTheme CSS settings in format: tag````value\ntag````value (newline-separated)
bash
curl -X POST https://example.com/api.php \
  -H "Content-Type: application/json" \
  -d '{
    "Command": "theme.create",
    "SessionID": "admin-session-id",
    "Template": "weefive",
    "ThemeName": "My Custom Theme",
    "ProductName": "My Email Platform",
    "ThemeSettings": "primary-color||||#0066cc\nbackground-color||||#ffffff"
  }'
json
{
  "Success": true,
  "ErrorCode": 0,
  "ThemeID": 123
}
json
{
  "Success": false,
  "ErrorCode": [1, 2, 3]
}
txt
0: Success
1: Missing template parameter
2: Missing theme name parameter
3: Invalid template code (template not found or not installed)

Get a Theme

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: theme.get
SessionIDStringNoSession ID obtained from admin login
APIKeyStringNoAdmin API key for authentication
ThemeIDIntegerYesID of the theme to retrieve
bash
curl -X POST https://example.com/api.php \
  -H "Content-Type: application/json" \
  -d '{
    "Command": "theme.get",
    "SessionID": "admin-session-id",
    "ThemeID": 123
  }'
json
{
  "Success": true,
  "ErrorCode": 0,
  "Theme": {
    "ThemeID": 123,
    "Template": "weefive",
    "ThemeName": "My Custom Theme",
    "ProductName": "My Email Platform",
    "LogoData": "",
    "LogoType": "",
    "LogoSize": 0,
    "LogoFileName": "",
    "ThemeSettings": "primary-color||||#0066cc\nbackground-color||||#ffffff"
  }
}
json
{
  "Success": false,
  "ErrorCode": [1, 2]
}
txt
0: Success
1: Missing theme ID parameter
2: Theme not found

Update a Theme

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: theme.update
SessionIDStringNoSession ID obtained from admin login
APIKeyStringNoAdmin API key for authentication
ThemeIDIntegerYesID of the theme to update
TemplateStringNoNew template code (must match an installed template)
ThemeNameStringNoNew theme name
ProductNameStringNoNew product name for white-label branding
LogoDataStringNoBase64-encoded logo image data
LogoTypeStringNoLogo MIME type (e.g., "image/png", "image/jpeg")
LogoSizeIntegerNoLogo file size in bytes
LogoFileNameStringNoOriginal logo filename
ThemeSettingsStringNoTheme CSS settings in format: tag````value\ntag````value (newline-separated). Omit (or send an empty string) to preserve the theme's existing settings unchanged — see below.

Partial Update Semantics:

theme.update is a partial update: every optional parameter you omit keeps its stored value. This includes ThemeSettings.

  • ThemeSettings omitted or empty — the theme's currently stored settings are carried forward and re-persisted as-is. Nothing is recalculated, and no tag is reset. This is the correct way to change only a theme's name, product name, logo or template.
  • ThemeSettings supplied — the settings are rebuilt from scratch against the CSS tag list of the effective template (the Template you supplied, or the theme's current template if you omitted it). Within that rebuild:
    • Blank lines and malformed lines (any line that does not contain both a tag and a value separated by ||||) are skipped.
    • Any tag defined by the template but absent from your payload falls back to that tag's Default value.

There is no way to reset a theme to its defaults through this endpoint

Because omitting ThemeSettings preserves the stored settings, and supplying it only defaults the tags you leave out of an otherwise-supplied payload, theme.update offers no "reset everything to defaults" path. To restore defaults for the full tag set, send a ThemeSettings payload that omits the tags you want defaulted.

Behavior change

Previously, omitting ThemeSettings did not preserve the stored settings. In the common partial-update case — where Template was omitted too, e.g. simply renaming a theme — the stored settings were wiped to an empty value. (Only in the narrower case where Template was supplied while ThemeSettings was omitted did each tag fall back to its Default.)

This is strictly a fix, but it is still a behavior change for integrations that worked around the old wipe by always resending the complete settings payload on every update. That compensation is no longer necessary — you can now send just the fields you intend to change.

bash
curl -X POST https://example.com/api.php \
  -H "Content-Type: application/json" \
  -d '{
    "Command": "theme.update",
    "SessionID": "admin-session-id",
    "ThemeID": 123,
    "ThemeName": "Updated Theme Name",
    "ProductName": "Updated Product Name",
    "ThemeSettings": "primary-color||||#ff6600\nbackground-color||||#f5f5f5"
  }'
json
{
  "Success": true,
  "ErrorCode": 0,
  "ErrorText": ""
}
json
{
  "Success": false,
  "ErrorCode": [3, 4, 5]
}
txt
0: Success
3: Invalid template code (template not found or not installed)
4: Missing theme ID parameter
5: Theme not found

Get All Themes

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: themes.get
SessionIDStringNoSession ID obtained from admin login
APIKeyStringNoAdmin API key for authentication
bash
curl -X POST https://example.com/api.php \
  -H "Content-Type: application/json" \
  -d '{
    "Command": "themes.get",
    "SessionID": "admin-session-id"
  }'
json
{
  "Success": true,
  "ErrorCode": 0,
  "Themes": [
    {
      "ThemeID": 1,
      "Template": "weefive",
      "ThemeName": "Default Theme",
      "ProductName": "Octeth",
      "ThemeSettings": "primary-color||||#0066cc\nbackground-color||||#ffffff"
    },
    {
      "ThemeID": 123,
      "Template": "weefive",
      "ThemeName": "My Custom Theme",
      "ProductName": "My Email Platform",
      "ThemeSettings": "primary-color||||#ff6600\nbackground-color||||#f5f5f5"
    }
  ]
}
json
{
  "Success": false,
  "ErrorCode": []
}
txt
0: Success

Delete Themes

POST /api.php

API Usage Notes

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

Deletes one or more themes. The system prevents deletion of the default theme and the last remaining theme to ensure at least one theme is always available.

Request Body Parameters:

ParameterTypeRequiredDescription
CommandStringYesAPI command: theme.delete
SessionIDStringNoSession ID obtained from admin login
APIKeyStringNoAdmin API key for authentication
ThemesStringYesComma-separated list of theme IDs to delete
bash
curl -X POST https://example.com/api.php \
  -H "Content-Type: application/json" \
  -d '{
    "Command": "theme.delete",
    "SessionID": "admin-session-id",
    "Themes": "123,456"
  }'
json
{
  "Success": true,
  "ErrorCode": 0
}
json
{
  "Success": false,
  "ErrorCode": [1, 2]
}
txt
0: Success
1: Missing themes parameter (theme IDs required)
2: Cannot delete the last remaining theme (at least one theme must exist)

Any questions? Contact us.