Page tree
Skip to end of metadata
Go to start of metadata

 

Description

This function retrieves the cPanel account's branding information. For more information, read our Customization documentation.

Note:

cPanel accounts that do not use the Paper Lantern theme, or that use Paper Lantern without configured branding information, return blank values. 

Examples 


 cPanel or Webmail Session URL
https://hostname.example.com:2083/cpsess##########/execute/Brand/read

Note:

This example calls the UAPI function via a cPanel session. For more information, read our Guide to UAPI documentation. 

 LiveAPI PHP Class
$cpanel = new CPANEL(); // Connect to cPanel - only do this once.
 
// Get Paper Lantern branding settings.
$pl_branding = $cpanel->uapi(
    'Brand', 'read'
);

Note:

For more information, read our Guide to the LiveAPI System.

 

 LiveAPI Perl Module
my $cpliveapi = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.
 
# Get Paper Lantern branding settings.
my $pl_branding = $cpliveapi->uapi(
    'Brand', 'read',
);

Note:

For more information, read our Guide to the LiveAPI System.

 

 cPanel Template Toolkit
<!-- Get a hash of all the data, then display the company_name value. -->
[% data = execute( 'Brand', 'read' ); %]
[% FOREACH q = data.company_name %]
     <p>
         [% q %]
     </p>
[% END %]
 

<!-- Get only the company name. -->
[% execute('Brand', 'read' ).data.company_name %]

Note:

For more information, read our Guide to Template Toolkit documentation. 

 

 Command Line
uapi --user=username Brand read

Notes:

  • You must URI-encode values.
  • username represents your account-level username.
  • For more information and additional output options, read our Guide to UAPI documentation or run the uapi --help command. 
  • We introduced this functionality in cPanel & WHM version 56.

 Output (JSON)
{
  "messages": null,
  "errors": null,
  "status": 1,
  "metadata": {
    
  },
  "data": {
    "company_name": "Hosting Company, Inc.",
    "display_company_name": 1,
    "webmail_display_company_name": 1,
    "documentation_url": "http://www.hostingcompany.com/docs",
    "help_url": "http://www.hostingcompany.com/support",
    "cpanel_logo": "logo.svg",
    "cpanel_logo_small": "logo_small.svg",
    "webmail_logo": "webmail.svg"
  }
}

Note:

Use cPanel's API Shell interface (cPanel >> Home >> Advanced >> API Shell) to directly test cPanel API calls.

   

Parameters

This function does not accept parameters.

Returns

ReturnTypeDescriptionPossible valuesExample
company_namestring

The company name.

This name appears in the top left corner of the branded cPanel interface.

  • A string value.
  • An empty string.
Hosting Company, Inc.
display_company_name BooleanWhether the cPanel interface displays the company_name value or a logo in the branded cPanel interface.
  • 1 — Display the company_name value.
  • 0 — Display the company's logo.
1
webmail_display_company_nameBoolean

Whether the Webmail interface displays the company_name value or a logo in the branded Webmail interface.

Note:

We added this return in cPanel & WHM version 60. 

  • 1 — Display the company_name value.
  • 0 — Display the company's logo.
1
documentation_urlstring

The company's documentation URL.

The Documentation link uses this URL in branded cPanel interfaces.

  • A valid URL.
  • An empty string.
http://www.hostingcompany.com/docs
help_urlstring

The company's support URL.

In cPanel & WHM version 11.48 and earlier, the Help link uses this URL in branded cPanel interfaces.

Note:

In cPanel & WHM version 11.50 and later, we removed the Help link from the cPanel interface.

  • A valid URL.
  • An empty string.

 

http://www.hostingcompany.com/support
cpanel_logostring

The filename of the logo file that displays in the cPanel interface.

Note:

We added this return in cPanel & WHM version 60. 

  • logo.svg
  • logo.png
logo.svg
cpanel_logo_smallstring

The filename of the small logo file that displays in the cPanel interface.

Note:

We added this return in cPanel & WHM version 60. 

  • logo_small.svg
  • logo_small.png
logo_small.svg
webmail_logostring

The filename of the logo file that displays in the Webmail interface.

Note:

We added this return in cPanel & WHM version 60. 

  • webmail.svg
  • webmail.png
webmail.svg