Delete Mini Drama Videos
Deletes up to 20 videos from a BytePlus space in one batch. TikTok refuses to delete a video that the online version of a mini drama references. Check each item in result_list, because a batch can partially succeed.
Endpoint
HTTP URL |
|
HTTP method |
|
Scopes |
|
Content type |
|
Request
Headers
Field | Type | Description | Required | Example |
|
| The client access token of your mini app, prefixed with | Yes |
|
|
| The client key of the calling mini app. | Yes |
|
|
| The media type of the request body. | Yes |
|
Request body
The BytePlus account and space must be bound to the calling mini app. All videos in a batch must belong to the same account and space.
Field | Type | Description | Required | Example |
|
| The ID of the BytePlus account. | Yes |
|
|
| The name of the BytePlus space. | Yes |
|
|
| The IDs of the videos to delete. Minimum: | Yes |
|
Remove duplicate IDs before you send the request. If vid_list contains a duplicate, TikTok processes the first occurrence and returns a parameter error for later ones. Duplicates count toward the 20-item limit.
Request example
curl --location --request POST 'https://open.tiktokapis.com/v2/sg/shortdrama/video/delete/' \
--header 'Authorization: Bearer CLIENT_ACCESS_TOKEN' \
--header 'client-key: CLIENT_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
"byteplus_account_id": "BYTEPLUS_ACCOUNT_ID",
"space_name": "SPACE_NAME",
"vid_list": ["VID_1", "VID_2"]
}'Replace the following:
CLIENT_ACCESS_TOKEN: your mini app's client access token.CLIENT_KEY: your mini app's client key.BYTEPLUS_ACCOUNT_ID: the ID of the BytePlus account bound to your mini app.SPACE_NAME: the name of your BytePlus space.VID_1,VID_2: the IDs of the videos to delete.
Response
Response body
If request validation fails, the response can contain only error.
Field | Type | Description |
| The batch result. | |
| The error object. |
DeleteVideosData
Field | Type | Description | Example |
|
| The overall batch result. One of: |
|
| The result for each video, in the same order as | See BatchDeleteShortDramaVideoItemResult. |
BatchDeleteShortDramaVideoItemResult
Field | Type | Description | Example |
|
| The ID of the video. |
|
|
| The result for this video. One of: |
|
|
| The error code. Returned only when deletion fails. |
|
|
| The error description. Returned only when deletion fails. |
|
| The mini dramas and versions that reference the video. Returned only when deletion is refused because an online version references the video. | See ShortDramaAlbumVersionReference. |
ShortDramaAlbumVersionReference
Field | Type | Description | Example |
|
| The ID of the mini drama that references the video. Preserve 64-bit precision when you parse it. |
|
|
| The online version that references the video. |
|
Note: error.code is a string, but result_list[].error_code is an integer.
ErrorStruct
Field | Type | Description |
|
| The error code. Omitted on success. |
|
| A human-readable description of the error. |
|
| The unique identifier for the request. Include this value when contacting support. |
Response example
{
"data": {
"result_type": 2,
"result_list": [
{
"vid": "v0d000example0000000000000000001",
"result_type": 1
},
{
"vid": "v0d000example0000000000000000002",
"result_type": 3,
"error_code": 22101,
"error_message": "Video is referenced by a currently online album version",
"related_album_versions": [
{
"album_id": 7300000000000000001,
"version": 2
}
]
}
]
},
"error": {
"log_id": "202508010000000000000000000000000"
}
}Error codes
Error code | Description | Resolution |
| The service is temporarily unavailable. | Retry later. If the error persists, contact support with the |
|
| Split the request into batches of 20 or fewer and retry. |
|
| Remove duplicates and retry. |
| The request is invalid. | Check the required fields, video IDs, and field limits, then retry. |
| An online mini drama version references the video. | Remove the reference before you delete the video. |
| The BytePlus account, space, or video doesn't match. | Correct the account and space, then retry. |
| The video doesn't exist in BytePlus. | Verify the |
| BytePlus couldn't delete the video. | Check the video's state and retry later. |