Create a legacy theme
Creates a legacy MySite theme and returns it. name is required and must not match any of the company’s existing MySite theme names, compared case-insensitively; a taken name returns 422 and leaves the existing theme untouched. To change an existing theme, use PATCH /api/legacy_themes/{id}. Send template.content, template.stylesheet, and template.head to give the new theme its own template, which is published immediately. public defaults to true; a public theme appears in the member theme picker and becomes the company’s default MySite theme when none is set yet. Send public as false for a private working copy. Returns 422 with validation errors when the theme cannot be saved. Requires a company admin Bearer token; admin users, company API tokens, and partner tokens also need the my_site_themes update permission.
curl --request POST \
--url https://api.fluid.app/api/legacy_themes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"legacy_theme": {
"name": "Scranton Classic",
"description": "Clean white layout with the Dunder Mifflin logo and a featured paper product.",
"image_url": "https://cdn.fluid.app/themes/dunder-mifflin/scranton-classic.png",
"public": true,
"template": {
"content": "<section class=\"hero\"><h1>{{ member.full_name }}</h1><p>Your Dunder Mifflin paper rep</p></section>",
"stylesheet": ".hero { background: #ffffff; color: #1d3c6e; }",
"head": "<link rel=\"preconnect\" href=\"https://cdn.fluid.app\">"
}
}
}
'import requests
url = "https://api.fluid.app/api/legacy_themes"
payload = { "legacy_theme": {
"name": "Scranton Classic",
"description": "Clean white layout with the Dunder Mifflin logo and a featured paper product.",
"image_url": "https://cdn.fluid.app/themes/dunder-mifflin/scranton-classic.png",
"public": True,
"template": {
"content": "<section class=\"hero\"><h1>{{ member.full_name }}</h1><p>Your Dunder Mifflin paper rep</p></section>",
"stylesheet": ".hero { background: #ffffff; color: #1d3c6e; }",
"head": "<link rel=\"preconnect\" href=\"https://cdn.fluid.app\">"
}
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
legacy_theme: {
name: 'Scranton Classic',
description: 'Clean white layout with the Dunder Mifflin logo and a featured paper product.',
image_url: 'https://cdn.fluid.app/themes/dunder-mifflin/scranton-classic.png',
public: true,
template: {
content: '<section class="hero"><h1>{{ member.full_name }}</h1><p>Your Dunder Mifflin paper rep</p></section>',
stylesheet: '.hero { background: #ffffff; color: #1d3c6e; }',
head: '<link rel="preconnect" href="https://cdn.fluid.app">'
}
}
})
};
fetch('https://api.fluid.app/api/legacy_themes', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.fluid.app/api/legacy_themes",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'legacy_theme' => [
'name' => 'Scranton Classic',
'description' => 'Clean white layout with the Dunder Mifflin logo and a featured paper product.',
'image_url' => 'https://cdn.fluid.app/themes/dunder-mifflin/scranton-classic.png',
'public' => true,
'template' => [
'content' => '<section class="hero"><h1>{{ member.full_name }}</h1><p>Your Dunder Mifflin paper rep</p></section>',
'stylesheet' => '.hero { background: #ffffff; color: #1d3c6e; }',
'head' => '<link rel="preconnect" href="https://cdn.fluid.app">'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.fluid.app/api/legacy_themes"
payload := strings.NewReader("{\n \"legacy_theme\": {\n \"name\": \"Scranton Classic\",\n \"description\": \"Clean white layout with the Dunder Mifflin logo and a featured paper product.\",\n \"image_url\": \"https://cdn.fluid.app/themes/dunder-mifflin/scranton-classic.png\",\n \"public\": true,\n \"template\": {\n \"content\": \"<section class=\\\"hero\\\"><h1>{{ member.full_name }}</h1><p>Your Dunder Mifflin paper rep</p></section>\",\n \"stylesheet\": \".hero { background: #ffffff; color: #1d3c6e; }\",\n \"head\": \"<link rel=\\\"preconnect\\\" href=\\\"https://cdn.fluid.app\\\">\"\n }\n }\n}")
req, _ := http.NewRequest("POST", 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(string(body))
}HttpResponse<String> response = Unirest.post("https://api.fluid.app/api/legacy_themes")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"legacy_theme\": {\n \"name\": \"Scranton Classic\",\n \"description\": \"Clean white layout with the Dunder Mifflin logo and a featured paper product.\",\n \"image_url\": \"https://cdn.fluid.app/themes/dunder-mifflin/scranton-classic.png\",\n \"public\": true,\n \"template\": {\n \"content\": \"<section class=\\\"hero\\\"><h1>{{ member.full_name }}</h1><p>Your Dunder Mifflin paper rep</p></section>\",\n \"stylesheet\": \".hero { background: #ffffff; color: #1d3c6e; }\",\n \"head\": \"<link rel=\\\"preconnect\\\" href=\\\"https://cdn.fluid.app\\\">\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fluid.app/api/legacy_themes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"legacy_theme\": {\n \"name\": \"Scranton Classic\",\n \"description\": \"Clean white layout with the Dunder Mifflin logo and a featured paper product.\",\n \"image_url\": \"https://cdn.fluid.app/themes/dunder-mifflin/scranton-classic.png\",\n \"public\": true,\n \"template\": {\n \"content\": \"<section class=\\\"hero\\\"><h1>{{ member.full_name }}</h1><p>Your Dunder Mifflin paper rep</p></section>\",\n \"stylesheet\": \".hero { background: #ffffff; color: #1d3c6e; }\",\n \"head\": \"<link rel=\\\"preconnect\\\" href=\\\"https://cdn.fluid.app\\\">\"\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"legacy_theme": {
"id": 3187,
"name": "Scranton Classic",
"description": "Clean white layout with the Dunder Mifflin logo and a featured paper product.",
"image_url": "https://cdn.fluid.app/themes/dunder-mifflin/scranton-classic.png",
"public": true,
"company_id": 1405,
"template": {
"id": 55210,
"name": "Scranton Classic",
"content": "<section class=\"hero\"><h1>{{ member.full_name }}</h1><p>Your Dunder Mifflin paper rep</p></section>",
"stylesheet": ".hero { background: #ffffff; color: #1d3c6e; }",
"head": "<link rel=\"preconnect\" href=\"https://cdn.fluid.app\">",
"status": "active"
}
},
"meta": {
"request_id": "8d27f4c0-6b1e-4a93-b5d8-e03c9a2f7b61",
"timestamp": "2026-09-22T10:02:17Z"
}
}{
"message": "<string>"
}{
"error_message": "Failed to create legacy theme",
"errors": {
"name": [
"is already taken"
]
},
"meta": {
"request_id": "3f9c1a72-5d84-4e0b-a6c3-91b2e7d40f58",
"timestamp": "2026-10-15T18:15:13Z"
}
}curl --request POST \
--url https://api.fluid.app/api/legacy_themes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"legacy_theme": {
"name": "Scranton Classic",
"description": "Clean white layout with the Dunder Mifflin logo and a featured paper product.",
"image_url": "https://cdn.fluid.app/themes/dunder-mifflin/scranton-classic.png",
"public": true,
"template": {
"content": "<section class=\"hero\"><h1>{{ member.full_name }}</h1><p>Your Dunder Mifflin paper rep</p></section>",
"stylesheet": ".hero { background: #ffffff; color: #1d3c6e; }",
"head": "<link rel=\"preconnect\" href=\"https://cdn.fluid.app\">"
}
}
}
'import requests
url = "https://api.fluid.app/api/legacy_themes"
payload = { "legacy_theme": {
"name": "Scranton Classic",
"description": "Clean white layout with the Dunder Mifflin logo and a featured paper product.",
"image_url": "https://cdn.fluid.app/themes/dunder-mifflin/scranton-classic.png",
"public": True,
"template": {
"content": "<section class=\"hero\"><h1>{{ member.full_name }}</h1><p>Your Dunder Mifflin paper rep</p></section>",
"stylesheet": ".hero { background: #ffffff; color: #1d3c6e; }",
"head": "<link rel=\"preconnect\" href=\"https://cdn.fluid.app\">"
}
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
legacy_theme: {
name: 'Scranton Classic',
description: 'Clean white layout with the Dunder Mifflin logo and a featured paper product.',
image_url: 'https://cdn.fluid.app/themes/dunder-mifflin/scranton-classic.png',
public: true,
template: {
content: '<section class="hero"><h1>{{ member.full_name }}</h1><p>Your Dunder Mifflin paper rep</p></section>',
stylesheet: '.hero { background: #ffffff; color: #1d3c6e; }',
head: '<link rel="preconnect" href="https://cdn.fluid.app">'
}
}
})
};
fetch('https://api.fluid.app/api/legacy_themes', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.fluid.app/api/legacy_themes",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'legacy_theme' => [
'name' => 'Scranton Classic',
'description' => 'Clean white layout with the Dunder Mifflin logo and a featured paper product.',
'image_url' => 'https://cdn.fluid.app/themes/dunder-mifflin/scranton-classic.png',
'public' => true,
'template' => [
'content' => '<section class="hero"><h1>{{ member.full_name }}</h1><p>Your Dunder Mifflin paper rep</p></section>',
'stylesheet' => '.hero { background: #ffffff; color: #1d3c6e; }',
'head' => '<link rel="preconnect" href="https://cdn.fluid.app">'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.fluid.app/api/legacy_themes"
payload := strings.NewReader("{\n \"legacy_theme\": {\n \"name\": \"Scranton Classic\",\n \"description\": \"Clean white layout with the Dunder Mifflin logo and a featured paper product.\",\n \"image_url\": \"https://cdn.fluid.app/themes/dunder-mifflin/scranton-classic.png\",\n \"public\": true,\n \"template\": {\n \"content\": \"<section class=\\\"hero\\\"><h1>{{ member.full_name }}</h1><p>Your Dunder Mifflin paper rep</p></section>\",\n \"stylesheet\": \".hero { background: #ffffff; color: #1d3c6e; }\",\n \"head\": \"<link rel=\\\"preconnect\\\" href=\\\"https://cdn.fluid.app\\\">\"\n }\n }\n}")
req, _ := http.NewRequest("POST", 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(string(body))
}HttpResponse<String> response = Unirest.post("https://api.fluid.app/api/legacy_themes")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"legacy_theme\": {\n \"name\": \"Scranton Classic\",\n \"description\": \"Clean white layout with the Dunder Mifflin logo and a featured paper product.\",\n \"image_url\": \"https://cdn.fluid.app/themes/dunder-mifflin/scranton-classic.png\",\n \"public\": true,\n \"template\": {\n \"content\": \"<section class=\\\"hero\\\"><h1>{{ member.full_name }}</h1><p>Your Dunder Mifflin paper rep</p></section>\",\n \"stylesheet\": \".hero { background: #ffffff; color: #1d3c6e; }\",\n \"head\": \"<link rel=\\\"preconnect\\\" href=\\\"https://cdn.fluid.app\\\">\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fluid.app/api/legacy_themes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"legacy_theme\": {\n \"name\": \"Scranton Classic\",\n \"description\": \"Clean white layout with the Dunder Mifflin logo and a featured paper product.\",\n \"image_url\": \"https://cdn.fluid.app/themes/dunder-mifflin/scranton-classic.png\",\n \"public\": true,\n \"template\": {\n \"content\": \"<section class=\\\"hero\\\"><h1>{{ member.full_name }}</h1><p>Your Dunder Mifflin paper rep</p></section>\",\n \"stylesheet\": \".hero { background: #ffffff; color: #1d3c6e; }\",\n \"head\": \"<link rel=\\\"preconnect\\\" href=\\\"https://cdn.fluid.app\\\">\"\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"legacy_theme": {
"id": 3187,
"name": "Scranton Classic",
"description": "Clean white layout with the Dunder Mifflin logo and a featured paper product.",
"image_url": "https://cdn.fluid.app/themes/dunder-mifflin/scranton-classic.png",
"public": true,
"company_id": 1405,
"template": {
"id": 55210,
"name": "Scranton Classic",
"content": "<section class=\"hero\"><h1>{{ member.full_name }}</h1><p>Your Dunder Mifflin paper rep</p></section>",
"stylesheet": ".hero { background: #ffffff; color: #1d3c6e; }",
"head": "<link rel=\"preconnect\" href=\"https://cdn.fluid.app\">",
"status": "active"
}
},
"meta": {
"request_id": "8d27f4c0-6b1e-4a93-b5d8-e03c9a2f7b61",
"timestamp": "2026-09-22T10:02:17Z"
}
}{
"message": "<string>"
}{
"error_message": "Failed to create legacy theme",
"errors": {
"name": [
"is already taken"
]
},
"meta": {
"request_id": "3f9c1a72-5d84-4e0b-a6c3-91b2e7d40f58",
"timestamp": "2026-10-15T18:15:13Z"
}
}