Update survey theme

Update Survey Theme

Updates a specified theme in your account's theme library. Include only the fields you want to change — all parameters are optional.

Endpoint

POST v5/surveytheme/{theme_id}

Requires authentication

Path Parameters

The theme to update.

theme_id
string
required
The ID of the theme to update.

Query Parameters

All query parameters are optional. Include only the fields you want to change. Hex color values should URL-encode # as %23. See Create Survey Theme for the full list of accepted parameters and their accepted values.

name
string
Updated display name for the theme.
header_image_url
string
Updated URL for the header image.
background_body_color
string
Updated hex color code for the survey background.
header_background_color
string
Updated hex color code for the header background.
page_background_color
string
Updated hex color code for the page background.
accent
string
Updated accent color for buttons and progress bar.
base_font_family
string
Updated font family for body text.
custom_css
string
Updated custom CSS for the theme.
custom_html
string
Updated custom HTML template body.

Response

Returns the updated theme object. See Get Survey Theme for the full list of response fields.

result_ok
boolean
Whether the request succeeded.
data
object
The updated theme object, including all resolved style_options.

Examples

Request (cURL)
curl -X POST "https://api.alchemer.com/v5/surveytheme/YOUR_THEME_ID?api_token=YOUR_API_TOKEN&api_token_secret=YOUR_API_TOKEN_SECRET&name=Updated+Theme+Name&accent=%23ff9900"
Response
{
  "result_ok": true,
  "data": {
    "id": 68965,
    "status": "Active",
    "created": null,
    "name": "Updated Theme Name",
    "style_options": {
      "accent": "#ff9900",
      "accent text": "#ffffff",
      "header background color": "#3a8ea8",
      "base font size": "14px",
      "survey title": "true",
      "progress bar": "true"
    },
    "Body": "<div class=\"sg-wrapper\">...</div>",
    "css": ""
  }
}