# /themes/{themeId}

Delete a custom theme from the current account. Forms using this theme will be switched to the default theme.

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "Formstack API v2025.0",
    "version": "0.0.4"
  },
  "servers": [
    {
      "url": "https://www.formstack.com/api/v2025",
      "description": "Production server"
    },
    {
      "url": "https://staging-formstack.com/api/v2025",
      "description": "Staging server"
    },
    {
      "url": "https://dev-formstack.com/api/v2025",
      "description": "Development server"
    }
  ],
  "paths": {
    "/themes/{themeId}": {
      "delete": {
        "tags": [
          "Themes"
        ],
        "description": "Delete a custom theme from the current account. Forms using this theme will be switched to the default theme.",
        "operationId": "deleteTheme",
        "parameters": [
          {
            "name": "themeId",
            "in": "path",
            "description": "Unique identifier of the theme to delete",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Theme deleted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ThemeDeleteDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad request - Theme cannot be deleted"
          },
          "401": {
            "description": "Unauthorized"
          },
          "404": {
            "description": "Theme not found"
          },
          "409": {
            "description": "Conflict - Theme is in use and cannot be deleted"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "ThemeDeleteDto": {
        "title": "Theme Delete Response",
        "description": "Response after successfully deleting a theme",
        "properties": {
          "deleted": {
            "description": "Indicates if the theme was successfully deleted",
            "type": "boolean",
            "nullable": false
          },
          "themeId": {
            "description": "The ID of the deleted theme",
            "type": "string",
            "nullable": false
          },
          "themeName": {
            "description": "The name of the deleted theme",
            "type": "string",
            "nullable": false
          },
          "formsAffected": {
            "description": "Number of forms that were using this theme",
            "type": "integer",
            "nullable": false
          },
          "fallbackThemeId": {
            "description": "The ID of the theme that forms were switched to",
            "type": "string",
            "nullable": false
          },
          "fallbackThemeName": {
            "description": "The name of the theme that forms were switched to",
            "type": "string",
            "nullable": false
          },
          "isStockFallback": {
            "description": "Indicates if the fallback theme is a stock theme",
            "type": "boolean",
            "nullable": false
          }
        },
        "type": "object"
      }
    }
  },
  "tags": [
    {
      "name": "Themes",
      "description": "Themes control the visual styling applied to forms. Use these endpoints to list the themes in an account, copy a theme, delete a theme, list the forms using a theme, and assign a theme to a form. Deleting a theme switches its forms to the default theme."
    }
  ]
}
```