TOOL API

file_music_upload

Uploads music and returns a music ID, or performs music-list actions for Carousel Ads by adding music to the Liked list or History list, or removing music from the Liked list. Copyright notice: you must have the right to use the music; any copyright infringement is your responsibility. Header usage depends on upload mode: use `application/json` when `upload_type` is `UPLOAD_BY_FILE_ID`. Version note: in v1.3, `advertiser_id` changed from number to string, request parameters `music_scene`, `material_action`, and `material_id` were added, and response field `name` was deprecated.

ecommerceOAuth1 credits

Call information

Tool slug
tiktok-ads.file_music_upload
Provider
TikTok for Business
Average response
0 ms
Calls in 7 days
0

Input parameters

advertiser_idrequired

Advertiser ID.

file_id

File repository ID of the music file. Required when `upload_type` is `UPLOAD_BY_FILE_ID`. Obtain this value from the Upload Files endpoints. When `music_scene` is `CAROUSEL_ADS` or `CATALOG_CAROUSEL`, the referenced file must be a customized MP3 no larger than 10 MB.

file_name

Music name. Valid only when `upload_type` is provided. Length: 1-100 characters. Defaults to the local file name if omitted.

material_action

Operation to perform on an existing piece of music. Supported only when `music_scene` is `CAROUSEL_ADS` or `CATALOG_CAROUSEL`; when those scenes are used, you must provide either `upload_type` or `material_action`. Not supported when `music_scene` is `CREATIVE_ASSET` or omitted. If this field is provided, `material_id` is also required. Enum values: `ADD_TO_LIKED`, `ADD_TO_HISTORY`, `REMOVE_FROM_LIKED`. The ad account's Liked list can contain up to 1,000 pieces of music; once the limit is reached, `ADD_TO_LIKED` cannot be used to add more.

material_id

Material ID of the music used for list operations. Required when `music_scene` is `CAROUSEL_ADS` or `CATALOG_CAROUSEL` and `material_action` is provided. Not supported when `music_scene` is `CREATIVE_ASSET` or omitted. Use this for adding music to the Liked list or History list, or removing music from the Liked list. You can obtain a valid value either by uploading customized music for Carousel Ads through this endpoint, or from the `material_id` returned by `/file/music/get/`.

music_scene

Scenario where the music is used. Enum values: `CREATIVE_ASSET` for Creative Tools, `CAROUSEL_ADS` for non-shopping carousel ads, and `CATALOG_CAROUSEL` for shopping ads (VSA) carousel format. Default is `CREATIVE_ASSET`.

upload_type

Upload method. When `music_scene` is `CAROUSEL_ADS` or `CATALOG_CAROUSEL`, you must provide either `upload_type` or `material_action`. If set to `UPLOAD_BY_FILE_ID`, provide `file_id`.