Skip to main content
PATCH
/
posts
/
{pid}
Update a post
curl --request PATCH \
  --url https://api.social-api.ai/v1/posts/{pid} \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "first_comment": "<string>",
  "hidden": false,
  "media_ids": [
    "<string>"
  ],
  "scheduled_at": "2026-04-02T14:00:00Z",
  "targets": [
    {
      "account_id": "acc_01HZ9X3Q4R5M6N7P8V2K0W1J",
      "first_comment": "<string>",
      "media_ids": [
        "<string>"
      ],
      "page_id": "sapi_page_01JRQX...",
      "platform_data": {},
      "scheduled_at": "2026-04-01T10:00:00Z",
      "text": "Platform-specific version of the post",
      "title": "Custom title for LinkedIn",
      "visibility": "public"
    }
  ],
  "text": "Updated post content",
  "title": "Updated Title",
  "visibility": "public"
}
'
{
  "created_at": "2026-03-14T09:00:00Z",
  "hidden": false,
  "id": "p_01HZ9X3Q4R5M6N7P8V2K0W1J",
  "media_ids": [
    "<string>"
  ],
  "published_at": "2026-04-01T10:00:05Z",
  "retry_count": 0,
  "scheduled_at": "2026-04-01T10:00:00Z",
  "status": "published",
  "targets": [
    {
      "account_id": "acc_01HZ9X3Q4R5M6N7P8V2K0W1J",
      "error": {
        "category": "validation",
        "caused_by": "user",
        "code": "platform.tiktok.media_required",
        "message": "Video posts require at least one media URL"
      },
      "first_comment": "<string>",
      "metadata": {},
      "metrics": {
        "comments": 23,
        "extra": {},
        "likes": 142,
        "saves": 31,
        "shares": 8
      },
      "metrics_synced_at": "2026-04-01T12:00:00Z",
      "permalink": "https://www.instagram.com/p/ABC123/",
      "platform": "instagram",
      "platform_post_id": "17895695668004550",
      "published_at": "2026-04-01T10:00:05Z",
      "scheduled_at": "2026-04-01T10:00:00Z",
      "status": "published",
      "text": "<string>",
      "title": "<string>",
      "visibility": "public"
    }
  ],
  "text": "Check out our new product launch!",
  "title": "Exciting News",
  "updated_at": "2026-03-14T09:00:00Z",
  "visibility": "public"
}

Documentation Index

Fetch the complete documentation index at: https://docs.social-api.ai/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Prefix your API key with "Bearer ". Example: Authorization: Bearer sapi_key_...

Path Parameters

pid
string
required

Post ID

Body

application/json

Updated content

first_comment
string

FirstComment replaces the auto-first-comment.

hidden
boolean

Hidden archives the post from default list views when true.

Example:

false

media_ids
string[]

MediaIDs replaces the attached media files.

scheduled_at
string

ScheduledAt changes the scheduled publication time (RFC3339).

Example:

"2026-04-02T14:00:00Z"

targets
object[]

Targets replaces or updates per-platform target configuration.

text
string

Text replaces the post body. Only for draft/scheduled/failed posts.

Example:

"Updated post content"

title
string

Title replaces the post title.

Example:

"Updated Title"

visibility
enum<string>

Visibility changes who can see the post.

Available options:
public,
private,
connections_only
Example:

"public"

Response

Post updated

created_at
string
Example:

"2026-03-14T09:00:00Z"

hidden
boolean
Example:

false

id
string
Example:

"p_01HZ9X3Q4R5M6N7P8V2K0W1J"

media_ids
string[]
published_at
string
Example:

"2026-04-01T10:00:05Z"

retry_count
integer
Example:

0

scheduled_at
string
Example:

"2026-04-01T10:00:00Z"

status
enum<string>
Available options:
draft,
scheduled,
publishing,
published,
partial,
failed,
cancelled
Example:

"published"

targets
object[]
text
string
Example:

"Check out our new product launch!"

title
string
Example:

"Exciting News"

updated_at
string
Example:

"2026-03-14T09:00:00Z"

visibility
enum<string>
Available options:
public,
private,
connections_only
Example:

"public"