Appearance
Update a Quiz
Update the properties of an existing quiz including name, appearance, scheduling, and content settings.
Overview
This endpoint allows you to modify various properties of an existing quiz. Note that for quizzes that have already started, only certain fields can be updated.
Method: PATCH
Endpoint:/api/v1/namespaces/{namespaceId}/quizzes/{quizId}
Requires administrator authentication.
Request
Headers
http
x-api-key: {your_api_key} # Required
Content-Type: application/jsonPath Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
namespaceId | string | ✅ | Namespace unique ID |
quizId | string | ✅ | Quiz unique ID |
Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | ❌ | Name of the quiz |
start | date | ❌ | Timestamp in milliseconds when the quiz becomes active |
end | date | ❌ | Timestamp in milliseconds when the quiz closes, must be greater than start time |
primaryColor | string | ❌ | Hex color code for the quiz theme (#RRGGBB or #RGB format) |
retryAfterDays | integer | ❌ | Number of days to wait before retry, must be 0 (for no retry) or greater |
anonymous | boolean | ❌ | Indicates if the quiz allows anonymous responses |
disableEmailing | boolean | ❌ | Prevents the quiz from sending emails |
customIntroScreen | object | ❌ | Custom introduction screen configuration |
customOutroScreen | object | ❌ | Custom conclusion screen configuration |
customLogo | string/object | ❌ | Custom logo URL or object |
demographicMessage | string | ❌ | Custom message for demographic section |
hasCustomIntro | boolean | ❌ | Indicates if quiz uses custom intro screen |
hasCustomOutro | boolean | ❌ | Indicates if quiz uses custom outro screen |
customCTA | object | ❌ | Custom call-to-action configuration |
fhscore | boolean | ❌ | Enable financial health scoring |
customRecommendationCard | object | ❌ | Custom recommendation card configuration |
customIntroScreen Object
| Field | Type | Required | Description |
|---|---|---|---|
headerMessage | string | ❌ | Header text for intro screen. Can be empty |
mainMessage | string | ❌ | Main body text for intro screen. Can be empty |
buttonMessage | string | ❌ | Custom text for start button. Can be empty |
footnoteMessage | string | ❌ | Footer text for intro screen. Can be empty |
customLogoUrl | string | ❌ | URL for custom logo on intro screen |
inheritLogo | boolean | ❌ | Whether to inherit logo from namespace |
customOutroScreen Object
| Field | Type | Required | Description |
|---|---|---|---|
outroMessage | string | ❌ | Message displayed on completion screen if hasCustomOutro is true |
customCTA Object
| Field | Type | Required | Description |
|---|---|---|---|
ctaLink | string | ❌ | URL for call-to-action. Can be empty |
ctaTitle | string | ❌ | Title for call-to-action (max 65 chars) |
ctaButton | string | ❌ | Button text for CTA (max 50 chars) |
ctaDescription | string | ❌ | Description text for CTA (max 320 chars) |
sticky | boolean | ❌ | Whether CTA should be sticky |
customRecommendationCard Object
This is where the recommendations live, and they can be customized. Each key in this object represents a card ID. The keys must be the following:
fhn1fhn2fhn3fhn4fhn5fhn6fhn7fhn8
Empty text fields will have a default set value, except for the CTA links. The customRecommendationCard object has the following properties:
| Field | Type | Required | Description |
|---|---|---|---|
title | string | ❌ | Card title. Can be empty |
subtitle | string | ❌ | Card subtitle. Can be empty |
recommendationTitle | string | ❌ | Title for recommendations. Can be empty |
recommendations | array | ❌ | Array of recommendation strings |
CTA1Button | string | ❌ | Text for first CTA button. Can be empty |
CTA1Link | string | ❌ | URL for first CTA. Can be empty |
CTA2Button | string | ❌ | Text for second CTA button. Can be empty |
CTA2Link | string | ❌ | URL for second CTA. Can be empty |
CTA3Button | string | ❌ | Text for third CTA button. Can be empty |
CTA3Link | string | ❌ | URL for third CTA. Can be empty |
Example Request Body
json
{
"name": "Updated Quiz Name",
"primaryColor": "#6633ff",
"end": 1626607199999,
"customLogo": "https://example.com/logo.png",
"hasCustomIntro": true,
"customIntroScreen": {
"headerMessage": "Welcome to Our Survey",
"mainMessage": "Help us improve your experience",
"buttonMessage": "Begin Survey"
},
"customCTA": {
"ctaLink": "https://example.com/learn-more",
"ctaTitle": "Learn More About Financial Health",
"ctaButton": "Explore Resources",
"ctaDescription": "Discover tools and tips to improve your financial well-being"
}
}Response
Success Response
json
{
"quiz": {
"id": "hK5ZY9n6xaUF5Mu3hnwV",
"name": "Updated Quiz Name",
"primaryColor": "#6633ff",
"customCTA": {
"ctaLink": "https://example.com/learn-more",
"ctaTitle": "Learn More About Financial Health",
"ctaButton": "Explore Resources",
"ctaDescription": "Discover tools and tips to improve your financial well-being"
},
"customCTAs": {},
"customRecommendationCard": {},
"customIntroScreen": {
"headerMessage": "Welcome to Our Survey",
"mainMessage": "Help us improve your experience",
"buttonMessage": "Begin Survey",
"customLogoUrl": "https://storage.googleapis.com/fhc-dev-files/https://example.com/logo.png"
},
"hasCustomIntro": true,
"customOutroScreen": {},
"createdOn": 1752737950897,
"start": 1758637199999,
"end": 1759637199999,
"questions": [
{
"id": "fhn1",
"order": 1,
"text": "In the last 12 months, my household <strong>spent</strong>...",
"type": "multipleChoice",
"required": true,
"answers": [
{
"id": "4b7e6d70-fd93-494a-874d-ea783f825289",
"code": 1,
"text": "Much less than our income",
"score": 100
},
/* Additional answers omitted for brevity */
],
"help": "Your income is all the money you've made, after taxes. Compare that to how much you spent.",
"visible": true,
"category": "finhealth"
},
/* Additional questions omitted for brevity */
],
"anonymous": true,
"inapp": false,
"fhscore": false,
"status": "queued",
"disableEmailing": true,
"emailedOn": null,
"wasReminded": false,
"lastDfUpdate": {
"_seconds": 1752737950,
"_nanoseconds": 897000000
}
}
}Notes
- For quizzes that have already started, only the following fields can be updated:
- name
- start
- end
- fhscore
- customCTAs
- customCTA
- customIntroScreen
- customOutroScreen
- resultScreen
- customLogo
- hasCustomIntro
- hasCustomOutro
- customRecommendationCard
- Attempting to update other fields on an active quiz will result in those changes being ignored.
- You can update one or more properties in a single request.