---
updatedAt: 2026-09-11T15:13:46.000Z
agentTools:
  projectIndex: https://docs.voiceform.com/llms.txt
---

# Update survey style, logo, and branding

Convenience endpoint for visual customization. Accepts `style` (text/background/button colors),
logo URL/path fields, and `settings.hide_branding`.
Requires plan feature `upload_logo` when setting logo fields, and `remove_branding` when
setting `hide_branding`. Partial `style` objects are deep-merged with the existing style.


# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Voiceform Public API",
    "version": "1.0.0",
    "description": "Public REST API for Voiceform surveys, questions, actions, folders, webhooks, and results.\n\n**Authentication:** Sanctum personal access token with the `public-api-call` ability.\nThe caller's plan must include the `api_access` feature. Requests without a valid token\nor without `api_access` are rejected.\n\n**Feature gates** (plan-dependent; missing features return `{ error: { code, message, details } }`):\n- `api_access` — required for all endpoints (middleware)\n- `matrix_question` — required to create `matrix` questions\n- `file_upload` — required to create `file-upload` questions\n- `all_question_types` — when false, only basic question types are allowed\n- `dynamic_loops` — required for action type `loop`\n- `condition_scripts` — required when an action condition uses `script: true`\n\nSync this file to ReadMe manually if needed (no automated publish from this repo).\n"
  },
  "servers": [
    {
      "url": "https://app.voiceform.com/api/v1",
      "description": "Production"
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "tags": [
    {
      "name": "Surveys"
    }
  ],
  "paths": {
    "/surveys/{survey_id}/styles": {
      "parameters": [
        {
          "$ref": "#/components/parameters/SurveyId"
        }
      ],
      "patch": {
        "tags": [
          "Surveys"
        ],
        "operationId": "updateSurveyStyles",
        "summary": "Update survey style, logo, and branding",
        "description": "Convenience endpoint for visual customization. Accepts `style` (text/background/button colors),\nlogo URL/path fields, and `settings.hide_branding`.\nRequires plan feature `upload_logo` when setting logo fields, and `remove_branding` when\nsetting `hide_branding`. Partial `style` objects are deep-merged with the existing style.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SurveyStylesUpdate"
              },
              "examples": {
                "theme": {
                  "summary": "Apply colors",
                  "value": {
                    "style": {
                      "color": "#111111",
                      "background": "#F8F5F0",
                      "button": {
                        "color": "#FFFFFF",
                        "background": "#111111"
                      }
                    }
                  }
                },
                "branding": {
                  "summary": "Logo and hide Voiceform branding",
                  "value": {
                    "top_left_file_url": "https://cdn.example.com/logo.png",
                    "settings": {
                      "hide_branding": true
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated survey",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Survey"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "Sanctum PAT",
        "description": "Personal access token created with ability `public-api-call`.\nPlan feature `api_access` is required.\n"
      }
    },
    "parameters": {
      "SurveyId": {
        "name": "survey_id",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string",
          "format": "uuid"
        }
      }
    },
    "responses": {
      "Error": {
        "description": "API error",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "message",
              "details"
            ],
            "properties": {
              "code": {
                "type": "string",
                "examples": [
                  "forbidden",
                  "survey_not_found",
                  "matrix_question",
                  "file_upload",
                  "dynamic_loops",
                  "condition_scripts",
                  "api_access"
                ]
              },
              "message": {
                "type": "string"
              },
              "details": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        }
      },
      "SurveyStyle": {
        "type": "object",
        "description": "Respondent UI colors (hex strings recommended)",
        "properties": {
          "color": {
            "type": "string",
            "description": "Primary text color",
            "example": "#000000"
          },
          "background": {
            "type": "string",
            "description": "Page background color",
            "example": "#FFFFFF"
          },
          "button": {
            "type": "object",
            "properties": {
              "color": {
                "type": "string",
                "description": "Button text color",
                "example": "#FFFFFF"
              },
              "background": {
                "type": "string",
                "description": "Button background color",
                "example": "#000000"
              }
            }
          }
        }
      },
      "SurveySettings": {
        "type": "object",
        "description": "Curated UI settings exposed by the public API. Writes merge these keys into the survey's\nfull settings JSON without wiping unrelated keys (localization, audio flags, etc.).\n",
        "properties": {
          "hide_branding": {
            "type": "boolean",
            "description": "Hide Voiceform branding (requires plan feature `remove_branding`)"
          },
          "is_progressbar_hidden": {
            "type": "boolean"
          },
          "is_nav_arrows_hidden": {
            "type": "boolean"
          },
          "percentage_progress": {
            "type": "boolean",
            "description": "Show progress as a percentage instead of a bar"
          },
          "hide_language_selector": {
            "type": "boolean"
          },
          "hide_welcome_step": {
            "type": "boolean"
          },
          "prevent_resubmit": {
            "type": "boolean"
          },
          "auto_switch": {
            "type": "boolean",
            "description": "Auto-advance after certain answer types"
          }
        }
      },
      "Survey": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "title": {
            "type": "string",
            "nullable": true
          },
          "subtitle": {
            "type": "string",
            "nullable": true
          },
          "goodbye_message": {
            "type": "string",
            "nullable": true
          },
          "goodbye_subtitle": {
            "type": "string",
            "nullable": true
          },
          "privacy_text": {
            "type": "string",
            "nullable": true
          },
          "include_welcome_page": {
            "type": "boolean"
          },
          "folder_id": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "team_id": {
            "type": "string",
            "format": "uuid"
          },
          "views_count": {
            "type": "integer"
          },
          "starts_count": {
            "type": "integer"
          },
          "language": {
            "type": "string",
            "nullable": true
          },
          "hash": {
            "type": "string",
            "nullable": true
          },
          "public_url": {
            "type": "string",
            "nullable": true,
            "description": "Public respondent URL when a hash exists"
          },
          "published_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "ends_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "redirect_link": {
            "type": "string",
            "nullable": true,
            "description": "Post-submit redirect URL (requires plan feature `redirect`)"
          },
          "style": {
            "allOf": [
              {
                "$ref": "#/components/schemas/SurveyStyle"
              }
            ],
            "nullable": true
          },
          "top_left_file_url": {
            "type": "string",
            "nullable": true,
            "description": "Logo URL (requires plan feature `upload_logo` to set or read when gated)"
          },
          "settings": {
            "$ref": "#/components/schemas/SurveySettings"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "responses_count": {
            "type": "integer",
            "nullable": true
          },
          "use_type": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "SurveyStylesUpdate": {
        "type": "object",
        "description": "Body for PATCH /surveys/{survey_id}/styles",
        "properties": {
          "style": {
            "$ref": "#/components/schemas/SurveyStyle"
          },
          "top_left_file_url": {
            "type": "string",
            "nullable": true
          },
          "top_left_file_path": {
            "type": "string",
            "nullable": true
          },
          "settings": {
            "type": "object",
            "properties": {
              "hide_branding": {
                "type": "boolean"
              }
            }
          }
        }
      }
    }
  }
}
```