XreplyAIDevelopers
API ReferencePublishing

Publish a post

Requires scope: `publish:write`. Publishes an existing post. Without `scheduled_at` or `use_next_slot` the post is sent immediately. Pass `scheduled_at` to schedule it, or `use_next_slot: true` to queue it into the next open posting-schedule slot. Target accounts default to those already attached to the post; override with `social_account_id(s)`.

POST
/posts/{post_id}/publishes
AuthorizationBearer <token>

A personal API key created in the dashboard (Starter, Pro, and Team plans).

In: header

Path Parameters

post_id*integer

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/posts/0/publishes" \  -H "Content-Type: application/json" \  -d '{    "social_account_ids": [      301    ],    "use_next_slot": true  }'
{  "post": {    "id": 0,    "status": "draft",    "flexible": true,    "scheduled_at": "2019-08-24T14:15:22Z",    "posted_at": "2019-08-24T14:15:22Z",    "failed_at": "2019-08-24T14:15:22Z",    "post_error": "string",    "disconnected": true,    "source": "string",    "recurrence_jitter_enabled": true,    "evergreen": true,    "evergreen_variations": [      "string"    ],    "recycled_from_id": 0,    "reviewed_at": "2019-08-24T14:15:22Z",    "review_action": "string",    "rejection_reason": "string",    "created_at": "2019-08-24T14:15:22Z",    "body": "string",    "post_contents": [      {        "id": 0,        "platform": "twitter",        "body": "string",        "content_type": "text",        "position": 0,        "first_comment": "string",        "metadata": {}      }    ],    "post_accounts": [      {        "id": 0,        "social_account_id": 0,        "platform": "string",        "username": "string",        "platform_status": "string",        "platform_post_id": "string",        "permalink": "string",        "platform_error": "string",        "dub_short_url": "string",        "dub_original_url": "string",        "post_metric": {          "impressions": 0,          "likes": 0,          "replies": 0,          "reposts": 0,          "clicks": 0,          "engagement_rate": 0,          "fetched_at": "2019-08-24T14:15:22Z"        }      }    ],    "dry_run": true  }}