Update publish settings for a marketplace item
curl --request PATCH \
--url https://your-instance.example.com/api/marketplace/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"shareType": "reference",
"isContentVisible": true,
"allowEditableReferences": true
}
'import requests
url = "https://your-instance.example.com/api/marketplace/{id}"
payload = {
"shareType": "reference",
"isContentVisible": True,
"allowEditableReferences": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({shareType: 'reference', isContentVisible: true, allowEditableReferences: true})
};
fetch('https://your-instance.example.com/api/marketplace/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://your-instance.example.com/api/marketplace/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'shareType' => 'reference',
'isContentVisible' => true,
'allowEditableReferences' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://your-instance.example.com/api/marketplace/{id}"
payload := strings.NewReader("{\n \"shareType\": \"reference\",\n \"isContentVisible\": true,\n \"allowEditableReferences\": true\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://your-instance.example.com/api/marketplace/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"shareType\": \"reference\",\n \"isContentVisible\": true,\n \"allowEditableReferences\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://your-instance.example.com/api/marketplace/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"shareType\": \"reference\",\n \"isContentVisible\": true,\n \"allowEditableReferences\": true\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"marketplaceItem": {
"_id": "64d2f9c5e8a1d4e001a0b1c2",
"itemType": "prompt",
"itemId": "64a1b2c3d4e5f6001234567a",
"publishedBy": "64a1b2c3d4e5f60012345679",
"scope": "marketplace",
"shareType": "reference",
"allowEditableReferences": false,
"isContentVisible": true,
"name": "Maple Court — Tour Confirm",
"status": "active",
"usageCount": 12
}
}
}{
"error": "Marketplace item not found"
}{
"error": "Marketplace item not found"
}{
"error": "Marketplace item not found"
}Marketplace
Update publish settings for a marketplace item
Patch shareType, isContentVisible, and allowEditableReferences on an existing PublishedItem. Admin/Superadmin only and the caller must be the original publisher (Superadmin override).
PATCH
/
api
/
marketplace
/
{id}
Update publish settings for a marketplace item
curl --request PATCH \
--url https://your-instance.example.com/api/marketplace/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"shareType": "reference",
"isContentVisible": true,
"allowEditableReferences": true
}
'import requests
url = "https://your-instance.example.com/api/marketplace/{id}"
payload = {
"shareType": "reference",
"isContentVisible": True,
"allowEditableReferences": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({shareType: 'reference', isContentVisible: true, allowEditableReferences: true})
};
fetch('https://your-instance.example.com/api/marketplace/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://your-instance.example.com/api/marketplace/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'shareType' => 'reference',
'isContentVisible' => true,
'allowEditableReferences' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://your-instance.example.com/api/marketplace/{id}"
payload := strings.NewReader("{\n \"shareType\": \"reference\",\n \"isContentVisible\": true,\n \"allowEditableReferences\": true\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://your-instance.example.com/api/marketplace/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"shareType\": \"reference\",\n \"isContentVisible\": true,\n \"allowEditableReferences\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://your-instance.example.com/api/marketplace/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"shareType\": \"reference\",\n \"isContentVisible\": true,\n \"allowEditableReferences\": true\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"marketplaceItem": {
"_id": "64d2f9c5e8a1d4e001a0b1c2",
"itemType": "prompt",
"itemId": "64a1b2c3d4e5f6001234567a",
"publishedBy": "64a1b2c3d4e5f60012345679",
"scope": "marketplace",
"shareType": "reference",
"allowEditableReferences": false,
"isContentVisible": true,
"name": "Maple Court — Tour Confirm",
"status": "active",
"usageCount": 12
}
}
}{
"error": "Marketplace item not found"
}{
"error": "Marketplace item not found"
}{
"error": "Marketplace item not found"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Body
application/json
reference (acquirer gets a live link) or copy (acquirer gets an editable duplicate).
Available options:
reference, copy When false, marketplace browsers see metadata only — body is hidden until acquired.
For reference listings on organization scope, allow acquirers to edit the linked item; only applied when shareType stays reference.
⌘I