Directly update a content item’s status. For most workflows, use the dedicated publish, unpublish, or discard endpoints instead.
Path Parameters
Request Body
The new status: draft, modified, unpublished, or deleted
Example Request
This endpoint does not validate status transitions as strictly as the dedicated endpoints. Use publish to publish, unpublish to unpublish, and discard to discard changes.
Response
Returns the updated Content object.
{
"id": "cont123",
"typeId": "ct123",
"typeVersion": 2,
"version": 2,
"lastPublishedVersion": 2,
"packageVersion": "1.0.0",
"name": "Getting Started Guide",
"status": "deleted",
"isTemplate": false,
"content": { ... },
"compiled": "const body = () => { ... }",
"tags": ["Tutorial"],
"metadata": { ... },
"createdAt": "2024-03-20T10:00:00Z",
"updatedAt": "2024-03-22T10:00:00Z"
}
Status Values
| Status | Description |
|---|
draft | Initial state, never published |
modified | Published then edited |
published | Live and active (use publish endpoint) |
unpublished | Was published, now inactive |
deleted | Soft deleted |
Error Responses
Invalid Status Value
{
"error": {
"code": "VALIDATION_FAILED",
"message": "Invalid status value",
"details": {
"provided": "archived",
"allowed": ["draft", "modified", "unpublished", "deleted"]
}
}
}
Code Examples
curl -X POST "https://api.metabind.ai/v1/organizations/org123/projects/proj456/content/cont123/status" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"status": "deleted"
}'