Skip to main content
POST
/
v1
/
posts
/
video
curl -X POST https://api.infinipost.co/v1/posts/video \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "accountIds": ["acc_123", "acc_456"],
    "contentUrl": "https://example.com/video.mp4",
    "caption": "Check out this amazing content! #viral",
    "soundId": "sound_abc123",
    "scheduledTime": "2024-04-22T12:00:00Z"
  }'
{
  "posts": [
    {
      "postId": "post_abc123",
      "accountId": "acc_123",
      "platform": "tiktok",
      "status": "scheduled",
      "scheduledTime": "2024-04-22T12:00:00Z",
      "createdAt": "2024-04-21T20:15:00Z"
    },
    {
      "postId": "post_def456",
      "accountId": "acc_456",
      "platform": "instagram",
      "status": "scheduled",
      "scheduledTime": "2024-04-22T12:00:00Z",
      "createdAt": "2024-04-21T20:15:00Z"
    }
  ]
}

Request Body

accountIds
array
required
Array of account IDs to post to (e.g., ["acc_123", "acc_456"]).
contentUrl
string
required
URL of the video file to post.
caption
string
Post caption/description.
soundId
string
ID of a TikTok sound to attach to the post.Platform Support:
  • TikTok: Supported
  • Instagram: Not supported
Usage:
  1. Import the audio using the Upload Sound endpoint with a TikTok video URL
  2. The endpoint returns a soundId
  3. Use that soundId in this field
Example workflow:
// Step 1: Import audio from a TikTok video
const soundResponse = await fetch('https://api.infinipost.co/v1/media/sounds', {
  method: 'POST',
  headers: { 'Authorization': 'Bearer YOUR_API_KEY' },
  body: JSON.stringify({
    soundUrl: 'https://www.tiktok.com/@username/video/7123456789'
  })
});
const { soundId } = await soundResponse.json();

// Step 2: Use the returned soundId in your post
const postResponse = await fetch('https://api.infinipost.co/v1/posts/video', {
  method: 'POST',
  headers: { 'Authorization': 'Bearer YOUR_API_KEY' },
  body: JSON.stringify({
    accountIds: ['acc_123456'],
    contentUrl: 'https://example.com/video.mp4',
    soundId: soundId
  })
});
scheduledTime
string
ISO 8601 timestamp for when to post. If not provided, posts immediately.

Response

posts
array
Array of created post objects (one per account).
curl -X POST https://api.infinipost.co/v1/posts/video \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "accountIds": ["acc_123", "acc_456"],
    "contentUrl": "https://example.com/video.mp4",
    "caption": "Check out this amazing content! #viral",
    "soundId": "sound_abc123",
    "scheduledTime": "2024-04-22T12:00:00Z"
  }'
{
  "posts": [
    {
      "postId": "post_abc123",
      "accountId": "acc_123",
      "platform": "tiktok",
      "status": "scheduled",
      "scheduledTime": "2024-04-22T12:00:00Z",
      "createdAt": "2024-04-21T20:15:00Z"
    },
    {
      "postId": "post_def456",
      "accountId": "acc_456",
      "platform": "instagram",
      "status": "scheduled",
      "scheduledTime": "2024-04-22T12:00:00Z",
      "createdAt": "2024-04-21T20:15:00Z"
    }
  ]
}