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" } ] }
Create and schedule a video post to one or more accounts
["acc_123", "acc_456"]
soundId
// 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 }) });
Show properties
tiktok
instagram
scheduled
processing
posted
failed