API
Login Sign Up

Knowledge base Themes

Listing available knowledge base themes

GET https://api.groovehq.com/v1/kb/themes

Example Request

curl -X -i GET https://api.groovehq.com/v1/kb/themes \
    -H "Authorization: Bearer $GROOVE_API_KEY" \
    -H "Content-Type: application/json"

Example Response

Status: 200 OK

{
    "themes": [
        {
            "id": "4517239960",
            "created_at": "2018-03-13T13:31:37Z",
            "description": "A clean theme that showcases your categories on the home page.",
            "name": "Barcelona",
            "screenshot_url": "https://assets.groovehq.com/assets/groove_kb_themes/kb_theme_screenshot_barcelona.png",
            "updated_at": "2019-03-23T07:32:40Z"
        },
        {
            "id": "7023641925",
            "created_at": "2018-03-13T13:31:37Z",
            "description": "Put your articles front and center along with a big bold search bar.",
            "name": "Nashville",
            "screenshot_url": "https://assets.groovehq.com/assets/groove_kb_themes/kb_theme_screenshot_nashville.png",
            "updated_at": "2019-03-23T07:32:43Z"
        },
        {
            "id": "2057964173",
            "created_at": "2018-03-13T13:31:37Z",
            "description": "An elegant and clean theme that looks great with most brands.",
            "name": "Cape Town",
            "screenshot_url": "https://assets.groovehq.com/assets/groove_kb_themes/kb_theme_screenshot_cape_town.png",
            "updated_at": "2019-03-23T07:32:47Z"
        }
    ]
}

Listing knowledge base theme preferences

GET https://api.groovehq.com/v1/kb/:knowledge_base_id/theme_preferences

Example Request

curl -i -X GET https://api.groovehq.com/v1/kb/4216430596/theme_preferences \
    -H "Authorization: Bearer $GROOVE_API_KEY" \
    -H "Content-Type: application/json"

Example Response

Status: 200 OK

{
    "theme_preferences": {
        "primary_color": "#145cec",
        "secondary_color": "#145cec",
        "primary_font_type": "IBM Plex Sans",
        "secondary_font_type": "IBM Plex Sans",
        "background_scaling": "tile",
        "authors_enabled": "t",
        "branding_disabled": "f",
        "ratings_enabled": "t",
        "help_count_enabled": "t",
        "contact_support_enabled": "t",
        "ratings_type": "emoji",
        "heading": "What are you looking for?",
        "subheading": "Get help straight from the team at Acme...",
        "search_input": "Search for answers...",
        "contact_support_mailbox_id": "0549243131",
        "published": true
    }
}

Updating knowledge base theme preferences

PUT https://api.groovehq.com/v1/kb/:knowledge_base_id/theme_preferences

Parameters

Name Type Required Default Notes
authors_disabled boolean No false Whether the article and category authors are disabled.
background_image_url string No The URL to the background image of the theme.
background_scaling string No "static" The background scaling, either stretch, tile, or static.
body_script string No The JavaScript code injected into the body section of the page. Must be wrapped in a <script> tag.
branding_disabled boolean No false Whether to disable Groove branding. Available to customers with Pro plan only.
contact_support_enabled boolean No true Whether the contact support form is enabled.
contact_support_mailbox_id string No The Mailbox ID to use in the contact support form.
favicon_image_url string No The URL to the favicon image of the theme.
footer_logo_inverted boolean No false Whether the logo image colors are inverted.
head_script string No The JavaScript code injected into the head section of the page. Must be wrapped in a <script> tag.
heading string No "What are you looking for?" The heading text of the theme.
help_count_enabled boolean No true Whether the article help counts are enabled.
logo_image_url string No The URL to the logo image of the theme.
logo_size string No "small" The size of the logo image, either small, medium, or large.
menu_links string No The JSON string of the main menu links of the theme. Must be an array of objects with key/value pairs: title and a valid HTTP url.
primary_color string No "#145cec" The Hex format primary color of the theme, used as the background color for the header and the mobile menu.
primary_font_type string No "IBM Plex Sans" The primary font of the theme, see Available fonts.
ratings_enabled boolean No true Whether the article ratings are enabled.
ratings_type string No "emoji" The ratings faces type, either emoji or upvote.
search_input string No "Search for answers..." The search input placeholder text of the theme.
secondary_color string No "#145cec" The Hex format secondary color of the theme, used for links and buttons.
subheading string No "Get help straight from our team..." The subheading text of the theme.
timestamps_disabled boolean No false Whether the article and category updated timestamps are disabled.

Available fonts

The following fonts are available for the theme:

  • IBM Plex Sans
  • Playfair Display
  • Roboto
  • Source Sans Pro
  • Poppins
  • PT Sans
  • PT Serif
  • Lato

Example Request

curl -i -X PUT https://api.groovehq.com/v1/kb/4216430596/theme_preferences \
    -H "Authorization: Bearer $GROOVE_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
        "theme_preferences": {
            "subheading": "To the moon and back",
            "ratingsType": "upvote"
        }
    }'

Example Response

Status: 200 OK

{
    "theme_preferences": {
        "primary_color": "#145cec",
        "secondary_color": "#145cec",
        "primary_font_type": "IBM Plex Sans",
        "secondary_font_type": "IBM Plex Sans",
        "background_scaling": "tile",
        "authors_enabled": "t",
        "branding_disabled": "f",
        "ratings_enabled": "t",
        "help_count_enabled": "t",
        "contact_support_enabled": "t",
        "ratings_type": "upvote",
        "heading": "What are you looking for?",
        "subheading": "To the moon and back",
        "search_input": "Search for answers...",
        "contact_support_mailbox_id": "0549243131",
        "published": false
    }
}

Publishing knowledge base theme preferences

PUT https://api.groovehq.com/v1/kb/:knowledge_base_id/theme_preferences/publish

Example Request

curl -i -X PUT https://api.groovehq.com/v1/kb/4216430596/theme_preferences/publish \
    -H "Authorization: Bearer $GROOVE_API_KEY" \
    -H "Content-Type: application/json"

Example Response

Status: 200 OK

{
  "theme_preferences": {
      "primary_color": "#145cec",
      "secondary_color": "#145cec",
      "primary_font_type": "IBM Plex Sans",
      "secondary_font_type": "IBM Plex Sans",
      "background_scaling": "tile",
      "authors_enabled": "t",
      "branding_disabled": "f",
      "ratings_enabled": "t",
      "help_count_enabled": "t",
      "contact_support_enabled": "t",
      "ratings_type": "upvote",
      "heading": "What are you looking for?",
      "subheading": "To the moon and back",
      "search_input": "Search for answers...",
      "contact_support_mailbox_id": "0549243131",
      "published": true
  }

}

Reverting knowledge base theme preferences

PUT https://api.groovehq.com/v1/kb/:knowledge_base_id/theme_preferences/revert

Example Request

curl -i -X PUT https://api.groovehq.com/v1/kb/4216430596/theme_preferences/revert \
    -H "Authorization: Bearer $GROOVE_API_KEY" \
    -H "Content-Type: application/json"

Example Response

Status: 200 OK

{
    "theme_preferences": {
        "primary_color": "#145cec",
        "secondary_color": "#145cec",
        "primary_font_type": "IBM Plex Sans",
        "secondary_font_type": "IBM Plex Sans",
        "background_scaling": "tile",
        "authors_enabled": "t",
        "branding_disabled": "f",
        "ratings_enabled": "t",
        "help_count_enabled": "t",
        "contact_support_enabled": "t",
        "ratings_type": "upvote",
        "heading": "What are you looking for?",
        "subheading": "To the moon and back",
        "search_input": "Search for answers...",
        "contact_support_mailbox_id": "0549243131",
        "published": true
    }
}

Resetting knowledge base theme preferences to its defaults

PUT https://api.groovehq.com/v1/kb/:knowledge_base_id/theme_preferences/reset

Example Request

curl -i -X PUT https://api.groovehq.com/v1/kb/4216430596/theme_preferences/reset \
    -H "Authorization: Bearer $GROOVE_API_KEY" \
    -H "Content-Type: application/json"

Example Response

Status: 200 OK

{
    "theme_preferences": {
        "primary_color": "#145cec",
        "secondary_color": "#145cec",
        "primary_font_type": "IBM Plex Sans",
        "secondary_font_type": "IBM Plex Sans",
        "background_scaling": "tile",
        "authors_enabled": "t",
        "branding_disabled": "f",
        "ratings_enabled": "t",
        "help_count_enabled": "t",
        "contact_support_enabled": "t",
        "ratings_type": "emoji",
        "heading": "What are you looking for?",
        "subheading": "Get help straight from the team at Acme...",
        "search_input": "Search for answers...",
        "published": true
    }
}