Marketplace

Publish an item to organization and/or marketplace

POST
/api/marketplace/publish

Publish a prompt or template to the caller's organization scope, the global marketplace scope, or both. Admin/Superadmin only; rejects duplicate publications of the same itemId.

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/api/marketplace/publish" \  -H "Content-Type: application/json" \  -d '{    "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"      }    ]  }}