cURL
curl --request POST \ --url https://api.example.com/v1/organizations/{organizationId}/projects/{projectId}/content-types/{id}/publish
Publish a content type, creating a new version
{ "id": "ct123", "name": "Article", "description": "Standard article content type...", "status": "published", "version": 4, "lastPublishedVersion": 4, "layoutComponentId": "c123", "componentIdsAllowList": ["c124", "c125", "c126"], "packageVersion": "1.0.0", "schema": { ... }, "templateContentIds": ["cont123"], "permissions": { ... }, "metadata": { "author": "[email protected]", "tags": ["article"], "publishedAt": "2024-03-22T10:00:00Z", "publishedBy": "user123" }, "createdAt": "2024-03-20T10:00:00Z", "updatedAt": "2024-03-22T10:00:00Z" }
draft
published
modified
unpublished
deleted
{ "error": { "code": "INVALID_STATUS", "message": "Cannot publish content type with status: deleted" } }
{ "error": { "code": "VALIDATION_FAILED", "message": "Content type references components not in the specified package version", "details": { "invalidComponentIds": ["c999"] } } }
curl -X POST "https://api.metabind.ai/v1/organizations/org123/projects/proj456/content-types/ct123/publish" \ -H "Authorization: Bearer YOUR_API_KEY"