sangtao.ai
API key

User Assets

Delete several assets

Delete several assets in one call, by their IDs.

POSThttps://api.sangtao.ai/v2/user-assets/bulk-delete

Authorization

  • X-Api-Keystring · headerrequired

    Your API key, from the API keys page of your account.

Body

  • idsstring[]required

    IDs of the assets to delete (ua_…), at most 50. Old numeric ids are still accepted, and can be mixed in

Response

  • deletednumber

    How many assets were deleted. Ids that are not yours are skipped; none of them yours → 404

Errors

StatuserrorCodeWhen
400VALIDATION_ERRORids is missing or empty, or has more than 50 ids
404ASSET_NOT_FOUNDNone of the ids is an asset of yours
POST/user-assets/bulk-delete
curl -X POST "https://api.sangtao.ai/v2/user-assets/bulk-delete" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "ids": [
      "ua_3kT9qPz0B",
      "ua_7mR2xLq5D",
      "ua_9pW4nKt1H"
    ]
  }'
{
  "success": true,
  "data": {
    "deleted": 3
  }
}