Docs
add_to_queue
Put posts into the next free queue slot of their channel account (list_queue_slots: weekly local times in the workspace's time zone). Several posts on one channel take consecutive free slots, in the order given. As with request_schedule, an agent without Autopilot only requests: the posts wait in `awaiting_confirmation` for a human. Each post gets its own result; one failing (`no_queue_slots`, `queue_full`, `invalid_post`, `signoff_required`...) doesn't stop the others. Optional per post: `expected`, the version you last saw; a post that changed since is refused (`version_conflict`) instead of being queued unseen.
Put posts into the next free queue slot of their channel account (list_queue_slots: weekly local times in the workspace's time zone). Several posts on one channel take consecutive free slots, in the order given. As with request_schedule, an agent without Autopilot only requests: the posts wait in awaiting_confirmation for a human. Each post gets its own result; one failing (no_queue_slots, queue_full, invalid_post, signoff_required...) doesn't stop the others. Optional per post: expected, the version you last saw; a post that changed since is refused (version_conflict) instead of being queued unseen.
A human confirms the result in heyeveryone's Updates unless a workspace owner put this agent on Autopilot for the post's channel (see whoami).
Access and cost
- Kind: mutation
- Scope: workspace
- Actors: member, agent
- Credits: Free
- Requires confirmation: true
- Accepts idempotency key: false
Input schema
{
"properties": {
"workspaceId": {
"format": "uuid",
"type": "string"
},
"postIds": {
"items": {
"format": "uuid",
"type": "string"
},
"maxItems": 100,
"minItems": 1,
"type": "array"
},
"expected": {
"items": {
"properties": {
"postId": {
"format": "uuid",
"type": "string"
},
"version": {
"minimum": 1,
"type": "integer"
}
},
"required": [
"postId",
"version"
],
"type": "object"
},
"maxItems": 100,
"type": "array"
}
},
"required": [
"workspaceId",
"postIds"
],
"type": "object"
}Output schema
{
"additionalProperties": false,
"properties": {
"results": {
"items": {
"additionalProperties": false,
"properties": {
"postId": {
"format": "uuid",
"type": "string"
},
"ok": {
"type": "boolean"
},
"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"
},
"needsConfirmation": {
"type": "boolean"
},
"autopilotNotice": {
"type": "string"
},
"error": {
"type": "string"
},
"message": {
"type": "string"
}
},
"required": [
"postId",
"ok"
],
"type": "object"
},
"type": "array"
},
"needsYouUrl": {
"type": [
"string",
"null"
]
}
},
"required": [
"results",
"needsYouUrl"
],
"type": "object"
}Errors
[
"version_conflict"
]Annotations
{
"destructiveHint": true,
"idempotentHint": false,
"openWorldHint": true,
"readOnlyHint": false,
"title": "Add posts to the queue"
}