Create a theme

POST

https://www.rapidoform.com/be/api/theme

All requests require X-EMAIL and X-API-KEY. See authentication and errors. JSON request bodies also require Content-Type: application/json. All IDs in examples are synthetic; replace them with your own values.

Parameters

NameType / locationDescription
themeNamestringOptional; defaults to My Theme.
backgroundColor, questionColor, questionTypeColor, btnBackgroundColor, btnTextColor, bottomLineColorstringOptional CSS colors.
backgroundImage, backgroundImageType, backgroundImageTypeColorstringOptional background media and treatment.
logo, logoType, logoTypeColor, logoAltTextstringOptional logo configuration.
textAlignment, welcomeTextAlignmentstringOptional text alignment.
fontSize, welcomeFontSizestringOptional font size; default is "1.5".
fontFamily, fontUrl, radiusstringOptional font family, font resource and border radius.
bgImgBrigthness, logoSizenumberOptional image brightness (default 1) and logo size (default 72). Keep the spelling bgImgBrigthness.
isPaidThemebooleanOptional; defaults to false.

themeCreatorId is assigned from the authenticated user. Assign the returned theme ID to a form through Update a form.

Example request

curl --request POST 'https://www.rapidoform.com/be/api/theme' \
  --header "X-EMAIL: $RAPIDOFORM_EMAIL" \
  --header "X-API-KEY: $RAPIDOFORM_API_KEY" \
  --header 'Content-Type: application/json' \
  --data '{"themeName":"Brand theme","backgroundColor":"#ffffff","btnBackgroundColor":"#1d4ed8","btnTextColor":"#ffffff"}'

JSON request body

{
  "themeName": "Brand theme",
  "backgroundColor": "#ffffff",
  "btnBackgroundColor": "#1d4ed8",
  "btnTextColor": "#ffffff"
}

Response

Examples show selected fields, not every stored property. Empty arrays are valid for list/report endpoints.

{
  "Errors": [],
  "Info": [],
  "Data": [
    {
      "savedNewTheme": {
        "_id": "000000000000000000000002",
        "themeName": "Brand theme",
        "backgroundColor": "#ffffff"
      }
    }
  ],
  "ErrorCode": "SUCCESS",
  "fieldErrors": {
    "List": []
  }
}

HTTP 200 alone does not indicate success. Check ErrorCode and Errors; see troubleshooting.