Skip to main content

Endpoint

POST https://api.ugc.inc/media/update-tag

Overview

Update tags on one or more media items. Works for both user-uploaded media and social audio. Supports bulk updates with different tags for each item in a single request.

Request Body

updates
array
required
Array of update objects, each containing:

Single Update (Deprecated)

id
string
The ID of the media item to update (deprecated - use updates array instead)
tag
string
The new tag value (deprecated - use updates array instead)

Response

data.results
array
Array of update results, one for each item in the request:
curl -X POST https://api.ugc.inc/media/update-tag \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "updates": [
      { "id": "media_abc123", "tag": "featured" },
      { "id": "media_def456", "tag": "archive" },
      { "id": "media_ghi789", "tag": "featured/videos" }
    ]
  }'
{
  "ok": true,
  "code": 200,
  "data": {
    "results": [
      {
        "id": "media_abc123",
        "success": true,
        "media": {
          "id": "media_abc123",
          "org_id": "org_xyz789",
          "name": "video.mp4",
          "tag": "featured",
          "type": "video",
          "url": "https://api.ugc.inc/media/file/media_abc123",
          "created_at": "2024-01-15T10:30:00.000Z",
          "media_type": "user_media"
        }
      },
      {
        "id": "media_def456",
        "success": true,
        "media": {
          "id": "media_def456",
          "org_id": "org_xyz789",
          "name": "image.jpg",
          "tag": "archive",
          "type": "image",
          "url": "https://api.ugc.inc/media/file/media_def456",
          "created_at": "2024-01-14T09:00:00.000Z",
          "media_type": "user_media"
        }
      }
    ]
  },
  "message": "Successfully updated 2 media item(s)"
}