Content
9 actions. Each is callable by the agent as a tool, over HTTP via /api/invoke, and (usually) from a UI page.
content.drafts.create_for_channel
POST · mutating
Create a single content-draft ticket for one platform channel. Used as the work-unit inside the draft-for-platform sub-workflow that the platform-fanout foreach iterates over. Reads channel (the foreach _each item) + subjectId + topic + optional attachments + missionId from context, resolves persona + per-platform voice, inserts the ticket with scheduledFor=now+delayMinutes.
- AI tool:
content_drafts_create_for_channel - API:
POST /api/invoke/content.drafts.create_for_channel
Input
| Field | Type | Required | Description |
|---|---|---|---|
subjectId |
string | yes | |
topic |
string | yes | |
channel |
object | yes | |
recipeName |
string | — | |
attachments |
object[] | — | |
missionId |
string | — |
JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"subjectId": {
"type": "string",
"minLength": 1
},
"topic": {
"type": "string"
},
"channel": {
"type": "object",
"properties": {
"order": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"platform": {
"type": "string"
},
"personaSubjectId": {
"type": "string",
"minLength": 1
},
"contentMode": {
"type": "string"
},
"delayMinutes": {
"default": 0,
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"hashtags": {
"type": "array",
"items": {
"type": "string"
}
},
"audienceHint": {
"type": "string"
}
},
"required": [
"order",
"platform"
]
},
"recipeName": {
"type": "string"
},
"attachments": {
"type": "array",
"items": {
"type": "object",
"properties": {
"fileId": {
"type": "string"
},
"url": {
"type": "string"
},
"alt": {
"type": "string"
}
}
}
},
"missionId": {
"type": "string",
"minLength": 1
}
},
"required": [
"subjectId",
"topic",
"channel"
]
}content.drafts.fanout_from_idea
POST · mutating
Generate the per-platform drafts from an approved idea seed. Reads the idea ticket's payload (topic, subjectId, attachments, recipeName, plannedChannels) and creates one content-draft per channel (parentId = idea, status = pending-review) with platform-specific voice baked in. Flips the idea ticket's status to approved + marks payload.fanoutTriggered so subsequent approvals are idempotent.
When the agent calls it: Use this after the user approves an idea seed. Idempotent — re-calls when fanoutTriggered already set just return the existing children.
- AI tool:
content_drafts_fanout_from_idea - API:
POST /api/invoke/content.drafts.fanout_from_idea
Input
| Field | Type | Required | Description |
|---|---|---|---|
ideaTicketId |
string | yes | |
overridePlatforms |
string[] | — |
JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"ideaTicketId": {
"type": "string",
"minLength": 1
},
"overridePlatforms": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"ideaTicketId"
]
}content.drafts.elaborate
POST · mutating
Run the LLM over a platform-specific draft ticket to turn the structured prompt body (topic + voice directive + attachments) into final post copy. Replaces ticket.description with the elaborated text and flips payload.awaitingElaboration = false. Idempotent — re-runs only if force=true. Usually fires automatically via the elaborate-drafts-on-fanout workflow after content.idea.fanned_out; agents call this directly only when re-elaborating after an edit.
- AI tool:
content_drafts_elaborate - API:
POST /api/invoke/content.drafts.elaborate
Input
| Field | Type | Required | Description |
|---|---|---|---|
id |
string | yes | |
force |
boolean | — |
JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1
},
"force": {
"type": "boolean"
}
},
"required": [
"id"
]
}content.drafts.list
GET
List content drafts, optionally filtered by mission or status.
- AI tool:
content_drafts_list - API:
GET /api/invoke/content.drafts.list
Input
| Field | Type | Required | Description |
|---|---|---|---|
missionId |
string | — | |
status |
string | — | |
limit |
integer | — | |
offset |
integer | — | |
orderBy |
string | — | |
orderDir |
"asc" | "desc" | — | |
q |
string | — |
JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"missionId": {
"type": "string",
"minLength": 1
},
"status": {
"type": "string"
},
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 500
},
"offset": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"orderBy": {
"type": "string"
},
"orderDir": {
"type": "string",
"enum": [
"asc",
"desc"
]
},
"q": {
"type": "string"
}
}
}content.drafts.generate
POST · mutating
Have the agent generate a new content draft for a mission. The draft is queued for review (or auto-published if autonomy permits).
When the agent calls it: Use this when the user wants the agent to create a new social post, thread, or article.
- AI tool:
content_drafts_generate - API:
POST /api/invoke/content.drafts.generate
Input
| Field | Type | Required | Description |
|---|---|---|---|
missionId |
string | yes | |
pillarId |
string | — | |
platform |
"twitter" | "instagram" | "linkedin" | "facebook" | "tiktok" | "youtube" | "threads" | "bluesky" | "kickstarter" | "indiegogo" | "reddit" | "hackernews" | "producthunt" | "patreon" | "itch" | "email" | — | |
type |
"post" | "thread" | "article" | "video" | "image" | "story" | — | |
topic |
string | — | |
personaSubjectId |
string | — | |
count |
integer | — | |
autoGenerateImage |
boolean | — |
JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"missionId": {
"type": "string",
"minLength": 1
},
"pillarId": {
"type": "string",
"minLength": 1
},
"platform": {
"type": "string",
"enum": [
"twitter",
"instagram",
"linkedin",
"facebook",
"tiktok",
"youtube",
"threads",
"bluesky",
"kickstarter",
"indiegogo",
"reddit",
"hackernews",
"producthunt",
"patreon",
"itch",
"email"
]
},
"type": {
"type": "string",
"enum": [
"post",
"thread",
"article",
"video",
"image",
"story"
]
},
"topic": {
"type": "string"
},
"personaSubjectId": {
"type": "string",
"minLength": 1
},
"count": {
"type": "integer",
"minimum": 1,
"maximum": 8
},
"autoGenerateImage": {
"type": "boolean"
}
},
"required": [
"missionId"
]
}content.drafts.approve
POST · mutating
Approve a draft. It becomes scheduled (or published immediately if no schedule).
- AI tool:
content_drafts_approve - API:
POST /api/invoke/content.drafts.approve
Input
| Field | Type | Required | Description |
|---|---|---|---|
id |
string | yes | |
approvedBy |
string | — |
JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1
},
"approvedBy": {
"default": "human",
"type": "string"
}
},
"required": [
"id"
]
}content.drafts.reject
POST · mutating
Reject a draft with a reason. The agent learns from the rejection.
- AI tool:
content_drafts_reject - API:
POST /api/invoke/content.drafts.reject
Input
| Field | Type | Required | Description |
|---|---|---|---|
id |
string | yes | |
reason |
string | yes | |
rejectedBy |
string | — |
JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1
},
"reason": {
"type": "string"
},
"rejectedBy": {
"default": "human",
"type": "string"
}
},
"required": [
"id",
"reason"
]
}content.drafts.edit
PATCH · mutating
Edit a draft's body content or scheduled time before publish.
- AI tool:
content_drafts_edit - API:
PATCH /api/invoke/content.drafts.edit
Input
| Field | Type | Required | Description |
|---|---|---|---|
id |
string | yes | |
content |
string | — | |
scheduledFor |
any | — | |
hashtags |
string[] | — |
JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1
},
"content": {
"type": "string"
},
"scheduledFor": {},
"hashtags": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"id"
]
}content.search_drafts
GET
Search content drafts by free-text query. Set semantic=true to use pgvector kNN; default is FTS.
- AI tool:
content_search_drafts - API:
GET /api/invoke/content.search_drafts
Input
| Field | Type | Required | Description |
|---|---|---|---|
q |
string | yes | |
missionId |
string | — | |
semantic |
boolean | — | |
limit |
integer | — |
JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"q": {
"type": "string"
},
"missionId": {
"type": "string",
"minLength": 1
},
"semantic": {
"default": false,
"type": "boolean"
},
"limit": {
"default": 20,
"type": "integer",
"minimum": 1,
"maximum": 50
}
},
"required": [
"q"
]
}