Skip to content

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/json

Path Parameters ​

ParameterTypeRequiredDescription
namespaceIdstring✅Namespace unique ID
quizIdstring✅Quiz unique ID

Body Parameters ​

ParameterTypeRequiredDescription
namestring❌Name of the quiz
startdate❌Timestamp in milliseconds when the quiz becomes active
enddate❌Timestamp in milliseconds when the quiz closes, must be greater than start time
primaryColorstring❌Hex color code for the quiz theme (#RRGGBB or #RGB format)
retryAfterDaysinteger❌Number of days to wait before retry, must be 0 (for no retry) or greater
anonymousboolean❌Indicates if the quiz allows anonymous responses
disableEmailingboolean❌Prevents the quiz from sending emails
customIntroScreenobject❌Custom introduction screen configuration
customOutroScreenobject❌Custom conclusion screen configuration
customLogostring/object❌Custom logo URL or object
demographicMessagestring❌Custom message for demographic section
hasCustomIntroboolean❌Indicates if quiz uses custom intro screen
hasCustomOutroboolean❌Indicates if quiz uses custom outro screen
customCTAobject❌Custom call-to-action configuration
fhscoreboolean❌Enable financial health scoring
customRecommendationCardobject❌Custom recommendation card configuration

customIntroScreen Object ​

FieldTypeRequiredDescription
headerMessagestring❌Header text for intro screen. Can be empty
mainMessagestring❌Main body text for intro screen. Can be empty
buttonMessagestring❌Custom text for start button. Can be empty
footnoteMessagestring❌Footer text for intro screen. Can be empty
customLogoUrlstring❌URL for custom logo on intro screen
inheritLogoboolean❌Whether to inherit logo from namespace

customOutroScreen Object ​

FieldTypeRequiredDescription
outroMessagestring❌Message displayed on completion screen if hasCustomOutro is true

customCTA Object ​

FieldTypeRequiredDescription
ctaLinkstring❌URL for call-to-action. Can be empty
ctaTitlestring❌Title for call-to-action (max 65 chars)
ctaButtonstring❌Button text for CTA (max 50 chars)
ctaDescriptionstring❌Description text for CTA (max 320 chars)
stickyboolean❌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:

  • fhn1
  • fhn2
  • fhn3
  • fhn4
  • fhn5
  • fhn6
  • fhn7
  • fhn8

Empty text fields will have a default set value, except for the CTA links. The customRecommendationCard object has the following properties:

FieldTypeRequiredDescription
titlestring❌Card title. Can be empty
subtitlestring❌Card subtitle. Can be empty
recommendationTitlestring❌Title for recommendations. Can be empty
recommendationsarray❌Array of recommendation strings
CTA1Buttonstring❌Text for first CTA button. Can be empty
CTA1Linkstring❌URL for first CTA. Can be empty
CTA2Buttonstring❌Text for second CTA button. Can be empty
CTA2Linkstring❌URL for second CTA. Can be empty
CTA3Buttonstring❌Text for third CTA button. Can be empty
CTA3Linkstring❌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.