List calendar

Returns the org's calendar, latest scheduled first, optionally narrowed to one status.

GET /v1/marketing/calendar

Addresshttps://api.hanzo.ai/v1/marketing/calendar
MethodGET
Operationget_marketing_calendar
AuthAuthorization: Bearer $HANZO_API_KEY

Returns the org's calendar, latest scheduled first, optionally narrowed to one status.

Request

2 fields.

FieldInTypeRequiredDescription
statusquerystring—Status keeps only posts in that state (draft, scheduled, published, failed, canceled).
limitqueryinteger—Limit caps the rows returned; 0 means 200 and nothing above 1000 is honoured.

Response

StatusBodyMeaning
200marketing.PostListok
defaultproblem-detailsrefused

200 body — 11 fields.

FieldInTypeAlwaysDescription
databodymarketing.CalendarPost[]—Data is the page, ordered by scheduledAt descending — the furthest-out post first and unscheduled drafts (scheduledAt 0) last.
data[].bodybodystring—Body is the post text.
data[].channelbodystring—Channel is the target network: x, facebook, instagram, linkedin, tiktok, youtube or threads.
data[].createdAtbodyinteger (int64)—CreatedAt is unix seconds when the post was added, server-assigned and never rewritten.
data[].errorbodystring—Error is the exact reason the last publish attempt failed — the honest record behind a "failed" status, never a faked success.
data[].idbodystring—ID is the server-assigned post id ("cal_" + 128 random bits).
data[].publishedAtbodyinteger (int64)—PublishedAt is when the publish succeeded; 0 until it does.
data[].scheduledAtbodyinteger (int64)—ScheduledAt is the unix publish time; 0 leaves the post a draft, and any value makes it "scheduled" for the durable sweep to pick up.
data[].statusbodystring—Status is draft, scheduled, published, failed or canceled.
data[].titlebodystring—Title is the post's internal label, capped at 1024 bytes.
data[].updatedAtbodyinteger (int64)—UpdatedAt is unix seconds of the last write, server-assigned.

Failure carries the platform error shape — see Errors.

Examples

hanzo marketing calendar list
import { Configuration, MarketingApi } from 'hanzoai';

const api = new MarketingApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.getMarketingCalendar();
from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import MarketingApi

client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = MarketingApi(client).get_marketing_calendar()
cfg := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)

resp, _, err := client.MarketingAPI.GetMarketingCalendar(context.Background()).Execute()
if err != nil {
	return err
}
use hanzo_client::apis::{configuration::Configuration, marketing_api};

let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();

let result = marketing_api::get_marketing_calendar(&cfg, Default::default()).await?;
import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.MarketingApi;

ApiClient client = new ApiClient();
client.setBearerToken(System.getenv("HANZO_API_KEY"));

var result = new MarketingApi(client).getMarketingCalendar();
curl https://api.hanzo.ai/v1/marketing/calendar \
  -H "Authorization: Bearer $HANZO_API_KEY"

Tool marketing, op get_marketing_calendar — 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": "marketing",
         "arguments": {
           "op": "get_marketing_calendar",
           "input": {}
         }
       }
     }'

Marketing API · All Hanzo APIs · Interactive reference

Was this page useful?