Create an API key
Open Dashboard → AI & API and create a key. Copy it once. It starts with pw_live_. Send it on every request:
Header
Authorization: Bearer pw_live_…
Every URL below starts at https://postwing.io/api/v1.
the whole flow
You call PostWing. PostWing publishes to TikTok at the time you set. The post also shows up on your calendar.
Open Dashboard → AI & API and create a key. Copy it once. It starts with pw_live_. Send it on every request:
Header
Authorization: Bearer pw_live_…
Every URL below starts at https://postwing.io/api/v1.
Connect the TikTok account you want to post from. You only do this once.
The simple way is in the dashboard. Open Accounts, choose TikTok, and finish the TikTok login.
From the API, start that same login. Send platform tiktok. The response includes a url. Open it and approve TikTok.
Start connect
curl -s -X POST "https://postwing.io/api/v1/accounts" \
-H "Authorization: Bearer pw_live_…" \
-H "Content-Type: application/json" \
-d '{ "platform": "tiktok" }'After you finish in the browser, sync. This imports the account into your workspace and returns the account id.
Sync
curl -s -X POST "https://postwing.io/api/v1/accounts/sync" \ -H "Authorization: Bearer pw_live_…"
In the response, find the object where platform is tiktok or tiktok_business and copy account_id. That is the id you send when you create the post.
Sync response
{
"synced_count": 1,
"accounts": [
{
"account_id": "c3d4e5f6-a7b8-9012-cdef-123456789012",
"platform": "tiktok_business",
"handle": "brand",
"display_name": "Brand",
"status": "connected"
}
]
}Connected TikTok in the dashboard instead? List accounts and copy the same field:
List accounts
curl -s -X GET "https://postwing.io/api/v1/accounts" \ -H "Authorization: Bearer pw_live_…"
TikTok needs a video or images. A caption by itself is not enough. Send the video, the caption, a future time, and the TikTok account_id from sync. This call creates the post. TikTok does not publish until you confirm in the next step. scheduled_at is UTC.
Create a video
curl -s -X POST "https://postwing.io/api/v1/posts/preview" \
-H "Authorization: Bearer pw_live_…" \
-H "Content-Type: application/json" \
-d '{
"caption": "A 15-second look at the new menu.",
"scheduled_at": "2026-10-12T15:00:00Z",
"targets": [
{ "account_id": "c3d4e5f6-a7b8-9012-cdef-123456789012" }
],
"media_items": [
{ "url": "https://cdn.example.com/menu.mp4", "type": "video" }
]
}'You get back three things that matter:
Response
{
"preview": {
"caption": "A 15-second look at the new menu.",
"scheduled_at": "2026-10-12T15:00:00.000Z",
"post_type": "video",
"targets": [
{
"account_id": "c3d4e5f6-a7b8-9012-cdef-123456789012",
"platform": "tiktok_business",
"handle": "brand"
}
]
},
"confirmation_token": "eyJ…signature",
"expires_in_seconds": 300
}One video per post. The video URL has to be public HTTPS, and videos imported from a URL need to be 100MB or smaller. A caption is capped at about 2,200 characters. Leave the TikTok options off for a public post that allows comments, duets, and stitch.
The same video can go to Instagram and YouTube. Connect each channel, then copy its account_id from the sync response.
Connect Instagram
curl -s -X POST "https://postwing.io/api/v1/accounts" \
-H "Authorization: Bearer pw_live_…" \
-H "Content-Type: application/json" \
-d '{ "platform": "instagram" }'Connect YouTube
curl -s -X POST "https://postwing.io/api/v1/accounts" \
-H "Authorization: Bearer pw_live_…" \
-H "Content-Type: application/json" \
-d '{ "platform": "youtube" }'Open each url, finish the login, then sync once. Copy account_id where platform is instagram, and where platform is youtube.
Add those ids to targets on the create call. YouTube still needs a title on its own target. One request, one confirm. Every account publishes at the same scheduled_at. Leave caption off a target to use the shared caption. Set caption when that channel needs different text.
Create one video for three channels
curl -s -X POST "https://postwing.io/api/v1/posts/preview" \
-H "Authorization: Bearer pw_live_…" \
-H "Content-Type: application/json" \
-d '{
"caption": "A 15-second look at the new menu.",
"scheduled_at": "2026-10-12T15:00:00Z",
"targets": [
{ "account_id": "c3d4e5f6-a7b8-9012-cdef-123456789012" },
{ "account_id": "b2c3d4e5-f6a7-8901-bcde-f12345678901" },
{
"account_id": "a7b8c9d0-e1f2-3456-0123-567890123456",
"platform_options": {
"title": "The new menu",
"made_for_kids": false
}
}
],
"media_items": [
{ "url": "https://cdn.example.com/menu.mp4", "type": "video" }
]
}'Facebook, LinkedIn, X, and Threads can use this video too. Pinterest needs board_ids on its own target. TikTok still needs the video or images.
When the TikTok preview looks right, confirm with the token from that response. Use the token as-is. Do not invent one.
Confirm
curl -s -X POST "https://postwing.io/api/v1/posts/confirm" \
-H "Authorization: Bearer pw_live_…" \
-H "Content-Type: application/json" \
-d '{ "confirmation_token": "eyJ…signature" }'The response includes view_url. Open it to see the post on your calendar. TikTok publishes at the time you set. Instagram and YouTube publish then too, when you added them. You can edit or cancel later from the dashboard or with the same API.
If confirm says the token expired, create the post again and confirm the new token within 5 minutes.
images
An image post uses type image. title is for image posts only. A video does not use it.
Create an image post
curl -s -X POST "https://postwing.io/api/v1/posts/preview" \
-H "Authorization: Bearer pw_live_…" \
-H "Content-Type: application/json" \
-d '{
"caption": "Three looks from the new drop.",
"scheduled_at": "2026-10-12T18:00:00Z",
"targets": [
{
"account_id": "c3d4e5f6-a7b8-9012-cdef-123456789012",
"platform_options": { "title": "New drop" }
}
],
"media_items": [
{ "url": "https://cdn.example.com/look-1.jpg", "type": "image" },
{ "url": "https://cdn.example.com/look-2.jpg", "type": "image" }
]
}'Add more image objects in media_items, up to 30. A title is capped at 90 characters. Leave title off when you do not need one.
options
These fields are optional. Leave them off for a public post. Set them on the TikTok target when you need control.
Save a private draft
curl -s -X POST "https://postwing.io/api/v1/posts/preview" \
-H "Authorization: Bearer pw_live_…" \
-H "Content-Type: application/json" \
-d '{
"caption": "Holding this until we are ready.",
"scheduled_at": "2026-10-12T18:00:00Z",
"targets": [
{
"account_id": "c3d4e5f6-a7b8-9012-cdef-123456789012",
"platform_options": {
"privacy_status": "private",
"is_draft": true
}
}
],
"media_items": [
{ "url": "https://cdn.example.com/menu.mp4", "type": "video" }
]
}'privacy_status is public or private. The default is public. is_draft saves a draft in the TikTok app, and you finish it there.
allow_comment, allow_duet, and allow_stitch default to true. Set any of them to false to turn that off. is_ai_generated defaults to false. Set it to true to mark the post as AI-generated.
A file on your computer uses the direct upload URL, covered in the API docs.
questions
No. TikTok needs a video or images in media_items, plus the TikTok account_id. Then confirm with the token.