工具 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.
调用信息
- 工具标识
- tiktok-ads.file_music_upload
- 服务提供方
- TikTok 广告
- 平均响应
- 0 ms
- 近 7 天调用
- 0
输入参数
advertiser_id必填Advertiser ID.
file_idFile 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_nameMusic name. Valid only when `upload_type` is provided. Length: 1-100 characters. Defaults to the local file name if omitted.
material_actionOperation 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_idMaterial 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_sceneScenario 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_typeUpload 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`.