Themes
Themes and theme files. Every example sets SOOQUNA_TOKEN from the environment; see authentication. Responses are from a test store, cut to two items per list.
| Endpoint | Method | Path |
|---|---|---|
| Add a theme from the library | POST | /themes |
| List themes | GET | /themes |
| Upload a theme (.zip) | POST | /themes/upload |
| Get a theme | GET | /themes/{id} |
| Rename a theme | PATCH | /themes/{id} |
| Duplicate a theme | POST | /themes/{id}/duplicate |
| Publish a theme | POST | /themes/{id}/publish |
| Delete a theme | DELETE | /themes/{id} |
| Download a theme as a .zip | GET | /themes/{id}/download |
| List a theme’s files | GET | /themes/{id}/files |
| Read a theme file | GET | /themes/{id}/file |
| Write a theme file | PUT | /themes/{id}/file |
| Open a file in the code editor | GET | /themes/{id}/code/file |
| Save a file with conflict detection | PUT | /themes/{id}/code/file |
| Delete a theme file | DELETE | /themes/{id}/code/file |
| Rename a theme file | POST | /themes/{id}/code/rename |
| List a file’s saved versions | GET | /themes/{id}/code/versions |
| Read a saved version of a file | GET | /themes/{id}/code/versions/{vid} |
| Restore a saved version of a file | POST | /themes/{id}/code/versions/{vid}/restore |
| List what uses a file | GET | /themes/{id}/references |
| Run the theme check | POST | /themes/{id}/check |
| Check unsaved content of a file | POST | /themes/{id}/check/file |
| Upload a theme asset | POST | /themes/{id}/assets |
| List restore points | GET | /themes/{id}/snapshots |
| Create a restore point | POST | /themes/{id}/snapshots |
| Restore the theme to a restore point | POST | /themes/{id}/snapshots/{sid}/restore |
| Add an alternate template | POST | /themes/{id}/templates |
Add a theme from the library
Section titled “Add a theme from the library”POST /themes · Scope: write_themes
curl -X POST "https://api.sooquna.com/admin/api/2026-10/themes" \ -H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN" \ -H "Content-Type: application/json" \ -d '{"library_key": "sahil"}'const res = await fetch("https://api.sooquna.com/admin/api/2026-10/themes", { method: "POST", headers: { "X-Sooquna-Access-Token": process.env.SOOQUNA_TOKEN, "Content-Type": "application/json", }, body: JSON.stringify({"library_key": "sahil"}),});if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);const data = await res.json();console.log(data);import osimport requests
res = requests.post( "https://api.sooquna.com/admin/api/2026-10/themes", headers={ "X-Sooquna-Access-Token": os.environ["SOOQUNA_TOKEN"], }, json={"library_key": "sahil"},)res.raise_for_status()print(res.json())<?php$ch = curl_init('https://api.sooquna.com/admin/api/2026-10/themes');curl_setopt_array($ch, [ CURLOPT_CUSTOMREQUEST => 'POST', CURLOPT_HTTPHEADER => [ 'X-Sooquna-Access-Token: ' . getenv('SOOQUNA_TOKEN'), 'Content-Type: application/json', ], CURLOPT_RETURNTRANSFER => true, CURLOPT_POSTFIELDS => json_encode(['library_key' => 'sahil'], JSON_UNESCAPED_UNICODE),]);$response = curl_exec($ch);$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);if ($status >= 300) { throw new RuntimeException("$status: $response");}$data = json_decode($response, true);print_r($data);package main
import ( "fmt" "io" "net/http" "os" "strings")
func main() { body := `{"library_key": "sahil"}` req, err := http.NewRequest("POST", "https://api.sooquna.com/admin/api/2026-10/themes", strings.NewReader(body)) if err != nil { panic(err) } req.Header.Set("X-Sooquna-Access-Token", os.Getenv("SOOQUNA_TOKEN")) req.Header.Set("Content-Type", "application/json") res, err := http.DefaultClient.Do(req) if err != nil { panic(err) } defer res.Body.Close() if res.StatusCode >= 300 { data, _ := io.ReadAll(res.Body) panic(fmt.Sprintf("%d: %s", res.StatusCode, data)) } data, _ := io.ReadAll(res.Body) fmt.Println(string(data))}using System.Text;
using var client = new HttpClient();var req = new HttpRequestMessage(HttpMethod.Post, "https://api.sooquna.com/admin/api/2026-10/themes");req.Headers.Add("X-Sooquna-Access-Token", Environment.GetEnvironmentVariable("SOOQUNA_TOKEN"));req.Content = new StringContent("""{"library_key": "sahil"}""", Encoding.UTF8, "application/json");var res = await client.SendAsync(req);if (!res.IsSuccessStatusCode) throw new Exception($"{(int)res.StatusCode}: {await res.Content.ReadAsStringAsync()}");Console.WriteLine(await res.Content.ReadAsStringAsync());Response 201
{ "created_at": "2026-10-18T09:30:00Z", "id": "0193a1b2-c3d4-7e5f-8a6b-000000000046", "latest_version": "1.1.0", "library_key": "sahil", "library_version": "1.1.0", "name": "Sahil", "role": "unpublished", "source": "library", "update_available": false, "updated_at": "2026-10-18T09:30:00Z", "version": 1}List themes
Section titled “List themes”GET /themes · Scope: read_themes
curl -X GET "https://api.sooquna.com/admin/api/2026-10/themes" \ -H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN"const res = await fetch("https://api.sooquna.com/admin/api/2026-10/themes", { method: "GET", headers: { "X-Sooquna-Access-Token": process.env.SOOQUNA_TOKEN, },});if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);const data = await res.json();console.log(data);import osimport requests
res = requests.get( "https://api.sooquna.com/admin/api/2026-10/themes", headers={ "X-Sooquna-Access-Token": os.environ["SOOQUNA_TOKEN"], },)res.raise_for_status()print(res.json())<?php$ch = curl_init('https://api.sooquna.com/admin/api/2026-10/themes');curl_setopt_array($ch, [ CURLOPT_CUSTOMREQUEST => 'GET', CURLOPT_HTTPHEADER => [ 'X-Sooquna-Access-Token: ' . getenv('SOOQUNA_TOKEN'), ], CURLOPT_RETURNTRANSFER => true,]);$response = curl_exec($ch);$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);if ($status >= 300) { throw new RuntimeException("$status: $response");}$data = json_decode($response, true);print_r($data);package main
import ( "fmt" "io" "net/http" "os")
func main() { req, err := http.NewRequest("GET", "https://api.sooquna.com/admin/api/2026-10/themes", nil) if err != nil { panic(err) } req.Header.Set("X-Sooquna-Access-Token", os.Getenv("SOOQUNA_TOKEN")) res, err := http.DefaultClient.Do(req) if err != nil { panic(err) } defer res.Body.Close() if res.StatusCode >= 300 { data, _ := io.ReadAll(res.Body) panic(fmt.Sprintf("%d: %s", res.StatusCode, data)) } data, _ := io.ReadAll(res.Body) fmt.Println(string(data))}using System.Text;
using var client = new HttpClient();var req = new HttpRequestMessage(HttpMethod.Get, "https://api.sooquna.com/admin/api/2026-10/themes");req.Headers.Add("X-Sooquna-Access-Token", Environment.GetEnvironmentVariable("SOOQUNA_TOKEN"));var res = await client.SendAsync(req);if (!res.IsSuccessStatusCode) throw new Exception($"{(int)res.StatusCode}: {await res.Content.ReadAsStringAsync()}");Console.WriteLine(await res.Content.ReadAsStringAsync());Response 200
{ "data": [ { "created_at": "2026-10-18T09:30:00Z", "id": "0193a1b2-c3d4-7e5f-8a6b-000000000046", "latest_version": "1.1.0", "library_key": "sahil", "library_version": "1.1.0", "name": "Sahil", "role": "unpublished", "source": "library", "update_available": false, "updated_at": "2026-10-18T09:30:00Z", "version": 1 } ]}Upload a theme (.zip)
Section titled “Upload a theme (.zip)”POST /themes/upload · Scope: write_themes
Send the .zip as the body with Content-Type: application/zip.
curl -X POST "https://api.sooquna.com/admin/api/2026-10/themes/upload" \ -H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN" \ -H "Content-Type: application/zip" \ --data-binary @sahil-eid.zipimport { readFile, writeFile } from "node:fs/promises";
const res = await fetch("https://api.sooquna.com/admin/api/2026-10/themes/upload", { method: "POST", headers: { "X-Sooquna-Access-Token": process.env.SOOQUNA_TOKEN, "Content-Type": "application/zip", }, body: await readFile("sahil-eid.zip"),});if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);const data = await res.json();console.log(data);import osimport requests
res = requests.post( "https://api.sooquna.com/admin/api/2026-10/themes/upload", headers={ "X-Sooquna-Access-Token": os.environ["SOOQUNA_TOKEN"], "Content-Type": "application/zip", }, data=open("sahil-eid.zip", "rb"),)res.raise_for_status()print(res.json())<?php$ch = curl_init('https://api.sooquna.com/admin/api/2026-10/themes/upload');curl_setopt_array($ch, [ CURLOPT_CUSTOMREQUEST => 'POST', CURLOPT_HTTPHEADER => [ 'X-Sooquna-Access-Token: ' . getenv('SOOQUNA_TOKEN'), 'Content-Type: application/zip', ], CURLOPT_RETURNTRANSFER => true, CURLOPT_POSTFIELDS => file_get_contents('sahil-eid.zip'),]);$response = curl_exec($ch);$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);if ($status >= 300) { throw new RuntimeException("$status: $response");}$data = json_decode($response, true);print_r($data);package main
import ( "fmt" "io" "net/http" "os")
func main() { f, err := os.Open("sahil-eid.zip") if err != nil { panic(err) } defer f.Close() req, err := http.NewRequest("POST", "https://api.sooquna.com/admin/api/2026-10/themes/upload", f) if err != nil { panic(err) } req.Header.Set("X-Sooquna-Access-Token", os.Getenv("SOOQUNA_TOKEN")) req.Header.Set("Content-Type", "application/zip") res, err := http.DefaultClient.Do(req) if err != nil { panic(err) } defer res.Body.Close() if res.StatusCode >= 300 { data, _ := io.ReadAll(res.Body) panic(fmt.Sprintf("%d: %s", res.StatusCode, data)) } data, _ := io.ReadAll(res.Body) fmt.Println(string(data))}using System.Text;
using var client = new HttpClient();var req = new HttpRequestMessage(HttpMethod.Post, "https://api.sooquna.com/admin/api/2026-10/themes/upload");req.Headers.Add("X-Sooquna-Access-Token", Environment.GetEnvironmentVariable("SOOQUNA_TOKEN"));req.Content = new ByteArrayContent(await File.ReadAllBytesAsync("sahil-eid.zip"));req.Content.Headers.ContentType = new("application/zip");var res = await client.SendAsync(req);if (!res.IsSuccessStatusCode) throw new Exception($"{(int)res.StatusCode}: {await res.Content.ReadAsStringAsync()}");Console.WriteLine(await res.Content.ReadAsStringAsync());Get a theme
Section titled “Get a theme”GET /themes/{id} · Scope: read_themes
| Parameter | In | Description |
|---|---|---|
id |
path | The resource’s ID. |
curl -X GET "https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-c3d4-7e5f-8a6b-000000000046" \ -H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN"const res = await fetch("https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-c3d4-7e5f-8a6b-000000000046", { method: "GET", headers: { "X-Sooquna-Access-Token": process.env.SOOQUNA_TOKEN, },});if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);const data = await res.json();console.log(data);import osimport requests
res = requests.get( "https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-c3d4-7e5f-8a6b-000000000046", headers={ "X-Sooquna-Access-Token": os.environ["SOOQUNA_TOKEN"], },)res.raise_for_status()print(res.json())<?php$ch = curl_init('https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-c3d4-7e5f-8a6b-000000000046');curl_setopt_array($ch, [ CURLOPT_CUSTOMREQUEST => 'GET', CURLOPT_HTTPHEADER => [ 'X-Sooquna-Access-Token: ' . getenv('SOOQUNA_TOKEN'), ], CURLOPT_RETURNTRANSFER => true,]);$response = curl_exec($ch);$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);if ($status >= 300) { throw new RuntimeException("$status: $response");}$data = json_decode($response, true);print_r($data);package main
import ( "fmt" "io" "net/http" "os")
func main() { req, err := http.NewRequest("GET", "https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-c3d4-7e5f-8a6b-000000000046", nil) if err != nil { panic(err) } req.Header.Set("X-Sooquna-Access-Token", os.Getenv("SOOQUNA_TOKEN")) res, err := http.DefaultClient.Do(req) if err != nil { panic(err) } defer res.Body.Close() if res.StatusCode >= 300 { data, _ := io.ReadAll(res.Body) panic(fmt.Sprintf("%d: %s", res.StatusCode, data)) } data, _ := io.ReadAll(res.Body) fmt.Println(string(data))}using System.Text;
using var client = new HttpClient();var req = new HttpRequestMessage(HttpMethod.Get, "https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-c3d4-7e5f-8a6b-000000000046");req.Headers.Add("X-Sooquna-Access-Token", Environment.GetEnvironmentVariable("SOOQUNA_TOKEN"));var res = await client.SendAsync(req);if (!res.IsSuccessStatusCode) throw new Exception($"{(int)res.StatusCode}: {await res.Content.ReadAsStringAsync()}");Console.WriteLine(await res.Content.ReadAsStringAsync());Response 200
{ "created_at": "2026-10-18T09:30:00Z", "id": "0193a1b2-c3d4-7e5f-8a6b-000000000046", "latest_version": "1.1.0", "library_key": "sahil", "library_version": "1.1.0", "name": "Sahil", "role": "unpublished", "source": "library", "update_available": false, "updated_at": "2026-10-18T09:30:00Z", "version": 1}Rename a theme
Section titled “Rename a theme”PATCH /themes/{id} · Scope: write_themes
| Parameter | In | Description |
|---|---|---|
id |
path | The resource’s ID. |
curl -X PATCH "https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-f0c3-73c2-8be6-b02e03b23165" \ -H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN" \ -H "Content-Type: application/json" \ -d '{"name": "Sahil (Eid)"}'const res = await fetch("https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-f0c3-73c2-8be6-b02e03b23165", { method: "PATCH", headers: { "X-Sooquna-Access-Token": process.env.SOOQUNA_TOKEN, "Content-Type": "application/json", }, body: JSON.stringify({"name": "Sahil (Eid)"}),});if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);const data = await res.json();console.log(data);import osimport requests
res = requests.patch( "https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-f0c3-73c2-8be6-b02e03b23165", headers={ "X-Sooquna-Access-Token": os.environ["SOOQUNA_TOKEN"], }, json={"name": "Sahil (Eid)"},)res.raise_for_status()print(res.json())<?php$ch = curl_init('https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-f0c3-73c2-8be6-b02e03b23165');curl_setopt_array($ch, [ CURLOPT_CUSTOMREQUEST => 'PATCH', CURLOPT_HTTPHEADER => [ 'X-Sooquna-Access-Token: ' . getenv('SOOQUNA_TOKEN'), 'Content-Type: application/json', ], CURLOPT_RETURNTRANSFER => true, CURLOPT_POSTFIELDS => json_encode(['name' => 'Sahil (Eid)'], JSON_UNESCAPED_UNICODE),]);$response = curl_exec($ch);$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);if ($status >= 300) { throw new RuntimeException("$status: $response");}$data = json_decode($response, true);print_r($data);package main
import ( "fmt" "io" "net/http" "os" "strings")
func main() { body := `{"name": "Sahil (Eid)"}` req, err := http.NewRequest("PATCH", "https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-f0c3-73c2-8be6-b02e03b23165", strings.NewReader(body)) if err != nil { panic(err) } req.Header.Set("X-Sooquna-Access-Token", os.Getenv("SOOQUNA_TOKEN")) req.Header.Set("Content-Type", "application/json") res, err := http.DefaultClient.Do(req) if err != nil { panic(err) } defer res.Body.Close() if res.StatusCode >= 300 { data, _ := io.ReadAll(res.Body) panic(fmt.Sprintf("%d: %s", res.StatusCode, data)) } data, _ := io.ReadAll(res.Body) fmt.Println(string(data))}using System.Text;
using var client = new HttpClient();var req = new HttpRequestMessage(HttpMethod.Patch, "https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-f0c3-73c2-8be6-b02e03b23165");req.Headers.Add("X-Sooquna-Access-Token", Environment.GetEnvironmentVariable("SOOQUNA_TOKEN"));req.Content = new StringContent("""{"name": "Sahil (Eid)"}""", Encoding.UTF8, "application/json");var res = await client.SendAsync(req);if (!res.IsSuccessStatusCode) throw new Exception($"{(int)res.StatusCode}: {await res.Content.ReadAsStringAsync()}");Console.WriteLine(await res.Content.ReadAsStringAsync());Duplicate a theme
Section titled “Duplicate a theme”POST /themes/{id}/duplicate · Scope: write_themes
| Parameter | In | Description |
|---|---|---|
id |
path | The resource’s ID. |
curl -X POST "https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-0753-74ce-894f-8a6cfd2e290d/duplicate" \ -H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN"const res = await fetch("https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-0753-74ce-894f-8a6cfd2e290d/duplicate", { method: "POST", headers: { "X-Sooquna-Access-Token": process.env.SOOQUNA_TOKEN, },});if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);const data = await res.json();console.log(data);import osimport requests
res = requests.post( "https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-0753-74ce-894f-8a6cfd2e290d/duplicate", headers={ "X-Sooquna-Access-Token": os.environ["SOOQUNA_TOKEN"], },)res.raise_for_status()print(res.json())<?php$ch = curl_init('https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-0753-74ce-894f-8a6cfd2e290d/duplicate');curl_setopt_array($ch, [ CURLOPT_CUSTOMREQUEST => 'POST', CURLOPT_HTTPHEADER => [ 'X-Sooquna-Access-Token: ' . getenv('SOOQUNA_TOKEN'), ], CURLOPT_RETURNTRANSFER => true,]);$response = curl_exec($ch);$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);if ($status >= 300) { throw new RuntimeException("$status: $response");}$data = json_decode($response, true);print_r($data);package main
import ( "fmt" "io" "net/http" "os")
func main() { req, err := http.NewRequest("POST", "https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-0753-74ce-894f-8a6cfd2e290d/duplicate", nil) if err != nil { panic(err) } req.Header.Set("X-Sooquna-Access-Token", os.Getenv("SOOQUNA_TOKEN")) res, err := http.DefaultClient.Do(req) if err != nil { panic(err) } defer res.Body.Close() if res.StatusCode >= 300 { data, _ := io.ReadAll(res.Body) panic(fmt.Sprintf("%d: %s", res.StatusCode, data)) } data, _ := io.ReadAll(res.Body) fmt.Println(string(data))}using System.Text;
using var client = new HttpClient();var req = new HttpRequestMessage(HttpMethod.Post, "https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-0753-74ce-894f-8a6cfd2e290d/duplicate");req.Headers.Add("X-Sooquna-Access-Token", Environment.GetEnvironmentVariable("SOOQUNA_TOKEN"));var res = await client.SendAsync(req);if (!res.IsSuccessStatusCode) throw new Exception($"{(int)res.StatusCode}: {await res.Content.ReadAsStringAsync()}");Console.WriteLine(await res.Content.ReadAsStringAsync());Publish a theme
Section titled “Publish a theme”POST /themes/{id}/publish · Scope: write_themes
| Parameter | In | Description |
|---|---|---|
id |
path | The resource’s ID. |
curl -X POST "https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-a154-7e3e-8469-fb60de553c57/publish" \ -H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN"const res = await fetch("https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-a154-7e3e-8469-fb60de553c57/publish", { method: "POST", headers: { "X-Sooquna-Access-Token": process.env.SOOQUNA_TOKEN, },});if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);const data = await res.json();console.log(data);import osimport requests
res = requests.post( "https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-a154-7e3e-8469-fb60de553c57/publish", headers={ "X-Sooquna-Access-Token": os.environ["SOOQUNA_TOKEN"], },)res.raise_for_status()print(res.json())<?php$ch = curl_init('https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-a154-7e3e-8469-fb60de553c57/publish');curl_setopt_array($ch, [ CURLOPT_CUSTOMREQUEST => 'POST', CURLOPT_HTTPHEADER => [ 'X-Sooquna-Access-Token: ' . getenv('SOOQUNA_TOKEN'), ], CURLOPT_RETURNTRANSFER => true,]);$response = curl_exec($ch);$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);if ($status >= 300) { throw new RuntimeException("$status: $response");}$data = json_decode($response, true);print_r($data);package main
import ( "fmt" "io" "net/http" "os")
func main() { req, err := http.NewRequest("POST", "https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-a154-7e3e-8469-fb60de553c57/publish", nil) if err != nil { panic(err) } req.Header.Set("X-Sooquna-Access-Token", os.Getenv("SOOQUNA_TOKEN")) res, err := http.DefaultClient.Do(req) if err != nil { panic(err) } defer res.Body.Close() if res.StatusCode >= 300 { data, _ := io.ReadAll(res.Body) panic(fmt.Sprintf("%d: %s", res.StatusCode, data)) } data, _ := io.ReadAll(res.Body) fmt.Println(string(data))}using System.Text;
using var client = new HttpClient();var req = new HttpRequestMessage(HttpMethod.Post, "https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-a154-7e3e-8469-fb60de553c57/publish");req.Headers.Add("X-Sooquna-Access-Token", Environment.GetEnvironmentVariable("SOOQUNA_TOKEN"));var res = await client.SendAsync(req);if (!res.IsSuccessStatusCode) throw new Exception($"{(int)res.StatusCode}: {await res.Content.ReadAsStringAsync()}");Console.WriteLine(await res.Content.ReadAsStringAsync());Delete a theme
Section titled “Delete a theme”DELETE /themes/{id} · Scope: write_themes
| Parameter | In | Description |
|---|---|---|
id |
path | The resource’s ID. |
curl -X DELETE "https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-f0c3-73c2-8be6-b02e03b23165" \ -H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN"const res = await fetch("https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-f0c3-73c2-8be6-b02e03b23165", { method: "DELETE", headers: { "X-Sooquna-Access-Token": process.env.SOOQUNA_TOKEN, },});if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);const data = await res.json();console.log(data);import osimport requests
res = requests.delete( "https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-f0c3-73c2-8be6-b02e03b23165", headers={ "X-Sooquna-Access-Token": os.environ["SOOQUNA_TOKEN"], },)res.raise_for_status()print(res.json())<?php$ch = curl_init('https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-f0c3-73c2-8be6-b02e03b23165');curl_setopt_array($ch, [ CURLOPT_CUSTOMREQUEST => 'DELETE', CURLOPT_HTTPHEADER => [ 'X-Sooquna-Access-Token: ' . getenv('SOOQUNA_TOKEN'), ], CURLOPT_RETURNTRANSFER => true,]);$response = curl_exec($ch);$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);if ($status >= 300) { throw new RuntimeException("$status: $response");}$data = json_decode($response, true);print_r($data);package main
import ( "fmt" "io" "net/http" "os")
func main() { req, err := http.NewRequest("DELETE", "https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-f0c3-73c2-8be6-b02e03b23165", nil) if err != nil { panic(err) } req.Header.Set("X-Sooquna-Access-Token", os.Getenv("SOOQUNA_TOKEN")) res, err := http.DefaultClient.Do(req) if err != nil { panic(err) } defer res.Body.Close() if res.StatusCode >= 300 { data, _ := io.ReadAll(res.Body) panic(fmt.Sprintf("%d: %s", res.StatusCode, data)) } data, _ := io.ReadAll(res.Body) fmt.Println(string(data))}using System.Text;
using var client = new HttpClient();var req = new HttpRequestMessage(HttpMethod.Delete, "https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-f0c3-73c2-8be6-b02e03b23165");req.Headers.Add("X-Sooquna-Access-Token", Environment.GetEnvironmentVariable("SOOQUNA_TOKEN"));var res = await client.SendAsync(req);if (!res.IsSuccessStatusCode) throw new Exception($"{(int)res.StatusCode}: {await res.Content.ReadAsStringAsync()}");Console.WriteLine(await res.Content.ReadAsStringAsync());Download a theme as a .zip
Section titled “Download a theme as a .zip”GET /themes/{id}/download · Scope: read_themes
| Parameter | In | Description |
|---|---|---|
id |
path | The resource’s ID. |
curl -X GET "https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-31fa-74d9-8a75-bfa9d5956a52/download" \ -H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN" \ -o sahil.zipimport { writeFile } from "node:fs/promises";
const res = await fetch("https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-31fa-74d9-8a75-bfa9d5956a52/download", { method: "GET", headers: { "X-Sooquna-Access-Token": process.env.SOOQUNA_TOKEN, },});if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);await writeFile("sahil.zip", Buffer.from(await res.arrayBuffer()));import osimport requests
res = requests.get( "https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-31fa-74d9-8a75-bfa9d5956a52/download", headers={ "X-Sooquna-Access-Token": os.environ["SOOQUNA_TOKEN"], },)res.raise_for_status()with open("sahil.zip", "wb") as f: f.write(res.content)<?php$ch = curl_init('https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-31fa-74d9-8a75-bfa9d5956a52/download');curl_setopt_array($ch, [ CURLOPT_CUSTOMREQUEST => 'GET', CURLOPT_HTTPHEADER => [ 'X-Sooquna-Access-Token: ' . getenv('SOOQUNA_TOKEN'), ], CURLOPT_RETURNTRANSFER => true,]);$response = curl_exec($ch);$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);if ($status >= 300) { throw new RuntimeException("$status: $response");}file_put_contents('sahil.zip', $response);package main
import ( "fmt" "io" "net/http" "os")
func main() { req, err := http.NewRequest("GET", "https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-31fa-74d9-8a75-bfa9d5956a52/download", nil) if err != nil { panic(err) } req.Header.Set("X-Sooquna-Access-Token", os.Getenv("SOOQUNA_TOKEN")) res, err := http.DefaultClient.Do(req) if err != nil { panic(err) } defer res.Body.Close() if res.StatusCode >= 300 { data, _ := io.ReadAll(res.Body) panic(fmt.Sprintf("%d: %s", res.StatusCode, data)) } out, err := os.Create("sahil.zip") if err != nil { panic(err) } defer out.Close() io.Copy(out, res.Body)}using System.Text;
using var client = new HttpClient();var req = new HttpRequestMessage(HttpMethod.Get, "https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-31fa-74d9-8a75-bfa9d5956a52/download");req.Headers.Add("X-Sooquna-Access-Token", Environment.GetEnvironmentVariable("SOOQUNA_TOKEN"));var res = await client.SendAsync(req);if (!res.IsSuccessStatusCode) throw new Exception($"{(int)res.StatusCode}: {await res.Content.ReadAsStringAsync()}");await File.WriteAllBytesAsync("sahil.zip", await res.Content.ReadAsByteArrayAsync());List a theme’s files
Section titled “List a theme’s files”GET /themes/{id}/files · Scope: read_themes
| Parameter | In | Description |
|---|---|---|
id |
path | The resource’s ID. |
curl -X GET "https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-c3d4-7e5f-8a6b-000000000046/files" \ -H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN"const res = await fetch("https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-c3d4-7e5f-8a6b-000000000046/files", { method: "GET", headers: { "X-Sooquna-Access-Token": process.env.SOOQUNA_TOKEN, },});if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);const data = await res.json();console.log(data);import osimport requests
res = requests.get( "https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-c3d4-7e5f-8a6b-000000000046/files", headers={ "X-Sooquna-Access-Token": os.environ["SOOQUNA_TOKEN"], },)res.raise_for_status()print(res.json())<?php$ch = curl_init('https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-c3d4-7e5f-8a6b-000000000046/files');curl_setopt_array($ch, [ CURLOPT_CUSTOMREQUEST => 'GET', CURLOPT_HTTPHEADER => [ 'X-Sooquna-Access-Token: ' . getenv('SOOQUNA_TOKEN'), ], CURLOPT_RETURNTRANSFER => true,]);$response = curl_exec($ch);$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);if ($status >= 300) { throw new RuntimeException("$status: $response");}$data = json_decode($response, true);print_r($data);package main
import ( "fmt" "io" "net/http" "os")
func main() { req, err := http.NewRequest("GET", "https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-c3d4-7e5f-8a6b-000000000046/files", nil) if err != nil { panic(err) } req.Header.Set("X-Sooquna-Access-Token", os.Getenv("SOOQUNA_TOKEN")) res, err := http.DefaultClient.Do(req) if err != nil { panic(err) } defer res.Body.Close() if res.StatusCode >= 300 { data, _ := io.ReadAll(res.Body) panic(fmt.Sprintf("%d: %s", res.StatusCode, data)) } data, _ := io.ReadAll(res.Body) fmt.Println(string(data))}using System.Text;
using var client = new HttpClient();var req = new HttpRequestMessage(HttpMethod.Get, "https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-c3d4-7e5f-8a6b-000000000046/files");req.Headers.Add("X-Sooquna-Access-Token", Environment.GetEnvironmentVariable("SOOQUNA_TOKEN"));var res = await client.SendAsync(req);if (!res.IsSuccessStatusCode) throw new Exception($"{(int)res.StatusCode}: {await res.Content.ReadAsStringAsync()}");Console.WriteLine(await res.Content.ReadAsStringAsync());Response 200
{ "data": [ { "modified": false, "path": "assets/back-in-stock.js", "sha": "07e1262d2e58cfd08fed9525b25e911db869ebc3f5a2db854d86b6da7f5601fd", "size": 2415, "updated_at": "2026-10-18T09:30:00Z" }, { "modified": false, "path": "assets/base.css", "sha": "9b083fbe7035e7b32638a76653a84152e7a88fdfb7fe7e22061550a27a9981db", "size": 50265, "updated_at": "2026-10-18T09:30:00Z" } ]}Read a theme file
Section titled “Read a theme file”GET /themes/{id}/file · Scope: read_themes
| Parameter | In | Description |
|---|---|---|
id |
path | The resource’s ID. |
path |
query | For example templates/index.json. |
curl -X GET "https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-c3d4-7e5f-8a6b-000000000046/file?path=templates%2Findex.json" \ -H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN"const res = await fetch("https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-c3d4-7e5f-8a6b-000000000046/file?path=templates%2Findex.json", { method: "GET", headers: { "X-Sooquna-Access-Token": process.env.SOOQUNA_TOKEN, },});if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);const data = await res.json();console.log(data);import osimport requests
res = requests.get( "https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-c3d4-7e5f-8a6b-000000000046/file?path=templates%2Findex.json", headers={ "X-Sooquna-Access-Token": os.environ["SOOQUNA_TOKEN"], },)res.raise_for_status()print(res.json())<?php$ch = curl_init('https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-c3d4-7e5f-8a6b-000000000046/file?path=templates%2Findex.json');curl_setopt_array($ch, [ CURLOPT_CUSTOMREQUEST => 'GET', CURLOPT_HTTPHEADER => [ 'X-Sooquna-Access-Token: ' . getenv('SOOQUNA_TOKEN'), ], CURLOPT_RETURNTRANSFER => true,]);$response = curl_exec($ch);$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);if ($status >= 300) { throw new RuntimeException("$status: $response");}$data = json_decode($response, true);print_r($data);package main
import ( "fmt" "io" "net/http" "os")
func main() { req, err := http.NewRequest("GET", "https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-c3d4-7e5f-8a6b-000000000046/file?path=templates%2Findex.json", nil) if err != nil { panic(err) } req.Header.Set("X-Sooquna-Access-Token", os.Getenv("SOOQUNA_TOKEN")) res, err := http.DefaultClient.Do(req) if err != nil { panic(err) } defer res.Body.Close() if res.StatusCode >= 300 { data, _ := io.ReadAll(res.Body) panic(fmt.Sprintf("%d: %s", res.StatusCode, data)) } data, _ := io.ReadAll(res.Body) fmt.Println(string(data))}using System.Text;
using var client = new HttpClient();var req = new HttpRequestMessage(HttpMethod.Get, "https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-c3d4-7e5f-8a6b-000000000046/file?path=templates%2Findex.json");req.Headers.Add("X-Sooquna-Access-Token", Environment.GetEnvironmentVariable("SOOQUNA_TOKEN"));var res = await client.SendAsync(req);if (!res.IsSuccessStatusCode) throw new Exception($"{(int)res.StatusCode}: {await res.Content.ReadAsStringAsync()}");Console.WriteLine(await res.Content.ReadAsStringAsync());Write a theme file
Section titled “Write a theme file”PUT /themes/{id}/file · Scope: write_themes
| Parameter | In | Description |
|---|---|---|
id |
path | The resource’s ID. |
curl -X PUT "https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-475c-7384-8181-3e210a78239d/file" \ -H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "path": "snippets/eid-banner.liquid", "content": "<p class=\"eid\">{{ '\''eid.banner'\'' | t }}</p>"}'const res = await fetch("https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-475c-7384-8181-3e210a78239d/file", { method: "PUT", headers: { "X-Sooquna-Access-Token": process.env.SOOQUNA_TOKEN, "Content-Type": "application/json", }, body: JSON.stringify({ "path": "snippets/eid-banner.liquid", "content": "<p class=\"eid\">{{ 'eid.banner' | t }}</p>" }),});if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);const data = await res.json();console.log(data);import osimport requests
res = requests.put( "https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-475c-7384-8181-3e210a78239d/file", headers={ "X-Sooquna-Access-Token": os.environ["SOOQUNA_TOKEN"], }, json={ "path": "snippets/eid-banner.liquid", "content": "<p class=\"eid\">{{ 'eid.banner' | t }}</p>", },)res.raise_for_status()print(res.json())<?php$ch = curl_init('https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-475c-7384-8181-3e210a78239d/file');curl_setopt_array($ch, [ CURLOPT_CUSTOMREQUEST => 'PUT', CURLOPT_HTTPHEADER => [ 'X-Sooquna-Access-Token: ' . getenv('SOOQUNA_TOKEN'), 'Content-Type: application/json', ], CURLOPT_RETURNTRANSFER => true, CURLOPT_POSTFIELDS => json_encode([ 'path' => 'snippets/eid-banner.liquid', 'content' => '<p class="eid">{{ \'eid.banner\' | t }}</p>', ], JSON_UNESCAPED_UNICODE),]);$response = curl_exec($ch);$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);if ($status >= 300) { throw new RuntimeException("$status: $response");}$data = json_decode($response, true);print_r($data);package main
import ( "fmt" "io" "net/http" "os" "strings")
func main() { body := `{ "path": "snippets/eid-banner.liquid", "content": "<p class=\"eid\">{{ 'eid.banner' | t }}</p>"}` req, err := http.NewRequest("PUT", "https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-475c-7384-8181-3e210a78239d/file", strings.NewReader(body)) if err != nil { panic(err) } req.Header.Set("X-Sooquna-Access-Token", os.Getenv("SOOQUNA_TOKEN")) req.Header.Set("Content-Type", "application/json") res, err := http.DefaultClient.Do(req) if err != nil { panic(err) } defer res.Body.Close() if res.StatusCode >= 300 { data, _ := io.ReadAll(res.Body) panic(fmt.Sprintf("%d: %s", res.StatusCode, data)) } data, _ := io.ReadAll(res.Body) fmt.Println(string(data))}using System.Text;
using var client = new HttpClient();var req = new HttpRequestMessage(HttpMethod.Put, "https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-475c-7384-8181-3e210a78239d/file");req.Headers.Add("X-Sooquna-Access-Token", Environment.GetEnvironmentVariable("SOOQUNA_TOKEN"));req.Content = new StringContent("""{ "path": "snippets/eid-banner.liquid", "content": "<p class=\"eid\">{{ 'eid.banner' | t }}</p>"}""", Encoding.UTF8, "application/json");var res = await client.SendAsync(req);if (!res.IsSuccessStatusCode) throw new Exception($"{(int)res.StatusCode}: {await res.Content.ReadAsStringAsync()}");Console.WriteLine(await res.Content.ReadAsStringAsync());Open a file in the code editor
Section titled “Open a file in the code editor”GET /themes/{id}/code/file · Scope: read_themes
| Parameter | In | Description |
|---|---|---|
id |
path | The resource’s ID. |
path |
query | For example sections/header.liquid. |
curl -X GET "https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-b6c1-7e31-8320-3f947513bbf5/code/file?path=sections%2Fheader.liquid" \ -H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN"const res = await fetch("https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-b6c1-7e31-8320-3f947513bbf5/code/file?path=sections%2Fheader.liquid", { method: "GET", headers: { "X-Sooquna-Access-Token": process.env.SOOQUNA_TOKEN, },});if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);const data = await res.json();console.log(data);import osimport requests
res = requests.get( "https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-b6c1-7e31-8320-3f947513bbf5/code/file?path=sections%2Fheader.liquid", headers={ "X-Sooquna-Access-Token": os.environ["SOOQUNA_TOKEN"], },)res.raise_for_status()print(res.json())<?php$ch = curl_init('https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-b6c1-7e31-8320-3f947513bbf5/code/file?path=sections%2Fheader.liquid');curl_setopt_array($ch, [ CURLOPT_CUSTOMREQUEST => 'GET', CURLOPT_HTTPHEADER => [ 'X-Sooquna-Access-Token: ' . getenv('SOOQUNA_TOKEN'), ], CURLOPT_RETURNTRANSFER => true,]);$response = curl_exec($ch);$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);if ($status >= 300) { throw new RuntimeException("$status: $response");}$data = json_decode($response, true);print_r($data);package main
import ( "fmt" "io" "net/http" "os")
func main() { req, err := http.NewRequest("GET", "https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-b6c1-7e31-8320-3f947513bbf5/code/file?path=sections%2Fheader.liquid", nil) if err != nil { panic(err) } req.Header.Set("X-Sooquna-Access-Token", os.Getenv("SOOQUNA_TOKEN")) res, err := http.DefaultClient.Do(req) if err != nil { panic(err) } defer res.Body.Close() if res.StatusCode >= 300 { data, _ := io.ReadAll(res.Body) panic(fmt.Sprintf("%d: %s", res.StatusCode, data)) } data, _ := io.ReadAll(res.Body) fmt.Println(string(data))}using System.Text;
using var client = new HttpClient();var req = new HttpRequestMessage(HttpMethod.Get, "https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-b6c1-7e31-8320-3f947513bbf5/code/file?path=sections%2Fheader.liquid");req.Headers.Add("X-Sooquna-Access-Token", Environment.GetEnvironmentVariable("SOOQUNA_TOKEN"));var res = await client.SendAsync(req);if (!res.IsSuccessStatusCode) throw new Exception($"{(int)res.StatusCode}: {await res.Content.ReadAsStringAsync()}");Console.WriteLine(await res.Content.ReadAsStringAsync());Save a file with conflict detection
Section titled “Save a file with conflict detection”PUT /themes/{id}/code/file · Scope: write_themes
Pass the base_sha you read; a newer save by someone else gets 409 with their content.
| Parameter | In | Description |
|---|---|---|
id |
path | The resource’s ID. |
curl -X PUT "https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-b6c1-7e31-8320-3f947513bbf5/code/file" \ -H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "path": "snippets/eid-banner.liquid", "content": "<p class=\"eid\">{{ '\''eid.banner'\'' | t }}</p>", "create": true}'const res = await fetch("https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-b6c1-7e31-8320-3f947513bbf5/code/file", { method: "PUT", headers: { "X-Sooquna-Access-Token": process.env.SOOQUNA_TOKEN, "Content-Type": "application/json", }, body: JSON.stringify({ "path": "snippets/eid-banner.liquid", "content": "<p class=\"eid\">{{ 'eid.banner' | t }}</p>", "create": true }),});if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);const data = await res.json();console.log(data);import osimport requests
res = requests.put( "https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-b6c1-7e31-8320-3f947513bbf5/code/file", headers={ "X-Sooquna-Access-Token": os.environ["SOOQUNA_TOKEN"], }, json={ "path": "snippets/eid-banner.liquid", "content": "<p class=\"eid\">{{ 'eid.banner' | t }}</p>", "create": True, },)res.raise_for_status()print(res.json())<?php$ch = curl_init('https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-b6c1-7e31-8320-3f947513bbf5/code/file');curl_setopt_array($ch, [ CURLOPT_CUSTOMREQUEST => 'PUT', CURLOPT_HTTPHEADER => [ 'X-Sooquna-Access-Token: ' . getenv('SOOQUNA_TOKEN'), 'Content-Type: application/json', ], CURLOPT_RETURNTRANSFER => true, CURLOPT_POSTFIELDS => json_encode([ 'path' => 'snippets/eid-banner.liquid', 'content' => '<p class="eid">{{ \'eid.banner\' | t }}</p>', 'create' => true, ], JSON_UNESCAPED_UNICODE),]);$response = curl_exec($ch);$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);if ($status >= 300) { throw new RuntimeException("$status: $response");}$data = json_decode($response, true);print_r($data);package main
import ( "fmt" "io" "net/http" "os" "strings")
func main() { body := `{ "path": "snippets/eid-banner.liquid", "content": "<p class=\"eid\">{{ 'eid.banner' | t }}</p>", "create": true}` req, err := http.NewRequest("PUT", "https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-b6c1-7e31-8320-3f947513bbf5/code/file", strings.NewReader(body)) if err != nil { panic(err) } req.Header.Set("X-Sooquna-Access-Token", os.Getenv("SOOQUNA_TOKEN")) req.Header.Set("Content-Type", "application/json") res, err := http.DefaultClient.Do(req) if err != nil { panic(err) } defer res.Body.Close() if res.StatusCode >= 300 { data, _ := io.ReadAll(res.Body) panic(fmt.Sprintf("%d: %s", res.StatusCode, data)) } data, _ := io.ReadAll(res.Body) fmt.Println(string(data))}using System.Text;
using var client = new HttpClient();var req = new HttpRequestMessage(HttpMethod.Put, "https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-b6c1-7e31-8320-3f947513bbf5/code/file");req.Headers.Add("X-Sooquna-Access-Token", Environment.GetEnvironmentVariable("SOOQUNA_TOKEN"));req.Content = new StringContent("""{ "path": "snippets/eid-banner.liquid", "content": "<p class=\"eid\">{{ 'eid.banner' | t }}</p>", "create": true}""", Encoding.UTF8, "application/json");var res = await client.SendAsync(req);if (!res.IsSuccessStatusCode) throw new Exception($"{(int)res.StatusCode}: {await res.Content.ReadAsStringAsync()}");Console.WriteLine(await res.Content.ReadAsStringAsync());Delete a theme file
Section titled “Delete a theme file”DELETE /themes/{id}/code/file · Scope: write_themes
| Parameter | In | Description |
|---|---|---|
id |
path | The resource’s ID. |
path |
query | For example snippets/eid-banner.liquid. |
curl -X DELETE "https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-b6c1-7e31-8320-3f947513bbf5/code/file?path=snippets%2Feid-banner.liquid" \ -H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN"const res = await fetch("https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-b6c1-7e31-8320-3f947513bbf5/code/file?path=snippets%2Feid-banner.liquid", { method: "DELETE", headers: { "X-Sooquna-Access-Token": process.env.SOOQUNA_TOKEN, },});if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);const data = await res.json();console.log(data);import osimport requests
res = requests.delete( "https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-b6c1-7e31-8320-3f947513bbf5/code/file?path=snippets%2Feid-banner.liquid", headers={ "X-Sooquna-Access-Token": os.environ["SOOQUNA_TOKEN"], },)res.raise_for_status()print(res.json())<?php$ch = curl_init('https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-b6c1-7e31-8320-3f947513bbf5/code/file?path=snippets%2Feid-banner.liquid');curl_setopt_array($ch, [ CURLOPT_CUSTOMREQUEST => 'DELETE', CURLOPT_HTTPHEADER => [ 'X-Sooquna-Access-Token: ' . getenv('SOOQUNA_TOKEN'), ], CURLOPT_RETURNTRANSFER => true,]);$response = curl_exec($ch);$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);if ($status >= 300) { throw new RuntimeException("$status: $response");}$data = json_decode($response, true);print_r($data);package main
import ( "fmt" "io" "net/http" "os")
func main() { req, err := http.NewRequest("DELETE", "https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-b6c1-7e31-8320-3f947513bbf5/code/file?path=snippets%2Feid-banner.liquid", nil) if err != nil { panic(err) } req.Header.Set("X-Sooquna-Access-Token", os.Getenv("SOOQUNA_TOKEN")) res, err := http.DefaultClient.Do(req) if err != nil { panic(err) } defer res.Body.Close() if res.StatusCode >= 300 { data, _ := io.ReadAll(res.Body) panic(fmt.Sprintf("%d: %s", res.StatusCode, data)) } data, _ := io.ReadAll(res.Body) fmt.Println(string(data))}using System.Text;
using var client = new HttpClient();var req = new HttpRequestMessage(HttpMethod.Delete, "https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-b6c1-7e31-8320-3f947513bbf5/code/file?path=snippets%2Feid-banner.liquid");req.Headers.Add("X-Sooquna-Access-Token", Environment.GetEnvironmentVariable("SOOQUNA_TOKEN"));var res = await client.SendAsync(req);if (!res.IsSuccessStatusCode) throw new Exception($"{(int)res.StatusCode}: {await res.Content.ReadAsStringAsync()}");Console.WriteLine(await res.Content.ReadAsStringAsync());Rename a theme file
Section titled “Rename a theme file”POST /themes/{id}/code/rename · Scope: write_themes
| Parameter | In | Description |
|---|---|---|
id |
path | The resource’s ID. |
curl -X POST "https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-fbe3-7f5b-852a-2375f6d83ee9/code/rename" \ -H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "path": "snippets/eid-banner.liquid", "new_path": "snippets/eid-strip.liquid"}'const res = await fetch("https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-fbe3-7f5b-852a-2375f6d83ee9/code/rename", { method: "POST", headers: { "X-Sooquna-Access-Token": process.env.SOOQUNA_TOKEN, "Content-Type": "application/json", }, body: JSON.stringify({ "path": "snippets/eid-banner.liquid", "new_path": "snippets/eid-strip.liquid" }),});if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);const data = await res.json();console.log(data);import osimport requests
res = requests.post( "https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-fbe3-7f5b-852a-2375f6d83ee9/code/rename", headers={ "X-Sooquna-Access-Token": os.environ["SOOQUNA_TOKEN"], }, json={ "path": "snippets/eid-banner.liquid", "new_path": "snippets/eid-strip.liquid", },)res.raise_for_status()print(res.json())<?php$ch = curl_init('https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-fbe3-7f5b-852a-2375f6d83ee9/code/rename');curl_setopt_array($ch, [ CURLOPT_CUSTOMREQUEST => 'POST', CURLOPT_HTTPHEADER => [ 'X-Sooquna-Access-Token: ' . getenv('SOOQUNA_TOKEN'), 'Content-Type: application/json', ], CURLOPT_RETURNTRANSFER => true, CURLOPT_POSTFIELDS => json_encode([ 'path' => 'snippets/eid-banner.liquid', 'new_path' => 'snippets/eid-strip.liquid', ], JSON_UNESCAPED_UNICODE),]);$response = curl_exec($ch);$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);if ($status >= 300) { throw new RuntimeException("$status: $response");}$data = json_decode($response, true);print_r($data);package main
import ( "fmt" "io" "net/http" "os" "strings")
func main() { body := `{ "path": "snippets/eid-banner.liquid", "new_path": "snippets/eid-strip.liquid"}` req, err := http.NewRequest("POST", "https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-fbe3-7f5b-852a-2375f6d83ee9/code/rename", strings.NewReader(body)) if err != nil { panic(err) } req.Header.Set("X-Sooquna-Access-Token", os.Getenv("SOOQUNA_TOKEN")) req.Header.Set("Content-Type", "application/json") res, err := http.DefaultClient.Do(req) if err != nil { panic(err) } defer res.Body.Close() if res.StatusCode >= 300 { data, _ := io.ReadAll(res.Body) panic(fmt.Sprintf("%d: %s", res.StatusCode, data)) } data, _ := io.ReadAll(res.Body) fmt.Println(string(data))}using System.Text;
using var client = new HttpClient();var req = new HttpRequestMessage(HttpMethod.Post, "https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-fbe3-7f5b-852a-2375f6d83ee9/code/rename");req.Headers.Add("X-Sooquna-Access-Token", Environment.GetEnvironmentVariable("SOOQUNA_TOKEN"));req.Content = new StringContent("""{ "path": "snippets/eid-banner.liquid", "new_path": "snippets/eid-strip.liquid"}""", Encoding.UTF8, "application/json");var res = await client.SendAsync(req);if (!res.IsSuccessStatusCode) throw new Exception($"{(int)res.StatusCode}: {await res.Content.ReadAsStringAsync()}");Console.WriteLine(await res.Content.ReadAsStringAsync());List a file’s saved versions
Section titled “List a file’s saved versions”GET /themes/{id}/code/versions · Scope: read_themes
| Parameter | In | Description |
|---|---|---|
id |
path | The resource’s ID. |
path |
query | For example sections/header.liquid. |
curl -X GET "https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-393e-7637-8f04-ca12cb4555cb/code/versions?path=sections%2Fheader.liquid" \ -H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN"const res = await fetch("https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-393e-7637-8f04-ca12cb4555cb/code/versions?path=sections%2Fheader.liquid", { method: "GET", headers: { "X-Sooquna-Access-Token": process.env.SOOQUNA_TOKEN, },});if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);const data = await res.json();console.log(data);import osimport requests
res = requests.get( "https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-393e-7637-8f04-ca12cb4555cb/code/versions?path=sections%2Fheader.liquid", headers={ "X-Sooquna-Access-Token": os.environ["SOOQUNA_TOKEN"], },)res.raise_for_status()print(res.json())<?php$ch = curl_init('https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-393e-7637-8f04-ca12cb4555cb/code/versions?path=sections%2Fheader.liquid');curl_setopt_array($ch, [ CURLOPT_CUSTOMREQUEST => 'GET', CURLOPT_HTTPHEADER => [ 'X-Sooquna-Access-Token: ' . getenv('SOOQUNA_TOKEN'), ], CURLOPT_RETURNTRANSFER => true,]);$response = curl_exec($ch);$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);if ($status >= 300) { throw new RuntimeException("$status: $response");}$data = json_decode($response, true);print_r($data);package main
import ( "fmt" "io" "net/http" "os")
func main() { req, err := http.NewRequest("GET", "https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-393e-7637-8f04-ca12cb4555cb/code/versions?path=sections%2Fheader.liquid", nil) if err != nil { panic(err) } req.Header.Set("X-Sooquna-Access-Token", os.Getenv("SOOQUNA_TOKEN")) res, err := http.DefaultClient.Do(req) if err != nil { panic(err) } defer res.Body.Close() if res.StatusCode >= 300 { data, _ := io.ReadAll(res.Body) panic(fmt.Sprintf("%d: %s", res.StatusCode, data)) } data, _ := io.ReadAll(res.Body) fmt.Println(string(data))}using System.Text;
using var client = new HttpClient();var req = new HttpRequestMessage(HttpMethod.Get, "https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-393e-7637-8f04-ca12cb4555cb/code/versions?path=sections%2Fheader.liquid");req.Headers.Add("X-Sooquna-Access-Token", Environment.GetEnvironmentVariable("SOOQUNA_TOKEN"));var res = await client.SendAsync(req);if (!res.IsSuccessStatusCode) throw new Exception($"{(int)res.StatusCode}: {await res.Content.ReadAsStringAsync()}");Console.WriteLine(await res.Content.ReadAsStringAsync());Read a saved version of a file
Section titled “Read a saved version of a file”GET /themes/{id}/code/versions/{vid} · Scope: read_themes
| Parameter | In | Description |
|---|---|---|
id |
path | The resource’s ID. |
vid |
path | The vid ID. |
curl -X GET "https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-037f-7e2a-8fcd-53d495e53d24/code/versions/0193a1b2-bef5-7711-8060-c0f60de80743" \ -H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN"const res = await fetch("https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-037f-7e2a-8fcd-53d495e53d24/code/versions/0193a1b2-bef5-7711-8060-c0f60de80743", { method: "GET", headers: { "X-Sooquna-Access-Token": process.env.SOOQUNA_TOKEN, },});if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);const data = await res.json();console.log(data);import osimport requests
res = requests.get( "https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-037f-7e2a-8fcd-53d495e53d24/code/versions/0193a1b2-bef5-7711-8060-c0f60de80743", headers={ "X-Sooquna-Access-Token": os.environ["SOOQUNA_TOKEN"], },)res.raise_for_status()print(res.json())<?php$ch = curl_init('https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-037f-7e2a-8fcd-53d495e53d24/code/versions/0193a1b2-bef5-7711-8060-c0f60de80743');curl_setopt_array($ch, [ CURLOPT_CUSTOMREQUEST => 'GET', CURLOPT_HTTPHEADER => [ 'X-Sooquna-Access-Token: ' . getenv('SOOQUNA_TOKEN'), ], CURLOPT_RETURNTRANSFER => true,]);$response = curl_exec($ch);$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);if ($status >= 300) { throw new RuntimeException("$status: $response");}$data = json_decode($response, true);print_r($data);package main
import ( "fmt" "io" "net/http" "os")
func main() { req, err := http.NewRequest("GET", "https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-037f-7e2a-8fcd-53d495e53d24/code/versions/0193a1b2-bef5-7711-8060-c0f60de80743", nil) if err != nil { panic(err) } req.Header.Set("X-Sooquna-Access-Token", os.Getenv("SOOQUNA_TOKEN")) res, err := http.DefaultClient.Do(req) if err != nil { panic(err) } defer res.Body.Close() if res.StatusCode >= 300 { data, _ := io.ReadAll(res.Body) panic(fmt.Sprintf("%d: %s", res.StatusCode, data)) } data, _ := io.ReadAll(res.Body) fmt.Println(string(data))}using System.Text;
using var client = new HttpClient();var req = new HttpRequestMessage(HttpMethod.Get, "https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-037f-7e2a-8fcd-53d495e53d24/code/versions/0193a1b2-bef5-7711-8060-c0f60de80743");req.Headers.Add("X-Sooquna-Access-Token", Environment.GetEnvironmentVariable("SOOQUNA_TOKEN"));var res = await client.SendAsync(req);if (!res.IsSuccessStatusCode) throw new Exception($"{(int)res.StatusCode}: {await res.Content.ReadAsStringAsync()}");Console.WriteLine(await res.Content.ReadAsStringAsync());Restore a saved version of a file
Section titled “Restore a saved version of a file”POST /themes/{id}/code/versions/{vid}/restore · Scope: write_themes
| Parameter | In | Description |
|---|---|---|
id |
path | The resource’s ID. |
vid |
path | The vid ID. |
curl -X POST "https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-73b7-7430-8bcd-96c8863373e8/code/versions/0193a1b2-ae62-7575-8ba3-32f821888101/restore" \ -H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN" \ -H "Content-Type: application/json" \ -d '{"path": "sections/header.liquid"}'const res = await fetch("https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-73b7-7430-8bcd-96c8863373e8/code/versions/0193a1b2-ae62-7575-8ba3-32f821888101/restore", { method: "POST", headers: { "X-Sooquna-Access-Token": process.env.SOOQUNA_TOKEN, "Content-Type": "application/json", }, body: JSON.stringify({"path": "sections/header.liquid"}),});if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);const data = await res.json();console.log(data);import osimport requests
res = requests.post( "https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-73b7-7430-8bcd-96c8863373e8/code/versions/0193a1b2-ae62-7575-8ba3-32f821888101/restore", headers={ "X-Sooquna-Access-Token": os.environ["SOOQUNA_TOKEN"], }, json={"path": "sections/header.liquid"},)res.raise_for_status()print(res.json())<?php$ch = curl_init('https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-73b7-7430-8bcd-96c8863373e8/code/versions/0193a1b2-ae62-7575-8ba3-32f821888101/restore');curl_setopt_array($ch, [ CURLOPT_CUSTOMREQUEST => 'POST', CURLOPT_HTTPHEADER => [ 'X-Sooquna-Access-Token: ' . getenv('SOOQUNA_TOKEN'), 'Content-Type: application/json', ], CURLOPT_RETURNTRANSFER => true, CURLOPT_POSTFIELDS => json_encode(['path' => 'sections/header.liquid'], JSON_UNESCAPED_UNICODE),]);$response = curl_exec($ch);$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);if ($status >= 300) { throw new RuntimeException("$status: $response");}$data = json_decode($response, true);print_r($data);package main
import ( "fmt" "io" "net/http" "os" "strings")
func main() { body := `{"path": "sections/header.liquid"}` req, err := http.NewRequest("POST", "https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-73b7-7430-8bcd-96c8863373e8/code/versions/0193a1b2-ae62-7575-8ba3-32f821888101/restore", strings.NewReader(body)) if err != nil { panic(err) } req.Header.Set("X-Sooquna-Access-Token", os.Getenv("SOOQUNA_TOKEN")) req.Header.Set("Content-Type", "application/json") res, err := http.DefaultClient.Do(req) if err != nil { panic(err) } defer res.Body.Close() if res.StatusCode >= 300 { data, _ := io.ReadAll(res.Body) panic(fmt.Sprintf("%d: %s", res.StatusCode, data)) } data, _ := io.ReadAll(res.Body) fmt.Println(string(data))}using System.Text;
using var client = new HttpClient();var req = new HttpRequestMessage(HttpMethod.Post, "https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-73b7-7430-8bcd-96c8863373e8/code/versions/0193a1b2-ae62-7575-8ba3-32f821888101/restore");req.Headers.Add("X-Sooquna-Access-Token", Environment.GetEnvironmentVariable("SOOQUNA_TOKEN"));req.Content = new StringContent("""{"path": "sections/header.liquid"}""", Encoding.UTF8, "application/json");var res = await client.SendAsync(req);if (!res.IsSuccessStatusCode) throw new Exception($"{(int)res.StatusCode}: {await res.Content.ReadAsStringAsync()}");Console.WriteLine(await res.Content.ReadAsStringAsync());List what uses a file
Section titled “List what uses a file”GET /themes/{id}/references · Scope: read_themes
| Parameter | In | Description |
|---|---|---|
id |
path | The resource’s ID. |
target |
query | For example snippets/product-card.liquid. |
curl -X GET "https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-c3d4-7e5f-8a6b-000000000046/references?target=snippets%2Fproduct-card.liquid" \ -H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN"const res = await fetch("https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-c3d4-7e5f-8a6b-000000000046/references?target=snippets%2Fproduct-card.liquid", { method: "GET", headers: { "X-Sooquna-Access-Token": process.env.SOOQUNA_TOKEN, },});if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);const data = await res.json();console.log(data);import osimport requests
res = requests.get( "https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-c3d4-7e5f-8a6b-000000000046/references?target=snippets%2Fproduct-card.liquid", headers={ "X-Sooquna-Access-Token": os.environ["SOOQUNA_TOKEN"], },)res.raise_for_status()print(res.json())<?php$ch = curl_init('https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-c3d4-7e5f-8a6b-000000000046/references?target=snippets%2Fproduct-card.liquid');curl_setopt_array($ch, [ CURLOPT_CUSTOMREQUEST => 'GET', CURLOPT_HTTPHEADER => [ 'X-Sooquna-Access-Token: ' . getenv('SOOQUNA_TOKEN'), ], CURLOPT_RETURNTRANSFER => true,]);$response = curl_exec($ch);$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);if ($status >= 300) { throw new RuntimeException("$status: $response");}$data = json_decode($response, true);print_r($data);package main
import ( "fmt" "io" "net/http" "os")
func main() { req, err := http.NewRequest("GET", "https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-c3d4-7e5f-8a6b-000000000046/references?target=snippets%2Fproduct-card.liquid", nil) if err != nil { panic(err) } req.Header.Set("X-Sooquna-Access-Token", os.Getenv("SOOQUNA_TOKEN")) res, err := http.DefaultClient.Do(req) if err != nil { panic(err) } defer res.Body.Close() if res.StatusCode >= 300 { data, _ := io.ReadAll(res.Body) panic(fmt.Sprintf("%d: %s", res.StatusCode, data)) } data, _ := io.ReadAll(res.Body) fmt.Println(string(data))}using System.Text;
using var client = new HttpClient();var req = new HttpRequestMessage(HttpMethod.Get, "https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-c3d4-7e5f-8a6b-000000000046/references?target=snippets%2Fproduct-card.liquid");req.Headers.Add("X-Sooquna-Access-Token", Environment.GetEnvironmentVariable("SOOQUNA_TOKEN"));var res = await client.SendAsync(req);if (!res.IsSuccessStatusCode) throw new Exception($"{(int)res.StatusCode}: {await res.Content.ReadAsStringAsync()}");Console.WriteLine(await res.Content.ReadAsStringAsync());Response 200
{ "data": [ { "line": 10, "path": "sections/featured-collection.liquid", "text": "<li>{% render 'product-card', product: product, sizes: '(min-width: 990px) 25vw, 50vw' %}</li>" }, { "line": 25, "path": "sections/main-collection.liquid", "text": "<li>{% render 'product-card', product: product, sizes: '(min-width: 990px) 25vw, 50vw', eager: eager %}</li>" } ]}Run the theme check
Section titled “Run the theme check”POST /themes/{id}/check · Scope: write_themes
| Parameter | In | Description |
|---|---|---|
id |
path | The resource’s ID. |
curl -X POST "https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-c3d4-7e5f-8a6b-000000000046/check" \ -H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN"const res = await fetch("https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-c3d4-7e5f-8a6b-000000000046/check", { method: "POST", headers: { "X-Sooquna-Access-Token": process.env.SOOQUNA_TOKEN, },});if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);const data = await res.json();console.log(data);import osimport requests
res = requests.post( "https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-c3d4-7e5f-8a6b-000000000046/check", headers={ "X-Sooquna-Access-Token": os.environ["SOOQUNA_TOKEN"], },)res.raise_for_status()print(res.json())<?php$ch = curl_init('https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-c3d4-7e5f-8a6b-000000000046/check');curl_setopt_array($ch, [ CURLOPT_CUSTOMREQUEST => 'POST', CURLOPT_HTTPHEADER => [ 'X-Sooquna-Access-Token: ' . getenv('SOOQUNA_TOKEN'), ], CURLOPT_RETURNTRANSFER => true,]);$response = curl_exec($ch);$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);if ($status >= 300) { throw new RuntimeException("$status: $response");}$data = json_decode($response, true);print_r($data);package main
import ( "fmt" "io" "net/http" "os")
func main() { req, err := http.NewRequest("POST", "https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-c3d4-7e5f-8a6b-000000000046/check", nil) if err != nil { panic(err) } req.Header.Set("X-Sooquna-Access-Token", os.Getenv("SOOQUNA_TOKEN")) res, err := http.DefaultClient.Do(req) if err != nil { panic(err) } defer res.Body.Close() if res.StatusCode >= 300 { data, _ := io.ReadAll(res.Body) panic(fmt.Sprintf("%d: %s", res.StatusCode, data)) } data, _ := io.ReadAll(res.Body) fmt.Println(string(data))}using System.Text;
using var client = new HttpClient();var req = new HttpRequestMessage(HttpMethod.Post, "https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-c3d4-7e5f-8a6b-000000000046/check");req.Headers.Add("X-Sooquna-Access-Token", Environment.GetEnvironmentVariable("SOOQUNA_TOKEN"));var res = await client.SendAsync(req);if (!res.IsSuccessStatusCode) throw new Exception($"{(int)res.StatusCode}: {await res.Content.ReadAsStringAsync()}");Console.WriteLine(await res.Content.ReadAsStringAsync());Response 200
{ "problems": [ { "line": 40, "message": "<img> without width and height causes layout shift", "path": "layout/theme.liquid", "severity": "warning" } ]}Check unsaved content of a file
Section titled “Check unsaved content of a file”POST /themes/{id}/check/file · Scope: write_themes
| Parameter | In | Description |
|---|---|---|
id |
path | The resource’s ID. |
curl -X POST "https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-9296-7481-870c-298744417c48/check/file" \ -H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN" \ -H "Content-Type: application/json" \ -d '{"path": "snippets/eid-banner.liquid", "content": "{% if %}"}'const res = await fetch("https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-9296-7481-870c-298744417c48/check/file", { method: "POST", headers: { "X-Sooquna-Access-Token": process.env.SOOQUNA_TOKEN, "Content-Type": "application/json", }, body: JSON.stringify({"path": "snippets/eid-banner.liquid", "content": "{% if %}"}),});if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);const data = await res.json();console.log(data);import osimport requests
res = requests.post( "https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-9296-7481-870c-298744417c48/check/file", headers={ "X-Sooquna-Access-Token": os.environ["SOOQUNA_TOKEN"], }, json={"path": "snippets/eid-banner.liquid", "content": "{% if %}"},)res.raise_for_status()print(res.json())<?php$ch = curl_init('https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-9296-7481-870c-298744417c48/check/file');curl_setopt_array($ch, [ CURLOPT_CUSTOMREQUEST => 'POST', CURLOPT_HTTPHEADER => [ 'X-Sooquna-Access-Token: ' . getenv('SOOQUNA_TOKEN'), 'Content-Type: application/json', ], CURLOPT_RETURNTRANSFER => true, CURLOPT_POSTFIELDS => json_encode(['path' => 'snippets/eid-banner.liquid', 'content' => '{% if %}'], JSON_UNESCAPED_UNICODE),]);$response = curl_exec($ch);$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);if ($status >= 300) { throw new RuntimeException("$status: $response");}$data = json_decode($response, true);print_r($data);package main
import ( "fmt" "io" "net/http" "os" "strings")
func main() { body := `{"path": "snippets/eid-banner.liquid", "content": "{% if %}"}` req, err := http.NewRequest("POST", "https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-9296-7481-870c-298744417c48/check/file", strings.NewReader(body)) if err != nil { panic(err) } req.Header.Set("X-Sooquna-Access-Token", os.Getenv("SOOQUNA_TOKEN")) req.Header.Set("Content-Type", "application/json") res, err := http.DefaultClient.Do(req) if err != nil { panic(err) } defer res.Body.Close() if res.StatusCode >= 300 { data, _ := io.ReadAll(res.Body) panic(fmt.Sprintf("%d: %s", res.StatusCode, data)) } data, _ := io.ReadAll(res.Body) fmt.Println(string(data))}using System.Text;
using var client = new HttpClient();var req = new HttpRequestMessage(HttpMethod.Post, "https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-9296-7481-870c-298744417c48/check/file");req.Headers.Add("X-Sooquna-Access-Token", Environment.GetEnvironmentVariable("SOOQUNA_TOKEN"));req.Content = new StringContent("""{"path": "snippets/eid-banner.liquid", "content": "{% if %}"}""", Encoding.UTF8, "application/json");var res = await client.SendAsync(req);if (!res.IsSuccessStatusCode) throw new Exception($"{(int)res.StatusCode}: {await res.Content.ReadAsStringAsync()}");Console.WriteLine(await res.Content.ReadAsStringAsync());Upload a theme asset
Section titled “Upload a theme asset”POST /themes/{id}/assets · Scope: write_themes
Send the file as the body; name it with ?name=.
| Parameter | In | Description |
|---|---|---|
id |
path | The resource’s ID. |
name |
query | For example logo.svg. |
curl -X POST "https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-d586-7e30-865b-b5d523c2ea11/assets?name=logo.svg" \ -H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN" \ -H "Content-Type: image/svg+xml" \ --data-binary @logo.svgimport { readFile, writeFile } from "node:fs/promises";
const res = await fetch("https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-d586-7e30-865b-b5d523c2ea11/assets?name=logo.svg", { method: "POST", headers: { "X-Sooquna-Access-Token": process.env.SOOQUNA_TOKEN, "Content-Type": "image/svg+xml", }, body: await readFile("logo.svg"),});if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);const data = await res.json();console.log(data);import osimport requests
res = requests.post( "https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-d586-7e30-865b-b5d523c2ea11/assets?name=logo.svg", headers={ "X-Sooquna-Access-Token": os.environ["SOOQUNA_TOKEN"], "Content-Type": "image/svg+xml", }, data=open("logo.svg", "rb"),)res.raise_for_status()print(res.json())<?php$ch = curl_init('https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-d586-7e30-865b-b5d523c2ea11/assets?name=logo.svg');curl_setopt_array($ch, [ CURLOPT_CUSTOMREQUEST => 'POST', CURLOPT_HTTPHEADER => [ 'X-Sooquna-Access-Token: ' . getenv('SOOQUNA_TOKEN'), 'Content-Type: image/svg+xml', ], CURLOPT_RETURNTRANSFER => true, CURLOPT_POSTFIELDS => file_get_contents('logo.svg'),]);$response = curl_exec($ch);$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);if ($status >= 300) { throw new RuntimeException("$status: $response");}$data = json_decode($response, true);print_r($data);package main
import ( "fmt" "io" "net/http" "os")
func main() { f, err := os.Open("logo.svg") if err != nil { panic(err) } defer f.Close() req, err := http.NewRequest("POST", "https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-d586-7e30-865b-b5d523c2ea11/assets?name=logo.svg", f) if err != nil { panic(err) } req.Header.Set("X-Sooquna-Access-Token", os.Getenv("SOOQUNA_TOKEN")) req.Header.Set("Content-Type", "image/svg+xml") res, err := http.DefaultClient.Do(req) if err != nil { panic(err) } defer res.Body.Close() if res.StatusCode >= 300 { data, _ := io.ReadAll(res.Body) panic(fmt.Sprintf("%d: %s", res.StatusCode, data)) } data, _ := io.ReadAll(res.Body) fmt.Println(string(data))}using System.Text;
using var client = new HttpClient();var req = new HttpRequestMessage(HttpMethod.Post, "https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-d586-7e30-865b-b5d523c2ea11/assets?name=logo.svg");req.Headers.Add("X-Sooquna-Access-Token", Environment.GetEnvironmentVariable("SOOQUNA_TOKEN"));req.Content = new ByteArrayContent(await File.ReadAllBytesAsync("logo.svg"));req.Content.Headers.ContentType = new("image/svg+xml");var res = await client.SendAsync(req);if (!res.IsSuccessStatusCode) throw new Exception($"{(int)res.StatusCode}: {await res.Content.ReadAsStringAsync()}");Console.WriteLine(await res.Content.ReadAsStringAsync());List restore points
Section titled “List restore points”GET /themes/{id}/snapshots · Scope: read_themes
| Parameter | In | Description |
|---|---|---|
id |
path | The resource’s ID. |
curl -X GET "https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-c3d4-7e5f-8a6b-000000000046/snapshots" \ -H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN"const res = await fetch("https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-c3d4-7e5f-8a6b-000000000046/snapshots", { method: "GET", headers: { "X-Sooquna-Access-Token": process.env.SOOQUNA_TOKEN, },});if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);const data = await res.json();console.log(data);import osimport requests
res = requests.get( "https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-c3d4-7e5f-8a6b-000000000046/snapshots", headers={ "X-Sooquna-Access-Token": os.environ["SOOQUNA_TOKEN"], },)res.raise_for_status()print(res.json())<?php$ch = curl_init('https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-c3d4-7e5f-8a6b-000000000046/snapshots');curl_setopt_array($ch, [ CURLOPT_CUSTOMREQUEST => 'GET', CURLOPT_HTTPHEADER => [ 'X-Sooquna-Access-Token: ' . getenv('SOOQUNA_TOKEN'), ], CURLOPT_RETURNTRANSFER => true,]);$response = curl_exec($ch);$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);if ($status >= 300) { throw new RuntimeException("$status: $response");}$data = json_decode($response, true);print_r($data);package main
import ( "fmt" "io" "net/http" "os")
func main() { req, err := http.NewRequest("GET", "https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-c3d4-7e5f-8a6b-000000000046/snapshots", nil) if err != nil { panic(err) } req.Header.Set("X-Sooquna-Access-Token", os.Getenv("SOOQUNA_TOKEN")) res, err := http.DefaultClient.Do(req) if err != nil { panic(err) } defer res.Body.Close() if res.StatusCode >= 300 { data, _ := io.ReadAll(res.Body) panic(fmt.Sprintf("%d: %s", res.StatusCode, data)) } data, _ := io.ReadAll(res.Body) fmt.Println(string(data))}using System.Text;
using var client = new HttpClient();var req = new HttpRequestMessage(HttpMethod.Get, "https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-c3d4-7e5f-8a6b-000000000046/snapshots");req.Headers.Add("X-Sooquna-Access-Token", Environment.GetEnvironmentVariable("SOOQUNA_TOKEN"));var res = await client.SendAsync(req);if (!res.IsSuccessStatusCode) throw new Exception($"{(int)res.StatusCode}: {await res.Content.ReadAsStringAsync()}");Console.WriteLine(await res.Content.ReadAsStringAsync());Response 200
{"data": []}Create a restore point
Section titled “Create a restore point”POST /themes/{id}/snapshots · Scope: write_themes
| Parameter | In | Description |
|---|---|---|
id |
path | The resource’s ID. |
curl -X POST "https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-e506-7f8e-88e5-d91e7fbd9ecb/snapshots" \ -H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN" \ -H "Content-Type: application/json" \ -d '{"name": "Before Ramadan banner"}'const res = await fetch("https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-e506-7f8e-88e5-d91e7fbd9ecb/snapshots", { method: "POST", headers: { "X-Sooquna-Access-Token": process.env.SOOQUNA_TOKEN, "Content-Type": "application/json", }, body: JSON.stringify({"name": "Before Ramadan banner"}),});if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);const data = await res.json();console.log(data);import osimport requests
res = requests.post( "https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-e506-7f8e-88e5-d91e7fbd9ecb/snapshots", headers={ "X-Sooquna-Access-Token": os.environ["SOOQUNA_TOKEN"], }, json={"name": "Before Ramadan banner"},)res.raise_for_status()print(res.json())<?php$ch = curl_init('https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-e506-7f8e-88e5-d91e7fbd9ecb/snapshots');curl_setopt_array($ch, [ CURLOPT_CUSTOMREQUEST => 'POST', CURLOPT_HTTPHEADER => [ 'X-Sooquna-Access-Token: ' . getenv('SOOQUNA_TOKEN'), 'Content-Type: application/json', ], CURLOPT_RETURNTRANSFER => true, CURLOPT_POSTFIELDS => json_encode(['name' => 'Before Ramadan banner'], JSON_UNESCAPED_UNICODE),]);$response = curl_exec($ch);$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);if ($status >= 300) { throw new RuntimeException("$status: $response");}$data = json_decode($response, true);print_r($data);package main
import ( "fmt" "io" "net/http" "os" "strings")
func main() { body := `{"name": "Before Ramadan banner"}` req, err := http.NewRequest("POST", "https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-e506-7f8e-88e5-d91e7fbd9ecb/snapshots", strings.NewReader(body)) if err != nil { panic(err) } req.Header.Set("X-Sooquna-Access-Token", os.Getenv("SOOQUNA_TOKEN")) req.Header.Set("Content-Type", "application/json") res, err := http.DefaultClient.Do(req) if err != nil { panic(err) } defer res.Body.Close() if res.StatusCode >= 300 { data, _ := io.ReadAll(res.Body) panic(fmt.Sprintf("%d: %s", res.StatusCode, data)) } data, _ := io.ReadAll(res.Body) fmt.Println(string(data))}using System.Text;
using var client = new HttpClient();var req = new HttpRequestMessage(HttpMethod.Post, "https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-e506-7f8e-88e5-d91e7fbd9ecb/snapshots");req.Headers.Add("X-Sooquna-Access-Token", Environment.GetEnvironmentVariable("SOOQUNA_TOKEN"));req.Content = new StringContent("""{"name": "Before Ramadan banner"}""", Encoding.UTF8, "application/json");var res = await client.SendAsync(req);if (!res.IsSuccessStatusCode) throw new Exception($"{(int)res.StatusCode}: {await res.Content.ReadAsStringAsync()}");Console.WriteLine(await res.Content.ReadAsStringAsync());Restore the theme to a restore point
Section titled “Restore the theme to a restore point”POST /themes/{id}/snapshots/{sid}/restore · Scope: write_themes
| Parameter | In | Description |
|---|---|---|
id |
path | The resource’s ID. |
sid |
path | The sid ID. |
curl -X POST "https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-3713-7414-8ee8-0537214a9614/snapshots/0193a1b2-07ea-7a69-8f04-e63849649165/restore" \ -H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN"const res = await fetch("https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-3713-7414-8ee8-0537214a9614/snapshots/0193a1b2-07ea-7a69-8f04-e63849649165/restore", { method: "POST", headers: { "X-Sooquna-Access-Token": process.env.SOOQUNA_TOKEN, },});if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);const data = await res.json();console.log(data);import osimport requests
res = requests.post( "https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-3713-7414-8ee8-0537214a9614/snapshots/0193a1b2-07ea-7a69-8f04-e63849649165/restore", headers={ "X-Sooquna-Access-Token": os.environ["SOOQUNA_TOKEN"], },)res.raise_for_status()print(res.json())<?php$ch = curl_init('https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-3713-7414-8ee8-0537214a9614/snapshots/0193a1b2-07ea-7a69-8f04-e63849649165/restore');curl_setopt_array($ch, [ CURLOPT_CUSTOMREQUEST => 'POST', CURLOPT_HTTPHEADER => [ 'X-Sooquna-Access-Token: ' . getenv('SOOQUNA_TOKEN'), ], CURLOPT_RETURNTRANSFER => true,]);$response = curl_exec($ch);$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);if ($status >= 300) { throw new RuntimeException("$status: $response");}$data = json_decode($response, true);print_r($data);package main
import ( "fmt" "io" "net/http" "os")
func main() { req, err := http.NewRequest("POST", "https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-3713-7414-8ee8-0537214a9614/snapshots/0193a1b2-07ea-7a69-8f04-e63849649165/restore", nil) if err != nil { panic(err) } req.Header.Set("X-Sooquna-Access-Token", os.Getenv("SOOQUNA_TOKEN")) res, err := http.DefaultClient.Do(req) if err != nil { panic(err) } defer res.Body.Close() if res.StatusCode >= 300 { data, _ := io.ReadAll(res.Body) panic(fmt.Sprintf("%d: %s", res.StatusCode, data)) } data, _ := io.ReadAll(res.Body) fmt.Println(string(data))}using System.Text;
using var client = new HttpClient();var req = new HttpRequestMessage(HttpMethod.Post, "https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-3713-7414-8ee8-0537214a9614/snapshots/0193a1b2-07ea-7a69-8f04-e63849649165/restore");req.Headers.Add("X-Sooquna-Access-Token", Environment.GetEnvironmentVariable("SOOQUNA_TOKEN"));var res = await client.SendAsync(req);if (!res.IsSuccessStatusCode) throw new Exception($"{(int)res.StatusCode}: {await res.Content.ReadAsStringAsync()}");Console.WriteLine(await res.Content.ReadAsStringAsync());Add an alternate template
Section titled “Add an alternate template”POST /themes/{id}/templates · Scope: write_themes
Copies the default template of the type (or from) to <type>.<suffix>.json.
| Parameter | In | Description |
|---|---|---|
id |
path | The resource’s ID. |
curl -X POST "https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-c29b-7faf-8b58-bd82cdfa2e75/templates" \ -H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN" \ -H "Content-Type: application/json" \ -d '{"type": "product", "suffix": "gift"}'const res = await fetch("https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-c29b-7faf-8b58-bd82cdfa2e75/templates", { method: "POST", headers: { "X-Sooquna-Access-Token": process.env.SOOQUNA_TOKEN, "Content-Type": "application/json", }, body: JSON.stringify({"type": "product", "suffix": "gift"}),});if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);const data = await res.json();console.log(data);import osimport requests
res = requests.post( "https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-c29b-7faf-8b58-bd82cdfa2e75/templates", headers={ "X-Sooquna-Access-Token": os.environ["SOOQUNA_TOKEN"], }, json={"type": "product", "suffix": "gift"},)res.raise_for_status()print(res.json())<?php$ch = curl_init('https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-c29b-7faf-8b58-bd82cdfa2e75/templates');curl_setopt_array($ch, [ CURLOPT_CUSTOMREQUEST => 'POST', CURLOPT_HTTPHEADER => [ 'X-Sooquna-Access-Token: ' . getenv('SOOQUNA_TOKEN'), 'Content-Type: application/json', ], CURLOPT_RETURNTRANSFER => true, CURLOPT_POSTFIELDS => json_encode(['type' => 'product', 'suffix' => 'gift'], JSON_UNESCAPED_UNICODE),]);$response = curl_exec($ch);$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);if ($status >= 300) { throw new RuntimeException("$status: $response");}$data = json_decode($response, true);print_r($data);package main
import ( "fmt" "io" "net/http" "os" "strings")
func main() { body := `{"type": "product", "suffix": "gift"}` req, err := http.NewRequest("POST", "https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-c29b-7faf-8b58-bd82cdfa2e75/templates", strings.NewReader(body)) if err != nil { panic(err) } req.Header.Set("X-Sooquna-Access-Token", os.Getenv("SOOQUNA_TOKEN")) req.Header.Set("Content-Type", "application/json") res, err := http.DefaultClient.Do(req) if err != nil { panic(err) } defer res.Body.Close() if res.StatusCode >= 300 { data, _ := io.ReadAll(res.Body) panic(fmt.Sprintf("%d: %s", res.StatusCode, data)) } data, _ := io.ReadAll(res.Body) fmt.Println(string(data))}using System.Text;
using var client = new HttpClient();var req = new HttpRequestMessage(HttpMethod.Post, "https://api.sooquna.com/admin/api/2026-10/themes/0193a1b2-c29b-7faf-8b58-bd82cdfa2e75/templates");req.Headers.Add("X-Sooquna-Access-Token", Environment.GetEnvironmentVariable("SOOQUNA_TOKEN"));req.Content = new StringContent("""{"type": "product", "suffix": "gift"}""", Encoding.UTF8, "application/json");var res = await client.SendAsync(req);if (!res.IsSuccessStatusCode) throw new Exception($"{(int)res.StatusCode}: {await res.Content.ReadAsStringAsync()}");Console.WriteLine(await res.Content.ReadAsStringAsync());Was this page helpful?

