> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://typeform.ferndocs.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://typeform.ferndocs.com/_mcp/server.

# Update theme (whole definition)

PUT https://api.typeform.com/themes/{theme_id}
Content-Type: application/json

Updates a theme in your Typeform account. **NOTE:** You can't change Typeform's public themes (the built-in themes that are available in all accounts). This endpoint is meant for receiving a full theme payload. The theme definition you provide will overwrite any existing theme with the same ID, even if that means overwriting fields with default values. For partial updates, use the `PATCH` endpoint.

Reference: https://typeform.ferndocs.com/documentation/create-api/api-reference/themes/replace

## Authentication

- `Authorization` header (bearer token, required) — Bearer token authentication. Tokens can be generated from the user account. Privileges needed may vary.
- `Authorization` header (required) — A string representation of JWT containing at least two parameters: `ctx.user_id` — user's id `ctx.account_id` — user's default account id `ctx.account_uid` — user's default account uid The usage of account_(u)id from JWT is discouraged, user can have access to multiple accounts, every endpoint has to be account aware if it's needed. This JWT must be signed by the appropriate authority.

## Request

### Path parameters

- `theme_id` (string, required) — Unique ID for the theme.

### Body (application/json)

This endpoint expects a ThemeCreateRequest.

- `name` (string, required) — Name of the theme.
- `font` (string, required) — Font for the theme.
- `colors` (any, required)
- `background` (any, optional)
- `fields` (ThemeCreateRequestFields, optional) — Defines font size and alignment for fields.
- `screens` (ThemeCreateRequestScreens, optional) — Defines font size and alignment for welcome and thankyou screens.
- `has_transparent_button` (boolean, optional) — `true` if buttons should be transparent. Otherwise, `false`.
- `rounded_corners` (string, optional) — Specifies border radius style of buttons and other elements in the form.
- `visibility` (string, optional) — Specifies whether the theme is public or private.

## Response

### 200

OK

## Types

### ThemeCreateRequestFields

Defines font size and alignment for fields.

### ThemeCreateRequestScreens

Defines font size and alignment for welcome and thankyou screens.

## Examples

**Request**

```json
{
  "name": "string",
  "font": "string",
  "colors": null
}
```

**Response**

```json
{}
```

**SDK Code**

```python
import requests

url = "https://api.typeform.com/themes/6lPNE6"

payload = {
    "name": "string",
    "font": "string",
    "colors": None
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.put(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.typeform.com/themes/6lPNE6';
const options = {
  method: 'PUT',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"name":"string","font":"string","colors":null}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.typeform.com/themes/6lPNE6"

	payload := strings.NewReader("{\n  \"name\": \"string\",\n  \"font\": \"string\",\n  \"colors\": null\n}")

	req, _ := http.NewRequest("PUT", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.typeform.com/themes/6lPNE6")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"name\": \"string\",\n  \"font\": \"string\",\n  \"colors\": null\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.put("https://api.typeform.com/themes/6lPNE6")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"name\": \"string\",\n  \"font\": \"string\",\n  \"colors\": null\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PUT', 'https://api.typeform.com/themes/6lPNE6', [
  'body' => '{
  "name": "string",
  "font": "string",
  "colors": null
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.typeform.com/themes/6lPNE6");
var request = new RestRequest(Method.PUT);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"name\": \"string\",\n  \"font\": \"string\",\n  \"colors\": null\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "name": "string",
  "font": "string",
  "colors": 
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.typeform.com/themes/6lPNE6")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```