# Publish to TikTok with the API
URL: https://skedcast.com/developers/guides/publish-to-tiktok-api

A TikTok video needs one required override, privacyLevel. TikTok requires an explicit visibility choice on every post, so there is no default, and the value must be one the connected creator account allows.

## What do you need before you publish?
You need one connected account for the platform. Connect it in the SkedCast console. If a client owns the account, create a connect link with `POST /v1/clients/{id}/connect-invites` and send it to them. They authorize from that page without a SkedCast login.
`GET /v1/accounts` lists the connected accounts with their ids. Pass that id in `targets.accountIds` below.

## How do you schedule a TikTok post with the API?
```bash
curl -X POST https://api.skedcast.com/v1/posts \
  -H "Authorization: Bearer sked_live_YOUR_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "clientId": "<clientId>",
    "content": "Launch day is here 🚀",
    "mediaIds": ["<mediaAssetId>"],
    "targets": { "mode": "selection", "accountIds": ["<tiktokAccountId>"] },
    "schedule": { "type": "at", "scheduledAt": "2030-01-15T15:00:00Z" }
  }'
```

## Which TikTok fields can you set?
Put everything platform-specific in one `variants` entry with `"platform": "tiktok"` and an `overrides` object. Send only `tiktok` keys on a `tiktok` variant. SkedCast reads the keys in the table below and ignores the rest.

## Reference
Field | Type | Values / default | Notes
`privacyLevel` | enum — Required | `PUBLIC_TO_EVERYONE` \| `MUTUAL_FOLLOW_FRIENDS` \| `FOLLOWER_OF_CREATOR` \| `SELF_ONLY` | No default. Must be a visibility the connected creator account allows.
`yourBrand` | boolean | `false` | The creator is promoting their own brand or business (`brand_organic_toggle`).
`brandedContent` | boolean | `false` | A paid partnership or third-party promotion (`brand_content_toggle`). Cannot be combined with `privacyLevel: "SELF_ONLY"`.
`disableComment` | boolean | `false` | —
`disableDuet` | boolean | `false` | —
`disableStitch` | boolean | `false` | —
`brandedContentAccepted` | boolean | `false` | Must be `true` when `brandedContent` is on: you accept TikTok's Branded Content Policy. It is not sent to TikTok.
`aiDisclosure` | boolean | `false` | Labels the post as AI-generated on TikTok. The post-level `aiDisclosure` sets it too.
`photoCoverIndex` | integer | `0` (the first photo) | Photo posts only: which attached photo TikTok shows as the cover.
`autoAddMusic` | boolean | `false` | Photo posts only: let TikTok add a recommended soundtrack.

## Unknown keys are ignored without an error
A misspelled or unknown key in `overrides` is not an error and not a warning. It is dropped, so check the field names in the table above, especially a required one.
A YouTube-only key (such as `privacyStatus`, `captions` or `chapters`) sent on another platform's variant is ignored and returns an `override_key_wrong_platform` warning.

## How do you add TikTok-specific settings?
```json
{
  "clientId": "<clientId>",
  "content": "Day in the life 🎬",
  "mediaIds": ["<videoAssetId>"],
  "coverFrameMs": 2500,
  "targets": { "mode": "selection", "accountIds": ["<tiktokAccountId>"] },
  "variants": [
    {
      "platform": "tiktok",
      "overrides": { "privacyLevel": "PUBLIC_TO_EVERYONE", "disableDuet": true, "yourBrand": true }
    }
  ],
  "schedule": { "type": "at", "scheduledAt": "2030-01-15T15:00:00Z" }
}
```

## The video cover is a timestamp, not an image
Other platforms take an uploaded image for a custom cover (`coverMediaId`). TikTok takes `coverFrameMs`, a millisecond offset into the video, which SkedCast sends as TikTok's `video_cover_timestamp_ms`. It is independent of `coverMediaId`, so you can set both on one post.

## How do you check that the post published?
Publishing creates one post target per account. `GET /v1/post-targets/{id}` (or `GET /v1/posts/{id}`) reports `status`, plus `externalId` (TikTok's own post id) and `permalink` (its public URL) once published. To avoid polling, subscribe to the `target.published` and `target.failed` webhooks (see the webhooks guide).

## FAQ
**Q: Why does a TikTok post fail when I set no overrides?**
A: privacyLevel is required and has no default. Set it on the tiktok variant to PUBLIC_TO_EVERYONE, MUTUAL_FOLLOW_FRIENDS, FOLLOWER_OF_CREATOR or SELF_ONLY.

**Q: Can I combine brandedContent with a private post?**
A: No. brandedContent: true cannot be combined with privacyLevel: "SELF_ONLY", because TikTok requires branded content to be visible.
