excalibur_create_post
Store a new post (draft or scheduled). Returns its post_id.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| doc | Yes | The editable Doc — a JSON object whose consumed key is ``blocks``, a list of block objects. A minimal static post is one block: ``{"blocks": [{"text": "gm. stack sats.", "flags": []}]}``. Blocks are joined with a blank line between them to form ``text_cache``. Each block: - ``text`` (str): the block's copy (for a dynamic block, a prompt). - ``flags`` (list): editor highlight regions, each ``{"start": int, "end": int, "note": str, "colorIdx": int}`` (char offsets into ``text``) — pass ``[]`` when there are none. - ``dynamic`` (bool, optional): when true ``text`` is a prompt the server resolves with an LLM at post time; ``fallback`` (str) is posted if it fails, and ``domains``/``maxFetches``/``runtimeLimit`` bound its web access. Voice/bans live in your separate Voice profile and the schedule in ``publish_at``/``recurrence``/``cease_at`` — neither belongs in ``doc``. | |
| npub | No | Required. Your Nostr public key (npub1...) for credit billing. | |
| title | No | Optional human label for the post; the list falls back to the first body line when it is blank. | |
| status | No | ``draft`` or ``scheduled``. | draft |
| cease_at | No | ISO-8601 stop time for recurrence; null = open-ended. | |
| tweet_url | No | ||
| dpop_token | No | ||
| publish_at | No | ISO-8601 first/next publish time; required when status='scheduled'. | |
| recurrence | No | ``{"freq": "daily|weekly|monthly", "interval": n}`` or null. | |
| text_cache | No | Composed text (blocks joined) for scheduler + list excerpts. | |
| client_req_id | No | Idempotency key — re-sending the same id returns the same post without a second charge. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||