Docs
create_post
Add a draft post to a content item for one channel account in one format from its capabilities (e.g. `text`, `thread`, `reels`, `short`, `story`; omit for the best fit). `segments`: one per post of a thread, each `text` and `media` (asset ids). Omit `segments` to start from the original draft (`---` splits thread posts); such a post follows the original until its own text is edited (`followOriginal: false` starts it customized). `settings`: channel fields such as a YouTube title. `firstComment`: posted right after it goes live where the format offers it (Instagram feed posts and Reels). One post per channel account (`post_exists`: update or unskip it). The result lists `issues` to fix before scheduling; give the person `url`. Retrying pipelines pass `idempotencyKey`: the same key within 24 hours returns the first post (`replayed: true`); different input with it is refused (`idempotency_conflict`).
Add a draft post to a content item for one channel account in one format from its capabilities (e.g. text, thread, reels, short, story; omit for the best fit). segments: one per post of a thread, each text and media (asset ids). Omit segments to start from the original draft (--- splits thread posts); such a post follows the original until its own text is edited (followOriginal: false starts it customized). settings: channel fields such as a YouTube title. firstComment: posted right after it goes live where the format offers it (Instagram feed posts and Reels). One post per channel account (post_exists: update or unskip it). The result lists issues to fix before scheduling; give the person url. Retrying pipelines pass idempotencyKey: the same key within 24 hours returns the first post (replayed: true); different input with it is refused (idempotency_conflict).
Access and cost
- Kind: mutation
- Scope: workspace
- Actors: member, agent
- Credits: Free
- Requires confirmation: false
- Accepts idempotency key: true
Input schema
{
"properties": {
"workspaceId": {
"format": "uuid",
"type": "string"
},
"pieceId": {
"format": "uuid",
"type": "string"
},
"channelAccountId": {
"format": "uuid",
"type": "string"
},
"format": {
"pattern": "^[a-z][a-z0-9_]*$",
"type": "string"
},
"segments": {
"items": {
"properties": {
"text": {
"type": "string"
},
"media": {
"default": [],
"items": {
"properties": {
"mediaAssetId": {
"format": "uuid",
"type": "string"
},
"altText": {
"maxLength": 2000,
"type": "string"
}
},
"required": [
"mediaAssetId"
],
"type": "object"
},
"maxItems": 35,
"type": "array"
}
},
"required": [
"text"
],
"type": "object"
},
"maxItems": 100,
"minItems": 1,
"type": "array"
},
"settings": {
"default": {},
"type": "object"
},
"firstComment": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"followOriginal": {
"type": "boolean"
},
"idempotencyKey": {
"description": "Optional. A key you choose for this request (for example your pipeline's job id). Sending the same key again within 24 hours returns what the first call created (`replayed: true`) instead of creating it twice.",
"maxLength": 200,
"minLength": 1,
"type": "string"
}
},
"required": [
"workspaceId",
"pieceId",
"channelAccountId"
],
"type": "object"
}Output schema
{
"additionalProperties": false,
"properties": {
"post": {
"additionalProperties": false,
"properties": {
"id": {
"format": "uuid",
"type": "string"
},
"workspaceId": {
"format": "uuid",
"type": "string"
},
"pieceId": {
"format": "uuid",
"type": "string"
},
"channelAccountId": {
"format": "uuid",
"type": "string"
},
"format": {
"pattern": "^[a-z][a-z0-9_]*$",
"type": "string"
},
"segments": {
"items": {
"additionalProperties": false,
"properties": {
"text": {
"type": "string"
},
"media": {
"items": {
"additionalProperties": false,
"properties": {
"mediaAssetId": {
"format": "uuid",
"type": "string"
},
"altText": {
"maxLength": 2000,
"type": "string"
}
},
"required": [
"mediaAssetId"
],
"type": "object"
},
"type": "array"
}
},
"required": [
"text",
"media"
],
"type": "object"
},
"minItems": 1,
"type": "array"
},
"settings": {
"type": "object"
},
"state": {
"enum": [
"draft",
"ready",
"awaiting_confirmation",
"scheduled",
"publishing",
"published",
"failed_retrying",
"needs_attention",
"failed",
"manual",
"removed"
],
"type": "string"
},
"scheduledAt": {
"anyOf": [
{
"format": "date-time",
"type": "string"
},
{
"type": "null"
}
]
},
"scheduleSource": {
"anyOf": [
{
"enum": [
"manual",
"queue",
"recurrence",
"evergreen"
],
"type": "string"
},
{
"type": "null"
}
]
},
"isSkipped": {
"type": "boolean"
},
"version": {
"minimum": 1,
"type": "integer"
},
"followsOriginal": {
"type": "boolean"
},
"followIssue": {
"type": [
"string",
"null"
]
},
"requestedByAgentClientId": {
"anyOf": [
{
"format": "uuid",
"type": "string"
},
{
"type": "null"
}
]
},
"confirmedByAccountId": {
"anyOf": [
{
"format": "uuid",
"type": "string"
},
{
"type": "null"
}
]
},
"confirmedAt": {
"anyOf": [
{
"format": "date-time",
"type": "string"
},
{
"type": "null"
}
]
},
"lastError": {
"anyOf": [
{
"additionalProperties": false,
"properties": {
"code": {
"type": "string"
},
"message": {
"type": "string"
},
"fix": {
"type": "string"
}
},
"required": [
"code",
"message"
],
"type": "object"
},
{
"type": "null"
}
]
},
"publishedAt": {
"anyOf": [
{
"format": "date-time",
"type": "string"
},
{
"type": "null"
}
]
},
"permalink": {
"type": [
"string",
"null"
]
},
"createdByAccountId": {
"anyOf": [
{
"format": "uuid",
"type": "string"
},
{
"type": "null"
}
]
},
"createdByAgentClientId": {
"anyOf": [
{
"format": "uuid",
"type": "string"
},
{
"type": "null"
}
]
},
"createdAt": {
"format": "date-time",
"type": "string"
},
"updatedAt": {
"format": "date-time",
"type": "string"
}
},
"required": [
"id",
"workspaceId",
"pieceId",
"channelAccountId",
"format",
"segments",
"settings",
"state",
"scheduledAt",
"scheduleSource",
"isSkipped",
"version",
"followsOriginal",
"followIssue",
"requestedByAgentClientId",
"confirmedByAccountId",
"confirmedAt",
"lastError",
"publishedAt",
"permalink",
"createdByAccountId",
"createdByAgentClientId",
"createdAt",
"updatedAt"
],
"type": "object"
},
"issues": {
"items": {
"additionalProperties": false,
"properties": {
"code": {
"type": "string"
},
"message": {
"type": "string"
},
"severity": {
"enum": [
"error",
"warning"
],
"type": "string"
},
"segmentIndex": {
"minimum": 0,
"type": "integer"
},
"field": {
"type": "string"
}
},
"required": [
"code",
"message",
"severity"
],
"type": "object"
},
"type": "array"
},
"url": {
"description": "The content page in heyeveryone. Give it to the person so they can open the draft.",
"type": "string"
},
"replayed": {
"type": "boolean"
}
},
"required": [
"post",
"issues",
"url",
"replayed"
],
"type": "object"
}Errors
[
"post_exists",
"channel_unavailable",
"unknown_format",
"idempotency_conflict"
]Annotations
{
"destructiveHint": false,
"idempotentHint": false,
"openWorldHint": false,
"readOnlyHint": false,
"title": "Create a post for a channel"
}