Publishing and the Marketplace
Once you have authored a template, you can share it in two ways: within your organization (instant) or to the public marketplace (requires platform admin approval). This page covers the publication flow, moderation, and how other organizations discover and launch your templates.
Visibility levels
Every template has a visibility field that controls who can see and launch it:
| Visibility | Who can launch | Publication flow |
|---|---|---|
private | Members of your organization only | Cannot be published |
org_shared | All members of your organization | Published immediately on request |
public | Any organization on the platform | Requires platform admin approval |
A template's visibility can be changed while it is in draft, rejected, or unpublished status.
Publication statuses
| Status | Meaning |
|---|---|
draft | Created but not yet published. Editable. |
submitted | Publish requested for a public template; awaiting admin review. |
approved | Approved by a platform admin (intermediate state). |
published | Live and launchable (by org members if org_shared, by anyone if public). |
rejected | Admin declined the public submission. Editable; you can revise and resubmit. |
unpublished | Previously published; withdrawn. Editable; can be republished. |
Sharing within your organization
Set visibility to org_shared (via PATCH if your template is still private), then publish:
# Set visibility
curl -X PATCH https://api.foundrydb.com/stacks/templates/$TEMPLATE_ID \
-H "Authorization: Bearer $FOUNDRYDB_TOKEN" \
-H "Content-Type: application/json" \
-d '{"visibility": "org_shared"}'
# Publish immediately
curl -X POST https://api.foundrydb.com/stacks/templates/$TEMPLATE_ID/publish \
-H "Authorization: Bearer $FOUNDRYDB_TOKEN"
The template moves to published status immediately. Every member of your organization can now launch it by passing template_id to POST /stacks.
Submitting to the public marketplace
Set visibility to public, then publish. Unlike org_shared, a public template enters the platform moderation queue and is launchable by other organizations only once a platform admin approves it.
# Set visibility to public
curl -X PATCH https://api.foundrydb.com/stacks/templates/$TEMPLATE_ID \
-H "Authorization: Bearer $FOUNDRYDB_TOKEN" \
-H "Content-Type: application/json" \
-d '{"visibility": "public"}'
# Submit for moderation
curl -X POST https://api.foundrydb.com/stacks/templates/$TEMPLATE_ID/publish \
-H "Authorization: Bearer $FOUNDRYDB_TOKEN"
The template moves to submitted status. Track its progress:
curl https://api.foundrydb.com/stacks/templates/$TEMPLATE_ID \
-H "Authorization: Bearer $FOUNDRYDB_TOKEN"
Once publication_status reaches published, the template appears in the marketplace and any authenticated organization can launch it.
If the submission is rejected, publication_status becomes rejected and moderation_reason contains the reviewer's note. Revise the template (it becomes editable again) and resubmit.
Publish rate limit
An organization can initiate at most 20 publication requests per hour. Exceeding this returns 429 Too Many Requests. The limit applies to all publish attempts from the organization combined.
Unpublishing
Unpublishing stops new launches from your template. Stacks already launched from it continue to run on their own snapshotted descriptor.
curl -X POST https://api.foundrydb.com/stacks/templates/$TEMPLATE_ID/unpublish \
-H "Authorization: Bearer $FOUNDRYDB_TOKEN"
The template moves to unpublished status. You can edit it and republish.
Listing your templates
To see all templates your organization owns, regardless of status:
curl https://api.foundrydb.com/stacks/templates/mine \
-H "Authorization: Bearer $FOUNDRYDB_TOKEN"
This returns draft, submitted, published, rejected, and unpublished templates together.
Browsing the marketplace
To see templates published publicly by other organizations:
curl https://api.foundrydb.com/stacks/templates/marketplace \
-H "Authorization: Bearer $FOUNDRYDB_TOKEN"
Each entry is a CustomStackTemplate with the descriptor, the publisher's organization ID, and the template version.
Launching a marketplace template
Once you find a marketplace template you want to use, preview and launch it by passing its template_id:
# Preview cost
curl -X POST https://api.foundrydb.com/stacks/preview \
-H "Authorization: Bearer $FOUNDRYDB_TOKEN" \
-H "Content-Type: application/json" \
-d '{"template_id": "'$TEMPLATE_ID'"}'
# Launch
curl -X POST https://api.foundrydb.com/stacks \
-H "Authorization: Bearer $FOUNDRYDB_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "my-stack",
"template_id": "'$TEMPLATE_ID'",
"accepted_monthly_cost": 42.00
}'
The launched stack records source_template_id and source_publisher_org_id as provenance fields. Stacks you launch from marketplace templates are your own resources; they are not affected if the publisher later unpublishes or modifies the template.
Admin moderation
Platform admins use three endpoints to manage public marketplace submissions:
# List templates awaiting review
GET /admin/stack-templates/pending
# Approve a submitted template (makes it publicly launchable)
POST /admin/stack-templates/{template-id}/approve
# Reject a submission (returns it to the author with a reason)
POST /admin/stack-templates/{template-id}/reject
{"reason": "Template references a disallowed image registry."}
# Force-unpublish a live public template
POST /admin/stack-templates/{template-id}/takedown
{"reason": "Security issue in the published image."}
All admin endpoints require platform-admin access and return 403 Forbidden otherwise. Running stacks are unaffected by admin takedowns; only new launches from that template are stopped.