Skip to content

Docs

POST /mark_post_published_manually

https://heyeveryone.ai/api/v1/mark_post_published_manually

Operation

{
  "post": {
    "description": "Record that a post went live outside heyeveryone: posted by hand with the post kit (state manual), or found live after an unknown outcome (needs_attention), or posted by hand after a failure. Pass the live post's URL as permalink when you have it. The post becomes published and is never sent again. Requires publish permission (a member, or an agent on Autopilot for the post's channel).",
    "operationId": "mark_post_published_manually",
    "requestBody": {
      "content": {
        "application/json": {
          "schema": {
            "properties": {
              "workspaceId": {
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$",
                "type": "string"
              },
              "postId": {
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$",
                "type": "string"
              },
              "permalink": {
                "format": "uri",
                "maxLength": 2000,
                "type": "string"
              },
              "publishedAt": {
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
                "type": "string"
              }
            },
            "required": [
              "workspaceId",
              "postId"
            ],
            "type": "object"
          }
        }
      },
      "required": true
    },
    "responses": {
      "200": {
        "content": {
          "application/json": {
            "schema": {
              "additionalProperties": false,
              "properties": {
                "status": {
                  "additionalProperties": false,
                  "properties": {
                    "postId": {
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$",
                      "type": "string"
                    },
                    "pieceId": {
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$",
                      "type": "string"
                    },
                    "channelAccountId": {
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$",
                      "type": "string"
                    },
                    "platform": {
                      "enum": [
                        "x",
                        "linkedin",
                        "threads",
                        "bluesky",
                        "instagram",
                        "facebook",
                        "tiktok",
                        "youtube",
                        "sandbox"
                      ],
                      "type": "string"
                    },
                    "state": {
                      "enum": [
                        "draft",
                        "ready",
                        "awaiting_confirmation",
                        "scheduled",
                        "publishing",
                        "published",
                        "failed_retrying",
                        "needs_attention",
                        "failed",
                        "manual",
                        "removed"
                      ],
                      "type": "string"
                    },
                    "scheduledAt": {
                      "anyOf": [
                        {
                          "format": "date-time",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "publishedAt": {
                      "anyOf": [
                        {
                          "format": "date-time",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "permalink": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "lastError": {
                      "anyOf": [
                        {
                          "additionalProperties": false,
                          "properties": {
                            "code": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string"
                            },
                            "fix": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "type": "object"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "needsYou": {
                      "type": "boolean"
                    },
                    "waitingForReconnect": {
                      "type": "boolean"
                    },
                    "nextRetryAt": {
                      "anyOf": [
                        {
                          "format": "date-time",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "automaticRetriesUsed": {
                      "maximum": 9007199254740991,
                      "minimum": 0,
                      "type": "integer"
                    },
                    "publication": {
                      "anyOf": [
                        {
                          "additionalProperties": false,
                          "properties": {
                            "status": {
                              "enum": [
                                "pending",
                                "published",
                                "failed"
                              ],
                              "type": "string"
                            },
                            "platformPostId": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "permalink": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "publishedAt": {
                              "anyOf": [
                                {
                                  "format": "date-time",
                                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "notices": {
                              "items": {
                                "additionalProperties": false,
                                "properties": {
                                  "code": {
                                    "type": "string"
                                  },
                                  "message": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "code",
                                  "message"
                                ],
                                "type": "object"
                              },
                              "type": "array"
                            }
                          },
                          "required": [
                            "status",
                            "platformPostId",
                            "permalink",
                            "publishedAt",
                            "notices"
                          ],
                          "type": "object"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "attempts": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "attemptNumber": {
                            "exclusiveMinimum": 0,
                            "maximum": 9007199254740991,
                            "type": "integer"
                          },
                          "outcome": {
                            "enum": [
                              "in_flight",
                              "succeeded",
                              "failed",
                              "ambiguous"
                            ],
                            "type": "string"
                          },
                          "errorCode": {
                            "anyOf": [
                              {
                                "enum": [
                                  "auth_expired",
                                  "rate_limited",
                                  "rejected_content",
                                  "media_unsupported",
                                  "platform_error",
                                  "timeout_after_send",
                                  "not_permitted"
                                ],
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "errorMessage": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "startedAt": {
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
                            "type": "string"
                          },
                          "finishedAt": {
                            "anyOf": [
                              {
                                "format": "date-time",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "durationMs": {
                            "anyOf": [
                              {
                                "maximum": 9007199254740991,
                                "minimum": -9007199254740991,
                                "type": "integer"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "attemptNumber",
                          "outcome",
                          "errorCode",
                          "errorMessage",
                          "startedAt",
                          "finishedAt",
                          "durationMs"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "nextStep": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "postId",
                    "pieceId",
                    "channelAccountId",
                    "platform",
                    "state",
                    "scheduledAt",
                    "publishedAt",
                    "permalink",
                    "lastError",
                    "needsYou",
                    "waitingForReconnect",
                    "nextRetryAt",
                    "automaticRetriesUsed",
                    "publication",
                    "attempts",
                    "nextStep"
                  ],
                  "type": "object"
                }
              },
              "required": [
                "status"
              ],
              "type": "object"
            }
          }
        },
        "description": "Success"
      },
      "400": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "description": "invalid_input: the body does not match the schema"
      },
      "401": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "description": "unauthenticated: missing, invalid, expired or revoked token"
      },
      "403": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "description": "forbidden: the agent may not do this (for example, another workspace)"
      },
      "404": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "description": "not_found"
      },
      "409": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "description": "conflict"
      },
      "422": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "description": "Service-specific errors: not_markable"
      },
      "429": {
        "$ref": "#/components/responses/RateLimited"
      },
      "500": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "description": "internal_error"
      }
    },
    "summary": "Mark a post as posted by hand",
    "tags": [
      "workspace"
    ],
    "x-heyeveryone-kind": "mutation"
  }
}

Referenced definitions

{
  "schemas": {
    "Error": {
      "properties": {
        "error": {
          "description": "A stable error code, for example forbidden.",
          "type": "string"
        },
        "message": {
          "description": "What went wrong, in plain words.",
          "type": "string"
        }
      },
      "required": [
        "error",
        "message"
      ],
      "type": "object"
    }
  },
  "responses": {
    "RateLimited": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      },
      "description": "rate_limited: too many requests from this agent, account or address (docs/setup/agents.md, Rate limits); wait the Retry-After seconds, then retry",
      "headers": {
        "Retry-After": {
          "description": "Seconds to wait before retrying.",
          "schema": {
            "minimum": 1,
            "type": "integer"
          }
        }
      }
    }
  }
}

Authentication

{
  "bearer": {
    "description": "Personal access token (hey_pat_...)",
    "scheme": "bearer",
    "type": "http"
  },
  "oauth": {
    "flows": {
      "authorizationCode": {
        "authorizationUrl": "https://heyeveryone.ai/oauth/authorize",
        "refreshUrl": "https://heyeveryone.ai/oauth/token",
        "scopes": {
          "agent": "Act as your agent in the workspaces you choose"
        },
        "tokenUrl": "https://heyeveryone.ai/oauth/token"
      }
    },
    "type": "oauth2"
  }
}

Security requirements

[
  {
    "bearer": []
  },
  {
    "oauth": [
      "agent"
    ]
  }
]