Skip to content
  • There are no suggestions because the search field is empty.

Primary & Secondary Logo APIs

The following article will show how to update and manage primary and secondary header logos via the API endpoints.

Administrators can configure the primary and secondary logos via the provided API endpoints. This option allows for a more streamlined experience when updating your site's branding. These API endpoints work for sites that have the Showcase page enabled. 

🔔Note: Site administrator permissions are required to update site logos. 

Primary & Secondary Logos

The primary and secondary logos sit within the header section of the site's showcase page. 

Logo images can be PNG, JPG or SVG format with a maximum file size of 2MB.

We recommend logos that render at 70px height.

The primary logo appears on the left-hand side, which is the main logo shown throughout the site. 
 
The secondary logo can be configured globally, per user or per account, and sits on the right-hand side. 
 
This means each account can have its own logo configured alongside the primary logo. 
 
 
Primary logo is set to the left and secondary is set to the right for the account 

 
 

How to Configure Logos 

To view the available endpoints, head to the API and Integration Documentation section via the admin area and select 'Beta Documentation'.

 

 

🔔Note: See the API: Application Programming Interfaces article to familiarise yourself with APIs in Content Catalyst. 

Select the BETA documentation link. See below:

🔔Note: These API endpoints are currently in BETA documentation, and they may change with future developments.

This article will be updated with any changes that are made. 

The relevant endpoints used for the promoted content section can be found under the 'Showcase' dropdown list.
 
Below is the list of endpoints, along with a brief description of their actions. 
 
GET /header-logo/files
Gets the list of header log files by their ID's.
POST /header-logo/files
Upload a header logo file 
DELETE /header-logo/files{logoId}
Deletes a header logo file by ID
GET /header-logo/primary
Gets the primary header logo
PUT /header-logo/primary
Updates the primary header logo
DELETE /header-logo/primary
Deletes the primary header logo
 GET /header-logo/secondary
Gets the secondary header logo for the current user
PUT /header-logo/secondary/accounts/{accountName}
Updates the account secondary header logo
DELETE /header-logo/secondary/accounts/{accountName}
Deletes the account secondary header logo 
PUT /header-logo/secondary/global
Updates the global secondary header logo 
DELETE /header-logo/secondary/global
Deletes secondary header logo 
PUT /header-logo/secondary/subscribers/{username}
Updates the subscriber header logo
DELETE /header-logo/secondary/subscribers/{username}
Deletes the subscriber secondary header logo
 
 

 

To use any of these endpoints, select the dropdown arrow to expand the parameters and select the 'Try it out' option. See below:

 
 

Example: Uploading an image

The following example shows how upload a logo image. Logos uploaded via this API are stored in a library. 

This process applies to all logo images used throughout the site. 

Choose the logo image PNG, JPG or SVG format with a maximum filesize of 2MB.

Select the query POST /header-logo/files.
 
 
Select 'Choose File' to select the image file.
 
 
 
Select the 'Execute' option to run the query and upload the file to the libary.
 
If the query has been successful, we can see the image ID in the Response body.

See below:

 

 

🔔Note: Keep a note of the image ID for future reference when applying the logo.

Example: Applying a primary header logo globally

The following example shows how to apply a primary logo globally to all accounts.

Select the query PUT /header-logo/primary

In the query 'body' section, replace the "string" value with the Image ID wrapped in quotation marks and separated by commas that you wish to add as the primary header logo.

Select the 'Execute' option to run the query.

🔔Note: Changes may not appear immediatly due to browser caching. We recommend clearing the browser cache after applying a logo.

The primary logo will now be updated globally throughout the site. 

Example: Applying a secondary logo per account 

The following example shows how to apply a secondary logo to a specific account.

Select the query PUT /header-logo/secondary/accounts/{accountName}

First, identify the account name you wish to apply the secondary logo to. 
 
Select Accounts > Company > 'Account Name' in the admin section.
 
In this example, the Company is Content Catalyst, but the account name is PIAdminAccount. 
 
 
Add the account name in the accountName field. For example:
 
accountName: PIAdminAccount (example account)
 
In the query 'body' section, replace the "string" value with the Image ID wrapped in quotation marks and separated by commas that you wish to add as the Secondary header logo.
 
Select the 'Execute' option to run the query.

 

Testing a user from the selected account will show the secondary logo updated for the chosen account.

Applying the Logo to a user requires the Username instead of the AccountName. 

🔔Note: See Testing a User for testing the account or user Logo change on your site.

Example: deleting a secondary logo for an account. 

The following example shows how to delete a logo. 

Select DELETE /header-logo/secondary/accounts/{accountName} 

Use the AccountName, for example

accountName: PIAdminAccount (example account)
 

Select the 'Execute' option to run the query.

The Secondary Logo will be removed. 

The DELETE API method deletes the association but not the underlying logo files,  which will still be available by their ID's from the library.

For any further changes to branding please contact us via support@contentcatalyst.com.