Skip to main content
POST
/
api
/
v1
/
endpoints
/
{slug}
/
publish
curl --request POST \
  --url http://localhost:8080/api/v1/endpoints/legal-qa/publish \
  --header 'Authorization: Bearer YOUR_TOKEN' \
  --header 'Content-Type: application/json' \
  --data '{
    "marketplace_ids": [
      "123e4567-e89b-12d3-a456-426614174000",
      "223e4567-e89b-12d3-a456-426614174001"
    ],
    "publish_to_all_marketplaces": false
  }'
{
  "endpoint_slug": "legal-qa",
  "results": [
    {
      "marketplace_id": "123e4567-e89b-12d3-a456-426614174000",
      "marketplace_name": "Legal Services Marketplace",
      "success": true,
      "message": "Successfully published endpoint to marketplace",
      "error": null
    },
    {
      "marketplace_id": "223e4567-e89b-12d3-a456-426614174001",
      "marketplace_name": "Enterprise Marketplace",
      "success": true,
      "message": "Successfully published endpoint to marketplace",
      "error": null
    }
  ]
}
Publish an endpoint to one or more marketplaces, making it discoverable and accessible to users.
Publishing an endpoint makes it visible in the marketplace where users can discover and use it. You can publish to specific marketplaces or all active marketplaces at once.

Authentication

Requires tenant authentication via SyftBox token.

Path parameters

slug
string
required
The unique slug of the endpoint to publish.

Request body

marketplace_ids
array
default:"null"
Array of marketplace UUIDs to publish to. Required if publish_to_all_marketplaces is false.
publish_to_all_marketplaces
boolean
default:"false"
If true, publishes to all active marketplaces. Takes precedence over marketplace_ids.

Response

endpoint_slug
string
required
The slug of the published endpoint.
results
array
required
Results for each marketplace publish operation.
curl --request POST \
  --url http://localhost:8080/api/v1/endpoints/legal-qa/publish \
  --header 'Authorization: Bearer YOUR_TOKEN' \
  --header 'Content-Type: application/json' \
  --data '{
    "marketplace_ids": [
      "123e4567-e89b-12d3-a456-426614174000",
      "223e4567-e89b-12d3-a456-426614174001"
    ],
    "publish_to_all_marketplaces": false
  }'
{
  "endpoint_slug": "legal-qa",
  "results": [
    {
      "marketplace_id": "123e4567-e89b-12d3-a456-426614174000",
      "marketplace_name": "Legal Services Marketplace",
      "success": true,
      "message": "Successfully published endpoint to marketplace",
      "error": null
    },
    {
      "marketplace_id": "223e4567-e89b-12d3-a456-426614174001",
      "marketplace_name": "Enterprise Marketplace",
      "success": true,
      "message": "Successfully published endpoint to marketplace",
      "error": null
    }
  ]
}
Use publish_to_all_marketplaces: true when you want to make your endpoint available across all marketplaces without specifying each one individually.

Build docs developers (and LLMs) love