Skip to main content
POST
/
v1
/
organizations
/
{organizationId}
/
projects
/
{projectId}
/
content-types
/
{id}
/
status
Update Content Type Status
curl --request POST \
  --url https://api.example.com/v1/organizations/{organizationId}/projects/{projectId}/content-types/{id}/status \
  --header 'Content-Type: application/json' \
  --data '
{
  "status": "<string>"
}
'
Directly update a content type’s status. For most workflows, use the dedicated publish, unpublish, or discard endpoints instead.

Path Parameters

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

Request Body

status
string
required
The new status: draft, modified, unpublished, or deleted

Example Request

{
  "status": "deleted"
}
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 ContentType object.
{
  "id": "ct123",
  "name": "Article",
  "status": "deleted",
  "version": 3,
  "lastPublishedVersion": 3,
  "layoutComponentId": "c123",
  "componentIdsAllowList": ["c124", "c125"],
  "packageVersion": "1.0.0",
  "schema": { ... },
  "templateContentIds": ["cont123"],
  "permissions": { ... },
  "metadata": { ... },
  "createdAt": "2024-03-20T10:00:00Z",
  "updatedAt": "2024-03-22T10:00:00Z"
}

Status Values

StatusDescription
draftInitial state, never published
modifiedPublished then edited
publishedLive and active (use publish endpoint)
unpublishedWas published, now inactive
deletedSoft 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-types/ct123/status" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "status": "deleted"
  }'