Metaobjects
Metafields, their definitions, and metaobjects. 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 |
|---|---|---|
| Create a custom field definition | POST | /metafield-definitions |
| List custom field definitions | GET | /metafield-definitions |
| Update a custom field definition | PATCH | /metafield-definitions/{id} |
| Set custom field values | PUT | /metafields |
| List a resource’s custom field values | GET | /metafields |
| Delete a custom field definition | DELETE | /metafield-definitions/{id} |
| Create a custom content type | POST | /metaobject-definitions |
| List custom content types | GET | /metaobject-definitions |
| Update a custom content type | PUT | /metaobject-definitions/{id} |
| Create a custom content entry | POST | /metaobjects |
| List custom content entries | GET | /metaobjects |
| Get a custom content entry | GET | /metaobjects/{id} |
| Update a custom content entry | PUT | /metaobjects/{id} |
| Delete a custom content entry | DELETE | /metaobjects/{id} |
| Delete a custom content type | DELETE | /metaobject-definitions/{id} |
Create a custom field definition
Section titled “Create a custom field definition”POST /metafield-definitions · Scope: write_metaobjects
curl -X POST "https://api.sooquna.com/admin/api/2026-10/metafield-definitions" \ -H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "owner_type": "product", "namespace": "custom", "key": "fabric", "name": "Fabric", "type": "single_line_text", "storefront_access": true}'const res = await fetch("https://api.sooquna.com/admin/api/2026-10/metafield-definitions", { method: "POST", headers: { "X-Sooquna-Access-Token": process.env.SOOQUNA_TOKEN, "Content-Type": "application/json", }, body: JSON.stringify({ "owner_type": "product", "namespace": "custom", "key": "fabric", "name": "Fabric", "type": "single_line_text", "storefront_access": 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.post( "https://api.sooquna.com/admin/api/2026-10/metafield-definitions", headers={ "X-Sooquna-Access-Token": os.environ["SOOQUNA_TOKEN"], }, json={ "owner_type": "product", "namespace": "custom", "key": "fabric", "name": "Fabric", "type": "single_line_text", "storefront_access": True, },)res.raise_for_status()print(res.json())<?php$ch = curl_init('https://api.sooquna.com/admin/api/2026-10/metafield-definitions');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([ 'owner_type' => 'product', 'namespace' => 'custom', 'key' => 'fabric', 'name' => 'Fabric', 'type' => 'single_line_text', 'storefront_access' => 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 := `{ "owner_type": "product", "namespace": "custom", "key": "fabric", "name": "Fabric", "type": "single_line_text", "storefront_access": true}` req, err := http.NewRequest("POST", "https://api.sooquna.com/admin/api/2026-10/metafield-definitions", 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/metafield-definitions");req.Headers.Add("X-Sooquna-Access-Token", Environment.GetEnvironmentVariable("SOOQUNA_TOKEN"));req.Content = new StringContent("""{ "owner_type": "product", "namespace": "custom", "key": "fabric", "name": "Fabric", "type": "single_line_text", "storefront_access": 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());Response 201
{ "description": "", "id": "0193a1b2-c3d4-7e5f-8a6b-000000000031", "key": "fabric", "name": "Fabric", "namespace": "custom", "owner_type": "product", "pinned_position": null, "storefront_access": true, "type": "single_line_text", "updated_at": "2026-10-18T09:30:00Z", "validations": {}, "version": 1}List custom field definitions
Section titled “List custom field definitions”GET /metafield-definitions · Scope: read_metaobjects
| Parameter | In | Description |
|---|---|---|
owner_type |
query | For example product. |
curl -X GET "https://api.sooquna.com/admin/api/2026-10/metafield-definitions?owner_type=product" \ -H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN"const res = await fetch("https://api.sooquna.com/admin/api/2026-10/metafield-definitions?owner_type=product", { 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/metafield-definitions?owner_type=product", 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/metafield-definitions?owner_type=product');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/metafield-definitions?owner_type=product", 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/metafield-definitions?owner_type=product");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": [ { "description": "", "id": "0193a1b2-c3d4-7e5f-8a6b-000000000031", "key": "fabric", "name": "Fabric", "namespace": "custom", "owner_type": "product", "pinned_position": null, "storefront_access": true, "type": "single_line_text", "updated_at": "2026-10-18T09:30:00Z", "validations": {}, "version": 1 } ]}Update a custom field definition
Section titled “Update a custom field definition”PATCH /metafield-definitions/{id} · Scope: write_metaobjects
| Parameter | In | Description |
|---|---|---|
id |
path | The resource’s ID. |
curl -X PATCH "https://api.sooquna.com/admin/api/2026-10/metafield-definitions/0193a1b2-c3d4-7e5f-8a6b-000000000031" \ -H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "owner_type": "product", "namespace": "custom", "key": "fabric", "name": "Fabric and care", "type": "single_line_text", "storefront_access": true, "version": 1}'const res = await fetch("https://api.sooquna.com/admin/api/2026-10/metafield-definitions/0193a1b2-c3d4-7e5f-8a6b-000000000031", { method: "PATCH", headers: { "X-Sooquna-Access-Token": process.env.SOOQUNA_TOKEN, "Content-Type": "application/json", }, body: JSON.stringify({ "owner_type": "product", "namespace": "custom", "key": "fabric", "name": "Fabric and care", "type": "single_line_text", "storefront_access": true, "version": 1 }),});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/metafield-definitions/0193a1b2-c3d4-7e5f-8a6b-000000000031", headers={ "X-Sooquna-Access-Token": os.environ["SOOQUNA_TOKEN"], }, json={ "owner_type": "product", "namespace": "custom", "key": "fabric", "name": "Fabric and care", "type": "single_line_text", "storefront_access": True, "version": 1, },)res.raise_for_status()print(res.json())<?php$ch = curl_init('https://api.sooquna.com/admin/api/2026-10/metafield-definitions/0193a1b2-c3d4-7e5f-8a6b-000000000031');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([ 'owner_type' => 'product', 'namespace' => 'custom', 'key' => 'fabric', 'name' => 'Fabric and care', 'type' => 'single_line_text', 'storefront_access' => true, 'version' => 1, ], 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 := `{ "owner_type": "product", "namespace": "custom", "key": "fabric", "name": "Fabric and care", "type": "single_line_text", "storefront_access": true, "version": 1}` req, err := http.NewRequest("PATCH", "https://api.sooquna.com/admin/api/2026-10/metafield-definitions/0193a1b2-c3d4-7e5f-8a6b-000000000031", 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/metafield-definitions/0193a1b2-c3d4-7e5f-8a6b-000000000031");req.Headers.Add("X-Sooquna-Access-Token", Environment.GetEnvironmentVariable("SOOQUNA_TOKEN"));req.Content = new StringContent("""{ "owner_type": "product", "namespace": "custom", "key": "fabric", "name": "Fabric and care", "type": "single_line_text", "storefront_access": true, "version": 1}""", 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 200
{ "description": "", "id": "0193a1b2-c3d4-7e5f-8a6b-000000000031", "key": "fabric", "name": "Fabric and care", "namespace": "custom", "owner_type": "product", "pinned_position": null, "storefront_access": true, "type": "single_line_text", "updated_at": "2026-10-18T09:30:00Z", "validations": {}, "version": 2}Set custom field values
Section titled “Set custom field values”PUT /metafields · Scope: write_metaobjects
A null value deletes the field.
curl -X PUT "https://api.sooquna.com/admin/api/2026-10/metafields" \ -H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "owner_type": "product", "owner_id": "0193a1b2-c3d4-7e5f-8a6b-000000000005", "metafields": [{"namespace": "custom", "key": "fabric", "value": "\"100% linen\""}]}'const res = await fetch("https://api.sooquna.com/admin/api/2026-10/metafields", { method: "PUT", headers: { "X-Sooquna-Access-Token": process.env.SOOQUNA_TOKEN, "Content-Type": "application/json", }, body: JSON.stringify({ "owner_type": "product", "owner_id": "0193a1b2-c3d4-7e5f-8a6b-000000000005", "metafields": [{"namespace": "custom", "key": "fabric", "value": "\"100% linen\""}] }),});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/metafields", headers={ "X-Sooquna-Access-Token": os.environ["SOOQUNA_TOKEN"], }, json={ "owner_type": "product", "owner_id": "0193a1b2-c3d4-7e5f-8a6b-000000000005", "metafields": [ { "namespace": "custom", "key": "fabric", "value": "\"100% linen\"", }, ], },)res.raise_for_status()print(res.json())<?php$ch = curl_init('https://api.sooquna.com/admin/api/2026-10/metafields');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([ 'owner_type' => 'product', 'owner_id' => '0193a1b2-c3d4-7e5f-8a6b-000000000005', 'metafields' => [ [ 'namespace' => 'custom', 'key' => 'fabric', 'value' => '"100% linen"', ], ], ], 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 := `{ "owner_type": "product", "owner_id": "0193a1b2-c3d4-7e5f-8a6b-000000000005", "metafields": [{"namespace": "custom", "key": "fabric", "value": "\"100% linen\""}]}` req, err := http.NewRequest("PUT", "https://api.sooquna.com/admin/api/2026-10/metafields", 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/metafields");req.Headers.Add("X-Sooquna-Access-Token", Environment.GetEnvironmentVariable("SOOQUNA_TOKEN"));req.Content = new StringContent("""{ "owner_type": "product", "owner_id": "0193a1b2-c3d4-7e5f-8a6b-000000000005", "metafields": [{"namespace": "custom", "key": "fabric", "value": "\"100% linen\""}]}""", 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 200
{ "data": [ { "id": "0193a1b2-c3d4-7e5f-8a6b-000000000032", "key": "fabric", "namespace": "custom", "type": "single_line_text", "updated_at": "2026-10-18T09:30:00Z", "value": "\"100% linen\"" } ]}List a resource’s custom field values
Section titled “List a resource’s custom field values”GET /metafields · Scope: read_metaobjects
| Parameter | In | Description |
|---|---|---|
owner_type |
query | For example product. |
owner_id |
query | An ID, as in the example. |
curl -X GET "https://api.sooquna.com/admin/api/2026-10/metafields?owner_type=product&owner_id=0193a1b2-c3d4-7e5f-8a6b-000000000005" \ -H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN"const res = await fetch("https://api.sooquna.com/admin/api/2026-10/metafields?owner_type=product&owner_id=0193a1b2-c3d4-7e5f-8a6b-000000000005", { 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/metafields?owner_type=product&owner_id=0193a1b2-c3d4-7e5f-8a6b-000000000005", 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/metafields?owner_type=product&owner_id=0193a1b2-c3d4-7e5f-8a6b-000000000005');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/metafields?owner_type=product&owner_id=0193a1b2-c3d4-7e5f-8a6b-000000000005", 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/metafields?owner_type=product&owner_id=0193a1b2-c3d4-7e5f-8a6b-000000000005");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": [ { "id": "0193a1b2-c3d4-7e5f-8a6b-000000000032", "key": "fabric", "namespace": "custom", "type": "single_line_text", "updated_at": "2026-10-18T09:30:00Z", "value": "\"100% linen\"" } ]}Delete a custom field definition
Section titled “Delete a custom field definition”DELETE /metafield-definitions/{id} · Scope: write_metaobjects
| Parameter | In | Description |
|---|---|---|
id |
path | The resource’s ID. |
curl -X DELETE "https://api.sooquna.com/admin/api/2026-10/metafield-definitions/0193a1b2-c3d4-7e5f-8a6b-000000000031" \ -H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN"const res = await fetch("https://api.sooquna.com/admin/api/2026-10/metafield-definitions/0193a1b2-c3d4-7e5f-8a6b-000000000031", { 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/metafield-definitions/0193a1b2-c3d4-7e5f-8a6b-000000000031", 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/metafield-definitions/0193a1b2-c3d4-7e5f-8a6b-000000000031');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/metafield-definitions/0193a1b2-c3d4-7e5f-8a6b-000000000031", 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/metafield-definitions/0193a1b2-c3d4-7e5f-8a6b-000000000031");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 204
{}Create a custom content type
Section titled “Create a custom content type”POST /metaobject-definitions · Scope: write_metaobjects
curl -X POST "https://api.sooquna.com/admin/api/2026-10/metaobject-definitions" \ -H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "type": "designer", "name": "Designer", "fields": [ { "key": "name", "name": "Name", "type": "single_line_text", "required": true }, {"key": "city", "name": "City", "type": "single_line_text"} ], "display_name_field": "name", "capabilities": {"publishable": true, "renderable": true, "translatable": true}}'const res = await fetch("https://api.sooquna.com/admin/api/2026-10/metaobject-definitions", { method: "POST", headers: { "X-Sooquna-Access-Token": process.env.SOOQUNA_TOKEN, "Content-Type": "application/json", }, body: JSON.stringify({ "type": "designer", "name": "Designer", "fields": [ { "key": "name", "name": "Name", "type": "single_line_text", "required": true }, {"key": "city", "name": "City", "type": "single_line_text"} ], "display_name_field": "name", "capabilities": {"publishable": true, "renderable": true, "translatable": 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.post( "https://api.sooquna.com/admin/api/2026-10/metaobject-definitions", headers={ "X-Sooquna-Access-Token": os.environ["SOOQUNA_TOKEN"], }, json={ "type": "designer", "name": "Designer", "fields": [ { "key": "name", "name": "Name", "type": "single_line_text", "required": True, }, {"key": "city", "name": "City", "type": "single_line_text"}, ], "display_name_field": "name", "capabilities": {"publishable": True, "renderable": True, "translatable": True}, },)res.raise_for_status()print(res.json())<?php$ch = curl_init('https://api.sooquna.com/admin/api/2026-10/metaobject-definitions');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' => 'designer', 'name' => 'Designer', 'fields' => [ [ 'key' => 'name', 'name' => 'Name', 'type' => 'single_line_text', 'required' => true, ], [ 'key' => 'city', 'name' => 'City', 'type' => 'single_line_text', ], ], 'display_name_field' => 'name', 'capabilities' => [ 'publishable' => true, 'renderable' => true, 'translatable' => 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 := `{ "type": "designer", "name": "Designer", "fields": [ { "key": "name", "name": "Name", "type": "single_line_text", "required": true }, {"key": "city", "name": "City", "type": "single_line_text"} ], "display_name_field": "name", "capabilities": {"publishable": true, "renderable": true, "translatable": true}}` req, err := http.NewRequest("POST", "https://api.sooquna.com/admin/api/2026-10/metaobject-definitions", 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/metaobject-definitions");req.Headers.Add("X-Sooquna-Access-Token", Environment.GetEnvironmentVariable("SOOQUNA_TOKEN"));req.Content = new StringContent("""{ "type": "designer", "name": "Designer", "fields": [ { "key": "name", "name": "Name", "type": "single_line_text", "required": true }, {"key": "city", "name": "City", "type": "single_line_text"} ], "display_name_field": "name", "capabilities": {"publishable": true, "renderable": true, "translatable": 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());Response 201
{ "capabilities": {"publishable": true, "renderable": true, "translatable": true}, "description": "", "display_name_field": "name", "entries_count": 0, "fields": [ { "key": "name", "name": "Name", "required": true, "type": "single_line_text", "validations": {} }, { "key": "city", "name": "City", "required": false, "type": "single_line_text", "validations": {} } ], "id": "0193a1b2-c3d4-7e5f-8a6b-000000000033", "name": "Designer", "storefront_access": false, "type": "designer", "version": 1}List custom content types
Section titled “List custom content types”GET /metaobject-definitions · Scope: read_metaobjects
curl -X GET "https://api.sooquna.com/admin/api/2026-10/metaobject-definitions" \ -H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN"const res = await fetch("https://api.sooquna.com/admin/api/2026-10/metaobject-definitions", { 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/metaobject-definitions", 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/metaobject-definitions');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/metaobject-definitions", 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/metaobject-definitions");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": [ { "capabilities": {"publishable": true, "renderable": true, "translatable": true}, "description": "", "display_name_field": "name", "entries_count": 0, "fields": [ { "key": "name", "name": "Name", "required": true, "type": "single_line_text", "validations": {} }, { "key": "city", "name": "City", "required": false, "type": "single_line_text", "validations": {} } ], "id": "0193a1b2-c3d4-7e5f-8a6b-000000000033", "name": "Designer", "storefront_access": false, "type": "designer", "version": 1 } ]}Update a custom content type
Section titled “Update a custom content type”PUT /metaobject-definitions/{id} · Scope: write_metaobjects
| Parameter | In | Description |
|---|---|---|
id |
path | The resource’s ID. |
curl -X PUT "https://api.sooquna.com/admin/api/2026-10/metaobject-definitions/0193a1b2-c3d4-7e5f-8a6b-000000000033" \ -H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "type": "designer", "name": "Designers", "fields": [ { "key": "name", "name": "Name", "type": "single_line_text", "required": true }, {"key": "city", "name": "City", "type": "single_line_text"} ], "display_name_field": "name", "capabilities": {"publishable": true, "renderable": true, "translatable": true}, "version": 1}'const res = await fetch("https://api.sooquna.com/admin/api/2026-10/metaobject-definitions/0193a1b2-c3d4-7e5f-8a6b-000000000033", { method: "PUT", headers: { "X-Sooquna-Access-Token": process.env.SOOQUNA_TOKEN, "Content-Type": "application/json", }, body: JSON.stringify({ "type": "designer", "name": "Designers", "fields": [ { "key": "name", "name": "Name", "type": "single_line_text", "required": true }, {"key": "city", "name": "City", "type": "single_line_text"} ], "display_name_field": "name", "capabilities": {"publishable": true, "renderable": true, "translatable": true}, "version": 1 }),});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/metaobject-definitions/0193a1b2-c3d4-7e5f-8a6b-000000000033", headers={ "X-Sooquna-Access-Token": os.environ["SOOQUNA_TOKEN"], }, json={ "type": "designer", "name": "Designers", "fields": [ { "key": "name", "name": "Name", "type": "single_line_text", "required": True, }, {"key": "city", "name": "City", "type": "single_line_text"}, ], "display_name_field": "name", "capabilities": {"publishable": True, "renderable": True, "translatable": True}, "version": 1, },)res.raise_for_status()print(res.json())<?php$ch = curl_init('https://api.sooquna.com/admin/api/2026-10/metaobject-definitions/0193a1b2-c3d4-7e5f-8a6b-000000000033');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([ 'type' => 'designer', 'name' => 'Designers', 'fields' => [ [ 'key' => 'name', 'name' => 'Name', 'type' => 'single_line_text', 'required' => true, ], [ 'key' => 'city', 'name' => 'City', 'type' => 'single_line_text', ], ], 'display_name_field' => 'name', 'capabilities' => [ 'publishable' => true, 'renderable' => true, 'translatable' => true, ], 'version' => 1, ], 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": "designer", "name": "Designers", "fields": [ { "key": "name", "name": "Name", "type": "single_line_text", "required": true }, {"key": "city", "name": "City", "type": "single_line_text"} ], "display_name_field": "name", "capabilities": {"publishable": true, "renderable": true, "translatable": true}, "version": 1}` req, err := http.NewRequest("PUT", "https://api.sooquna.com/admin/api/2026-10/metaobject-definitions/0193a1b2-c3d4-7e5f-8a6b-000000000033", 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/metaobject-definitions/0193a1b2-c3d4-7e5f-8a6b-000000000033");req.Headers.Add("X-Sooquna-Access-Token", Environment.GetEnvironmentVariable("SOOQUNA_TOKEN"));req.Content = new StringContent("""{ "type": "designer", "name": "Designers", "fields": [ { "key": "name", "name": "Name", "type": "single_line_text", "required": true }, {"key": "city", "name": "City", "type": "single_line_text"} ], "display_name_field": "name", "capabilities": {"publishable": true, "renderable": true, "translatable": true}, "version": 1}""", 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 200
{ "capabilities": {"publishable": true, "renderable": true, "translatable": true}, "description": "", "display_name_field": "name", "entries_count": 0, "fields": [ { "key": "name", "name": "Name", "required": true, "type": "single_line_text", "validations": {} }, { "key": "city", "name": "City", "required": false, "type": "single_line_text", "validations": {} } ], "id": "0193a1b2-c3d4-7e5f-8a6b-000000000033", "name": "Designers", "storefront_access": false, "type": "designer", "version": 2}Create a custom content entry
Section titled “Create a custom content entry”POST /metaobjects · Scope: write_metaobjects
curl -X POST "https://api.sooquna.com/admin/api/2026-10/metaobjects" \ -H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "type": "designer", "handle": "layla-ahmad", "status": "active", "fields": {"name": "\"Layla Ahmad\"", "city": "\"Doha\""}}'const res = await fetch("https://api.sooquna.com/admin/api/2026-10/metaobjects", { method: "POST", headers: { "X-Sooquna-Access-Token": process.env.SOOQUNA_TOKEN, "Content-Type": "application/json", }, body: JSON.stringify({ "type": "designer", "handle": "layla-ahmad", "status": "active", "fields": {"name": "\"Layla Ahmad\"", "city": "\"Doha\""} }),});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/metaobjects", headers={ "X-Sooquna-Access-Token": os.environ["SOOQUNA_TOKEN"], }, json={ "type": "designer", "handle": "layla-ahmad", "status": "active", "fields": {"name": "\"Layla Ahmad\"", "city": "\"Doha\""}, },)res.raise_for_status()print(res.json())<?php$ch = curl_init('https://api.sooquna.com/admin/api/2026-10/metaobjects');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' => 'designer', 'handle' => 'layla-ahmad', 'status' => 'active', 'fields' => ['name' => '"Layla Ahmad"', 'city' => '"Doha"'], ], 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": "designer", "handle": "layla-ahmad", "status": "active", "fields": {"name": "\"Layla Ahmad\"", "city": "\"Doha\""}}` req, err := http.NewRequest("POST", "https://api.sooquna.com/admin/api/2026-10/metaobjects", 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/metaobjects");req.Headers.Add("X-Sooquna-Access-Token", Environment.GetEnvironmentVariable("SOOQUNA_TOKEN"));req.Content = new StringContent("""{ "type": "designer", "handle": "layla-ahmad", "status": "active", "fields": {"name": "\"Layla Ahmad\"", "city": "\"Doha\""}}""", 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
{ "display_name": "\"Layla Ahmad\"", "fields": {"city": "\"Doha\"", "name": "\"Layla Ahmad\""}, "handle": "layla-ahmad", "id": "0193a1b2-c3d4-7e5f-8a6b-000000000034", "status": "active", "type": "designer", "updated_at": "2026-10-18T09:30:00Z", "version": 1}List custom content entries
Section titled “List custom content entries”GET /metaobjects · Scope: read_metaobjects
| Parameter | In | Description |
|---|---|---|
type |
query | For example designer. |
curl -X GET "https://api.sooquna.com/admin/api/2026-10/metaobjects?type=designer" \ -H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN"const res = await fetch("https://api.sooquna.com/admin/api/2026-10/metaobjects?type=designer", { 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/metaobjects?type=designer", 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/metaobjects?type=designer');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/metaobjects?type=designer", 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/metaobjects?type=designer");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": [ { "display_name": "\"Layla Ahmad\"", "fields": {"city": "\"Doha\"", "name": "\"Layla Ahmad\""}, "handle": "layla-ahmad", "id": "0193a1b2-c3d4-7e5f-8a6b-000000000034", "status": "active", "type": "designer", "updated_at": "2026-10-18T09:30:00Z", "version": 1 } ], "page_info": {"has_next_page": false}}Get a custom content entry
Section titled “Get a custom content entry”GET /metaobjects/{id} · Scope: read_metaobjects
| Parameter | In | Description |
|---|---|---|
id |
path | The resource’s ID. |
curl -X GET "https://api.sooquna.com/admin/api/2026-10/metaobjects/0193a1b2-c3d4-7e5f-8a6b-000000000034" \ -H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN"const res = await fetch("https://api.sooquna.com/admin/api/2026-10/metaobjects/0193a1b2-c3d4-7e5f-8a6b-000000000034", { 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/metaobjects/0193a1b2-c3d4-7e5f-8a6b-000000000034", 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/metaobjects/0193a1b2-c3d4-7e5f-8a6b-000000000034');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/metaobjects/0193a1b2-c3d4-7e5f-8a6b-000000000034", 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/metaobjects/0193a1b2-c3d4-7e5f-8a6b-000000000034");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
{ "display_name": "\"Layla Ahmad\"", "fields": {"city": "\"Doha\"", "name": "\"Layla Ahmad\""}, "handle": "layla-ahmad", "id": "0193a1b2-c3d4-7e5f-8a6b-000000000034", "status": "active", "type": "designer", "updated_at": "2026-10-18T09:30:00Z", "version": 1}Update a custom content entry
Section titled “Update a custom content entry”PUT /metaobjects/{id} · Scope: write_metaobjects
| Parameter | In | Description |
|---|---|---|
id |
path | The resource’s ID. |
curl -X PUT "https://api.sooquna.com/admin/api/2026-10/metaobjects/0193a1b2-c3d4-7e5f-8a6b-000000000034" \ -H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "handle": "layla-ahmad", "status": "active", "fields": {"name": "\"Layla Ahmad\"", "city": "\"Lusail\""}, "version": 1}'const res = await fetch("https://api.sooquna.com/admin/api/2026-10/metaobjects/0193a1b2-c3d4-7e5f-8a6b-000000000034", { method: "PUT", headers: { "X-Sooquna-Access-Token": process.env.SOOQUNA_TOKEN, "Content-Type": "application/json", }, body: JSON.stringify({ "handle": "layla-ahmad", "status": "active", "fields": {"name": "\"Layla Ahmad\"", "city": "\"Lusail\""}, "version": 1 }),});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/metaobjects/0193a1b2-c3d4-7e5f-8a6b-000000000034", headers={ "X-Sooquna-Access-Token": os.environ["SOOQUNA_TOKEN"], }, json={ "handle": "layla-ahmad", "status": "active", "fields": {"name": "\"Layla Ahmad\"", "city": "\"Lusail\""}, "version": 1, },)res.raise_for_status()print(res.json())<?php$ch = curl_init('https://api.sooquna.com/admin/api/2026-10/metaobjects/0193a1b2-c3d4-7e5f-8a6b-000000000034');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([ 'handle' => 'layla-ahmad', 'status' => 'active', 'fields' => ['name' => '"Layla Ahmad"', 'city' => '"Lusail"'], 'version' => 1, ], 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 := `{ "handle": "layla-ahmad", "status": "active", "fields": {"name": "\"Layla Ahmad\"", "city": "\"Lusail\""}, "version": 1}` req, err := http.NewRequest("PUT", "https://api.sooquna.com/admin/api/2026-10/metaobjects/0193a1b2-c3d4-7e5f-8a6b-000000000034", 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/metaobjects/0193a1b2-c3d4-7e5f-8a6b-000000000034");req.Headers.Add("X-Sooquna-Access-Token", Environment.GetEnvironmentVariable("SOOQUNA_TOKEN"));req.Content = new StringContent("""{ "handle": "layla-ahmad", "status": "active", "fields": {"name": "\"Layla Ahmad\"", "city": "\"Lusail\""}, "version": 1}""", 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 200
{ "display_name": "\"Layla Ahmad\"", "fields": {"city": "\"Lusail\"", "name": "\"Layla Ahmad\""}, "handle": "layla-ahmad", "id": "0193a1b2-c3d4-7e5f-8a6b-000000000034", "status": "active", "type": "designer", "updated_at": "2026-10-18T09:30:00Z", "version": 2}Delete a custom content entry
Section titled “Delete a custom content entry”DELETE /metaobjects/{id} · Scope: write_metaobjects
| Parameter | In | Description |
|---|---|---|
id |
path | The resource’s ID. |
curl -X DELETE "https://api.sooquna.com/admin/api/2026-10/metaobjects/0193a1b2-c3d4-7e5f-8a6b-000000000034" \ -H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN"const res = await fetch("https://api.sooquna.com/admin/api/2026-10/metaobjects/0193a1b2-c3d4-7e5f-8a6b-000000000034", { 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/metaobjects/0193a1b2-c3d4-7e5f-8a6b-000000000034", 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/metaobjects/0193a1b2-c3d4-7e5f-8a6b-000000000034');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/metaobjects/0193a1b2-c3d4-7e5f-8a6b-000000000034", 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/metaobjects/0193a1b2-c3d4-7e5f-8a6b-000000000034");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 204
{}Delete a custom content type
Section titled “Delete a custom content type”DELETE /metaobject-definitions/{id} · Scope: write_metaobjects
| Parameter | In | Description |
|---|---|---|
id |
path | The resource’s ID. |
curl -X DELETE "https://api.sooquna.com/admin/api/2026-10/metaobject-definitions/0193a1b2-c3d4-7e5f-8a6b-000000000033" \ -H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN"const res = await fetch("https://api.sooquna.com/admin/api/2026-10/metaobject-definitions/0193a1b2-c3d4-7e5f-8a6b-000000000033", { 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/metaobject-definitions/0193a1b2-c3d4-7e5f-8a6b-000000000033", 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/metaobject-definitions/0193a1b2-c3d4-7e5f-8a6b-000000000033');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/metaobject-definitions/0193a1b2-c3d4-7e5f-8a6b-000000000033", 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/metaobject-definitions/0193a1b2-c3d4-7e5f-8a6b-000000000033");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 204
{}Was this page helpful?

