Skip to main content
PATCH
/
v1
/
posts
/
{postId}
curl -X PATCH "https://api.infinipost.co/v1/posts/post_abc123" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "caption": "Updated caption! #trending",
    "scheduledTime": "2024-04-22T15:00",
    "timezone": "America/New_York",
    "soundId": "snd_xyz789"
  }'
{
  "postId": "post_abc123",
  "accountId": "acc_1a2b3c4d5e",
  "platform": "tiktok",
  "contentType": "video",
  "contentUrl": "https://storage.googleapis.com/...",
  "thumbnailUrl": "https://storage.googleapis.com/.../thumb.jpg",
  "caption": "Updated caption! #trending",
  "soundId": "snd_xyz789",
  "timezone": "America/New_York",
  "scheduledTime": "2024-04-22T19:00:00Z",
  "status": "generated",
  "createdAt": "2024-04-21T20:15:00Z"
}

Documentation Index

Fetch the complete documentation index at: https://docs.infinipost.co/llms.txt

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

Only posts with a status of generated or pending_render can be edited. Attempting to edit a post that has already been posted or failed will return an error.

Path Parameters

postId
string
required
The unique post identifier.

Request Body

All fields are optional. Only include the fields you want to update.
caption
string
Updated caption for the post.
scheduledTime
string
Updated local time to post, in YYYY-MM-DDTHH:MM format (e.g. "2024-04-22T14:00"). Interpreted in the timezone specified by the timezone parameter.
timezone
string
IANA timezone for interpreting scheduledTime. Required if scheduledTime is provided. Supported values:
ValueLabel
America/New_YorkEastern (ET)
America/ChicagoCentral (CT)
America/DenverMountain (MT)
America/Los_AngelesPacific (PT)
America/AnchorageAlaska (AKT)
Pacific/HonoluluHawaii (HST)
Europe/LondonLondon (GMT)
Europe/ParisParis (CET)
Asia/TokyoTokyo (JST)
Asia/SingaporeSingapore (SGT)
Australia/SydneySydney (AEDT)
contentType
string
Updated content type: video or slides. Must be provided alongside contentUrl if changing content.
contentUrl
string | array
Updated content URL. When contentType is video, provide a single URL string. When contentType is slides, provide an array of image URL strings.
soundId
string
Sound ID to attach to the post. If omitted the post will have no TikTok sound attached. Only applicable for TikTok posts.

Response

postId
string
Unique identifier for the post.
accountId
string
The account this post is scheduled for.
platform
string
Platform: tiktok or instagram.
contentType
string
video or slides.
contentUrl
string | array
The content to be posted. When contentType is video, this is a single URL string. When contentType is slides, this is an array of image URL strings.
thumbnailUrl
string
URL of the video thumbnail. null for slideshow posts or if not yet generated.
caption
string
Post caption.
soundId
string
ID of the sound attached to this post. null if no sound.
timezone
string
IANA timezone the scheduledTime was submitted in.
scheduledTime
string
UTC ISO 8601 timestamp of when the post is scheduled to go live.
status
string
Current status: generated or pending_render.
createdAt
string
ISO 8601 timestamp of when the post was created.
curl -X PATCH "https://api.infinipost.co/v1/posts/post_abc123" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "caption": "Updated caption! #trending",
    "scheduledTime": "2024-04-22T15:00",
    "timezone": "America/New_York",
    "soundId": "snd_xyz789"
  }'
{
  "postId": "post_abc123",
  "accountId": "acc_1a2b3c4d5e",
  "platform": "tiktok",
  "contentType": "video",
  "contentUrl": "https://storage.googleapis.com/...",
  "thumbnailUrl": "https://storage.googleapis.com/.../thumb.jpg",
  "caption": "Updated caption! #trending",
  "soundId": "snd_xyz789",
  "timezone": "America/New_York",
  "scheduledTime": "2024-04-22T19:00:00Z",
  "status": "generated",
  "createdAt": "2024-04-21T20:15:00Z"
}

Error Responses

Unauthorized
{
  "error": {
    "code": "unauthenticated",
    "message": "Invalid or missing API key"
  }
}
Post Not Found
{
  "error": {
    "code": "not_found",
    "message": "Post post_abc123 not found"
  }
}
Post Already Posted
{
  "error": {
    "code": "cannot_edit",
    "message": "Only posts with status 'generated' or 'pending_render' can be edited"
  }
}
Server Error
{
  "error": {
    "code": "internal",
    "message": "An unexpected error occurred"
  }
}