cURL
curl --request POST \ --url https://api.example.com/v1/organizations/{organizationId}/projects/{projectId}/content/{id}/publish
Publish content, creating a new version
{ "id": "cont123", "typeId": "ct123", "typeVersion": 2, "version": 3, "lastPublishedVersion": 3, "packageVersion": "1.0.0", "name": "Getting Started Guide", "status": "published", "isTemplate": false, "content": { ... }, "compiled": "const body = () => { ... }", "tags": ["Tutorial"], "metadata": { "author": "[email protected]", "publishedAt": "2024-03-21T10:00:00Z", "publishedBy": "user123", "locale": "en-US" }, "createdAt": "2024-03-20T10:00:00Z", "updatedAt": "2024-03-21T10:00:00Z" }
draft
published
modified
unpublished
deleted
{ "error": { "code": "INVALID_STATUS", "message": "Cannot publish content with status: deleted" } }
{ "error": { "code": "VALIDATION_FAILED", "message": "Content does not match current ContentType schema", "details": { "errors": [...] } } }
curl -X POST "https://api.metabind.ai/v1/organizations/org123/projects/proj456/content/cont123/publish" \ -H "Authorization: Bearer YOUR_API_KEY"