Create Post

Create, schedule, or publish a new social media post.


Request

Use this endpoint to create a post. You can publish immediately, schedule for later, or save as a draft.

Permission required: posts:create

Body Parameters

contentstringRequired

The text content of the post. Maximum 63,206 characters. Content is automatically sanitized — HTML tags are stripped.

accountIdsstring[]Required

Array of social account UUIDs to publish to. Must belong to the authenticated user. Get these from the List Connections endpoint.

publishNowbooleanOptional
Default: false

If true, publishes the post immediately to all specified accounts. Cannot be combined with isDraft or scheduledAt.

isDraftbooleanOptional
Default: false

If true, saves the post as a draft. Cannot be combined with publishNow or scheduledAt.

scheduledAtstringRequired

ISO 8601 datetime for when the post should be published. Must be at least 1 minute in the future. Cannot be combined with publishNow or isDraft.

mediaUrlsstring[]Required

Array of public URLs for images or videos to include. Maximum 10 URLs. URLs are validated and sanitized.

platformCaptionsobjectRequired

Per-platform content overrides. Keys are lowercase platform names, values are caption strings. Example: { "twitter": "Short tweet", "linkedin": "Longer professional post" }

tiktokSettingsobjectRequired

TikTok-specific publishing settings. Fields: privacyLevel (PUBLIC_TO_EVERYONE, PRIVATE, FRIENDS), disableDuet, disableComment, disableStitch, sendAsDraft, markAsAiGenerated.

youtubeTitlestringRequired

Separate title for YouTube posts. Maximum 100 characters.

Validation Rules

  • isDraft, publishNow, and scheduledAt are mutually exclusive — only set one.
  • scheduledAt must be at least 1 minute in the future.
  • Content is validated against each target platform's character limit.
  • All accountIds must belong to the authenticated user.

Response

Returns the created post object wrapped in a data envelope. HTTP status 201 Created.

idstring

The unique UUID of the created post.

contentstring

The sanitized content of the post.

statusstring

The status: DRAFT, SCHEDULED, PUBLISHED, PROCESSING, FAILED, or PARTIALLY_PUBLISHED.

platformsstring[]

List of target platforms (lowercase).

mediaUrlsstring[]

Array of media URLs attached to the post.

scheduledAtstring | null

Scheduled publication timestamp, or null.

publishedAtstring | null

Actual publication timestamp, or null.

createdAtstring

ISO 8601 creation timestamp.

publishingobject

Only present when publishNow: true. Contains per-platform publishing results with total, success, failed, and results array.

Examples

{
  "content": "Just launched our new API! #devtools",
  "accountIds": ["550e8400-e29b-41d4-a716-446655440000"],
  "publishNow": true,
  "mediaUrls": ["https://example.com/screenshot.png"]
}
{
  "content": "Happy Monday! Start your week with eWasl",
  "accountIds": ["550e8400-e29b-41d4-a716-446655440000"],
  "scheduledAt": "2026-12-31T09:00:00Z"
}
{
  "content": "Work in progress...",
  "accountIds": ["550e8400-e29b-41d4-a716-446655440000"],
  "isDraft": true
}

Response Example

{
  "data": {
    "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "content": "Just launched our new API! #devtools",
    "status": "PUBLISHED",
    "platforms": ["twitter", "linkedin"],
    "mediaUrls": ["https://example.com/screenshot.png"],
    "scheduledAt": null,
    "publishedAt": "2026-03-01T12:00:05Z",
    "createdAt": "2026-03-01T12:00:00Z",
    "publishing": {
      "total": 2,
      "success": 2,
      "failed": 0,
      "results": [
        { "platform": "TWITTER", "success": true, "url": "https://x.com/ewasl/status/123" },
        { "platform": "LINKEDIN", "success": true, "url": "https://linkedin.com/feed/update/456" }
      ]
    }
  }
}