Create Survey Theme
Creates a new theme in your account's theme library. All parameters are optional — omitted values fall back to system defaults.
Endpoint
PUT
v5/surveytheme
Requires authentication
Path Parameters
This endpoint does not include path parameters.
None
Query Parameters
All query parameters are optional. Hex color values should URL-encode # as %23.
name
string
The display name of the theme.
header_image_url
string
URL for the header image.
image_align
string
Alignment of the header image.
img_width
integer
Percentage width for the header image. Range:
1–100.img_width_max
integer
Maximum percentage width for the header image. Range:
1–100.background_image
string
URL for the survey background image.
background_body_color
string
Hex color code for the survey background. Example:
%23efefef.body_background_opacity
number
Opacity of the background. Range:
0.0–1.00. Lower values are more transparent.background_image_style
string
How the background image is displayed. Values:
cover, tile, left, right, center.background_grad_orient
string
Background gradient orientation. Values:
vertical, horizontal.header_background_color
string
Hex color code for the header background. Example:
%233a8ea8.header_background_opacity
number
Opacity of the header background. Range:
0.0–1.00.header_text_color
string
Hex color code for header text. Example:
%23ffffff.page_background_color
string
Hex color code for the page (content area) background. Example:
%233a8ea8.page_background_opacity
number
Opacity of the page background. Range:
0.0–1.00.accent
string
Hex color code for accent elements (Next, Back, Submit buttons and Progress Bar). Example:
%233a8ea8.accent_text
string
Hex color code for text on accent-colored elements. Example:
%23ffffff.title_font_family
string
Font family for the survey title. Example:
Montserrat.title_font_size
string
Font size for the survey title. Example:
36px.title_font_weight
string
Font weight for the survey title. Example:
400.title_web_font_name
string
Name of a custom web font to use for the title.
title_web_font_url
string
URL of a custom web font to use for the title.
base_font_family
string
Font family for body text. Example:
Arial.base_font_size
string
Font size for body text. Example:
14px.base_font_weight
string
Font weight for body text. Example:
400.base_web_font_name
string
Name of a custom web font to use for body text.
base_web_font_url
string
URL of a custom web font to use for body text.
base_web_font_color
string
Color for the custom web font used in body text.
survey_title
boolean
Show or hide the survey title. Values:
true, false.title_align
string
Alignment of the survey title. Values:
left, center, right.page_title
boolean
Show or hide page titles. Values:
true, false.question_numbers
boolean
Show or hide question numbers. Values:
true, false.required_ast
boolean
Show or hide the required asterisk symbol. Values:
true, false.question_border
boolean
Show or hide question borders. Values:
true, false.back_button
boolean
Show or hide the Back button. Values:
true, false.progress_bar
boolean
Show or hide the progress bar. Values:
true, false.survey_width_number
integer
The survey width value, in the unit specified by
survey_width_unit.survey_width_unit
string
Unit for the survey width. Values:
%, px.page_width_number
integer
The page width value, in the unit specified by
page_width_unit.page_width_unit
string
Unit for the page width. Values:
%, px.survey_round_corner_number
integer
Corner rounding for the survey page. Range:
0–100. Higher values produce more rounded corners.comment_width
integer
Width in pixels for Comment question fields. Example:
200.table_header_width
integer
Width in pixels for Grid question row headers. Example:
150.custom_css
string
Custom CSS to apply to the theme. Example:
.sg-title{color:red;}.custom_head
string
Custom HTML to inject into the
<head> of the survey.custom_html
string
Custom HTML template body for the survey layout.
Response
Returns the result of the creation request and the newly created theme object. See Get Survey Theme for the full list of response fields.
result_ok
boolean
Whether the request succeeded.
data
object
The newly created theme object, including its assigned ID and all resolved
style_options.Examples
Request (cURL)
curl -X PUT "https://api.alchemer.com/v5/surveytheme?api_token=YOUR_API_TOKEN&api_token_secret=YOUR_API_TOKEN_SECRET&name=My+New+Theme&accent=%233a8ea8&header_background_color=%233a8ea8"
Response
{
"result_ok": true,
"data": {
"id": 68965,
"status": "Active",
"created": null,
"name": "My New Theme",
"style_options": {
"accent": "#3a8ea8",
"accent text": "#ffffff",
"header background color": "#3a8ea8",
"base font size": "14px",
"survey title": "true",
"progress bar": "true"
},
"Body": "<div class=\"sg-wrapper\">...</div>",
"css": ""
}
}