Zernio
APIFor you
Zernio
APIFor you
Platforms

TikTok

Overview

Publish

PostsLocations & MusicPlatform FieldsMedia Requirements

Engage

AnalyticsInbox

Reference

Limits & Errors
Dashboard
OverviewPlatformsAPI ReferenceResources
TikTok

Locations & Music

Search TikTok locations and Commercial Music Library tracks and attach them to a post.


Location tags

TikTok video posts can optionally attach a location tag (place).

First search for a location tag. Then send the chosen result’s id and name as tiktokSettings.locationId and tiktokSettings.locationName when creating the post.

TikTok returns up to 20 results. It fills the list with fuzzy matches when nothing matches closely, so an unrelated result does not mean the place is missing.

Search locations

Call GET /v1/accounts/{accountId}/tiktok/locations with a query string.

curl "https://zernio.com/api/v1/accounts/66b2e19d8c3f5a7e9d0b1c2d/tiktok/locations?query=Barcelona" \
  -H "Authorization: Bearer $ZERNIO_API_KEY"

Response (200):

{
  "locations": [
    {
      "id": "1234567890",
      "name": "Barcelona",
      "address": "Catalonia, Spain"
    }
  ]
}

Attach a location to a post

Send both locationId and locationName in tiktokSettings.

Location tags are supported for accounts connected through the TikTok for Business app and video posts only. A developer-app account rejects the post at publish time, and a direct photo post is rejected at creation.

Location fields are ignored on drafts (tiktokSettings.draft: true), because TikTok ignores post_info fields in the Creator Inbox flow.

curl -X POST https://zernio.com/api/v1/posts \
  -H "Authorization: Bearer $ZERNIO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "content": "Coffee stop before the show",
    "mediaItems": [
      {"type": "video", "url": "https://cdn.example.com/video.mp4"}
    ],
    "platforms": [
      {"platform": "tiktok", "accountId": "66b2e19d8c3f5a7e9d0b1c2d"}
    ],
    "tiktokSettings": {
      "privacy_level": "PUBLIC_TO_EVERYONE",
      "allow_comment": true,
      "allow_duet": true,
      "allow_stitch": true,
      "locationId": "1234567890",
      "locationName": "Barcelona",
      "content_preview_confirmed": true,
      "express_consent_given": true
    },
    "publishNow": true
  }'

Commercial Music Library (Business app accounts)

Accounts connected through the TikTok for Business app can attach a Commercial Music Library (CML) track to a post by setting tiktokSettings.musicSoundInfo.

Use this when you need a specific track (instead of auto_add_music).

musicSoundInfo is ignored on drafts (tiktokSettings.draft: true), because TikTok ignores post_info fields in the Creator Inbox flow.

List trending tracks

Call GET /v1/accounts/{accountId}/tiktok/commercial-music to fetch the 100 currently trending CML tracks for the account.

The list is not paged. Use countryCode to select a country chart.

curl "https://zernio.com/api/v1/accounts/66b2e19d8c3f5a7e9d0b1c2d/tiktok/commercial-music?countryCode=ES" \
  -H "Authorization: Bearer $ZERNIO_API_KEY"

Response (200):

{
  "tracks": [
    {
      "id": "7212345678901234567",
      "commercialMusicId": "7012345678901234567",
      "name": "Track Name",
      "artist": "Artist Name",
      "durationSec": 30,
      "genres": ["pop"],
      "previewUrl": "https://...",
      "thumbnailUrl": "https://...",
      "rank": 1,
      "clip": {
        "id": "7312345678901234567",
        "durationSec": 15,
        "previewUrl": "https://..."
      }
    }
  ]
}

Attach a track to a post

Prefer tracks[].clip.id as tiktokSettings.musicSoundInfo.musicSoundId when creating a post. Fall back to tracks[].id only when the track has no clip.

Both ids publish. But posts published with the full-track id have shown viewers a sound page saying the song is not available in their country (observed from Germany, 2026-10-06).

The clip.id gave a working sound page for the same track.

Do not use commercialMusicId as musicSoundId. TikTok rejects it at publish time.

Optionally set track volume and trim points (video posts only).

curl -X POST https://zernio.com/api/v1/posts \
  -H "Authorization: Bearer $ZERNIO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "content": "New drop with a CML track",
    "mediaItems": [
      {"type": "video", "url": "https://cdn.example.com/video.mp4"}
    ],
    "platforms": [
      {"platform": "tiktok", "accountId": "66b2e19d8c3f5a7e9d0b1c2d"}
    ],
    "tiktokSettings": {
      "privacy_level": "PUBLIC_TO_EVERYONE",
      "allow_comment": true,
      "allow_duet": true,
      "allow_stitch": true,
      "musicSoundInfo": {
        "musicSoundId": "7312345678901234567",
        "musicSoundVolume": 50,
        "musicSoundStart": 0,
        "musicSoundEnd": 15000
      },
      "videoOriginalSoundVolume": 20,
      "content_preview_confirmed": true,
      "express_consent_given": true
    },
    "publishNow": true
  }'
Was this page helpful?

Posts

Video posts, covers, photo carousels, creator info, commercial content, posting caps and Creator Inbox drafts.

Platform Fields

Every tiktokSettings field you can send with a TikTok post.

On this page

Location tagsSearch locationsAttach a location to a postCommercial Music Library (Business app accounts)List trending tracksAttach a track to a post