PostHero API

v1 Reference

POST/posts

Create Post

Create a new post. Can be saved as draft, scheduled for later, or published immediately.

Body Parameters

NameTypeDescription
text*stringMain post content. This is also used as the LinkedIn text.
platforms*arrayArray of {platform, accountId} objects specifying where to publish.
schedulestringISO 8601 UTC date. Omit for draft.
publishNowbooleanSet true to publish immediately.
platformContentobjectPer-platform text overrides and settings. See Platform Content reference.
isThreadbooleanSet true to enable thread mode. Use \n\n to separate thread posts in text.
mediaobjectMedia attachments: {images: [...urls], video: "url", carousel: "url"}

Request Body Example

{
  "text": "My LinkedIn post content here...",
  "platforms": [
    { "platform": "linkedin", "accountId": "abc123" },
    { "platform": "twitter", "accountId": "def456" }
  ],
  "schedule": "2025-03-15T14:00:00Z",
  "platformContent": {
    "twitter": {
      "text": "Shorter version for Twitter"
    }
  }
}

Response

200
{
  "success": true,
  "data": {
    "id": "post_abc123",
    "text": "My LinkedIn post content here...",
    "status": "scheduled",
    "source": "api",
    "isThread": false,
    "platforms": [
      {
        "platform": "linkedin",
        "accountId": "abc123",
        "status": "scheduled"
      },
      {
        "platform": "twitter",
        "accountId": "def456",
        "status": "scheduled"
      }
    ],
    "schedule": "2025-03-15T14:00:00Z",
    "createdAt": "2025-03-10T10:00:00Z"
  }
}