Returns the ONE marketing-content state machine: the ordered lifecycle states,…
Returns the ONE marketing-content state machine: the ordered lifecycle states, which state a fresh document starts in, which one is publicly live, and the…
GET /v1/content/lifecycle
| Address | https://api.hanzo.ai/v1/content/lifecycle |
| Method | GET |
| Operation | get_content_lifecycle |
| Auth | Authorization: Bearer $HANZO_API_KEY |
Returns the ONE marketing-content state machine: the ordered lifecycle states, which state a fresh document starts in, which one is publicly live, and the legal successors of every state. The console builds its board columns and its per-item action buttons from this single answer, so the UI and the write-time enforcement hook can never disagree about what is legal.
Request
GET /v1/content/lifecycle takes no parameters and no body — the credential is the whole request.
Response
| Status | Body | Meaning |
|---|---|---|
200 | stateGraph | ok |
200 body — 5 fields.
| Field | In | Type | Always | Description |
|---|---|---|---|---|
initial | body | string | — | Initial is the state a fresh document starts in — "draft". |
live | body | string | — | Live is the ONE state that is publicly readable — "published". |
states | body | string[] | — | States is every lifecycle state in canonical order: draft, in_review, approved, queued, published, archived. |
transitions | body | object | — | Transitions maps each state to the states it may move to. |
transitions.* | body | string[] | — |
Failure carries the platform error shape — see Errors.
Examples
hanzo content lifecycleimport { Configuration, ContentApi } from 'hanzoai';
const api = new ContentApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.getContentLifecycle();from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import ContentApi
client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = ContentApi(client).get_content_lifecycle()cfg := cloud.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := cloud.NewAPIClient(cfg)
resp, _, err := client.ContentAPI.GetContentLifecycle(context.Background()).Execute()
if err != nil {
return err
}use hanzo_cloud::apis::{configuration::Configuration, content_api};
let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();
let result = content_api::get_content_lifecycle(&cfg, Default::default()).await?;import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.ContentApi;
ApiClient client = new ApiClient();
client.setRequestInterceptor(b -> b.header("Authorization", "Bearer " + System.getenv("HANZO_API_KEY")));
var result = new ContentApi(client).getContentLifecycle();curl https://api.hanzo.ai/v1/content/lifecycle \
-H "Authorization: Bearer $HANZO_API_KEY"Tool content, op get_content_lifecycle — POST the JSON-RPC envelope to https://api.hanzo.ai/v1/mcp.
curl -X POST https://api.hanzo.ai/v1/mcp \
-H "Authorization: Bearer $HANZO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "content",
"arguments": {
"op": "get_content_lifecycle",
"input": {}
}
}
}'How is this guide?