Skip to main content
Manage a single tracked analytics target.

Path Parameters

id
string
required
Analytics target ID.

GET Behavior

  • Returns target plus summary (profile, totals, timeline, top posts, and refresh status) for the target.
  • This mirrors the per-account detail panel used in the internal UI.

PATCH Body

At least one of these fields is required:
displayName
string
New display name (nullable).
refreshPolicy
object
Refresh policy patch (for example freeDailyRefresh, maxPosts).
favorite
boolean
Favorite toggle stored in metadata.

DELETE Behavior

Deletes the target from the authenticated key scope.
curl --request PATCH \
  --url https://www.genviral.io/api/partner/v1/analytics/targets/e7a7f417-56db-4320-9e9a-fd6fdabda09d \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "favorite": true
  }'
{
  "ok": true,
  "code": 200,
  "message": "Analytics target updated",
  "data": {
    "id": "e7a7f417-56db-4320-9e9a-fd6fdabda09d",
    "platform": "tiktok",
    "identifier": "@brand",
    "display_name": "Brand HQ",
    "metadata": {
      "favorite": true
    }
  }
}

Error Responses

  • 400 missing_target_id — missing path parameter
  • 400 invalid_json — PATCH body is not valid JSON
  • 400 invalid_payload — PATCH body must be a JSON object
  • 400 — no valid updates provided
  • 404 — target not found in current key scope
  • 401/403 — authentication failed or key lacks workspace access
  • 500 — unexpected database/analytics service error
All error responses from analytics endpoints include an error_code field.