Skip to content
Developers

    Posts

    Edit a post

    Markdown
    PATCHhttps://api.tiktornado.com/api/v1/posts/{postId}

    Scope: posts:write. Needs an Idempotency-Key header.

    Changes a scheduled or failed post: any of its caption, mediaRefs, settings and scheduledFor, at least one. Only the fields you send change.

    • settings replaces the whole set: a setting you leave out goes back to TikTok's usual behavior. settings: null clears every setting.
    • New media is checked like a new post's.
    • The post's kind and toDrafts never change. To change them, cancel the post and schedule a new one.
    • A post going to TikTok drafts takes no settings.
    • Refused from 10 minutes before the post goes out (post_locked), so from the start for a post sent with postNow, unless it failed.
    • A failed post that is edited is scheduled again, so its time must be more than 10 minutes ahead.

    {"scheduledFor": ...} alone moves the post to a new time.

    The answer's status is scheduling until TikTok's scheduler has the change. Follow it with GET /posts.

    Path parameters

    • postIdstringRequired

      The post, from POST /posts or GET /posts.

      Matches ^[A-Za-z0-9]{1,64}$.

    Header parameters

    • Idempotency-KeystringRequired

      A unique string you make up for this change, for example a UUID: 1 to 255 visible ASCII characters, no spaces. Send the same key with the same body to retry safely. Missing or malformed: 400 idempotency_key_required, before anything runs.

      Matches ^[\x21-\x7e]{1,255}$.

    Request body

    Any of these fields, at least one. A field you leave out stays as it is.

    • captionstring

      The caption, hashtags included. Up to 2,200 characters for a video and 4,000 for photos (caption_too_long). Counted as UTF-16 code units, the way JavaScript's length counts, spaces included, so most emoji count as 2 or more. A reply's 150 characters are counted differently, as the characters you see after trimming.

      At most 4,000 characters.

    • mediaRefsarray of strings

      One video, or 1 to 35 photos, in order, no item twice. Each is a mediaRef from POST /uploads, passed back exactly as you got it, or a public https link straight to the file (no login, no IP address).

      1 to 35 items. No item twice. Each: At most 2,048 characters.

    • settingsobject or null

      The new set of settings, replacing the whole old set, or null to clear them all.

      13 fields inside
      • privacystring

        Photos only: who can see the post. Videos are always public (everyone). everyone if left out. Not only_me with brandedContent other than none (branded_private).

        One of everyone, friends, followers, only_me.

      • allowCommentsboolean

        Videos and photos. false turns comments off. On if left out.

      • allowDuetsboolean

        Videos only. false turns duets off. On if left out.

      • allowStitchesboolean

        Videos only. false turns stitches off. On if left out.

      • brandedContentstring

        Videos and photos: the commercial content disclosure. your_brand promotes your own business, paid_partnership promotes another brand, both is both at once. none if left out.

        One of none, your_brand, paid_partnership, both.

      • aiGeneratedboolean

        Videos only. true labels the video as made with AI. A photo post can't carry the label (ai_label_photo).

      • coverAtMsinteger

        Videos only. The frame to use as the cover, in milliseconds from the start. Not with coverImageRef.

        0 to 600,000.

      • coverImageRefstring

        Videos only. A custom cover image: a mediaRef from POST /uploads, or a public https link straight to a JPEG, PNG or WebP up to 20 MB. Not with coverAtMs.

        At most 2,048 characters.

      • coverPhotoIndexinteger

        Photos only. Which photo is the cover, 0 for the first. It must be one of the post's photos.

        0 to 34.

      • musicobject

        Videos and photos: a track from TikTok's commercial music, added to the post. Not with autoMusic (music_conflict). The volumes, startMs and endMs are for videos only.

        5 fields inside
        • trackIdstringRequired

          A track's id from GET /accounts/{accountId}/music for this account.

          1 to 200 characters.

        • volumeinteger

          Videos only. The track's volume, 0 to 100. 50 if left out.

          0 to 100.

        • startMsinteger

          Videos only. Where in the track to start, in milliseconds. 0 if left out.

          At least 0.

        • endMsinteger

          Videos only. Where in the track to stop, in milliseconds, after startMs. The video's end if left out.

          At least 1.

        • videoSoundVolumeinteger

          Videos only. The video's own sound under the track, 0 to 100. 50 if left out.

          0 to 100.

      • autoMusicboolean

        Photos only. true lets TikTok add a recommended track. Not with music, and not with brandedContent other than none (auto_music_branded).

      • locationobject

        Videos only. A place to tag, as GET /accounts/{accountId}/locations gives it.

        2 fields inside
        • idstringRequired

          The place's id.

          1 to 200 characters.

        • namestringRequired

          The place's name.

          1 to 200 characters.

      • adsOnlyboolean

        Videos only. true keeps the video off the profile, for use as an ad.

    • scheduledForstring

      When to publish, ISO 8601 with a time zone, for example 2026-12-02T15:00:00Z. More than 10 minutes from now (schedule_too_soon), so a time exactly 10 minutes ahead is refused.

      Matches ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}(:\d{2}(\.\d{1,3})?)?(Z|[+-]\d{2}:\d{2})$.

    Example request

    curl -X PATCH 'https://api.tiktornado.com/api/v1/posts/k174wq9nrm6t2f0bd3xh8pz5a87v1c2e' \
      -H "Authorization: Bearer $TIKTORNADO_API_KEY" \
      -H "Idempotency-Key: $(uuidgen)" \
      -H "Content-Type: application/json" \
      -d '{
        "caption": "Leg day, round two #fitness",
        "settings": {
          "allowComments": false,
          "aiGenerated": true
        }
      }'

    Response 200

    The change is saved and on its way to TikTok's scheduler.

    Idempotent-Replayed

    true when this is the stored answer to an earlier request with the same Idempotency-Key. Absent otherwise.

    • idstringRequired

      An id, letters and digits only.

      Matches ^[A-Za-z0-9]{1,64}$.

    • statusstringRequired

      Always scheduling.

    Example
    {
      "id": "k174wq9nrm6t2f0bd3xh8pz5a87v1c2e",
      "status": "scheduling"
    }

    Errors

    StatusReasonMessage
    400invalid_request

    Something here isn't valid. Check it and try again.

    idempotency_key_required

    Send an Idempotency-Key header with every change, so a retry can't make it twice.

    post_locked

    This post goes out in 10 minutes or less, so it can't be changed now.

    post_already_published

    This post is already live, so it can't be changed.

    invalid_state

    This can't be done right now. Refresh and try again.

    account_not_ready

    This account isn't ready to post yet.

    This account is under review by TikTok, so new posts can't be scheduled right now.

    media_required

    Add a video or photos to this post.

    too_many_photos

    This post has too many photos. TikTok allows up to 35.

    caption_too_long

    Your caption is too long. TikTok allows 2,200 characters on videos and 4,000 on photo posts.

    link_not_allowed

    This link can't be used. Use a public https link to the file.

    link_unreachable

    We couldn't open this link. Make sure it's public and points straight at the file.

    upload_expired

    This upload has expired. Upload the file again.

    file_damaged

    This file looks damaged. Export it again and upload it.

    mixed_media

    A post can have a video or photos, not both.

    file_type_not_supported

    This file type isn't supported. Use MP4, MOV or WebM for videos, or JPEG, PNG or WebP for photos.

    file_too_large

    This file is too big. Videos can be up to 4 GB and photos 20 MB.

    photo_too_large

    This photo is too big. Photos can be up to 20 MB.

    schedule_too_soon

    Pick a time more than 10 minutes from now.

    past_account_end

    This account ends before that time. Pick an earlier time.

    daily_limit_reached

    This account has hit TikTok's daily posting limit. Pick a later time.

    drafts_no_settings

    Posts sent to drafts can't carry post settings. Add them in the TikTok app.

    ai_label_photo

    Photo posts can only be marked as AI-generated in the TikTok app. Send it to drafts instead.

    setting_videos_only

    This setting only works on video posts.

    setting_photos_only

    This setting only works on photo posts.

    music_conflict

    Pick a track or automatic music, not both.

    auto_music_branded

    Automatic music doesn't work on branded content. Pick a track instead.

    branded_private

    Branded content can't be posted as Only me.

    invalid_post_setting

    One of this post's settings isn't valid. Check it and try again.

    401api_key_invalid

    This API key isn't valid. Check it, or create a new one in the app.

    403access_locked

    Your subscription isn't active, so this can't be changed right now. Visit Billing to fix it.

    api_scope_missing

    This API key can't do this. Create a key with the access it needs in the app.

    404not_found

    We couldn't find this.

    409idempotency_in_progress

    A request with this Idempotency-Key is still running. Try again in a moment.

    422idempotency_key_reused

    This Idempotency-Key was already used for a different request. Use a new one.

    429slow_down

    You're going a bit fast. Wait a moment and try again.

    500unknown_error

    Something went wrong on our side. We're on it.

    503service_unavailable

    Something went wrong on our side. We're on it.