cURL
curl --request POST \ --url https://api.example.com/v1/organizations/{organizationId}/projects/{projectId}/content \ --header 'Content-Type: application/json' \ --data ' { "typeId": "<string>", "name": "<string>", "description": "<string>", "isTemplate": true, "content": {}, "tags": [ "<string>" ], "folderId": "<string>", "metadata": { "metadata.locale": "<string>" } } '
Create a new content item
Show properties
{ "typeId": "ct123", "name": "Getting Started Guide", "description": "Getting Started with Metabind. A comprehensive guide for new users.\n\n**Topics:** Technology, Platform Overview\n**Key points:** Platform basics, core features\n**Length:** ~1500 words\n**Language:** English", "isTemplate": false, "content": { "title": "Getting Started with Metabind", "subtitle": "Your journey begins here", "author": "Documentation Team", "heroImage": "asset999", "components": [ { "type": "ArticleParagraph", "text": "Welcome to Metabind! This guide will help you get started..." }, { "type": "ArticleHeading", "text": "First Steps", "level": 2 } ] }, "tags": ["Tutorial"], "metadata": { "locale": "en-US" } }
packageVersion
{ "id": "cont125", "typeId": "ct123", "typeVersion": 2, "version": null, "lastPublishedVersion": null, "packageVersion": "1.0.0", "name": "Getting Started Guide", "description": "Getting Started with Metabind...", "status": "draft", "isTemplate": false, "content": { "title": "Getting Started with Metabind", "subtitle": "Your journey begins here", "author": "Documentation Team", "heroImage": "asset999", "components": [...] }, "compiled": "const body = () => { ... }", "tags": ["Tutorial"], "metadata": { "author": "user123", "locale": "en-US" }, "createdAt": "2024-03-21T10:00:00Z", "updatedAt": "2024-03-21T10:00:00Z" }
draft
null
typeVersion
{ "error": { "code": "CONTENT_TYPE_NOT_FOUND", "message": "Content type not found", "details": { "typeId": "ct123" } } }
{ "error": { "code": "VALIDATION_FAILED", "message": "Content does not match schema", "details": { "errors": [ { "path": "/content/title", "message": "Required field missing" } ] } } }
{ "error": { "code": "INVALID_COMPONENT", "message": "Component type not allowed", "details": { "componentType": "VideoPlayer", "allowedTypes": ["ArticleParagraph", "ArticleHeading", "ArticleImage"] } } }
curl -X POST "https://api.metabind.ai/v1/organizations/org123/projects/proj456/content" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "typeId": "ct123", "name": "Getting Started Guide", "content": { "title": "Getting Started with Metabind", "components": [ { "type": "ArticleParagraph", "text": "Welcome to Metabind!" } ] } }'