Update Theme Settings
curl --request PUT \
--url https://api.launchmystore.io/api/v1/themes/{theme_id}/settings.json \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"settings": {}
}'import requests
url = "https://api.launchmystore.io/api/v1/themes/{theme_id}/settings.json"
payload = { "settings": {} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({settings: {}})
};
fetch('https://api.launchmystore.io/api/v1/themes/{theme_id}/settings.json', 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.launchmystore.io/api/v1/themes/{theme_id}/settings.json",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'settings' => [
]
]),
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.launchmystore.io/api/v1/themes/{theme_id}/settings.json"
payload := strings.NewReader("{\n \"settings\": {}\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(string(body))
}HttpResponse<String> response = Unirest.put("https://api.launchmystore.io/api/v1/themes/{theme_id}/settings.json")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"settings\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.launchmystore.io/api/v1/themes/{theme_id}/settings.json")
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 \"settings\": {}\n}"
response = http.request(request)
puts response.read_bodyThemes
Update Theme Settings
Change theme global settings
PUT
/
api
/
v1
/
themes
/
{theme_id}
/
settings.json
Update Theme Settings
curl --request PUT \
--url https://api.launchmystore.io/api/v1/themes/{theme_id}/settings.json \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"settings": {}
}'import requests
url = "https://api.launchmystore.io/api/v1/themes/{theme_id}/settings.json"
payload = { "settings": {} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({settings: {}})
};
fetch('https://api.launchmystore.io/api/v1/themes/{theme_id}/settings.json', 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.launchmystore.io/api/v1/themes/{theme_id}/settings.json",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'settings' => [
]
]),
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.launchmystore.io/api/v1/themes/{theme_id}/settings.json"
payload := strings.NewReader("{\n \"settings\": {}\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(string(body))
}HttpResponse<String> response = Unirest.put("https://api.launchmystore.io/api/v1/themes/{theme_id}/settings.json")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"settings\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.launchmystore.io/api/v1/themes/{theme_id}/settings.json")
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 \"settings\": {}\n}"
response = http.request(request)
puts response.read_bodyChanges one or more of the theme’s global settings. Requires the
write_themes scope. The values you send are merged into the current
settings (the active preset, for themes that store settings in presets);
settings you leave out keep their values. The storefront shows the change
immediately.
Request
curl -X PUT "https://api.launchmystore.io/api/v1/themes/1f2e3d4c-5b6a-7980-a1b2-c3d4e5f60718/settings.json" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"settings": {
"colors_accent_1": "#FF5733",
"type_header_font": "Roboto"
}
}'
const response = await fetch('https://api.launchmystore.io/api/v1/themes/1f2e3d4c-5b6a-7980-a1b2-c3d4e5f60718/settings.json', {
method: 'PUT',
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
'Content-Type': 'application/json'
},
body: JSON.stringify({
settings: { colors_accent_1: '#FF5733', type_header_font: 'Roboto' }
})
});
Path Parameters
string
required
The theme id.
Body Parameters
object
required
Setting ids (from the theme’s settings schema — see
Theme Settings) mapped to their new
values. A flat body with the setting ids at the top level is accepted too.
Response
{
"status": 200,
"state": "success",
"message": null,
"data": {
"success": true,
"message": "Theme settings saved successfully"
},
"pagination": null
}
Error Codes
| Status | Description |
|---|---|
404 | Theme not found (or not one of the store’s themes) |
422 | No settings in the body |
401 | Invalid or missing access token |
403 | App doesn’t have the write_themes scope |