Skip to main content
PUT
/
v1
/
organizations
/
{organizationId}
/
projects
/
{projectId}
/
content
/
{id}
Update Content
curl --request PUT \
  --url https://api.example.com/v1/organizations/{organizationId}/projects/{projectId}/content/{id} \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "description": "<string>",
  "content": {},
  "tags": [
    "<string>"
  ],
  "folderId": "<string>",
  "metadata": {}
}
'

Path Parameters

organizationId
string
required
Organization ID
projectId
string
required
Project ID
id
string
required
Content ID

Request Body

All fields are optional. Only provided fields will be updated.
name
string
Display name for the content
description
string
Structured markdown description
content
object
The content data following the ContentType’s schema
tags
string[]
Tags for categorization
folderId
string
Folder ID for organization
metadata
object
Additional metadata

Example Request

{
  "name": "Updated Getting Started Guide",
  "content": {
    "title": "Getting Started with Metabind (Updated)",
    "subtitle": "Your complete guide, now with more examples",
    "components": [
      {
        "type": "ArticleParagraph",
        "text": "Updated introduction text..."
      },
      {
        "type": "ArticleHeading",
        "text": "New Section",
        "level": 2
      }
    ]
  },
  "tags": ["Tutorial", "Updated"]
}
Updating a published content item changes its status to modified. The changes will not be visible to end users until the content is published again.

Response

Returns the updated Content object.
{
  "id": "cont124",
  "typeId": "ct123",
  "typeVersion": 2,
  "version": 1,
  "lastPublishedVersion": 1,
  "packageVersion": "1.0.0",
  "name": "Updated Getting Started Guide",
  "status": "modified",
  "isTemplate": false,
  "content": {
    "title": "Getting Started with Metabind (Updated)",
    "subtitle": "Your complete guide, now with more examples",
    "components": [...]
  },
  "compiled": "const body = () => { ... }",
  "tags": ["Tutorial", "Updated"],
  "metadata": { ... },
  "createdAt": "2024-03-21T10:00:00Z",
  "updatedAt": "2024-03-22T15:30:00Z"
}

Error Responses

Content Not Found

{
  "error": {
    "code": "NOT_FOUND",
    "message": "Content not found"
  }
}

Validation Failed

{
  "error": {
    "code": "VALIDATION_FAILED",
    "message": "Content does not match schema",
    "details": {
      "errors": [
        {
          "path": "/content/components/0/type",
          "message": "Component type 'InvalidComponent' not allowed"
        }
      ]
    }
  }
}

Code Examples

curl -X PUT "https://api.metabind.ai/v1/organizations/org123/projects/proj456/content/cont124" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Updated Getting Started Guide",
    "content": {
      "title": "Getting Started with Metabind (Updated)",
      "components": [
        {
          "type": "ArticleParagraph",
          "text": "Updated introduction text..."
        }
      ]
    }
  }'