Skip to main content
POST
/
api
/
marketplace
/
publish
Publish an item to organization and/or marketplace
curl --request POST \
  --url https://your-instance.example.com/api/marketplace/publish \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "itemType": "prompt",
  "itemId": "5f7b1c2e8a1d4e0012c3b4a5",
  "scopes": {
    "organization": {
      "enabled": true,
      "shareType": "copy",
      "isContentVisible": true,
      "allowEditableReferences": false
    },
    "marketplace": {
      "enabled": false,
      "shareType": "reference",
      "isContentVisible": false,
      "allowEditableReferences": false
    }
  },
  "metadata": {
    "name": "Acme Inbound Triage Prompt",
    "description": "Routes inbound SMS to the right department.",
    "usageInformation": "Set the {{org_name}} variable before applying."
  }
}
'
{
  "success": true,
  "data": {
    "published": [
      {
        "id": "64d2f9c5e8a1d4e001a0b1c2",
        "scope": "organization",
        "shareType": "copy",
        "isContentVisible": true,
        "status": "active"
      },
      {
        "id": "64d2f9c5e8a1d4e001a0b1c3",
        "scope": "marketplace",
        "shareType": "reference",
        "isContentVisible": false,
        "status": "active"
      }
    ]
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
itemType
enum<string>
required

What's being published: prompt or template.

Available options:
prompt,
template
itemId
string
required

Mongo ObjectId of the source prompt or template the caller owns and wants to publish.

scopes
object
required

Per-scope publish settings (organization, marketplace) — each carries enabled, shareType, isContentVisible, allowEditableReferences.

metadata
object

Optional display overrides for the listing; when omitted the underlying item's own name/description are used.

Response

Item published

Returned after POST /api/marketplace/publish. published[] contains one summary per enabled scope.

success
enum<boolean>
required
Available options:
true
data
object
required