{"openapi":"3.1.0","info":{"title":"TokTik Developer API","version":"v1","description":"Versioned public API for persisted LIVE intelligence. All bearer-key routes are workspace-scoped."},"servers":[{"url":"https://api.toktikhq.com"}],"x-realtime-websocket":{"path":"/v1/live/stream","authentication":"Short-lived HS256 JWT in Authorization or Sec-WebSocket-Protocol; never the URL","clientMessages":["subscribe","unsubscribe"],"serverMessages":["hello","status","event","error"],"eventTypes":["chat","gift","member","like","social","roomUser","control","envelope","goodyBag","subscribe","linkMicBattle","linkMicArmies","hourlyRank","liveStart","unknown"],"backpressure":"Per-socket bounded queue: lossy like/member/roomUser/unknown frames may drop; critical overflow closes only that socket with 1013"},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"API key"}},"schemas":{"Error":{"type":"object","required":["code","message","retryable"],"properties":{"code":{"type":"string","description":"Stable machine-readable error code, e.g. insufficient_scope, module_not_entitled."},"message":{"type":"string"},"requestId":{"type":"string"},"retryable":{"type":"boolean","description":"True when retrying the same request may succeed (rate limits, transient upstream)."}}},"Provenance":{"type":"object","required":["observedAt","freshness","source","coverageStatus","methodologyVersion"],"properties":{"observedAt":{"type":"string","format":"date-time","description":"RFC 3339 instant of the newest observation in this response."},"freshness":{"type":"string","enum":["near_realtime","historical","stale"]},"source":{"type":"string","description":"Collector or persisted dataset that produced the observation."},"coverageStatus":{"type":"string","enum":["observed","partial","not-covered","not-offered","stale"]},"methodologyVersion":{"type":"string"}}},"CreatorLastSeenLive":{"type":"object","required":["at","source"],"properties":{"at":{"type":"string","format":"date-time","description":"When the platform last observed the creator live."},"source":{"type":"string","enum":["tracking","your_watchlist"],"description":"`tracking` = our own rank-board and live-room tracking (the same for every customer); `your_watchlist` = this workspace's watchlist probe."}}},"StoredLiveReading":{"type":"object","required":["isLive","observedAt","source"],"properties":{"isLive":{"type":"boolean"},"observedAt":{"type":"string","format":"date-time","description":"Never older than 15 minutes."},"source":{"type":"string","enum":["tracking","your_watchlist"]}}},"LiveCheckQuota":{"type":"object","required":["used","limit","nextSlotAt"],"properties":{"used":{"type":"integer","description":"Checks counted in the rolling hour (a check where TikTok answered nothing is given back)."},"limit":{"type":"integer"},"nextSlotAt":{"type":["string","null"],"format":"date-time","description":"When the oldest counted check leaves the window; null when nothing is counted."}}},"CreatorBatchItem":{"type":"object","required":["input","handle","found","creatorUid","displayName","avatarUrl","followers","region","regionSource","live","lastSeenLive","profileRefreshedAt"],"properties":{"input":{"type":"string","description":"The input exactly as supplied."},"handle":{"type":["string","null"],"description":"Normalised handle; null when the input is not a handle or a tiktok.com link (not charged)."},"found":{"type":"boolean","description":"True when the platform stores anything about the handle. A creator who asked to be removed is always false."},"creatorUid":{"type":["string","null"]},"displayName":{"type":["string","null"]},"avatarUrl":{"type":["string","null"]},"followers":{"type":["integer","null"]},"region":{"type":["string","null"],"description":"Upper-case. ISO alpha-2 when `regionSource` is `profile`; the rank board's code (possibly a multi-country bucket such as `MENA`, `US+`) when `board`. Null = unknown."},"regionSource":{"type":["string","null"],"enum":["profile","board",null]},"live":{"oneOf":[{"$ref":"#/components/schemas/StoredLiveReading"},{"type":"null"}],"description":"The newest stored reading from the last 15 minutes; null when there is none. Not a fresh TikTok read."},"lastSeenLive":{"oneOf":[{"$ref":"#/components/schemas/CreatorLastSeenLive"},{"type":"null"}]},"profileRefreshedAt":{"type":["string","null"],"format":"date-time"}}},"CreatorBatchResponse":{"type":"object","required":["items","summary","creditsCharged"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/CreatorBatchItem"},"description":"One item per distinct input, in the order supplied."},"summary":{"type":"object","required":["requested","found","notFound","invalid"],"properties":{"requested":{"type":"integer"},"found":{"type":"integer"},"notFound":{"type":"integer"},"invalid":{"type":"integer"}}},"creditsCharged":{"type":"integer","description":"Credits charged for this call: one `cached-read` per distinct valid handle for an API-key call; 0 in the app."}}},"CreatorProfileHistoryPoint":{"type":"object","properties":{"capturedAt":{"type":"string","format":"date-time"},"followerCount":{"type":["integer","null"]},"followingCount":{"type":["integer","null"]},"awemeCount":{"type":["integer","null"]},"totalFavorited":{"type":["integer","null"]},"favoritingCount":{"type":["integer","null"]},"region":{"type":["string","null"]},"displayName":{"type":["string","null"]},"verified":{"type":["boolean","null"]}}},"CreatorProfileData":{"type":"object","required":["tiktokUserId","uniqueId","firstSeenAt","lastRefreshedAt","history"],"properties":{"tiktokUserId":{"type":"string","description":"Stable numeric TikTok user id."},"uniqueId":{"type":"string","description":"Current handle (may be recycled across accounts over time)."},"secUid":{"type":["string","null"]},"displayName":{"type":["string","null"]},"region":{"type":["string","null"]},"language":{"type":["string","null"]},"signature":{"type":["string","null"]},"avatarUrl":{"type":["string","null"]},"followerCount":{"type":["integer","null"]},"followingCount":{"type":["integer","null"]},"awemeCount":{"type":["integer","null"]},"totalFavorited":{"type":["integer","null"]},"favoritingCount":{"type":["integer","null"]},"verified":{"type":["boolean","null"]},"customVerify":{"type":["string","null"]},"enterpriseVerifyReason":{"type":["string","null"]},"instagramId":{"type":["string","null"]},"youtubeChannelId":{"type":["string","null"]},"twitterId":{"type":["string","null"]},"firstSeenAt":{"type":"string","format":"date-time"},"lastRefreshedAt":{"type":"string","format":"date-time"},"history":{"type":"array","items":{"$ref":"#/components/schemas/CreatorProfileHistoryPoint"}}}},"CreatorSearchResult":{"type":"object","properties":{"tiktokUserId":{"type":"string","description":"TikTok user id. On a masked row an opaque `mk1_…` token sealed for the caller instead (RM: a uid IS identity — tiktok.com/share/user/<uid> redirects to the handle)."},"uniqueId":{"type":"string"},"displayName":{"type":["string","null"]},"region":{"type":["string","null"]},"avatarUrl":{"type":["string","null"]},"followerCount":{"type":["integer","null"]},"verified":{"type":["boolean","null"]},"isLive":{"type":"boolean"},"masked":{"type":"boolean"},"unmaskTier":{"type":["string","null"]}}},"CreatorProfileChange":{"type":"object","properties":{"field":{"type":"string","description":"Tracked field name, e.g. uniqueId, displayName, avatarUrl."},"oldValue":{"type":["string","null"]},"newValue":{"type":["string","null"]},"observedAt":{"type":"string","format":"date-time"},"source":{"type":"string"}}},"FollowListEntry":{"type":"object","properties":{"tiktokUserId":{"type":"string"},"uniqueId":{"type":"string"},"secUid":{"type":["string","null"]},"displayName":{"type":["string","null"]},"avatarUrl":{"type":["string","null"]},"region":{"type":["string","null"]},"signature":{"type":["string","null"]},"followerCount":{"type":["integer","null"]},"followingCount":{"type":["integer","null"]},"awemeCount":{"type":["integer","null"]},"verified":{"type":["boolean","null"]},"firstSeenAt":{"type":"string","format":"date-time"},"lastRefreshedAt":{"type":"string","format":"date-time"}}},"FollowListData":{"type":"object","required":["tiktokUserId","uniqueId","direction","entries","nextCursor","hasMore","storedCount","isPrivate"],"properties":{"tiktokUserId":{"type":"string"},"uniqueId":{"type":"string"},"direction":{"type":"string","enum":["following","follower"]},"entries":{"type":"array","items":{"$ref":"#/components/schemas/FollowListEntry"}},"nextCursor":{"type":["string","null"]},"hasMore":{"type":"boolean"},"totalReported":{"type":["integer","null"]},"storedCount":{"type":"integer"},"isPrivate":{"type":"boolean"}}},"VideoMetricHistoryPoint":{"type":"object","properties":{"capturedAt":{"type":"string","format":"date-time"},"playCount":{"type":["integer","null"]},"diggCount":{"type":["integer","null"]},"commentCount":{"type":["integer","null"]},"shareCount":{"type":["integer","null"]},"collectCount":{"type":["integer","null"]}}},"VideoData":{"type":"object","required":["videoId","tiktokUserId","uniqueId"],"properties":{"videoId":{"type":"string"},"tiktokUserId":{"type":"string"},"uniqueId":{"type":"string"},"description":{"type":["string","null"]},"createTime":{"type":["string","null"],"format":"date-time"},"coverUrl":{"type":["string","null"]},"durationSeconds":{"type":["number","null"]},"playCount":{"type":["integer","null"]},"diggCount":{"type":["integer","null"]},"commentCount":{"type":["integer","null"]},"shareCount":{"type":["integer","null"]},"collectCount":{"type":["integer","null"]},"firstSeenAt":{"type":"string","format":"date-time"},"lastRefreshedAt":{"type":"string","format":"date-time"}}},"VideoWithHistory":{"allOf":[{"$ref":"#/components/schemas/VideoData"},{"type":"object","required":["history"],"properties":{"history":{"type":"array","items":{"$ref":"#/components/schemas/VideoMetricHistoryPoint"}}}}]},"VideoCommentData":{"type":"object","properties":{"commentId":{"type":"string"},"videoId":{"type":"string"},"parentCommentId":{"type":["string","null"]},"authorUserId":{"type":["string","null"]},"authorSecUid":{"type":["string","null"]},"authorUniqueId":{"type":["string","null"]},"authorNickname":{"type":["string","null"]},"authorAvatarUrl":{"type":["string","null"]},"text":{"type":"string"},"likeCount":{"type":["integer","null"]},"replyCount":{"type":["integer","null"]},"commentedAt":{"type":["string","null"],"format":"date-time"},"language":{"type":["string","null"]},"pinnedByAuthor":{"type":"boolean"},"likedByAuthor":{"type":"boolean"},"firstSeenAt":{"type":"string","format":"date-time"},"lastRefreshedAt":{"type":"string","format":"date-time"}}},"Story":{"type":"object","required":["itemId","kind","viewed","isSubscriberOnly"],"properties":{"itemId":{"type":"string","description":"Stable story/aweme id (string — exceeds 2^53)."},"kind":{"type":"string","enum":["photo","video"]},"imageUrl":{"type":["string","null"]},"videoUrl":{"type":["string","null"]},"createdAt":{"type":["string","null"],"format":"date-time"},"expiresAt":{"type":["string","null"],"format":"date-time"},"viewed":{"type":"boolean"},"isSubscriberOnly":{"type":"boolean"}}},"CreatorAnalysisSubject":{"type":"object","properties":{"tiktokUserId":{"type":"string"},"uniqueId":{"type":"string"},"displayName":{"type":["string","null"]},"avatarUrl":{"type":["string","null"]},"region":{"type":["string","null"]},"verified":{"type":["boolean","null"]},"followerCount":{"type":["integer","null"]},"followingCount":{"type":["integer","null"]},"awemeCount":{"type":["integer","null"]},"totalFavorited":{"type":["integer","null"]},"firstSeenAt":{"type":"string","format":"date-time"},"lastRefreshedAt":{"type":"string","format":"date-time"}}},"CreatorAnalysisSample":{"type":"object","properties":{"videosAnalyzed":{"type":"integer"},"oldestVideoAt":{"type":["string","null"],"format":"date-time"},"newestVideoAt":{"type":["string","null"],"format":"date-time"},"spanDays":{"type":["integer","null"]},"shareOfCatalog":{"type":["number","null"]}}},"CreatorAnalysisEngagement":{"type":"object","properties":{"totalPlays":{"type":"number"},"totalLikes":{"type":"number"},"totalComments":{"type":"number"},"totalShares":{"type":"number"},"avgPlays":{"type":"number"},"medianPlays":{"type":"number"},"avgLikes":{"type":"number"},"avgComments":{"type":"number"},"avgShares":{"type":"number"},"engagementRate":{"type":["number","null"]},"likeRate":{"type":["number","null"]},"commentRate":{"type":["number","null"]},"shareRate":{"type":["number","null"]},"viewsPerFollower":{"type":["number","null"]}}},"CreatorAnalysisCadence":{"type":"object","properties":{"postsPerWeek":{"type":["number","null"]},"avgDaysBetweenPosts":{"type":["number","null"]},"longestGapDays":{"type":["number","null"]},"busiestWeekday":{"type":["integer","null"]},"postsByWeekday":{"type":"array","items":{"type":"integer"}}}},"CreatorAnalysisVideo":{"type":"object","properties":{"videoId":{"type":"string"},"description":{"type":["string","null"]},"createTime":{"type":["string","null"],"format":"date-time"},"playCount":{"type":["integer","null"]},"diggCount":{"type":["integer","null"]},"commentCount":{"type":["integer","null"]},"shareCount":{"type":["integer","null"]},"engagementRate":{"type":["number","null"]}}},"CreatorAnalysisAudience":{"type":"object","properties":{"commentsAnalyzed":{"type":"integer"},"videosWithComments":{"type":"integer"},"distinctCommenters":{"type":"integer"},"avgLikesPerComment":{"type":["number","null"]},"topCommenters":{"type":"array","items":{"type":"object","properties":{"uniqueId":{"type":["string","null"]},"nickname":{"type":["string","null"]},"avatarUrl":{"type":["string","null"]},"comments":{"type":"integer"},"likes":{"type":"integer"}}}},"languages":{"type":"array","items":{"type":"object","properties":{"language":{"type":"string"},"share":{"type":"number"}}}}}},"CreatorAnalysisGrowth":{"type":"object","properties":{"fromObservedAt":{"type":"string","format":"date-time"},"toObservedAt":{"type":"string","format":"date-time"},"days":{"type":"integer"},"startFollowers":{"type":"integer"},"endFollowers":{"type":"integer"},"followerDelta":{"type":"integer"},"followerDeltaRate":{"type":["number","null"]}}},"CreatorAnalysisLimit":{"type":"object","properties":{"code":{"type":"string","enum":["thin-video-sample","no-videos","no-play-counts","undated-videos","single-observation","no-comments"]},"message":{"type":"string"}}},"CreatorAnalysisData":{"type":"object","required":["creator","sample","topByPlays","topByEngagement","limits"],"properties":{"creator":{"$ref":"#/components/schemas/CreatorAnalysisSubject"},"sample":{"$ref":"#/components/schemas/CreatorAnalysisSample"},"engagement":{"oneOf":[{"$ref":"#/components/schemas/CreatorAnalysisEngagement"},{"type":"null"}]},"cadence":{"oneOf":[{"$ref":"#/components/schemas/CreatorAnalysisCadence"},{"type":"null"}]},"topByPlays":{"type":"array","items":{"$ref":"#/components/schemas/CreatorAnalysisVideo"}},"topByEngagement":{"type":"array","items":{"$ref":"#/components/schemas/CreatorAnalysisVideo"}},"audience":{"oneOf":[{"$ref":"#/components/schemas/CreatorAnalysisAudience"},{"type":"null"}]},"growth":{"oneOf":[{"$ref":"#/components/schemas/CreatorAnalysisGrowth"},{"type":"null"}]},"limits":{"type":"array","items":{"$ref":"#/components/schemas/CreatorAnalysisLimit"}}}},"GifterClosedDay":{"type":"object","required":["date","start","end","region","settlingUntil","final"],"properties":{"date":{"type":"string","format":"date","description":"YD.1 — the calendar day that closed (UTC date of the day's midpoint = the local date in every region from UTC−12 to UTC+12)."},"start":{"type":"string","format":"date-time","description":"The region's reset that opened the day; without `region`, the earliest start over all regions."},"end":{"type":"string","format":"date-time","description":"The reset that closed it (= the start of Today); without `region`, the latest end over all regions."},"region":{"type":["string","null"],"description":"The region code `start` / `end` are exact for; null = every gift counts in its own region's closed day."},"settlingUntil":{"type":"string","format":"date-time","description":"`end` + 3 h: late rows (drain lag, top-ups, guest gifts) can still land until then."},"final":{"type":"boolean","description":"True once `settlingUntil` has passed."}}},"GifterSummary":{"type":"object","properties":{"gifterKey":{"type":"string","description":"TikTok sec_uid, or a uid:<userId> fallback — see `identity`."},"identity":{"type":"string","enum":["sec_uid","user_id_fallback"]},"secUid":{"type":["string","null"]},"uniqueId":{"type":["string","null"]},"nickname":{"type":["string","null"]},"avatarUrl":{"type":["string","null"],"description":"PD4 — resolved gifter avatar (best-effort, cached); null → gradient fallback, never an invented image. RM.14: null on a masked row read by an API key (its image key names the creator)."},"observedDiamonds":{"type":["integer","null"],"description":"Coins (\"Xu\") observed from the gifter within the requested window — per-poll deltas summed, exact to the hour; not a lifetime total. The name is historical. RM.14: null on a masked row read by a Free workspace's API key. `estimatedValueUsd` with it."},"estimatedValueUsd":{"type":["number","null"],"description":"PD5 — `observedDiamonds` as an 'est.' USD value at DIAMOND_USD_RATE (creator-received). Null when not estimable."},"sessionCount":{"type":"integer","description":"Distinct live sessions (rooms) the gifter gave coins in within the window."},"creatorCount":{"type":"integer"},"segment":{"type":["string","null"],"enum":["whale","one_time","rising","dormant","regular",null],"description":"LT3.1 archetype derived from observed figures. RM.14: null on a masked row read by a Free workspace's API key (it is read off the diamonds)."},"firstSeenAt":{"type":"string","format":"date-time"},"lastSeenAt":{"type":"string","format":"date-time"},"gifterLevel":{"type":["integer","null"],"description":"GL.2 — the gifter's GLOBAL TikTok wealth/gift grade (1–50): their grade badge level, same wherever they gift, not a per-creator fan-club level. Read per-uid from webcast/user (not on the board). A per-gifter attribute (highest grade ever observed), not windowed — reads the same across 24h/7d/30d. Null when not yet looked up or the grade is hidden (fills forward as the collector backfills)."},"fansLevel":{"type":["integer","null"],"description":"GL.2 — the gifter's FAN/community level (1–50): the fan badge (scene_type=10) level from the contribution board, distinct from the global grade. Per-gifter, not windowed. Null when not shown."},"currentRoom":{"oneOf":[{"$ref":"#/components/schemas/GifterRoom"},{"type":"null"}],"description":"GU.2 — the creator this gifter gave to most recently (last 7 days); `live` when that gift was <= 10 min ago. Null when none in 7 days and ALWAYS null on a masked row."},"masked":{"type":"boolean","description":"True when identity (nickname/uniqueId/secUid/gifterKey) is masked below the caller's unlock tier. Reuses the standard rankings board rule: unmask at Pro, top-3 teaser. Avatar/diamonds/segment still show."},"unmaskTier":{"type":["string","null"],"description":"When masked, the plan tier that unlocks the real identity (for an Unlock CTA); else null."}}},"GifterRoom":{"type":"object","properties":{"creatorUniqueId":{"type":"string"},"creatorDisplayName":{"type":["string","null"]},"creatorAvatarUrl":{"type":["string","null"]},"lastGiftAt":{"type":"string","format":"date-time"},"live":{"type":"boolean","description":"lastGiftAt is within 10 minutes of the response — 'gifting now'. Gift recency, not proof the room is still live."}}},"GifterHistoryCreator":{"type":"object","required":["creatorUid","creatorUniqueId","coins","sessionCount","firstGiftAt","lastGiftAt"],"properties":{"creatorUid":{"type":"string"},"creatorUniqueId":{"type":["string","null"]},"coins":{"type":"integer"},"sessionCount":{"type":"integer"},"firstGiftAt":{"type":"string"},"lastGiftAt":{"type":"string"}}},"FundedCreator":{"type":"object","properties":{"creatorUniqueId":{"type":"string"},"creatorDisplayName":{"type":["string","null"]},"creatorAvatarUrl":{"type":["string","null"]},"observedDiamonds":{"type":"integer"},"estimatedValueUsd":{"type":["number","null"],"description":"PD5 — `observedDiamonds` as an 'est.' USD value at DIAMOND_USD_RATE. Null when not estimable."},"sessionCount":{"type":"integer"},"firstSeenAt":{"type":"string","format":"date-time"},"lastSeenAt":{"type":"string","format":"date-time"},"live":{"type":"boolean","description":"GU.2 — lastSeenAt is within 10 minutes of the response: the gifter is gifting this creator now."},"asGuest":{"type":"boolean","description":"GW.19b — this row is what the gifter gave the creator while they were a GUEST in hostUniqueId's LIVE (full value). A creator funded in both has one row of each. Absent = the creator's own room."},"hostUniqueId":{"type":["string","null"],"description":"GW.19b — the host whose room it was (asGuest rows); null when the host has no known handle."}}},"CreatorGifter":{"type":"object","properties":{"gifterKey":{"type":"string"},"identity":{"type":"string","enum":["sec_uid","user_id_fallback"]},"secUid":{"type":["string","null"]},"uniqueId":{"type":["string","null"]},"nickname":{"type":["string","null"]},"avatarUrl":{"type":["string","null"],"description":"PD4 — resolved gifter avatar (best-effort, cached); null → gradient fallback. RM.14: null on a masked row read by an API key (its image key names the creator)."},"observedDiamonds":{"type":["integer","null"],"description":"Coins observed from the gifter in the creator's rooms. RM.14: null on a masked row read by a Free workspace's API key."},"estimatedValueUsd":{"type":["number","null"],"description":"PD5 — `observedDiamonds` as an 'est.' USD value at DIAMOND_USD_RATE. Null when not estimable."},"sessionCount":{"type":"integer"},"firstSeenAt":{"type":"string","format":"date-time"},"lastSeenAt":{"type":"string","format":"date-time"},"gifterLevel":{"type":["integer","null"],"description":"GL.2/GL.3 — the gifter's GLOBAL wealth/gift grade (1–50, scene_type=8), same as GifterSummary.gifterLevel; per-gifter (not windowed). Null until the grade collector has looked the gifter up."},"masked":{"type":"boolean","description":"True when identity is masked below the caller's unlock tier (top-3 teaser per creator, then masked)."},"unmaskTier":{"type":["string","null"],"description":"When masked, the plan tier that unlocks the real identity; else null."}}},"CreatorGiftersAccess":{"type":"object","required":["topN","moreWithheld","unlockTier","totalsWithheld","totalsUnlockTier"],"properties":{"topN":{"type":["integer","null"]},"moreWithheld":{"type":"boolean"},"unlockTier":{"type":["string","null"]},"totalsWithheld":{"type":"boolean"},"totalsUnlockTier":{"type":["string","null"]}}},"FundedCreatorsAccess":{"type":"object","required":["topN","moreWithheld","unlockTier"],"properties":{"topN":{"type":["integer","null"]},"moreWithheld":{"type":"boolean"},"unlockTier":{"type":["string","null"]}}},"CreatorGifterTotals":{"type":"object","required":["observedDiamonds","gifterCount","estimatedValueUsd"],"properties":{"observedDiamonds":{"type":"integer"},"gifterCount":{"type":"integer"},"estimatedValueUsd":{"type":["number","null"],"description":"`observedDiamonds` as an 'est.' USD value at DIAMOND_USD_RATE. Null when not estimable."},"smallGifters":{"type":"object","required":["coins","gifterCount"],"properties":{"coins":{"type":"integer"},"gifterCount":{"type":"integer"}},"description":"The share given by gifters below the store's naming rule (by default under 100 coins in a session and outside the room's top 10): counted in the totals, not listed by name; never negative. Absent on the live board."}}},"CreatorGuestGifter":{"allOf":[{"$ref":"#/components/schemas/CreatorGifter"},{"type":"object","required":["hostUniqueId","hostKey","giftCount"],"properties":{"hostUniqueId":{"type":["string","null"],"description":"The host whose LIVE it was; null when the host has no known handle."},"hostKey":{"type":"string","description":"The row's host in hosts[] (opaque, stable within one response)."},"giftCount":{"type":"integer","description":"Gift messages counted (each gift's full price is in observedDiamonds)."}}}]},"CreatorGuestHost":{"type":"object","required":["hostKey","hostUniqueId","hostDisplayName","hostAvatarUrl","observedDiamonds","gifterCount","sessionCount","firstGiftAt","lastGiftAt"],"properties":{"hostKey":{"type":"string","description":"Opaque key of this host within the response (CreatorGuestGifter.hostKey)."},"hostUniqueId":{"type":["string","null"]},"hostDisplayName":{"type":["string","null"]},"hostAvatarUrl":{"type":["string","null"]},"observedDiamonds":{"type":"integer","description":"Coins the creator received in this host's room (full value)."},"gifterCount":{"type":"integer"},"sessionCount":{"type":"integer","description":"Distinct rooms (sessions) of this host."},"firstGiftAt":{"type":"string","format":"date-time"},"lastGiftAt":{"type":"string","format":"date-time"}}},"CreatorAsGuest":{"type":"object","required":["gifters","hosts","totals","access"],"properties":{"gifters":{"type":"array","items":{"$ref":"#/components/schemas/CreatorGuestGifter"},"description":"Ranked by coins, capped and masked by plan like the own list."},"hosts":{"type":"array","items":{"$ref":"#/components/schemas/CreatorGuestHost"},"description":"The host rooms, most coins first (at most 50). Where the plan withholds totals: only the hosts of the visible gifters, figures summed over those rows."},"totals":{"oneOf":[{"type":"object","required":["observedDiamonds","gifterCount","hostCount","estimatedValueUsd"],"properties":{"observedDiamonds":{"type":"integer"},"gifterCount":{"type":"integer"},"hostCount":{"type":"integer"},"estimatedValueUsd":{"type":["number","null"]}}},{"type":"null"}],"description":"Over every guest gift in the window; null when withheld by plan."},"access":{"$ref":"#/components/schemas/CreatorGiftersAccess"}}},"CreatorHostGuest":{"type":"object","required":["guestUniqueId","guestDisplayName","guestAvatarUrl","observedDiamonds","bonusDiamonds","gifterCount","lastGiftAt"],"properties":{"guestUniqueId":{"type":["string","null"]},"guestDisplayName":{"type":["string","null"]},"guestAvatarUrl":{"type":["string","null"]},"observedDiamonds":{"type":"integer","description":"Coins the guest received in the creator's room (full value)."},"bonusDiamonds":{"type":"integer","description":"Σ floor(0.3 × each of those gifts): added to the host's Daily / League score."},"gifterCount":{"type":"integer"},"lastGiftAt":{"type":"string","format":"date-time"}}},"CreatorHostBonus":{"type":"object","required":["bonusDiamonds","guestDiamonds","guestCount","guests"],"properties":{"bonusDiamonds":{"type":"integer","description":"TikTok adds floor(0.3 × each gift to a guest in the host's room) to the host's Daily / League score: this sum over the window. Compared with Daily, the host's figure is totals.observedDiamonds + bonusDiamonds."},"guestDiamonds":{"type":"integer","description":"Coins the guests received in the creator's room (full value)."},"guestCount":{"type":"integer"},"guests":{"type":"array","items":{"$ref":"#/components/schemas/CreatorHostGuest"},"description":"Most coins first (at most 50)."}}},"CreatorLiveSession":{"type":"object","properties":{"roomId":{"type":"string"},"isLive":{"type":"boolean","description":"False = the creator is offline and this is their most recent session (kept ~2 h after it ends)."},"firstObservedAt":{"type":["string","null"],"format":"date-time","description":"First time a gifter of this session was observed; null while no gift has been seen."},"lastObservedAt":{"type":["string","null"],"format":"date-time","description":"Latest change observed (a gift, or a present gifter's periodic refresh); null while no gift has been seen."}}},"RankingEntry":{"type":"object","properties":{"rank":{"type":"integer"},"creatorUid":{"type":"string","description":"TikTok user id. On a masked row an opaque `mk1_…` token sealed for the caller instead (RM: a uid IS identity — tiktok.com/share/user/<uid> redirects to the handle). Stable per caller, so it keys rows and joins a creator masked in several periods; open in one period and masked in another does not join (that would unmask them)."},"uniqueId":{"type":["string","null"]},"nickname":{"type":["string","null"]},"avatarUrl":{"type":["string","null"],"description":"Creator avatar URL, shown on a masked row in the app. RM.14: null on a masked row read by an API key (its image key names the creator)."},"isLive":{"type":"boolean"},"roomId":{"type":["string","null"]},"score":{"type":["number","null"],"description":"Board score (TikTok board points / diamonds). RM.14: null on a masked row read by a Free workspace's API key."},"leagueClass":{"type":["string","null"]},"leagueClassSource":{"type":["string","null"],"enum":["observed","last_phase",null]},"leagueClassAsOf":{"type":["string","null"],"format":"date-time"},"movement":{"type":"string","enum":["up","down","same","new"]},"previousRank":{"type":["integer","null"]},"masked":{"type":"boolean","description":"True when identity is masked below the caller's unlock tier."},"unmaskTier":{"type":["string","null"]},"sourceRegion":{"type":["string","null"],"description":"GLOBAL board only — the region (bucket key) this creator's score came from; null on a single-region board."},"isLivePro":{"type":["boolean","null"],"description":"LP.4 — TikTok LIVE Pro (✦) member: true = member, false = not, null = unknown/withheld (withheld on a masked row and when the chip is disabled server-side)."}}},"RankingCoverage":{"type":"object","properties":{"completeBoards":{"type":"integer"},"expectedBoards":{"type":"integer"},"ratio":{"type":"number"},"threshold":{"type":"number"}}},"OfficialRankingBoard":{"type":"object","properties":{"kind":{"type":"string","enum":["official"]},"board":{"type":"string"},"region":{"type":"string"},"periodKey":{"type":"string"},"resetAt":{"type":["string","null"],"format":"date-time"},"publishable":{"type":"boolean"},"coverage":{"$ref":"#/components/schemas/RankingCoverage"},"game":{"type":"object","required":["gameKey","gameTitle"],"properties":{"gameKey":{"type":"string"},"gameTitle":{"type":["string","null"]}}},"entries":{"type":"array","items":{"$ref":"#/components/schemas/RankingEntry"}}}},"TeamRankingEntry":{"type":"object","properties":{"rank":{"type":"integer"},"clubName":{"type":["string","null"],"description":"Community display name (masked below the unlock tier)."},"communityLevel":{"type":["integer","null"]},"contributorNum":{"type":["integer","null"]},"communityImageUrl":{"type":["string","null"],"description":"The club image. RM.14: null on a masked row read by an API key (the CDN key names the club)."},"hostCreatorUid":{"type":"string","description":"The host's TikTok user id. On a masked row an opaque `mk1_…` token sealed for the caller instead (RM: a uid IS identity — tiktok.com/share/user/<uid> redirects to the handle). The roster route accepts either."},"hostUniqueId":{"type":["string","null"],"description":"Host handle (masked below the unlock tier)."},"hostNickname":{"type":["string","null"],"description":"Host display name (masked below the unlock tier)."},"hostAvatarUrl":{"type":["string","null"],"description":"Host avatar URL, shown on a masked row in the app. RM.14: null on a masked row read by an API key (its image key names the creator)."},"score":{"type":["number","null"],"description":"Combined diamonds of the community's members this period. RM.14: null on a masked row read by a Free workspace's API key."},"estEarningsUsd":{"type":["number","null"],"description":"Est. creator earnings (USD) from score — observed proxy, not a payout. RM.14: null on a masked row read by a Free workspace's API key."},"masked":{"type":"boolean"},"unmaskTier":{"type":["string","null"]},"sourceRegion":{"type":["string","null"],"description":"GLOBAL board only — the region this community's winning score came from (shown on masked rows too)."}}},"TeamRankingBoard":{"type":"object","properties":{"kind":{"type":"string","enum":["teams"]},"region":{"type":"string"},"periodKey":{"type":"string"},"resetAt":{"type":["string","null"],"format":"date-time"},"publishable":{"type":"boolean"},"coverage":{"$ref":"#/components/schemas/RankingCoverage"},"entries":{"type":"array","items":{"$ref":"#/components/schemas/TeamRankingEntry"}}}},"TeamRosterMember":{"type":"object","properties":{"rank":{"type":"integer"},"userId":{"type":"string","description":"The member's TikTok user id. On a masked row an opaque `mk1_…` token sealed for the caller instead (RM: a uid IS identity — tiktok.com/share/user/<uid> redirects to the handle)."},"uniqueId":{"type":["string","null"],"description":"Member handle (masked below the unlock tier)."},"nickname":{"type":["string","null"],"description":"Member display name (masked below the unlock tier)."},"avatarUrl":{"type":["string","null"],"description":"Avatar URL, shown on a masked row in the app. RM.14: null on a masked row read by an API key (its image key names the creator)."},"fansLevel":{"type":["integer","null"]},"score":{"type":["number","null"],"description":"Diamonds/points this member contributed for the list's window. RM.14: null on a masked row read by a Free workspace's API key."},"estEarningsUsd":{"type":["number","null"],"description":"Est. creator earnings (USD) the host got from this member — observed proxy. RM.14: null on a masked row read by a Free workspace's API key."},"masked":{"type":"boolean"},"unmaskTier":{"type":["string","null"]}}},"TeamRoster":{"type":"object","properties":{"host":{"type":"object","required":["creatorUid","uniqueId","nickname","avatarUrl"],"properties":{"creatorUid":{"type":"string","description":"The host's TikTok user id (the board row's hostCreatorUid). On a masked row an opaque `mk1_…` token sealed for the caller instead (RM: a uid IS identity — tiktok.com/share/user/<uid> redirects to the handle)."},"uniqueId":{"type":["string","null"],"description":"Host handle (masked below the unlock tier)."},"nickname":{"type":["string","null"],"description":"Host display name (masked below the unlock tier)."},"avatarUrl":{"type":["string","null"]}}},"fanClub":{"type":"object","required":["activeCount","totalCount","hasNext","members"],"properties":{"activeCount":{"type":["integer","null"]},"totalCount":{"type":["integer","null"]},"hasNext":{"type":"boolean"},"members":{"type":"array","items":{"$ref":"#/components/schemas/TeamRosterMember"}}}},"today":{"type":"object","required":["contributorsNum","countdownSeconds","hasNext","contributors"],"properties":{"contributorsNum":{"type":["integer","null"]},"countdownSeconds":{"type":["integer","null"]},"hasNext":{"type":"boolean"},"contributors":{"type":"array","items":{"$ref":"#/components/schemas/TeamRosterMember"}}}}}},"GamingGame":{"type":"object","required":["gameKey","gameTitle","status","resetAt"],"properties":{"gameKey":{"type":"string"},"gameTitle":{"type":["string","null"]},"status":{"type":"string","enum":["offered","not_offered"]},"resetAt":{"type":["string","null"],"format":"date-time"}}},"RankMoversBoard":{"type":"object","required":["board","region","periodKey","gainers","losers"],"properties":{"board":{"type":"string"},"region":{"type":"string"},"periodKey":{"type":"string"},"gainers":{"type":"array","items":{"$ref":"#/components/schemas/RankingEntry"}},"losers":{"type":"array","items":{"$ref":"#/components/schemas/RankingEntry"}}}},"LeagueWindowBucket":{"type":"object","required":["from","to","stored"],"properties":{"from":{"type":"string"},"to":{"type":"string"},"stored":{"type":"boolean"}}},"LeagueWindowEntry":{"type":"object","required":["rank","creatorUid","uniqueId","nickname","avatarUrl","isLive","leagueClass","diamonds","daysActive","daysAtClose","lastDay","lastDayDiamonds","dayBeforeDiamonds","bars","boardKnown","rankNow","classBar","masked","unmaskTier"],"properties":{"rank":{"type":"integer"},"creatorUid":{"type":"string"},"uniqueId":{"type":["string","null"]},"nickname":{"type":["string","null"]},"avatarUrl":{"type":["string","null"],"description":"Creator avatar URL, shown on a masked row in the app. RM.14: null on a masked row read by an API key (its image key names the creator)."},"isLive":{"type":"boolean"},"leagueClass":{"type":["string","null"]},"diamonds":{"type":["integer","null"],"description":"Diamonds in the window (today: so far). RM.14: null on a masked row read by a Free workspace's API key. `lastDayDiamonds`, `dayBeforeDiamonds` and `bars` likewise."},"daysActive":{"type":["integer","null"]},"daysAtClose":{"type":["integer","null"]},"lastDay":{"type":["string","null"]},"lastDayDiamonds":{"type":["integer","null"]},"dayBeforeDiamonds":{"type":["integer","null"]},"bars":{"type":["array","null"],"items":{"type":["integer","null"]}},"boardKnown":{"type":["boolean","null"]},"rankNow":{"type":["integer","null"]},"classBar":{"type":["integer","null"],"description":"Today only: diamonds of #99 on the class's current board. RM.14: null on every row read by a Free workspace's API key."},"masked":{"type":"boolean"},"unmaskTier":{"type":["string","null"]}}},"LeagueWindowView":{"type":"object","required":["region","window","status","floor","min","leagueClass","belowTop99","windowDays","summary","total","offset","limit","entries","teaserTopN","unmaskAll","unmaskTier"],"properties":{"region":{"type":"string"},"window":{"type":"string","enum":["today","yesterday","7d","30d","60d","90d","180d","365d"]},"status":{"type":"string","enum":["ready","building"]},"floor":{"type":"integer"},"min":{"type":"integer"},"leagueClass":{"type":["string","null"]},"belowTop99":{"type":"boolean"},"query":{"type":["string","null"]},"windowDays":{"type":"integer"},"firstDay":{"type":["string","null"]},"lastDay":{"type":["string","null"]},"lastDayEnd":{"type":["string","null"]},"firstStoredDay":{"type":["string","null"]},"daysCovered":{"type":["integer","null"]},"buckets":{"type":["array","null"],"items":{"$ref":"#/components/schemas/LeagueWindowBucket"}},"openDay":{"type":["object","null"],"properties":{"dayStart":{"type":"string"},"dayEnd":{"type":"string"},"boardObservedAt":{"type":["string","null"]},"unknownClasses":{"type":"array","items":{"type":"string"}}}},"summary":{"type":["object","null"],"properties":{"creators":{"type":"integer"},"belowTop99":{"type":"integer"},"inTop99":{"type":"integer"},"quietYesterday":{"type":["integer","null"]},"liveNow":{"type":["integer","null"]}}},"total":{"type":"integer"},"offset":{"type":"integer"},"limit":{"type":"integer"},"entries":{"type":"array","items":{"$ref":"#/components/schemas/LeagueWindowEntry"}},"teaserTopN":{"type":"integer"},"unmaskAll":{"type":"boolean"},"unmaskTier":{"type":["string","null"]}}},"LeagueWindowAccess":{"type":"object","required":["unmaskAll","unmaskTier","historyWindowDays"],"properties":{"unmaskAll":{"type":"boolean"},"unmaskTier":{"type":["string","null"]},"historyWindowDays":{"type":["integer","null"]}}},"RankingHistoryPeriod":{"type":"object","properties":{"periodKey":{"type":"string"},"observedAt":{"type":"string","format":"date-time"},"coverageStatus":{"type":"string","enum":["observed","partial","not-covered","not-offered","stale"]},"publishable":{"type":"boolean"},"entries":{"type":"array","items":{"$ref":"#/components/schemas/RankingEntry"}}}},"RankingRegion":{"type":"object","properties":{"region":{"type":"string"},"label":{"type":"string"},"coverage":{"$ref":"#/components/schemas/RankingCoverage"},"boards":{"type":"array","items":{"type":"string"}},"notOfferedBoards":{"type":"array","items":{"type":"string"}}}},"AgencyOfficialAccount":{"type":"object","required":["uid","handle","nickname","avatarUrl","followers"],"properties":{"uid":{"type":"string","description":"Numeric TikTok user id as a string."},"handle":{"type":["string","null"]},"nickname":{"type":["string","null"]},"avatarUrl":{"type":["string","null"],"description":"Signed CDN url — it EXPIRES; render with an initials fallback."},"followers":{"type":["integer","null"]}}},"AgencySizeBands":{"type":"object","required":["hosts","agents","monthlyDiamonds","healthScore"],"properties":{"hosts":{"type":["string","null"],"description":"TikTok's band string, verbatim (e.g. \"500+\", \"11-50\")."},"agents":{"type":["string","null"]},"monthlyDiamonds":{"type":["string","null"],"description":"TikTok's band string, verbatim (e.g. \"3000k+\")."},"healthScore":{"type":["string","null"]}}},"AgencyContact":{"type":"object","required":["email","phone","whatsapp","address"],"properties":{"email":{"type":["string","null"]},"phone":{"type":["string","null"]},"whatsapp":{"type":["string","null"]},"address":{"type":["string","null"]}}},"AgencyListItem":{"type":"object","required":["agencyId","name","slug","regionBucket","regionBuckets","onboardedOn","official","hasPublicProfile","hasPage","serviceTypes","customServices","size","applyUrl","lastSeenAt"],"properties":{"agencyId":{"type":"string","description":"TikTok's numeric agency id as a string — the stable key."},"name":{"type":"string"},"slug":{"type":"string","description":"Cosmetic URL segment derived from the name; the id is authoritative."},"regionBucket":{"type":["string","null"],"description":"The primary region bucket (MENA, US+, …) — not an ISO country. TikTok's own value unless the owner recorded regions for the agency (then `regionBuckets[0]`)."},"regionBuckets":{"type":"array","items":{"type":"string"},"description":"Every region the agency is listed under, primary first. Owner-recorded regions replace TikTok's single bucket (AR.1)."},"onboardedOn":{"type":["string","null"],"description":"YYYY-MM-DD."},"official":{"oneOf":[{"$ref":"#/components/schemas/AgencyOfficialAccount"},{"type":"null"}]},"hasPublicProfile":{"type":"boolean","description":"True when the agency filled its public profile on TikTok (intro / services / contact / size bands)."},"hasPage":{"type":"boolean","description":"AD.14 — the agency has its own page: a TikTok public profile, or an introduction / services the owner recorded at the agency's request."},"serviceTypes":{"type":"array","items":{"type":"string"},"description":"TikTok service-type keys (e.g. 1_on_1_support). They drive the serviceType filter."},"customServices":{"type":"array","items":{"type":"string"},"description":"AD.14 — the agency's own service labels, in its own words (owner-recorded at its request); when non-empty, show them instead of serviceTypes. Empty when none."},"size":{"oneOf":[{"$ref":"#/components/schemas/AgencySizeBands"},{"type":"null"}]},"applyUrl":{"type":["string","null"],"description":"TikTok's own apply deep link (snssdk1233://webview?…ttba_uid=), or null without an official account."},"lastSeenAt":{"type":"string","format":"date-time"},"introSnippet":{"type":["string","null"],"description":"AD.12 — the first ~200 characters of the agency's introduction on one line (owner override > TikTok), for directory cards; null when none published. The full text is on the single-agency read."}}},"AgencyListResponse":{"type":"object","required":["agencies","hasMore"],"properties":{"agencies":{"type":"array","items":{"$ref":"#/components/schemas/AgencyListItem"}},"hasMore":{"type":"boolean"}}},"AgencyLinks":{"type":"object","required":["websiteUrl","recruitmentUrl","discordUrl"],"properties":{"websiteUrl":{"type":["string","null"]},"recruitmentUrl":{"type":["string","null"]},"discordUrl":{"type":["string","null"]}}},"AgencyDetail":{"type":"object","required":["agencyId","name","slug","regionBucket","regionBuckets","onboardedOn","official","hasPublicProfile","hasPage","serviceTypes","customServices","size","applyUrl","lastSeenAt","intro","firstSeenAt","contactAvailable","contact","links","editedByRequest"],"properties":{"agencyId":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"regionBucket":{"type":["string","null"]},"regionBuckets":{"type":"array","items":{"type":"string"}},"onboardedOn":{"type":["string","null"]},"official":{"oneOf":[{"$ref":"#/components/schemas/AgencyOfficialAccount"},{"type":"null"}]},"hasPublicProfile":{"type":"boolean","description":"True when the agency filled its public profile on TikTok (intro / services / contact / size bands)."},"hasPage":{"type":"boolean","description":"AD.14 — the agency has its own page: a TikTok public profile, or an introduction / services the owner recorded at the agency's request."},"serviceTypes":{"type":"array","items":{"type":"string"},"description":"TikTok service-type keys (e.g. 1_on_1_support). They drive the serviceType filter."},"customServices":{"type":"array","items":{"type":"string"},"description":"AD.14 — the agency's own service labels, in its own words (owner-recorded at its request); when non-empty, show them instead of serviceTypes. Empty when none."},"size":{"oneOf":[{"$ref":"#/components/schemas/AgencySizeBands"},{"type":"null"}]},"applyUrl":{"type":["string","null"]},"lastSeenAt":{"type":"string","format":"date-time"},"intro":{"type":["string","null"],"description":"The agency's published introduction (free text, any language)."},"firstSeenAt":{"type":"string","format":"date-time"},"contactAvailable":{"type":"boolean","description":"True when the agency published contact details."},"contact":{"oneOf":[{"$ref":"#/components/schemas/AgencyContact"},{"type":"null"}],"description":"AD.9 — the agency's published email / phone / WhatsApp / address; public on every plan. null when the agency published none."},"links":{"oneOf":[{"$ref":"#/components/schemas/AgencyLinks"},{"type":"null"}],"description":"https links (website / recruitment / Discord): the owner's override per field (AD.5), else a URL the agency pasted into its own TikTok introduction or address (AD.9). null when none."},"editedByRequest":{"type":"boolean","description":"AD.5 — true when the owner set at least one of name / introduction / contact / links / hidden services or contact / own services (AD.14) at the agency's request (the value may coincide with TikTok's)."}}},"AgencyRegionSummary":{"type":"object","required":["regionBucket","agencies","withPublicProfile","newestOnboardedOn"],"properties":{"regionBucket":{"type":["string","null"],"description":"A region bucket (TikTok's verbatim, or one the owner recorded for an agency — AR.1); null = agencies with no region. An agency listed under several regions counts in each."},"agencies":{"type":"integer"},"withPublicProfile":{"type":"integer"},"newestOnboardedOn":{"type":["string","null"]}}},"GoodybagCapacity":{"type":"object","required":["laneEnabled","intervalMs","capacity","claimedByOthers","available","entitlement","entitlementExpired"],"properties":{"laneEnabled":{"type":"boolean"},"intervalMs":{"type":"integer"},"capacity":{"type":"integer","description":"Rooms the lane can sweep in one interval (Σ credential caps × interval × headroom)."},"claimedByOthers":{"type":"integer"},"available":{"type":"integer","description":"Rooms still free to this workspace, also bounded by its own grant."},"entitlement":{"oneOf":[{"type":"null"},{"type":"object","required":["includedRooms","expiresAt"],"properties":{"includedRooms":{"type":"integer"},"expiresAt":{"type":["string","null"]}}}]},"entitlementExpired":{"type":"boolean"}}},"GoodybagWatchSet":{"type":"object","required":["mode","size","region","priorityCountries","disabledBoards","minBagCoins","bagFloorExceptions","enabled","rooms","followRooms","lastRefreshedAt"],"properties":{"mode":{"type":"string","enum":["top","custom"]},"size":{"type":"integer"},"region":{"type":["string","null"]},"priorityCountries":{"type":"array","items":{"type":"string"},"description":"PB.4 — ISO country codes whose live rooms take the set's slots first (top sets); empty = none."},"disabledBoards":{"type":"array","items":{"type":"string"},"description":"PB.10 — rank boards left out of the ranking pool (see /v1/goodybag/countries); empty = every board."},"minBagCoins":{"type":["integer","null"],"description":"PB.24a — goody bags worth fewer coins are not sent to this workspace (realtime `goodybag.event` or GET /v1/goodybag/events); null = every bag. Treasure chests are not affected."},"bagFloorExceptions":{"type":"array","maxItems":20,"items":{"type":"string"},"description":"PB.24f — goody bag types written `coins/people` (`20/5` = 20 coins for 5 people) still sent under `minBagCoins`; empty = none."},"enabled":{"type":"boolean"},"rooms":{"type":"integer","description":"Live rooms the set holds right now."},"followRooms":{"type":"integer","description":"PB.11 — how many of `rooms` belong to creators on this workspace's own follow lists (including followed creators who are also on a leaderboard or listed as priority creators)."},"lastRefreshedAt":{"type":["string","null"]},"entries":{"type":"array","items":{"type":"object","required":["entry","kind","status"],"properties":{"entry":{"type":"string"},"kind":{"type":"string","enum":["handle","uid"]},"status":{"type":"string","enum":["pending","live","offline","not_tracked","over_size"]}}}}}},"GoodybagEvent":{"type":"object","required":["eventId","event","roomId","creatorId","creatorUid","observedAt","diamondCount","peopleCount","joinedHeadcount","unpackAt","viewerCount","viewerCountAt","viewerCountAtEvent"],"properties":{"eventId":{"type":"string","description":"The id the event is stored under: a bag `evt_goody_bag:<roomId>:<bagId>`, a chest `evt_chest:<envelopeId>` (a chest status frame id names the same chest)."},"event":{"type":"string","enum":["goodyBag","treasureBox"]},"roomId":{"type":"string"},"creatorId":{"type":["string","null"],"description":"Creator handle."},"creatorUid":{"type":["string","null"]},"observedAt":{"type":"string","description":"When the feed first sent it (ISO 8601)."},"diamondCount":{"type":["integer","null"]},"peopleCount":{"type":["integer","null"]},"joinedHeadcount":{"type":["integer","null"],"description":"Bag only: the most viewers seen joined so far; null for a chest."},"unpackAt":{"type":["integer","null"],"description":"Bag only: when it opens, epoch seconds; null for a chest or when unknown."},"viewerCount":{"type":["integer","null"],"description":"Viewers in the room now; null when no count from the last minute is held (the LIVE ended, or the room is not in the workspace's treasure-chest rooms)."},"viewerCountAt":{"type":["string","null"],"description":"When `viewerCount` was taken (ISO 8601)."},"viewerCountAtEvent":{"type":["integer","null"],"description":"Viewers when the event was first sent."}}},"GoodybagEvents":{"type":"object","required":["items","notFound"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/GoodybagEvent"},"description":"Found events, in the order asked."},"notFound":{"type":"array","items":{"type":"string"},"description":"Ids asked for that this workspace was not sent."}}},"ChestRecipient":{"type":"object","required":["userId","handle","nickname","coins"],"properties":{"userId":{"type":"string","description":"TikTok user id, as a string (ids pass 2^53)."},"handle":{"type":["string","null"],"description":"The @handle; null when TikTok sent none."},"nickname":{"type":["string","null"]},"coins":{"type":"integer","description":"Coins this user received from the chest (≥ 1: TikTok lists no 0-coin viewer)."}}},"ChestRecipients":{"type":"object","required":["eventId","roomId","diamondCount","peopleCount","recipients","luckiestUserId","listed","complete","capped","fetchedAt"],"properties":{"eventId":{"type":"string","description":"`evt_chest:<envelopeId>` (a chest status id asked names the same chest)."},"roomId":{"type":"string"},"diamondCount":{"type":["integer","null"]},"peopleCount":{"type":["integer","null"]},"recipients":{"type":"array","items":{"$ref":"#/components/schemas/ChestRecipient"},"description":"Who received coins, as TikTok lists them (largest share first). At most 200; TikTok leaves some out (its own app says: delay or privacy). Empty before the chest opens or while TikTok's list lags."},"luckiestUserId":{"type":["string","null"],"description":"The recipient TikTok marks luckiest."},"listed":{"type":"integer","description":"How many recipients TikTok listed."},"complete":{"type":"boolean","description":"`listed` reached `peopleCount`: TikTok listed everyone."},"capped":{"type":"boolean","description":"TikTok listed its maximum (200); the chest's other recipients cannot be read."},"fetchedAt":{"type":"string","description":"When the list was read from TikTok (ISO 8601). A complete or capped list, or a non-empty list of a chest found 30 min ago or more, is kept 24 h; any other (an empty one included) 60 s."}}},"ChestRecipientsBatch":{"type":"object","required":["items","failed","notFound"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/ChestRecipients"},"description":"Chests answered, in the order asked."},"failed":{"type":"array","items":{"type":"object","required":["eventId","code"],"properties":{"eventId":{"type":"string"},"code":{"type":"string","enum":["recipients_rate_limited","recipients_unavailable","recipients_expired"]},"retryAfterSeconds":{"type":"integer","description":"Only for `recipients_rate_limited`."}}},"description":"Chests this workspace was sent whose list could not be read now (retry `recipients_rate_limited` after `retryAfterSeconds`; `recipients_expired`: TikTok no longer keeps it)."},"notFound":{"type":"array","items":{"type":"string"},"description":"Ids asked for that name no chest this workspace was sent."}}},"GoodybagCountry":{"type":"object","required":["code","name","flag"],"properties":{"code":{"type":"string"},"name":{"type":"string"},"flag":{"type":"string"}}},"GoodybagCountries":{"type":"object","required":["region","boards","enabledBoards","priorityCountries","limits","updatedAt"],"properties":{"region":{"type":["string","null"],"description":"Set when the set is pinned to one board (`PUT /v1/goodybag/watch-set` `region`): `boards` is then that board alone, always on, and cannot be switched."},"boards":{"type":"array","items":{"type":"object","required":["code","name","flag","group","countries","enabled","rooms"],"properties":{"code":{"type":"string","description":"Board code (`VN`, `US+`, `MENA` …) — the key to send in PATCH `boards`."},"name":{"type":"string"},"flag":{"type":["string","null"],"description":"Flag of a single-country board; null for a group."},"group":{"type":"boolean","description":"True for a board that groups several countries."},"countries":{"type":"array","items":{"$ref":"#/components/schemas/GoodybagCountry"}},"enabled":{"type":"boolean","description":"False = left out of the set's ranking pool."},"rooms":{"type":"integer","description":"Rooms of the set on this board right now."}}}},"enabledBoards":{"type":"integer"},"priorityCountries":{"type":"array","items":{"type":"object","required":["code","name","flag","board"],"properties":{"code":{"type":"string"},"name":{"type":"string"},"flag":{"type":"string"},"board":{"type":["string","null"],"description":"The board the country is found on; null when no scanned board covers it."}}}},"limits":{"type":"object","required":["priorityCountries"],"properties":{"priorityCountries":{"type":"integer"}}},"updatedAt":{"type":["string","null"],"description":"When the lane last refilled the set; a change shows on the next refill (~30 s)."}}},"GoodybagFollowSources":{"type":"object","required":["sources","limit"],"properties":{"sources":{"type":"array","items":{"$ref":"#/components/schemas/GoodybagFollowSource"}},"limit":{"type":"integer","description":"Most accounts this workspace may have scanned."},"results":{"type":"array","items":{"$ref":"#/components/schemas/GoodybagFollowSource"},"description":"POST only: one answer per submitted handle, in the order sent."}}},"GoodybagFollowSource":{"type":"object","required":["handle","status","followingTotal","accountsRead","checkedAt","message"],"properties":{"handle":{"type":"string","description":"POST on a held handle whose account now holds another one: the new handle."},"status":{"type":"string","enum":["ok","hidden","reading","not_found"]},"followingTotal":{"type":"integer","nullable":true,"description":"How many accounts it follows, as TikTok reports it; null until read, and while the list is `hidden` or `not_found`."},"accountsRead":{"type":"integer","description":"How many of them are scanned: 0 for `hidden` and `not_found`."},"checkedAt":{"type":["string","null"]},"message":{"type":"string"}}},"GoodybagCoverage":{"type":"object","required":["monitoredRooms","regions","regionCodes","updatedAt"],"properties":{"monitoredRooms":{"type":"integer","description":"Rooms in this workspace's watch set right now."},"regions":{"type":"integer","description":"Distinct regional boards those rooms come from."},"regionCodes":{"type":"array","items":{"type":"string"}},"updatedAt":{"type":["string","null"],"description":"When the set was last refilled; null before the first refresh."}}},"GoodybagPriority":{"type":"object","required":["entries","limit"],"properties":{"entries":{"type":"array","items":{"type":"object","required":["entry","kind","status","checkedAt"],"properties":{"entry":{"type":"string"},"kind":{"type":"string","enum":["handle","uid"]},"status":{"type":"string","enum":["pending","live","offline","not_tracked","over_size"]},"checkedAt":{"type":["string","null"]}}}},"limit":{"type":"integer","description":"Most priority creators this workspace may list."}}},"GoodybagWatchSetResponse":{"type":"object","required":["watchSet","capacity"],"properties":{"watchSet":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/GoodybagWatchSet"}]},"capacity":{"$ref":"#/components/schemas/GoodybagCapacity"}}},"AgencyRegionsResponse":{"type":"object","required":["regions","totals"],"properties":{"regions":{"type":"array","items":{"$ref":"#/components/schemas/AgencyRegionSummary"}},"totals":{"type":"object","required":["agencies","withPublicProfile","regions"],"properties":{"agencies":{"type":"integer"},"withPublicProfile":{"type":"integer"},"regions":{"type":"integer"}}}}},"LiveProDirectoryMember":{"type":"object","required":["uniqueId","nickname","avatarUrl","isLive","roomId","region","firstSeenAt","lastSeenAt","masked","unmaskTier"],"properties":{"uniqueId":{"type":["string","null"],"description":"Handle (masked below the unlock tier)."},"nickname":{"type":["string","null"],"description":"Display name (masked below the unlock tier)."},"avatarUrl":{"type":["string","null"],"description":"Avatar URL — public data, shown on a masked row in the app. RM.14: null on a masked row read by an API key (its image key names the creator)."},"isLive":{"type":"boolean"},"roomId":{"type":["string","null"],"description":"Live room id when isLive; withheld (null) on a masked row (it resolves to the handle)."},"region":{"type":"string"},"firstSeenAt":{"type":"string","format":"date-time"},"lastSeenAt":{"type":"string","format":"date-time"},"masked":{"type":"boolean","description":"True when uniqueId/nickname are masked below the caller's unlock tier."},"unmaskTier":{"type":["string","null"]}}},"LiveProDirectoryResponse":{"type":"object","required":["region","members"],"properties":{"region":{"type":"string"},"members":{"type":"array","items":{"$ref":"#/components/schemas/LiveProDirectoryMember"}}}},"LiveProRegion":{"type":"object","required":["region","members","liveNow","lastSeenAt"],"properties":{"region":{"type":"string","description":"ISO country code — pass verbatim as `region` to GET /v1/live-pro (rankings bucket keys such as US+ match no directory)."},"members":{"type":"integer"},"liveNow":{"type":"integer","description":"Members whose newest sighting was live."},"lastSeenAt":{"type":"string","format":"date-time"}}},"LiveProRegionsResponse":{"type":"object","required":["regions"],"properties":{"regions":{"type":"array","items":{"$ref":"#/components/schemas/LiveProRegion"}}}},"RecruitCandidate":{"type":"object","required":["creatorUid","uniqueId","nickname","avatarUrl","region","rank","movement","scoreToday","coins30d","coins30dSince","followerCount","verified","isLive","roomId","isLivePro","mark","markNote","masked","unmaskTier"],"properties":{"creatorUid":{"type":"string","description":"TikTok user id. On a masked row an opaque `mk1_…` token sealed for the caller instead (RM: a uid IS identity — tiktok.com/share/user/<uid> redirects to the handle). GET /v1/recruit/creators/{creatorUid}/days accepts either."},"uniqueId":{"type":["string","null"],"description":"Handle (masked below the Agency unlock tier)."},"nickname":{"type":["string","null"],"description":"Display name (masked below the unlock tier)."},"avatarUrl":{"type":["string","null"],"description":"Avatar URL (masked below the unlock tier — recruit hides the photo too)."},"region":{"type":"string","description":"Resolved per creator: home region (ISO) when profiled, else the board bucket. Approximate."},"rank":{"type":["integer","null"],"description":"1-based rank on the board in `scoreBoard` (the creator's best current board: Daily first, then League, then the rest). RM.9 — null on a masked row, which carries `rankBand` instead."},"rankBand":{"$ref":"#/components/schemas/RecruitBand","description":"RM.9 — masked rows only: the range `rank` falls in (Top 10 · 11–25 · 26–50 · 51 and below; both ends inclusive)."},"movement":{"type":["string","null"],"enum":["up","down","same","new",null],"description":"Rank movement vs the prior period. RM.9 — null on a masked row (the board shows it per creator); `newOnly` is then ignored."},"scoreToday":{"type":["number","null"],"description":"The score on scoreBoard's current snapshot: diamonds on daily / hourly / league_* boards, ranking points on the others. RM.9 — null on a masked row, which carries `scoreBand` instead."},"scoreBand":{"$ref":"#/components/schemas/RecruitBand","description":"RM.9 — masked rows only: the range `scoreToday` falls in (<10K · 10K–50K · 50K–100K · 100K–250K · 250K–500K · 500K–1M · 1M+; max exclusive)."},"scoreBoard":{"type":"string","description":"EC.11 — the board rank / scoreToday / movement come from: daily, league_<class> (league_c2), hourly, popular_live, gaming_weekly, … Absent on a pre-EC.11 server."},"coins30d":{"type":["number","null"],"description":"Gifts observed over the 30-day window (coins↔💎 1:1); a lower bound. Since EC.11 the sum over diamonds30d's board days when the creator has any, else the last 30 × 24 h of the gift store. null when none observed. Prefer diamonds30d."},"coins30dSince":{"type":["string","null"],"format":"date-time","description":"Start of the window coins30d covers; null when no data."},"diamonds30d":{"$ref":"#/components/schemas/RecruitDiamonds30d"},"followerCount":{"type":["integer","null"],"description":"Followers; null when unprofiled. RM.9 — null on a masked row, which carries `followerBand` (and null coins30d / coins30dSince)."},"followerBand":{"$ref":"#/components/schemas/RecruitBand","description":"RM.9 — profiled masked rows only: the range followerCount falls in (<10K · 10K–50K · 50K–100K · 100K–500K · 500K–1M · 1M+; max exclusive)."},"verified":{"type":["boolean","null"],"description":"Verified account. RM.9 — null on a masked row."},"isLive":{"type":"boolean","description":"Live right now (a live check ≤ 30 min old). EC.14: the pool also holds creators on a current board who are not live (false); live rows come first."},"roomId":{"type":["string","null"],"description":"Live room id when isLive; withheld (null) on a masked row."},"isLivePro":{"type":"boolean"},"mark":{"type":["string","null"],"enum":["checked","eligible","ineligible","contacted","signed",null],"description":"Caller workspace's mark (EC.2); null when unmarked."},"markNote":{"type":["string","null"],"maxLength":500,"description":"Caller workspace's note on the mark (EC.2); null when none."},"markAssigneeUserId":{"type":["string","null"],"format":"uuid","description":"AO.5 — owner on the caller workspace's mark; null when none. Absent on a pre-AO.5 server."},"markFollowUpOn":{"type":["string","null"],"pattern":"^[0-9]{4}-[0-9]{2}-[0-9]{2}$","description":"AO.5 — follow-up day on the caller workspace's mark; null when none."},"masked":{"type":"boolean","description":"True when identity (handle/nickname/avatar/roomId) is masked below the unlock tier."},"unmaskTier":{"type":["string","null"]},"regionSource":{"type":"string","enum":["profile","board"],"description":"AR.10 — where `region` came from: the creator's profile, or the board bucket they ranked on (profile not resolved yet)."},"liveCheckedAt":{"type":["string","null"],"format":"date-time","description":"AR.10 — when the live check behind `isLive` was observed; on an offline row (EC.14) our newest live check of the creator, null when never checked. RM.9 — null on a masked row (as is profileRefreshedAt)."},"liveProCheckedAt":{"type":["string","null"],"format":"date-time","description":"AR.10 — when isLivePro was effectively checked: a member's own newest directory sighting; else the newest refresh of the LIVE Pro directory for the board bucket; null when none is crawled for it."},"liveProCheckedRegion":{"type":["string","null"],"description":"AR.10 — the directory region liveProCheckedAt refers to (a member's region, else the board bucket); null with a null time."},"profileRefreshedAt":{"type":["string","null"],"format":"date-time","description":"AR.10 — when the creator's profile was last refreshed; null when unprofiled."},"onBoardToday":{"type":"boolean","description":"RW.3 — wide list only: on any current board right now (a creator off every board has rank / scoreToday / movement null)."},"window":{"type":"object","required":["days","total","daysActive","daysAtClose","lastDay","from","to"],"properties":{"days":{"type":"integer"},"total":{"type":["integer","null"],"description":"Diamonds over the window (TikTok's day numbers summed); null on a masked row (then totalBand)."},"totalBand":{"$ref":"#/components/schemas/RecruitBand"},"daysActive":{"type":["integer","null"],"description":"Days with TikTok's number; null on a masked row (then daysActiveBand)."},"daysActiveBand":{"$ref":"#/components/schemas/RecruitBand"},"daysAtClose":{"type":["integer","null"],"description":"Days in a League class's top 99 when the day closed; null on a masked row."},"lastDay":{"type":["string","null"],"description":"Newest day with diamonds (YYYY-MM-DD); null on a masked row."},"from":{"type":["string","null"]},"to":{"type":["string","null"]}},"description":"RW.3 — wide list only: the creator's figures over the window (the list's order and the ceiling's figure)."}}},"RecruitBand":{"type":"object","required":["min","max"],"properties":{"min":{"type":"integer"},"max":{"type":["integer","null"],"description":"null = open-ended."}}},"RecruitDiamonds30d":{"type":"object","required":["estimate","tiktok","upperBound","daysWithTiktok","daysCovered","from","to","status","basis"],"properties":{"estimate":{"type":["number","null"],"description":"Σ per board day of max(TikTok's own number, the gifts we observed) over the last 30 board days of the creator's region — what the maxCoins30d ceiling acts on. null = no data at all."},"tiktok":{"type":["number","null"],"description":"Σ per board day of TikTok's own number alone (sealed Daily / League finals; a League reading during the day or the live Daily board when no final exists). RM.9 — null on a masked row (as are estimate, upperBound and today)."},"estimateBand":{"$ref":"#/components/schemas/RecruitBand","description":"RM.9 — masked rows only: the range estimate falls in (<50K · 50K–100K · 100K–250K · 250K–500K · 500K–1M · 1M–5M · 5M+; max exclusive). status, the day counts, the window and basis stay."},"upperBound":{"type":["number","null"],"description":"Σ per board day of the most the creator can have earned: the exact number on a day with a sealed final, else the larger of the estimate and the region's bar (the lower of the Daily board's last place and the highest last place among the full League boards). null when a day of the window has no bound."},"daysWithTiktok":{"type":["integer","null"],"description":"Board days of the window with a TikTok number for the creator. RM.9 — null on a masked row (a count of past boards, countable on them)."},"daysWithTiktokBand":{"$ref":"#/components/schemas/RecruitBand","description":"RM.9 — masked rows only: the range daysWithTiktok falls in (0 · 1–3 · 4–9 · 10–19 · 20+; both ends inclusive)."},"daysCovered":{"type":"integer","description":"Board days of the window our data covers for the creator's region (of 30)."},"from":{"type":["string","null"],"description":"First local board date of the window (YYYY-MM-DD, inclusive); null when the creator has no board day in our data."},"to":{"type":["string","null"],"description":"Last local board date of the window (the region's newest closed board day)."},"status":{"type":"string","enum":["under","check","over"],"description":"Against the read's ceiling (stats.ceiling): over = estimate > ceiling; under = upperBound ≤ ceiling; check = otherwise, including no data. A signal, not a verdict."},"basis":{"type":"string","enum":["boards","observed","none"],"description":"boards = the per-board-day table; observed = no closed board day in our data, estimate = the observed gifts (coins30d) or today's running number, whichever is larger; none = nothing."},"today":{"type":["number","null"],"description":"EC.15 — TikTok's running number for today's open board day (Daily / League score since the reset), already included in estimate, tiktok and upperBound (the window = the 29 newest closed board days + today, still 30 days); null when on no diamond board today."}}},"RecruitDiamondsDay":{"type":"object","required":["day","covered","tiktok","tiktokSource","leagueClass","observed","estimate","upperBound","exact"],"properties":{"day":{"type":"string","description":"Local board date of the window's region (YYYY-MM-DD)."},"covered":{"type":"boolean","description":"Our data holds this day for the region; false = before our data (or not rolled) — nothing bounds it."},"tiktok":{"type":["number","null"],"description":"TikTok's own number that day; null = none (on no board we read)."},"tiktokSource":{"type":["string","null"],"enum":["daily_final","league_final","live_sample","daily_live","league_observation",null],"description":"Which reading gave `tiktok`: a *_final is exact; live_sample (our score sampler, also off every board) is exact when the day is `exact`; daily_live / league_observation are a minimum."},"leagueClass":{"type":["string","null"],"description":"The creator's League class that day (B3); null when not on a League board."},"observed":{"type":["number","null"],"description":"Gifts we observed in that day's window as TikTok's score counts them (GW.19b: a host's includes hostBonus); null = no gift reading kept for the creator that day."},"hostBonus":{"type":"integer","description":"GW.19b — the part of observed that is the host bonus: floor(0.3 × each gift to a guest in the creator's room), which TikTok adds to the host's score; present only on a day with one."},"estimate":{"type":["number","null"],"description":"What the day adds to the estimate: max(tiktok, observed); null = no row (off every board), adds 0."},"upperBound":{"type":["number","null"],"description":"The most the creator can have earned that day: the estimate when exact, else the larger of it and the day's board bar; null = no bound."},"exact":{"type":"boolean","description":"A sealed final names the creator that day (upperBound = estimate)."}}},"RecruitCreatorDays":{"type":"object","required":["creatorUid","region","ceiling","diamonds30d","giftStoreCoins","days"],"properties":{"creatorUid":{"type":"string","description":"What was asked for: the TikTok user id, or the masked row's token when read by one (the uid is never echoed for a token)."},"region":{"type":["string","null"],"description":"The board region the window follows (US+, MX); null when the creator has no board day in our data."},"ceiling":{"type":"integer","description":"The ceiling diamonds30d.status is computed against (maxCoins30d, else 500000)."},"diamonds30d":{"$ref":"#/components/schemas/RecruitDiamonds30d"},"giftStoreCoins":{"type":["number","null"],"description":"Gifts we observed over the last 30 × 24 h in any LIVE we track, as TikTok counts them (GW.19b: + the host bonus from the creator's guests); the estimate never falls below it."},"days":{"type":"array","items":{"$ref":"#/components/schemas/RecruitDiamondsDay"},"description":"The window's closed days, oldest first (30 entries; 29 when today counts — today takes the oldest day's place), or [] when the creator has no board day in our data."},"today":{"type":["object","null"],"properties":{"score":{"type":"number"},"boardKey":{"type":"string"},"region":{"type":"string"},"observedAt":{"type":"string","format":"date-time"}},"required":["score","boardKey","region","observedAt"],"description":"EC.15 — today's open board day (included in diamonds30d): the Daily / League score since the reset, the board and when it was read; null when on no diamond board today."},"window":{"type":"integer","description":"RW.8 — the days `days` spans (30 / 60 / 90 / 180 / 365)."},"windowTotals":{"type":["object","null"],"properties":{"window":{"type":"integer"},"estimate":{"type":"number"},"tiktok":{"type":"number"},"upperBound":{"type":["number","null"]},"daysWithTiktok":{"type":"integer"},"daysCovered":{"type":"integer","description":"Days of the window our data holds (< window until the store is that old: never a fake total)."},"from":{"type":"string"},"to":{"type":"string"}},"required":["window","estimate","tiktok","upperBound","daysWithTiktok","daysCovered","from","to"],"description":"RW.8 — present when window > 30: its closed days summed with diamonds30d's arithmetic (today and the gift-store floor not in it); null when the creator has no row inside it."}}},"RecruitMark":{"type":"object","required":["creatorUid","status","note","markedAt","updatedAt","assigneeUserId","assigneeName","followUpOn"],"properties":{"creatorUid":{"type":"string"},"status":{"type":"string","enum":["checked","eligible","ineligible","contacted","signed"]},"note":{"type":["string","null"],"maxLength":500},"markedAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"assigneeUserId":{"type":["string","null"],"format":"uuid","description":"AO.5 — the workspace member who owns this candidate (users.id); null when unassigned."},"assigneeName":{"type":["string","null"],"description":"AO.5 — owner's display name, else email local part; null when unassigned or no longer a member."},"followUpOn":{"type":["string","null"],"pattern":"^[0-9]{4}-[0-9]{2}-[0-9]{2}$","description":"AO.5 — the agency's next follow-up, a UTC calendar day; null when not set."}}},"RecruitMarkSaved":{"allOf":[{"$ref":"#/components/schemas/RecruitMark"},{"type":"object","required":["inRoster","addedToRoster"],"properties":{"inRoster":{"type":"boolean","description":"True when the workspace has a roster host for this creator after the call (always false while the roster is off / not on the plan)."},"addedToRoster":{"type":"boolean","description":"True only when THIS call newly added the host (never for an existing host, never without addToRoster)."}}}]},"CrmEvent":{"type":"object","required":["id","at","kind","text","subject","actorUserId","actorName"],"properties":{"id":{"type":"string","description":"Opaque, strictly increasing within a workspace."},"at":{"type":"string","format":"date-time"},"kind":{"type":"string","enum":["status","note","assignee","follow_up","contract_end","roster","contact"]},"text":{"type":"string","description":"Final human wording, e.g. 'Status → Contacted', 'Follow-up set for Oct 9'. Never about money."},"subject":{"type":"string","enum":["recruit","host"],"description":"Where the line was recorded: a host's history also carries its recruit-stage lines."},"actorUserId":{"type":["string","null"],"format":"uuid"},"actorName":{"type":["string","null"],"description":"Display name, else email local part; null for an API-key write or a deleted user."},"via":{"type":"string","enum":["recruit"],"description":"Present (`recruit`) on an 'Added to roster' line that came from the Recruit mark dialog / Pipeline handoff; absent otherwise."}}},"CrmEventsResponse":{"type":"object","required":["events"],"properties":{"events":{"type":"array","items":{"$ref":"#/components/schemas/CrmEvent"}}}},"RecruitDigestConditions":{"type":"object","required":["excludeLivePro","newlyRankedOnly","maxCoins30d","minFollowers"],"properties":{"excludeLivePro":{"type":"boolean","description":"Leave out current LIVE Pro badge-holders (default true)."},"newlyRankedOnly":{"type":"boolean","description":"Keep only creators whose board movement is `new` (the Recruit page's 'New only'; distinct from the digest mode `new_only`)."},"maxCoins30d":{"type":["integer","null"],"minimum":0,"maximum":1000000000000,"description":"'Not yet graduated' ceiling on the 30-day estimate (diamonds30d.estimate, EC.11); null = no ceiling."},"minFollowers":{"type":["integer","null"],"minimum":0,"maximum":10000000000,"description":"Minimum followers; null = any."}}},"RecruitDigestSubscription":{"type":"object","required":["enabled","countries","cadence","mode","skipMarked","conditions","sendToAccountEmail","emailRecipientStatus","emailRecipientMasked","pendingEmailRecipientMasked","channelIds","lastRunAt","nextRunAt","createdAt","updatedAt"],"properties":{"enabled":{"type":"boolean"},"countries":{"type":"array","items":{"type":"string"},"description":"Resolved-country codes; empty = every country."},"cadence":{"type":"string","enum":["6h","12h","daily","weekly"]},"mode":{"type":"string","enum":["full","new_only"]},"skipMarked":{"type":"boolean"},"conditions":{"$ref":"#/components/schemas/RecruitDigestConditions"},"topCount":{"type":"integer","enum":[5,10,25],"description":"EC.8 — names listed in the message body; the full list is in the Excel attachment (email: one sheet per region) / the webhook's `creators`."},"sendToAccountEmail":{"type":"boolean","description":"The built-in email delivery (independent of alert channels)."},"emailRecipientStatus":{"type":"string","enum":["account","verified","pending"],"description":"account = the account email of the member who turned it on; verified = a confirmed custom address; pending = a NEW address awaiting confirmation (digests keep going to the previous recipient)."},"emailRecipientMasked":{"type":["string","null"],"description":"MASKED address digests are mailed to right now (j***@x.com); null when none can be resolved."},"pendingEmailRecipientMasked":{"type":["string","null"],"description":"MASKED address awaiting confirmation."},"channelIds":{"type":"array","items":{"type":"string"},"description":"Existing alert channels (AlertChannelView.id) the digest is delivered to."},"lastRunAt":{"type":["string","null"],"format":"date-time"},"nextRunAt":{"type":["string","null"],"format":"date-time"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"RecruitDigestResponse":{"type":"object","required":["subscription","minCadenceHours","cadences","accountEmailMasked"],"properties":{"subscription":{"oneOf":[{"$ref":"#/components/schemas/RecruitDigestSubscription"},{"type":"null"}]},"minCadenceHours":{"type":"integer"},"cadences":{"type":"array","items":{"type":"string","enum":["6h","12h","daily","weekly"]}},"accountEmailMasked":{"type":["string","null"],"description":"The CALLER's own account email, masked; null for an API key."}}},"RecruitMarksResponse":{"type":"object","required":["marks","nextCursor"],"properties":{"marks":{"type":"array","items":{"$ref":"#/components/schemas/RecruitMark"}},"nextCursor":{"type":["string","null"]}}},"RecruitPipelineMark":{"type":"object","required":["creatorUid","handle","nickname","avatarUrl","region","followerCount","verified","status","note","assigneeUserId","assigneeName","followUpOn","markedAt","updatedAt","inRoster","recruit"],"properties":{"creatorUid":{"type":"string"},"handle":{"type":["string","null"],"description":"Handle without @; null when never observed."},"nickname":{"type":["string","null"]},"avatarUrl":{"type":["string","null"]},"region":{"type":["string","null"],"description":"Home region, else the board bucket the creator was ranked in (uppercase); null when unknown."},"followerCount":{"type":["integer","null"],"description":"null = not collected yet (not zero)."},"verified":{"type":"boolean","description":"Whether the creator's account is verified, as on a Discover row; false when unknown."},"status":{"type":"string","enum":["checked","eligible","ineligible","contacted","signed"]},"note":{"type":["string","null"],"maxLength":500},"assigneeUserId":{"type":["string","null"],"format":"uuid"},"assigneeName":{"type":["string","null"]},"followUpOn":{"type":["string","null"],"pattern":"^[0-9]{4}-[0-9]{2}-[0-9]{2}$"},"markedAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"inRoster":{"type":"boolean","description":"True when the workspace has a roster host (any roster status) for this creator."},"recruit":{"oneOf":[{"$ref":"#/components/schemas/RecruitPipelineSnapshot"},{"type":"null"}],"description":"Discover's metrics for this creator (same sources); null when it is not on today's boards — never zeros."}}},"RecruitPipelineSnapshot":{"type":"object","required":["rank","movement","scoreToday","coins30d","isLivePro","isLive","followerCount"],"properties":{"rank":{"type":"integer"},"movement":{"type":"string","enum":["up","down","same","new"]},"scoreToday":{"type":"number"},"scoreBoard":{"type":"string","description":"EC.11 — the board rank / scoreToday come from (as RecruitCandidate.scoreBoard)."},"coins30d":{"type":["integer","null"],"description":"Gifts observed over the 30-day window (a lower bound); null when none observed."},"diamonds30d":{"$ref":"#/components/schemas/RecruitDiamonds30d"},"isLivePro":{"type":"boolean"},"isLive":{"type":"boolean"},"followerCount":{"type":["integer","null"],"description":"null = not collected yet (not zero)."}}},"RecruitPipelineCounts":{"type":"object","required":["total","byStatus","overdue","overdueByStatus","signedNotInRoster"],"properties":{"total":{"type":"integer"},"byStatus":{"type":"object","required":["checked","eligible","ineligible","contacted","signed"],"properties":{"checked":{"type":"integer"},"eligible":{"type":"integer"},"ineligible":{"type":"integer"},"contacted":{"type":"integer"},"signed":{"type":"integer"}}},"overdue":{"type":"integer","description":"Marks whose follow-up day is before today (UTC), all statuses."},"overdueByStatus":{"type":"object","required":["checked","eligible","ineligible","contacted","signed"],"properties":{"checked":{"type":"integer"},"eligible":{"type":"integer"},"ineligible":{"type":"integer"},"contacted":{"type":"integer"},"signed":{"type":"integer"}}},"signedNotInRoster":{"type":"integer","description":"Signed marks that are not on the roster yet."}}},"RecruitPipelineResponse":{"type":"object","required":["marks","counts","regions","nextCursor","rosterEnabled","truncated"],"properties":{"marks":{"type":"array","items":{"$ref":"#/components/schemas/RecruitPipelineMark"}},"counts":{"$ref":"#/components/schemas/RecruitPipelineCounts"},"regions":{"type":"array","items":{"type":"object","required":["region","count"],"properties":{"region":{"type":"string"},"count":{"type":"integer"}}},"description":"Resolved regions present in the assignee/q-narrowed set (not region-narrowed), largest first — the Region filter's menu."},"nextCursor":{"type":["string","null"]},"rosterEnabled":{"type":"boolean"},"truncated":{"type":"boolean"}}},"RecruitStats":{"type":"object","required":["liveNow","regions","earnedToday","observedAt"],"properties":{"liveNow":{"type":"integer","description":"Creators live on a current board right now."},"offlineNow":{"type":"integer","description":"EC.14 — creators on a current board who are not live right now (the rest of the pool). Absent on a server before EC.14."},"regions":{"type":"integer","description":"Distinct resolved regions represented in the pool."},"earnedToday":{"type":"number","description":"Sum of today's diamond scores (rows whose scoreBoard is daily or league_*)."},"observedAt":{"type":"string","format":"date-time"},"ceiling":{"type":"integer","description":"EC.11 — the ceiling diamonds30d.status was computed against (the read's maxCoins30d, else 500000)."},"statusCounts":{"type":"object","required":["under","check","over"],"properties":{"under":{"type":"integer"},"check":{"type":"integer"},"over":{"type":"integer"}},"description":"EC.11 — rows per ceiling signal after every filter except the ceiling itself (before paging)."},"worth":{"type":"object","required":["total","qualifying","belowFloor","fewDays"],"properties":{"total":{"type":"integer"},"qualifying":{"type":"integer"},"belowFloor":{"type":"integer"},"fewDays":{"type":"integer"}},"description":"EC.19 — the worth-checking split over the pool after every filter except `worthChecking` (the ceiling included), before paging: qualifying = estimate ≥ 50,000 and ≥ 4 days with a TikTok number; belowFloor = estimate under 50,000; fewDays = over the floor but under 4 TikTok days."},"wide":{"type":"object","required":["window","listed","from","to","refreshedAt"],"properties":{"window":{"type":"integer"},"listed":{"type":"integer"},"from":{"type":["string","null"]},"to":{"type":["string","null"]},"daysCovered":{"type":["integer","null"],"description":"RW.8 — days of the window the list holds (< window until the store is that old); null while counting, and with from / to null when no list of the window is built yet (the store keeps fewer than window + 2 days) — the page then says \"not ready yet\"."},"refreshedAt":{"type":["string","null"],"format":"date-time"},"counting":{"type":"boolean","enum":[true]}},"description":"RW.3 — present on a wide read (PLATFORM_API_RECRUIT_WIDE_ENABLED): the window in days, the rows the filters keep (the M of an export's 'Top N of M'), the list's window and its newest refresh. statusCounts is then absent and earnedToday 0. counting: true = this filter combination's counts were not ready within 1 s — the page is served, the counts read 0 and worth is absent; the next read carries them."}}},"RecruitResponse":{"type":"object","required":["stats","candidates","nextCursor"],"properties":{"stats":{"$ref":"#/components/schemas/RecruitStats"},"candidates":{"type":"array","items":{"$ref":"#/components/schemas/RecruitCandidate"}},"nextCursor":{"type":["string","null"]}}},"LiveCreatorPerformanceRecord":{"type":"object","properties":{"sessionId":{"type":"string"},"sessionStartedAt":{"type":"string","format":"date-time"},"creatorUniqueId":{"type":"string"},"roomKey":{"type":"string"},"durationSeconds":{"type":"integer"},"peakViewerCount":{"type":"integer"},"eventCount":{"type":"integer"},"chatCount":{"type":"integer"},"giftCount":{"type":"integer"},"totalGiftDiamonds":{"type":"integer"},"distinctGifterCount":{"type":"integer"}}},"LivePlayback":{"type":"object","required":["status"],"properties":{"status":{"type":"string","enum":["live","no_playback","offline"],"description":"`live` carries the fields below; `no_playback`/`offline` carry only status + message."},"roomId":{"type":["string","null"]},"title":{"type":["string","null"]},"nickname":{"type":["string","null"]},"hlsUrl":{"type":["string","null"],"description":"null for FLV-only rooms; prefer HLS when both are present."},"flvUrl":{"type":["string","null"]},"expiresAt":{"type":["string","null"],"format":"date-time"},"startedAt":{"type":["string","null"],"format":"date-time"},"renditions":{"type":"array","items":{"type":"object"}},"avatarUrl":{"type":["string","null"]},"verified":{"type":"boolean"},"followerCount":{"type":["integer","null"]},"region":{"type":["string","null"]},"source":{"type":"string","description":"Always tiktok-cdn: the customer's browser fetches the video directly from TikTok."},"cached":{"type":"boolean"},"message":{"type":["string","null"]}}},"TrendData":{"type":"object","properties":{"trendType":{"type":"string","enum":["hashtag","sound"]},"trendId":{"type":"string"},"region":{"type":"string"},"title":{"type":["string","null"]},"rank":{"type":["integer","null"]},"videoCount":{"type":["integer","null"]},"viewCount":{"type":["integer","null"]},"firstSeenAt":{"type":"string","format":"date-time"},"lastRefreshedAt":{"type":"string","format":"date-time"}}},"WatchlistEntry":{"type":"object","required":["id","creatorUniqueId","creatorDisplayName","creatorAvatarUrl","region","isLive","roomId","rank","ranks","topGifter","note","createdAt"],"properties":{"id":{"type":"string","format":"uuid"},"creatorUniqueId":{"type":"string"},"creatorDisplayName":{"type":["string","null"]},"creatorAvatarUrl":{"type":["string","null"]},"creatorFollowerCount":{"type":["integer","null"]},"verified":{"type":["boolean","null"]},"region":{"type":["string","null"]},"isLive":{"type":"boolean"},"roomId":{"type":["string","null"]},"rank":{"type":["integer","null"]},"ranks":{"type":"array","items":{"type":"object","required":["board","rank","gameTitle"],"properties":{"board":{"type":"string"},"rank":{"type":"integer"},"gameTitle":{"type":["string","null"]}}}},"topGifter":{"type":["object","null"],"properties":{"gifterUniqueId":{"type":["string","null"]},"gifterNickname":{"type":["string","null"]},"diamondTotal":{"type":"integer"},"estimatedValueUsd":{"type":["number","null"]}},"required":["gifterUniqueId","gifterNickname","diamondTotal","estimatedValueUsd"]},"giftTotals":{"type":["object","null"],"properties":{"24h":{"type":"object","required":["observedDiamonds","gifterCount","estimatedValueUsd"],"properties":{"observedDiamonds":{"type":"integer"},"gifterCount":{"type":"integer"},"estimatedValueUsd":{"type":["number","null"]},"hostBonus":{"type":"integer","description":"GW.19b — the creator's host bonus in the window: floor(0.3 × each gift to a guest in their room), which TikTok adds to the host's Daily score; not in observedDiamonds. observedDiamonds + hostBonus = the window as Daily counts it. Present only when positive."}}},"yesterday":{"type":"object","required":["observedDiamonds","gifterCount","estimatedValueUsd"],"properties":{"observedDiamonds":{"type":"integer"},"gifterCount":{"type":"integer"},"estimatedValueUsd":{"type":["number","null"]},"closedDay":{"$ref":"#/components/schemas/GifterClosedDay","description":"YD.5 — the closed Daily day of the region this creator's gifts count in (the board country they rank on, else their home region; region null = every region over its own day)."},"hostBonus":{"type":"integer","description":"GW.19b — the creator's host bonus in the window: floor(0.3 × each gift to a guest in their room), which TikTok adds to the host's Daily score; not in observedDiamonds. observedDiamonds + hostBonus = the window as Daily counts it. Present only when positive."}}},"7d":{"type":"object","required":["observedDiamonds","gifterCount","estimatedValueUsd"],"properties":{"observedDiamonds":{"type":"integer"},"gifterCount":{"type":"integer"},"estimatedValueUsd":{"type":["number","null"]},"hostBonus":{"type":"integer","description":"GW.19b — the creator's host bonus in the window: floor(0.3 × each gift to a guest in their room), which TikTok adds to the host's Daily score; not in observedDiamonds. observedDiamonds + hostBonus = the window as Daily counts it. Present only when positive."}}},"30d":{"type":"object","required":["observedDiamonds","gifterCount","estimatedValueUsd"],"properties":{"observedDiamonds":{"type":"integer"},"gifterCount":{"type":"integer"},"estimatedValueUsd":{"type":["number","null"]},"hostBonus":{"type":"integer","description":"GW.19b — the creator's host bonus in the window: floor(0.3 × each gift to a guest in their room), which TikTok adds to the host's Daily score; not in observedDiamonds. observedDiamonds + hostBonus = the window as Daily counts it. Present only when positive."}}}},"required":["24h","yesterday","7d","30d"]},"tracking":{"type":["object","null"],"description":"AR.18 — coverage of the last 30 UTC days. Null = no reading held for this handle.","properties":{"since":{"type":"string","pattern":"^[0-9]{4}-[0-9]{2}-[0-9]{2}$","description":"UTC day of the first reading we hold; before it nothing is known, not 0."},"windowDays":{"type":"integer","description":"Always 30."},"daysTracked":{"type":"integer","description":"Days of the window on or after `since`."},"daysObserved":{"type":"integer","description":"Days of the window with ≥ 1 observed live minute (or an observed gift when `basis` is live_and_gifts). Never exceeds `daysTracked`."},"lastObservedAt":{"type":["string","null"],"format":"date-time","description":"Newest reading we hold for this creator."},"status":{"type":"string","enum":["full","partial","new"]},"basis":{"type":"string","enum":["live","live_and_gifts"],"description":"What was counted. `live` when the plan withholds gift totals."},"through":{"type":"string","pattern":"^[0-9]{4}-[0-9]{2}-[0-9]{2}$","description":"UTC day of the last cell of the two daily series (today). Cell i is the day through - (windowDays - 1 - i)."},"dailyLiveMinutes":{"type":"array","items":{"type":"integer"},"description":"Minutes we saw the creator live on each day of the window, oldest first (windowDays entries); a minimum. The first windowDays - daysTracked cells are before `since`: unknown, not zero."},"dailyGifts":{"type":["string","null"],"description":"One character per day of the window, oldest first: 1 = a gift was observed that day, 0 = the day is closed and no gift was observed, ? = unknown (before `since`, or that day is not closed yet). Null when `basis` is live. A 0 on a day seen live means no gifts seen: they may have received none, or we could not see them."}},"required":["since","windowDays","daysTracked","daysObserved","lastObservedAt","status","basis","through","dailyLiveMinutes","dailyGifts"]},"note":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time"},"rosterStatus":{"type":["string","null"],"enum":["active","paused","left",null]},"signedOn":{"type":["string","null"]},"leftOn":{"type":["string","null"]},"rosterNote":{"type":["string","null"]},"splitPct":{"type":["number","null"]},"creatorUid":{"type":["string","null"]},"assigneeUserId":{"type":["string","null"],"format":"uuid","description":"AO.5 — the workspace member who owns this host (users.id; `userId` in GET /v1/workspace/members). Roster fields only."},"assigneeName":{"type":["string","null"],"description":"AO.5 — owner's display name, else email local part; null when unassigned or no longer a member."},"followUpOn":{"type":["string","null"],"pattern":"^[0-9]{4}-[0-9]{2}-[0-9]{2}$","description":"AO.5 — next follow-up, a UTC day."},"contractEndsOn":{"type":["string","null"],"pattern":"^[0-9]{4}-[0-9]{2}-[0-9]{2}$","description":"AO.5 — the contract end the agency typed (a UTC day); never read from a contract."}}},"AlertChannelView":{"type":"object","properties":{"id":{"type":"string"},"channelType":{"type":"string","enum":["webhook","email","in_app","telegram","discord"]},"target":{"type":["string","null"]},"enabled":{"type":"boolean"},"hasSigningSecret":{"type":"boolean"}}},"AlertRuleView":{"type":"object","required":["id","name","scope","eventTypes","enabled","channels"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"scope":{"type":"string","enum":["watchlist","creator","any","gifter_watchlist"]},"creatorUniqueId":{"type":["string","null"]},"region":{"type":["string","null"]},"eventTypes":{"type":"array","items":{"type":"string"}},"minDiamondCount":{"type":["integer","null"]},"minFollowerMilestone":{"type":["integer","null"]},"enabled":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"destinationIds":{"type":"array","items":{"type":"string"},"description":"the places of \"Where to send\" this alert sends to; `channels` lists the same places (id = destination id)."},"destinationIdsOff":{"type":"array","items":{"type":"string"},"description":"of `destinationIds`, the places whose link to this alert is off (\"Stop these emails\"): nothing is sent there. Naming one again in `destinationIds` turns it back on when the caller may use it."},"channels":{"type":"array","items":{"$ref":"#/components/schemas/AlertChannelView"}}}},"AlertDestinationView":{"type":"object","required":["id","kind","label","target","personal","mine","status","failureStreak","usedBy","createdAt"],"properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["webhook","email","in_app","telegram","discord"]},"label":{"type":["string","null"]},"target":{"type":"string","description":"The address as shown: an email masked (o***@agency.com), a URL as host/…/last4, \"Telegram\", \"In the app\". Never the URL or a secret."},"personal":{"type":"boolean","description":"One member's own (their Telegram, their email); false = the whole workspace's."},"mine":{"type":"boolean"},"status":{"type":"string","enum":["active","pending_confirm","paused","disconnected"],"description":"pending_confirm = an email waiting for its confirmation link to be clicked (it receives nothing until then)."},"verifiedAt":{"type":["string","null"]},"lastSuccessAt":{"type":["string","null"]},"lastFailureAt":{"type":["string","null"]},"lastFailureReason":{"type":["string","null"]},"failureStreak":{"type":"integer"},"pausedAt":{"type":["string","null"]},"pausedReason":{"type":["string","null"],"enum":["owner","email_link","failures","telegram_blocked",null],"description":"why it is paused: the owner paused it, \"Stop these emails\" in a summary email, 10 failed sends in a row, or Telegram refused the bot (blocked / removed). Resume with PATCH { paused: false }."},"failingSince":{"type":["string","null"],"description":"the first failure of the current run of failures; null while it works."},"usedBy":{"type":"object","required":["alerts","digest"],"properties":{"alerts":{"type":"integer"},"digest":{"type":"boolean"}}},"createdAt":{"type":"string","format":"date-time"}}},"GifterWatchlistEntry":{"type":"object","required":["id","gifterKey","status","alert","addedAt"],"properties":{"id":{"type":"string"},"gifterKey":{"type":"string","description":"Stable gifter key (sec_uid, else uid:<id>) — also the id of the gifter's page."},"uniqueId":{"type":["string","null"]},"nickname":{"type":["string","null"]},"avatarUrl":{"type":["string","null"]},"gifterLevel":{"type":["integer","null"],"description":"Global gifter level 1–50, when known and not hidden by the gifter."},"status":{"type":"string","enum":["gifting_now","seen","not_seen","unknown"],"description":"gifting_now = observed gifting in a live room in the last few minutes; seen = observed gifting in the window; not_seen = never observed in the window; unknown = the history lookup did not finish in time (the next refresh fills it)."},"liveInCreator":{"type":["string","null"],"description":"Host handle whose live the gifter is gifting in (status gifting_now)."},"lastSeenAt":{"type":["string","null"],"format":"date-time"},"observedDiamonds":{"type":["integer","null"],"description":"Coins (Xu) observed from the gifter over the response `window`."},"creatorCount":{"type":["integer","null"],"description":"Distinct creators funded in that window."},"estimatedValueUsd":{"type":["number","null"],"description":"Estimated creator-received value of the window's coins (est.; revenue is about 2x, earnings = this)."},"sessionCount":{"type":["integer","null"]},"region":{"type":["string","null"]},"regionCount":{"type":["integer","null"]},"segment":{"type":["string","null"],"description":"whale | rising | regular | one_time | dormant — the Gifters board archetype over the window."},"firstSeenAt":{"type":["string","null"],"format":"date-time"},"fansLevel":{"type":["integer","null"]},"alert":{"type":"object","required":["enabled","minCoins","channels"],"properties":{"enabled":{"type":"boolean"},"minCoins":{"type":["integer","null"]},"channels":{"type":["array","null"],"items":{"type":"string"}}}},"addedAt":{"type":"string","format":"date-time"}}},"GifterDateRange":{"type":"object","required":["from","to","dataFrom"],"properties":{"from":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"to":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"dataFrom":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"The first day the store holds data for in this range (later than `from` when the range starts before the stored history)."}}},"GifterWatchlistAccess":{"type":"object","required":["allowed","unlockTier","limit"],"properties":{"allowed":{"type":"boolean"},"unlockTier":{"type":["string","null"]},"limit":{"type":"integer"}}},"WebhookSecretReveal":{"type":"object","required":["channelId","signingSecret"],"properties":{"channelId":{"type":"string"},"signingSecret":{"type":"string","description":"The signing secret, shown ONCE at creation. Store it now — it is never returned again."}}},"ExportJob":{"type":"object","required":["id","dataset","format","status","filename","createdAt"],"properties":{"id":{"type":"string"},"dataset":{"type":"string","enum":["rankings","gifters","creator_roster","creator_gifters","gifter_funded_creators","teams","team_roster","live_pro","recruit","agencies","gifter_watchlist","live_sessions","league_window"]},"format":{"type":"string","enum":["csv","xlsx"]},"status":{"type":"string","enum":["pending","ready","failed"]},"rowCount":{"type":"integer"},"filename":{"type":"string"},"downloadUrl":{"type":["string","null"]},"error":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time"},"completedAt":{"type":["string","null"],"format":"date-time"}}},"ApiKey":{"type":"object","required":["id","label","keyPrefix","scopes","status","createdAt"],"properties":{"id":{"type":"string"},"label":{"type":"string"},"keyPrefix":{"type":"string","description":"The public prefix; the secret is NEVER returned by a list."},"scopes":{"type":"array","items":{"type":"string"}},"status":{"type":"string"},"expiresAt":{"type":["string","null"],"format":"date-time"},"revokedAt":{"type":["string","null"],"format":"date-time"},"lastUsedAt":{"type":["string","null"],"format":"date-time"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"CreatedApiKey":{"type":"object","required":["item","token"],"properties":{"item":{"$ref":"#/components/schemas/ApiKey"},"token":{"type":"string","description":"The full secret token, shown ONCE. Store it now — it is never returned again."}}},"UsageLedgerItem":{"type":"object","properties":{"id":{"type":"string"},"apiKeyId":{"type":["string","null"]},"apiKeyPrefix":{"type":["string","null"]},"apiKeyLabel":{"type":["string","null"]},"operation":{"type":"string"},"creditDelta":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"}}},"Usage":{"type":"object","required":["period","balance","items"],"properties":{"period":{"type":"string","description":"The UTC billing-month bucket, e.g. 2026-08-01."},"balance":{"type":"object","required":["remaining","spent"],"properties":{"remaining":{"type":"integer"},"spent":{"type":"integer"}}},"items":{"type":"array","items":{"$ref":"#/components/schemas/UsageLedgerItem"}}}},"EntitlementLimits":{"type":"object","properties":{"requestsPerWindow":{"type":"integer"},"rateWindowMs":{"type":"integer"},"apiRequestsPerSecond":{"type":"integer"},"requestsPerDay":{"type":"integer"},"maxApiKeys":{"type":"integer"},"wsConcurrencyCap":{"type":"integer","description":"Max LIVE rooms the workspace's subscriptions hold at once; a room another workspace already streams is shared and takes no slot. Realtime spends no credits."},"maxRoomMinutesPerMonth":{"type":"integer","deprecated":true,"description":"Deprecated (RS.1, 2026-11-02): no minute ceiling exists. Equals wsConcurrencyCap × 43,200 (every socket open all month); removed in a later release."},"historyWindowDays":{"type":["integer","null"]},"maxSeats":{"type":"integer"},"seatsUsed":{"type":"integer"},"exportFormats":{"type":"array","items":{"type":"string","enum":["csv","xlsx"]}}}},"EntitlementCredits":{"type":"object","properties":{"period":{"type":"string"},"monthlyAllotment":{"type":"integer"},"hardCap":{"type":"integer"},"spent":{"type":"integer"},"remaining":{"type":"integer"}}},"Entitlement":{"type":"object","required":["workspaceId","tier","modules","freeFallbackModules","limits","credits"],"properties":{"workspaceId":{"type":"string"},"planCode":{"type":["string","null"]},"tier":{"type":"string","enum":["free","starter","pro","scale","agency","enterprise"]},"modules":{"type":"array","items":{"type":"string","enum":["live","lookup"]}},"freeFallbackModules":{"type":"array","items":{"type":"string","enum":["live","lookup"]}},"limits":{"$ref":"#/components/schemas/EntitlementLimits"},"credits":{"$ref":"#/components/schemas/EntitlementCredits"}}}}},"paths":{"/v1/rankings/regions":{"get":{"summary":"List the regions a rank board can be read for, each with its coverage, its currently offered captured board keys, and `notOfferedBoards` — the boards proven absent from TikTok's product there. Disable only what `notOfferedBoards` names: a board missing from `boards` may simply be one we have not captured yet. Regions are BUCKET keys (US+, MENA, LATAM, DE+) — not ISO country codes, which match no board — and the list is built from captured availability, not from the crawl configuration.","security":[{"bearerAuth":["rank:read"]}],"parameters":[],"responses":{"200":{"description":"Provenance-wrapped region list","content":{"application/json":{"schema":{"type":"object","required":["data","provenance"],"properties":{"data":{"type":"object","required":["regions"],"properties":{"regions":{"type":"array","items":{"$ref":"#/components/schemas/RankingRegion"}}}},"provenance":{"$ref":"#/components/schemas/Provenance"}}}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/agencies":{"get":{"summary":"AD.2 — the TikTok LIVE agency directory (TikTok's own LIVE Creator Network registry, swept by id): name, TikTok region bucket, onboarding date, official account, services, TikTok's size bands and TikTok's apply deep link. Filter by `region` (TikTok's bucket verbatim — see /v1/agencies/regions), `q` (name or official handle contains), `serviceType`, `publicProfileOnly`; `sort` size (default) | newest | name; page with `limit` (1..100, default 24) + `offset`. List rows never carry contact details — read one agency for those. Reads collected data only — never reaches TikTok.","security":[{"bearerAuth":["agencies:read"]}],"parameters":[{"name":"region","in":"query","schema":{"type":"string"}},{"name":"q","in":"query","schema":{"type":"string"}},{"name":"serviceType","in":"query","schema":{"type":"string"}},{"name":"publicProfileOnly","in":"query","schema":{"type":"string","enum":["true","false"]}},{"name":"regionUnset","in":"query","schema":{"type":"string","enum":["true","false"]}},{"name":"sort","in":"query","schema":{"type":"string","enum":["size","newest","name"]}},{"name":"limit","in":"query","schema":{"type":"string"}},{"name":"offset","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Provenance-wrapped agency list","content":{"application/json":{"schema":{"type":"object","required":["data","provenance"],"properties":{"data":{"$ref":"#/components/schemas/AgencyListResponse"},"provenance":{"$ref":"#/components/schemas/Provenance"}}}}}},"400":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/agencies/regions":{"get":{"summary":"AD.2 — the region buckets the agency directory holds, each with its agency count, how many published a public profile and its newest onboarding, largest first, plus whole-directory totals. Buckets are TikTok's own agency regions verbatim (MENA, US+, …) — NOT the rankings bucket keys or ISO codes; `null` groups agencies that left the region empty. No parameters.","security":[{"bearerAuth":["agencies:read"]}],"parameters":[],"responses":{"200":{"description":"Provenance-wrapped agency region list","content":{"application/json":{"schema":{"type":"object","required":["data","provenance"],"properties":{"data":{"$ref":"#/components/schemas/AgencyRegionsResponse"},"provenance":{"$ref":"#/components/schemas/Provenance"}}}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/agencies/{agencyId}":{"get":{"summary":"AD.2 — one agency in full: everything in the list row plus its published introduction, its contact details (email / phone / address — public on every plan) and its website / apply / Discord links when known. 404 `agency_not_found` when TikTok's catalog holds no such id.","security":[{"bearerAuth":["agencies:read"]}],"parameters":[{"name":"agencyId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Provenance-wrapped agency detail","content":{"application/json":{"schema":{"type":"object","required":["data","provenance"],"properties":{"data":{"$ref":"#/components/schemas/AgencyDetail"},"provenance":{"$ref":"#/components/schemas/Provenance"}}}}}},"400":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/goodybag/coverage":{"get":{"summary":"TB.7 — how much this workspace's goody-bag / treasure-chest feed covers: `monitoredRooms` (rooms in the set now), `regions` (distinct regional boards they come from, e.g. VN, US+, LATAM) with their `regionCodes`, and `updatedAt` (when the set was last refilled). Sold under `goodybag:manage`; not credit-metered.","security":[{"bearerAuth":["goodybag:manage"]}],"parameters":[],"responses":{"200":{"description":"Coverage totals","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoodybagCoverage"}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/goodybag/priority":{"get":{"summary":"TB.9 — the priority creators of this workspace's `top` goody-bag / treasure-chest set, each with its status from the last refresh: `live` (holds a slot), `offline` (slot given back to the ranking pool until they go live), `not_tracked` (not on any regional rank board, so liveness is not known), `over_size`, or `pending` (not checked yet). Sold under `goodybag:manage`; not credit-metered.","security":[{"bearerAuth":["goodybag:manage"]}],"parameters":[],"responses":{"200":{"description":"Priority list","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoodybagPriority"}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"TB.9 — add creators (handles or numeric creator ids, ≤ 500 per call) to the priority list of the `top` set without replacing the ranking pool or the creators already listed. Live priority creators take slots first; the set's total stays `size`. 409 `priority_limit` past the list limit, 409 `priority_needs_top_set` on a `custom` set. Sold under `goodybag:manage`.","security":[{"bearerAuth":["goodybag:manage"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["entries"],"properties":{"entries":{"type":"array","minItems":1,"maxItems":500,"items":{"type":"string","maxLength":40}}}}}}},"responses":{"200":{"description":"Priority list","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoodybagPriority"}}}},"400":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/goodybag/priority/{entry}":{"delete":{"summary":"TB.9 — remove one creator (handle or numeric creator id) from the priority list; its slot returns to the ranking pool on the next refresh. 404 `priority_not_found` when it is not listed. Sold under `goodybag:manage`.","security":[{"bearerAuth":["goodybag:manage"]}],"parameters":[{"name":"entry","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Priority list","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoodybagPriority"}}}},"400":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/goodybag/follow-sources":{"get":{"summary":"PB.11 — the accounts (≤ 5) whose FOLLOWING list this workspace has asked us to scan for live rooms, each with `status` (`ok` readable and scanned, `hidden` a private account or a hidden following list, `reading` still being read, `not_found` no account under this handle; only `ok` is scanned), how many accounts it follows and how many of them are scanned. Each list is read again every 7 days. Requires a `top` set. Sold under `goodybag:manage`; not credit-metered.","security":[{"bearerAuth":["goodybag:manage"]}],"parameters":[],"responses":{"200":{"description":"Follow lists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoodybagFollowSources"}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"PB.11 — add accounts (TikTok handles, ≤ 5 in all) whose following list is scanned for live rooms in addition to the leaderboard set. The list is read at once and `results` answers per submitted handle: `ok` (readable, with the number of accounts it follows), `hidden` (a private account or a hidden following list — a new handle is NOT kept; make it public and send it again), `reading` (a long list still being read), `not_found`. Rooms found this way count against the purchased rooms and hold their slots ahead of the ranking; their frames carry `is_bxh: 0` (rooms the platform picks — creators on a leaderboard or who have been on one — carry `is_bxh: 1`). 409 `follow_sources_limit`, 409 `follow_needs_top_set`, 503 `follow_lists_unavailable`. Sold under `goodybag:manage`.","security":[{"bearerAuth":["goodybag:manage"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["handles"],"properties":{"handles":{"type":"array","minItems":1,"maxItems":5,"items":{"type":"string","maxLength":40}}}}}}},"responses":{"200":{"description":"Follow lists with one result per submitted handle","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoodybagFollowSources"}}}},"400":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/goodybag/follow-sources/{handle}":{"delete":{"summary":"PB.11 — stop scanning one account's following list; its rooms leave the set on the next refresh. 404 `follow_source_not_found` when it is not listed. Sold under `goodybag:manage`.","security":[{"bearerAuth":["goodybag:manage"]}],"parameters":[{"name":"handle","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Follow lists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoodybagFollowSources"}}}},"400":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/goodybag/events":{"get":{"summary":"PB.14 — look up several goody bags / treasure chests this workspace's feed sent, by the `eventId` of their `goodybag.event` frames (`ids`, comma-separated or repeated, ≤ 50), with fresh numbers: viewers in the room now and the bag's latest joined count. Ids this workspace was not sent come back in `notFound` (PB.24a: a goody bag under the watch set's `minBagCoins` was not sent). 400 `invalid_event_id` for a malformed id (`details.invalid`) or more than 50; 403 `goodybag_not_entitled` / `goodybag_entitlement_expired` without an in-force grant. Sold under `goodybag:read`; not credit-metered.","security":[{"bearerAuth":["goodybag:read"]}],"parameters":[{"name":"ids","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Found events and the ids not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoodybagEvents"}}}},"400":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/goodybag/events/recipients":{"get":{"summary":"PB.18x — who received coins from several treasure chests this workspace's feed sent (`ids`, comma-separated or repeated, ≤ 50), as TikTok lists them; read from TikTok when asked and kept in memory only (a settled list 24 h, a younger incomplete one 60 s). TikTok calls are paced (5/s per credential, burst 50): a cold batch of 50 is answered whole; beyond the pace chests come back in `failed`. Per chest: answered in `items`, or in `failed` (`recipients_rate_limited` + `retryAfterSeconds`, `recipients_unavailable`, `recipients_expired`), or `notFound`. 400 `invalid_event_id` (none, more than 50, malformed) or `not_a_chest` (a goody bag id); 403 without an in-force grant; 503 `recipients_unavailable` is never whole-batch. Sold under `goodybag:read`; not credit-metered.","security":[{"bearerAuth":["goodybag:read"]}],"parameters":[{"name":"ids","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Recipients per chest, failures and the ids not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChestRecipientsBatch"}}}},"400":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/goodybag/events/{eventId}/recipients":{"get":{"summary":"PB.18x — who received coins from one treasure chest this workspace's feed sent, as TikTok lists them (≤ 200; TikTok leaves some out and lists no 0-coin viewer); read from TikTok when asked, kept in memory only. 400 `invalid_event_id` / `not_a_chest`; 404 `event_not_found` when this workspace was not sent it; 410 `recipients_expired` when TikTok no longer keeps the list (about a week); 429 `recipients_rate_limited` with `Retry-After` and `details.retryAfterSeconds`; 503 `recipients_unavailable` (TikTok read failed — retry). Sold under `goodybag:read`; not credit-metered.","security":[{"bearerAuth":["goodybag:read"]}],"parameters":[{"name":"eventId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The chest's recipients","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChestRecipients"}}}},"400":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/goodybag/events/{eventId}":{"get":{"summary":"PB.14 — one goody bag / treasure chest this workspace's feed sent, by the `eventId` of its `goodybag.event` frame, with viewers in the room now and the bag's latest joined count. 404 `event_not_found` when this workspace was not sent it (PB.24a: a goody bag under the watch set's `minBagCoins` was not sent); 400 `invalid_event_id`; 403 `goodybag_not_entitled` / `goodybag_entitlement_expired` without an in-force grant. Sold under `goodybag:read`; not credit-metered.","security":[{"bearerAuth":["goodybag:read"]}],"parameters":[{"name":"eventId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The event","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoodybagEvent"}}}},"400":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/goodybag/countries":{"get":{"summary":"PB.10 — the countries scanned for this workspace's `top` set: every rank board read now (`code` such as VN, US+, MENA, its name, flag, the countries a group board covers, `enabled`, and how many of the set's rooms sit on it), plus the priority countries (ISO-2) whose live rooms take the set's slots first. A set pinned to one board (`region`) lists that board alone. 404 `watch_set_not_found` before a set exists, 409 `countries_need_top_set` on a `custom` set. Sold under `goodybag:manage`; not credit-metered.","security":[{"bearerAuth":["goodybag:manage"]}],"parameters":[],"responses":{"200":{"description":"Boards and priority countries","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoodybagCountries"}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"summary":"PB.10 — change what the set scans. `boards` maps board codes to `false` (leave the board out of the ranking pool) or `true` (scan it again); boards not named keep their state. `priorityCountries` replaces the priority list (≤ 10 ISO-2 codes, `[]` clears it); a priority country is scanned even when its board is switched off. The workspace's own lists (priority creators, follow lists) are never filtered by board. The lane follows on its next refresh (~30 s). Every malformed JSON body is 400 `invalid_countries` — nothing is coerced or dropped (a body that is not JSON at all is 400 `bad_request`): a value that is not exactly `true`/`false`, an unknown field (`details.unknownFields`), one board named twice with different values (`details.conflicting`), an unknown board code (`details.unknown`), a bad priority list. 409 `countries_region_pinned` when `boards` is sent for a set pinned to one board. Sold under `goodybag:manage`.","security":[{"bearerAuth":["goodybag:manage"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"boards":{"type":"object","additionalProperties":{"type":"boolean"},"maxProperties":200},"priorityCountries":{"type":"array","maxItems":10,"items":{"type":"string","pattern":"^[A-Za-z]{2}$"}}},"additionalProperties":false}}}},"responses":{"200":{"description":"Boards and priority countries","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoodybagCountries"}}}},"400":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/goodybag/capacity":{"get":{"summary":"GB.4 — the goody-bag watch lane's capacity as this workspace sees it: whether the lane is on, its sweep `intervalMs`, the rooms it can sweep (`capacity`), rooms already promised to other workspaces (`claimedByOthers`), the rooms still `available` to this workspace (bounded by its own grant), and the grant itself (`entitlement.includedRooms`, `expiresAt`; `entitlementExpired` when it ended). Workspace configuration of a granted capability, not credit-metered. Sold under `goodybag:manage`.","security":[{"bearerAuth":["goodybag:manage"]}],"parameters":[],"responses":{"200":{"description":"The lane capacity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoodybagCapacity"}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/goodybag/watch-set":{"get":{"summary":"GB.4 — this workspace's goody-bag watch set (`null` until one is set) and the lane capacity. A `top` set watches the N best-ranked live rooms; a `custom` set watches the live rooms of the creators listed (`entries`, each with the status the last refresh found: live | offline | not_tracked | over_size | pending — never dropped silently). `rooms` is how many live rooms the set holds right now; the lane refills it as rooms end. Sold under `goodybag:manage`; not credit-metered.","security":[{"bearerAuth":["goodybag:manage"]}],"parameters":[],"responses":{"200":{"description":"The watch set and capacity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoodybagWatchSetResponse"}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"put":{"summary":"GB.4 — create or replace this workspace's goody-bag watch set; idempotent. Body `{ mode: top|custom, size (1..200000: the most live rooms watched), region? (top only: a board region code), priorityCountries? (top only, ≤ 10 ISO-2 codes: those countries' live rooms fill first, then the ranking; omitted keeps the stored list, `[]` clears it), enabled? (default true), entries? (custom only, ≤ 5000 creator handles or numeric creator ids), minBagCoins? (PB.24a: goody bags worth fewer coins are not sent — feed or event lookup; 1..100000000 sets it, null or 0 clears it, omitted keeps it — none after a DELETE; treasure chests are not affected), bagFloorExceptions? (PB.24f: ≤ 20 goody bag types written `coins/people`, e.g. `20/5` and `20/1` — a bag under minBagCoins whose coins and people both match one is still sent; null or [] clears them, omitted keeps them — none after a DELETE) }`. Refused `403 goodybag_not_entitled` / `goodybag_entitlement_expired` without an in-force grant, `409 goodybag_plan_limit` when `size` is above the grant, `409 goodybag_lane_capacity` (retryable) when the lane has not enough free rooms (`details.available`), `400 invalid_watch_set` for a malformed body. The rooms themselves are filled by the lane within one refresh (~30 s). Receive the bags over the realtime WebSocket `goodybag.*` plane (token scope `goodybag:read`). Sold under `goodybag:manage`.","security":[{"bearerAuth":["goodybag:manage"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["mode","size"],"properties":{"mode":{"type":"string","enum":["top","custom"]},"size":{"type":"integer","minimum":1,"maximum":200000},"region":{"type":["string","null"],"maxLength":32},"priorityCountries":{"type":"array","maxItems":10,"items":{"type":"string","minLength":2,"maxLength":2}},"enabled":{"type":"boolean"},"entries":{"type":"array","maxItems":5000,"items":{"type":"string","maxLength":40}},"minBagCoins":{"type":["integer","null"],"minimum":0,"maximum":100000000},"bagFloorExceptions":{"type":["array","null"],"maxItems":20,"items":{"type":"string","maxLength":32}}}}}}},"responses":{"200":{"description":"The stored watch set and capacity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoodybagWatchSetResponse"}}}},"400":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"summary":"GB.4 — remove this workspace's goody-bag watch set (the lane stops sweeping its rooms within one refresh). Sold under `goodybag:manage`.","security":[{"bearerAuth":["goodybag:manage"]}],"responses":{"204":{"description":"Deleted"},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/live-pro":{"get":{"summary":"LP.4 — the TikTok LIVE Pro creator directory for a region: creators TikTok surfaces with the ✦ LIVE Pro badge (from the signed anchor/top_creator/list feed, collected over time into a membership union), freshest sighting first, with who is live right now. Handle/nickname mask below the unlock tier (avatar shown even when masked, like the rank boards); a masked row's live roomId is withheld. `region` is an ISO country code (call /v1/live-pro/regions for the live list — rankings bucket keys such as US+ match no directory); `liveOnly=true` restricts to currently-live members; `limit` caps the page (1..1000, default 100). Reads collected directory data only — never reaches TikTok.","security":[{"bearerAuth":["live-pro:read"]}],"parameters":[{"name":"region","in":"query","schema":{"type":"string"}},{"name":"liveOnly","in":"query","schema":{"type":"string","enum":["true","false"]}},{"name":"limit","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Provenance-wrapped LIVE Pro directory","content":{"application/json":{"schema":{"type":"object","required":["data","provenance"],"properties":{"data":{"$ref":"#/components/schemas/LiveProDirectoryResponse"},"provenance":{"$ref":"#/components/schemas/Provenance"}}}}}},"400":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/live-pro/regions":{"get":{"summary":"LP.7 — the regions the LIVE Pro directory can be read for, each with its member count, how many are live now and its newest sighting. Built from collected directory data (never from the collector configuration), sorted by region code; ISO country codes, NOT the rankings bucket keys. Call this before guessing a region for /v1/live-pro. No parameters.","security":[{"bearerAuth":["live-pro:read"]}],"parameters":[],"responses":{"200":{"description":"Provenance-wrapped LIVE Pro region list","content":{"application/json":{"schema":{"type":"object","required":["data","provenance"],"properties":{"data":{"$ref":"#/components/schemas/LiveProRegionsResponse"},"provenance":{"$ref":"#/components/schemas/Provenance"}}}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/recruit":{"get":{"summary":"EC.1 — the recruiting pool: creators on a current board, live or not (EC.14 — live creators come first whatever the sort; `isLive` marks them; `live=live|offline|all` filters, default all) (EC.11: every board the collector reads — Daily, every League class, Hourly, Popular LIVE, Gaming, Shopping), enriched with today's score on their best board (`scoreBoard`: Daily first, then League, then the rest), the 30-day diamonds (`diamonds30d`: an estimate from TikTok's own board numbers and the gifts we observed, an upper bound, the days with a TikTok number, the real window and an under | check | over signal against the ceiling), followers/verified, and the ✦ LIVE Pro badge, so an agency can find who is worth recruiting. It never computes eligibility (the agency checks that in TikTok's backstage). Identity (handle/nickname/avatar/roomId) masks below the Agency unlock tier; RM.9 — so do the numbers that would find a masked row on a board: rank, scoreToday, the 30-day figures and the followers become ranges (`rankBand` / `scoreBand` / `diamonds30d.estimateBand` / `followerBand`, the exact fields null, coins30d null), `movement` and `diamonds30d.daysWithTiktok` are null too (`daysWithTiktokBand`; `newOnly` is ignored), every sort orders masked rows on those ranges (ties in a secret-keyed per-viewer order), and `minScoreToday` / `minFollowers` / `maxCoins30d` (and so the ceiling `status` is read against) snap down to a range start (`stats.ceiling` reports it). `region` is a board bucket (empty = every bucket); `excludeLivePro` (default true) hides current LIVE Pro badge-holders; `maxCoins30d` is the 'not yet graduated' ceiling — it drops rows whose 30-day ESTIMATE is above it and sets the ceiling `diamonds30d.status` is computed against (default 500000); `newOnly` keeps movement=new; `minFollowers`/`minScoreToday` filter; every filter runs over the whole pool before paging; `sort` = score|diamonds30d|coins30d|followers|rank (default score; score = today's diamond score, creators only on point boards after; EC.7's removed liveFirst|windowScore are read as score); `minScoreToday` compares scoreToday whatever the board (diamonds or points); `limit` 1..200; `cursor` pages. The EC.7 not-live read (`includeOffline`, `from`/`to`, `minDaysOnBoard`, `minWindowScore`/`maxWindowScore`) was removed in EC.11 — those parameters are now ignored. Reads collected data only — never reaches TikTok. RW.3 — with PLATFORM_API_RECRUIT_WIDE_ENABLED on, the list is every creator of the 30-day window list (≥ 1,000 diamonds in the window, on a board today or not), filtered, ordered by the window total (`order`) and paged in SQL with a keyset cursor; rows add `window` and `onBoardToday`, `stats.wide` says so; masked rows order by the 30-day range then a secret random tie.","security":[{"bearerAuth":["rank:read"]}],"parameters":[{"name":"region","in":"query","schema":{"type":"string"}},{"name":"excludeLivePro","in":"query","schema":{"type":"string","enum":["true","false"]}},{"name":"newOnly","in":"query","schema":{"type":"string","enum":["true","false"]}},{"name":"minFollowers","in":"query","schema":{"type":"string"}},{"name":"maxCoins30d","in":"query","schema":{"type":"string"},"description":"The ceiling on the 30-day estimate (diamonds30d.estimate); also the ceiling diamonds30d.status is computed against. Omitted = no filter, status against 500000."},{"name":"minScoreToday","in":"query","schema":{"type":"string"}},{"name":"country","in":"query","schema":{"type":"string"},"description":"Keep only creators whose RESOLVED country (profile home region, else the board bucket — the `region` field of each row) equals this code (ISO like RO, or a bucket code like US+); case-insensitive. Distinct from `region`, which selects the BOARD bucket; applied after resolution, so `stats` stay pool-wide."},{"name":"live","in":"query","schema":{"type":"string","enum":["live","offline","all"]},"description":"EC.14 — live = only creators live right now; offline = only creators on a current board who are not live now; all (or omitted) = both, live first. `stats` stay pool-wide."},{"name":"worthChecking","in":"query","schema":{"type":"string","enum":["true","false"]},"description":"EC.19 — true keeps only creators worth checking: a 30-day estimate of at least 50,000 and at least 4 days with a TikTok number (the Recruit digest's gates). Omitted / false = every creator, as before. `stats.worth` always reports the split."},{"name":"q","in":"query","schema":{"type":"string","maxLength":64},"description":"Text search over handle and nickname (case-insensitive substring, a leading @ ignored), applied over the whole pool before paging. Identity-only: honoured at the Agency unlock tier or above, ignored below it (never a way to probe masked handles). Like the other filters, `stats.worth` and `stats.statusCounts` follow it; the rest of `stats` stay pool-wide."},{"name":"sort","in":"query","schema":{"type":"string","enum":["score","diamonds30d","coins30d","followers","rank","priority"]},"description":"EC.19 — `priority` = best to recruit: signal tier (under, check, over), then the 30-day estimate high → low, days with a TikTok number, followers; live only breaks a tie (no live-first). The default stays `score`."},{"name":"window","in":"query","schema":{"type":"string","enum":["30","60","90","180","365"]},"description":"RW.3 — the list's window in days (RW.8: 30 / 60 / 90 / 180 / 365; default 30; `stats.wide.daysCovered` = how many of them our data holds). Read only with the wide list (PLATFORM_API_RECRUIT_WIDE_ENABLED); accepted and ignored otherwise."},{"name":"order","in":"query","schema":{"type":"string","enum":["desc","asc"]},"description":"RW.3 — wide list only: the direction of the order on the window total (desc = most → least, the default)."},{"name":"limit","in":"query","schema":{"type":"string"}},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"The previous page's nextCursor, opaque. RW.3 — a wide list's cursor is a keyset (sealed for the workspace on a masked read); a cursor the read cannot continue is a 400."}],"responses":{"200":{"description":"Provenance-wrapped recruiting pool","content":{"application/json":{"schema":{"type":"object","required":["data","provenance"],"properties":{"data":{"$ref":"#/components/schemas/RecruitResponse"},"provenance":{"$ref":"#/components/schemas/Provenance"}}}}}},"400":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/recruit/creators/{creatorUid}/days":{"get":{"summary":"EC.12 — one creator's 30-day diamonds with every board day of the window (the Recruit creator panel): per day TikTok's own number and where it came from (a sealed Daily / League final is exact; a reading during the day is a minimum), the gifts we observed, what the day adds to the estimate and the most it can be. `diamonds30d` is the same as on the creator's /v1/recruit row (read fresh, so it can differ from a row read up to a few minutes earlier); `maxCoins30d` = the ceiling its status is computed against (default 500000). `creatorUid` = the TikTok user id (digits), or the opaque `mk1_…` token a masked /v1/recruit row carries instead (below Agency); a token opens only for the workspace it was issued to (404 otherwise) and is echoed back as `creatorUid`; RM.9 — by token, Agency plan or above (403 plan_required below it): a masked creator's exact board days would match them on past boards; RM.12 — by uid, Scale plan or above (403 plan_required below it: the 30-day estimate is a paid figure). Numbers only — no identity; a creator with no board day in our data returns `days: []`. Reads collected data only — never reaches TikTok.","security":[{"bearerAuth":["rank:read"]}],"parameters":[{"name":"creatorUid","in":"path","required":true,"schema":{"type":"string"}},{"name":"maxCoins30d","in":"query","schema":{"type":"string"}},{"name":"window","in":"query","schema":{"type":"string","enum":["30","60","90","180","365"]},"description":"RW.8 — the days `days` spans (default 30); longer than 30: its closed days, summed in `windowTotals` (today stays in diamonds30d only)"}],"responses":{"200":{"description":"Provenance-wrapped board days of one creator (30, or `window`)","content":{"application/json":{"schema":{"type":"object","required":["data","provenance"],"properties":{"data":{"$ref":"#/components/schemas/RecruitCreatorDays"},"provenance":{"$ref":"#/components/schemas/Provenance"}}}}}},"400":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/recruit/marks":{"get":{"summary":"EC.2 — this workspace's recruiting marks (the agency's own status per creator: checked | eligible | ineligible | contacted | signed), newest change first, optionally one `status`; `limit` 1..200 (default 50) and `cursor` page. Private to the workspace — never another's. Agency plan or above (403 plan_required below it). Workspace-owned data, not credit-metered.","security":[{"bearerAuth":["watchlist:manage"]}],"parameters":[{"name":"status","in":"query","schema":{"type":"string","enum":["checked","eligible","ineligible","contacted","signed"]}},{"name":"limit","in":"query","schema":{"type":"string"}},{"name":"cursor","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"The workspace's marks","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecruitMarksResponse"}}}},"400":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/recruit/pipeline":{"get":{"summary":"Recruit → Pipeline — this workspace's marks as a CRM pipeline: each mark with the creator it is about (handle, nickname, avatar, resolved region, followers), its status, note, owner, follow-up and `inRoster` (a roster host exists for the creator). Filters: `status` (comma list of checked|eligible|ineligible|contacted|signed), `assignee` (a member's users.id, or `unassigned`), `followUp` (overdue|today|upcoming, UTC days), `region` (uppercase code), `q` (prefix of the handle or nickname). Newest change first (uid ascending tie-break); `limit` 1..100 (default 50) and the opaque keyset `cursor` page. `counts` (per status, overdue, Eligible/Signed not in the roster) is narrowed by assignee / region / q but NOT by status or followUp, so it is a stable menu for the same filters. A `manager` session may call it but only ever sees marks assigned to them (the server ignores `assignee`); a manager never gets a mutation. Private to the workspace — never another's. Agency plan or above (403 plan_required below it). Workspace-owned data, not credit-metered; not part of the SDKs (customer-ui surface).","security":[{"bearerAuth":["watchlist:manage"]}],"parameters":[{"name":"status","in":"query","schema":{"type":"string","description":"Comma-separated statuses."}},{"name":"assignee","in":"query","schema":{"type":"string","description":"A workspace member's users.id, or `unassigned`."}},{"name":"followUp","in":"query","schema":{"type":"string","enum":["overdue","today","upcoming"]}},{"name":"region","in":"query","schema":{"type":"string"}},{"name":"q","in":"query","schema":{"type":"string","maxLength":64}},{"name":"limit","in":"query","schema":{"type":"string"}},{"name":"cursor","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"The pipeline page","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecruitPipelineResponse"}}}},"400":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/recruit/marks/{creatorUid}":{"put":{"summary":"EC.2 — set (or overwrite) this workspace's mark for a creator; idempotent. Body `{ status, note?, assigneeUserId?, followUpOn? }` (note ≤ 500 chars). AO.5 — `assigneeUserId` (a CURRENT member's users.id, else `422 assignee_not_member`; `null` unassigns) and `followUpOn` (a real UTC day `YYYY-MM-DD`, 2000–2100, else `400 invalid_follow_up_on`; `null` clears) are optional: OMITTED keeps the stored value. Each changed field (status, note, owner, follow-up) appends one line to the mark's history; an unchanged re-PUT appends none. Signed handoff: `addToRoster: true` (only with `status: signed`) also adds the creator to the roster in the same transaction — see that field. `creatorUid` is the TikTok user id a /v1/recruit row carries. The agency's own call — we never auto-mark. Agency plan or above (403 plan_required below it).","security":[{"bearerAuth":["watchlist:manage"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["status"],"properties":{"status":{"type":"string","enum":["checked","eligible","ineligible","contacted","signed"]},"note":{"type":["string","null"],"maxLength":500},"assigneeUserId":{"type":["string","null"],"format":"uuid"},"followUpOn":{"type":["string","null"],"pattern":"^[0-9]{4}-[0-9]{2}-[0-9]{2}$"},"addToRoster":{"type":"boolean","description":"Signed → Roster handoff: only with `status: signed` (else `400 add_to_roster_requires_signed`). `true` also makes the creator a roster host in the SAME transaction as the mark (nothing is saved if either half fails): roster_status active, signed today (UTC), carrying the mark's owner, follow-up and note. A creator who is already a host is NOT overwritten (the mark is still saved; `addedToRoster: false`). `404` while the roster is not enabled; `403 plan_required` below Agency; `409 watchlist_full` at the pin cap; `422 creator_handle_unknown` when we have never observed the creator's handle."},"contractEndsOn":{"type":["string","null"],"pattern":"^[0-9]{4}-[0-9]{2}-[0-9]{2}$","description":"Host-only contract end the agency typed, a real UTC day 2000–2100 (else `400 invalid_contract_ends_on`). Only with `addToRoster: true` (else `400 contract_end_requires_add_to_roster`)."}}}}}},"responses":{"200":{"description":"The stored mark plus `inRoster` / `addedToRoster`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecruitMarkSaved"}}}},"400":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"summary":"EC.2 — clear this workspace's mark for a creator. `removed` is false when there was no mark (idempotent). Agency plan or above.","security":[{"bearerAuth":["watchlist:manage"]}],"responses":{"200":{"description":"Removal result","content":{"application/json":{"schema":{"type":"object","required":["removed"],"properties":{"removed":{"type":"boolean"}}}}}},"400":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/recruit/marks/{creatorUid}/events":{"get":{"summary":"AO.5 — the history of this workspace's mark for a creator (status, note, owner and follow-up changes), newest first, at most 50. Never another workspace's. Agency plan or above (403 plan_required below it). Workspace-owned data, not credit-metered.","security":[{"bearerAuth":["watchlist:manage"]}],"parameters":[{"name":"creatorUid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The mark's history","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmEventsResponse"}}}},"400":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/recruit/digest":{"get":{"summary":"EC.5 — this workspace's Recruit Creator Digest subscription (or null), plus the cadence floor in force (`minCadenceHours`) and the cadences a client may pick. One subscription per workspace, delivered through the workspace's EXISTING alert channels. Agency plan or above (403 plan_required below it). Workspace-owned config, not credit-metered. 404 while the digest flag is off.","security":[{"bearerAuth":["watchlist:manage"]}],"parameters":[],"responses":{"200":{"description":"The subscription","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecruitDigestResponse"}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"put":{"summary":"EC.5 — create or replace this workspace's digest subscription; idempotent. Body `{ cadence: 6h|12h|daily|weekly (6h only when the floor allows), mode?: full|new_only (default new_only), countries?: string[] (resolved-country codes; empty = all), skipMarked? (default true), conditions?: { excludeLivePro? (default true), newlyRankedOnly? (default false), maxCoins30d? (int 0..1e12 or null = no ceiling on the 30-day estimate; a NEW subscription defaults to 500000), minFollowers? (int 0..1e10 or null) } — the Recruit-page filters as digest conditions; topCount? (EC.8: 5|10|25, default 10 — names listed in the message, the full list is in the Excel attachment); omitted keeps the current values, and each delivered digest states them (webhook: `digest.conditions`), channelIds: string[] (0..10 enabled channels that belong to THIS workspace's alert rules — may be empty when sendToAccountEmail is true), sendToAccountEmail? (the built-in email delivery, independent of alert channels; omitted keeps the current value, off for a new subscription via the API; needs a signed-in session or an `emailRecipient`), emailRecipient? (string = a NEW address that must be CONFIRMED by an emailed link before it receives anything — digests keep going to the previous recipient meanwhile; null = back to the account email; omitted = unchanged), enabled? (default true) }`. A digest needs at least one of the built-in email or an enabled channel. A channel of another workspace, or a disabled one, is refused (400 invalid_recruit_digest_input). A new/changed cadence schedules the next run one cadence from now. Agency plan or above.","security":[{"bearerAuth":["watchlist:manage"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["cadence","channelIds"],"properties":{"enabled":{"type":"boolean"},"countries":{"type":"array","items":{"type":"string"},"maxItems":40},"cadence":{"type":"string","enum":["6h","12h","daily","weekly"]},"mode":{"type":"string","enum":["full","new_only"]},"skipMarked":{"type":"boolean"},"sendToAccountEmail":{"type":"boolean"},"emailRecipient":{"type":["string","null"],"maxLength":254},"conditions":{"type":"object","properties":{"excludeLivePro":{"type":"boolean"},"newlyRankedOnly":{"type":"boolean"},"maxCoins30d":{"type":["integer","null"],"minimum":0,"maximum":1000000000000},"minFollowers":{"type":["integer","null"],"minimum":0,"maximum":10000000000}}},"topCount":{"type":"integer","enum":[5,10,25]},"channelIds":{"type":"array","items":{"type":"string"},"minItems":0,"maxItems":10}}}}}},"responses":{"200":{"description":"The stored subscription","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecruitDigestResponse"}}}},"400":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"summary":"EC.5 — delete this workspace's digest subscription (and its 'sent' memory). `removed` is false when there was none. Agency plan or above.","security":[{"bearerAuth":["watchlist:manage"]}],"responses":{"200":{"description":"Removal result","content":{"application/json":{"schema":{"type":"object","required":["removed"],"properties":{"removed":{"type":"boolean"}}}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/recruit/digest/email/resend":{"post":{"summary":"EC.5b — mail the confirmation link again for the address awaiting confirmation (rate-limited to 3 confirmation emails per subscription per UTC day, drawn from the daily digest-email budget). 409 when nothing is pending. Agency plan or above.","security":[{"bearerAuth":["watchlist:manage"]}],"responses":{"200":{"description":"The subscription","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecruitDigestResponse"}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/recruit/digest/email/cancel":{"post":{"summary":"EC.5b — drop the address awaiting confirmation (its emailed link stops working). Digests are untouched. Agency plan or above.","security":[{"bearerAuth":["watchlist:manage"]}],"responses":{"200":{"description":"The subscription","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecruitDigestResponse"}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/recruit/digest/email/confirm":{"get":{"summary":"EC.5b — PUBLIC (token only): the page an emailed confirmation link opens. It shows a Confirm button and changes nothing (a mail scanner prefetching the link cannot confirm for the recipient). HTML.","security":[],"parameters":[{"name":"token","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Confirmation page (HTML)"},"400":{"description":"Invalid or expired link (HTML)"},"404":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"EC.5b — PUBLIC (token only): confirm the address named by the signed, 48-hour token; from then on digests go to it. The token binds the subscription, its workspace and the exact address, so it cannot confirm anything else, and it stops working once the pending address changes or is cancelled. HTML.","security":[],"parameters":[{"name":"token","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Confirmed (HTML)"},"400":{"description":"Invalid, expired or no-longer-pending link (HTML)"},"404":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/weekly-report/unsubscribe":{"get":{"summary":"AO.7b — PUBLIC (token only): the page the weekly owner report's unsubscribe link opens. It shows an Unsubscribe button and changes NOTHING (a mail scanner prefetching the link cannot unsubscribe the owner); if the owner is already unsubscribed it offers Resubscribe instead. HTML. No email address or workspace is printed.","security":[],"parameters":[{"name":"token","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Confirmation page (HTML)"},"400":{"description":"Invalid link (HTML)"},"503":{"description":"Link verification not configured (HTML)"}}},"post":{"summary":"AO.7b — PUBLIC (token only): opt the owner named by the signed `weekly-report-unsub` token out of the weekly owner report, idempotently, whatever their current role. The token comes from the form body (`token=`) or the query string (the RFC 8058 one-click request: `application/x-www-form-urlencoded` body `List-Unsubscribe=One-Click`, token in the URL). The response page carries a Resubscribe button. HTML.","security":[],"parameters":[{"name":"token","in":"query","required":false,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"token":{"type":"string"},"List-Unsubscribe":{"type":"string"}}}}}},"responses":{"200":{"description":"Unsubscribed (HTML)"},"400":{"description":"Invalid link (HTML)"},"503":{"description":"Link verification not configured (HTML)"}}}},"/v1/weekly-report/resubscribe":{"post":{"summary":"AO.7b — PUBLIC (token only): turn the weekly owner report back on for the owner named by the token — only while they are STILL an owner of that workspace (403 otherwise). Idempotent. Token in the form body or the query string. HTML.","security":[],"parameters":[{"name":"token","in":"query","required":false,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"token":{"type":"string"}}}}}},"responses":{"200":{"description":"Resubscribed (HTML)"},"400":{"description":"Invalid link (HTML)"},"403":{"description":"No longer an owner of the workspace (HTML)"},"503":{"description":"Link verification not configured (HTML)"}}}},"/v1/product-updates/unsubscribe":{"get":{"summary":"PUBLIC (token only): the page the product-update emails' unsubscribe link opens. It shows an Unsubscribe button and changes NOTHING (a mail scanner prefetching the link cannot unsubscribe anyone); if the user is already unsubscribed it offers Resubscribe instead. HTML. No email address is printed.","security":[],"parameters":[{"name":"token","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Confirmation page (HTML)"},"400":{"description":"Invalid link (HTML)"},"503":{"description":"Link verification not configured (HTML)"}}},"post":{"summary":"PUBLIC (token only): opt the user named by the signed `product-updates-unsub` token out of product-update emails, idempotently. The token comes from the form body (`token=`) or the query string (the RFC 8058 one-click request: `application/x-www-form-urlencoded` body `List-Unsubscribe=One-Click`, token in the URL). The response page carries a Resubscribe button. HTML.","security":[],"parameters":[{"name":"token","in":"query","required":false,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"token":{"type":"string"},"List-Unsubscribe":{"type":"string"}}}}}},"responses":{"200":{"description":"Unsubscribed (HTML)"},"400":{"description":"Invalid link (HTML)"},"503":{"description":"Link verification not configured (HTML)"}}}},"/v1/product-updates/resubscribe":{"post":{"summary":"PUBLIC (token only): turn product-update emails back on for the user named by the token. Idempotent. Token in the form body or the query string. HTML.","security":[],"parameters":[{"name":"token","in":"query","required":false,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"token":{"type":"string"}}}}}},"responses":{"200":{"description":"Resubscribed (HTML)"},"400":{"description":"Invalid link (HTML)"},"503":{"description":"Link verification not configured (HTML)"}}}},"/v1/recruit/digest/test":{"post":{"summary":"EC.5 — 'send me a test digest now': enqueues one small sample digest (≤ 10 creators, subject-prefixed [TEST]) to the subscription's selected, enabled channels. Never advances the schedule and never records 'sent' memory. Rate-limited to one per minute per workspace (429). 404 when there is no subscription. Agency plan or above.","security":[{"bearerAuth":["watchlist:manage"]}],"responses":{"200":{"description":"Jobs enqueued","content":{"application/json":{"schema":{"type":"object","required":["enqueued"],"properties":{"enqueued":{"type":"integer"}}}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/rankings/gaming/games":{"get":{"summary":"List the per-game gaming boards a region offers — the source for the `game` parameter of board=gaming_game reads, built from captured switcher evidence, never a hardcoded list. `offered` games are readable now; `not_offered` names games TikTok has pulled. An empty list means the region runs only the aggregate gaming board (TikTok has not enabled per-game tabs there). Exposes no creator identity, so no masking applies.","security":[{"bearerAuth":["rank:read"]}],"parameters":[{"name":"region","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Provenance-wrapped game list","content":{"application/json":{"schema":{"type":"object","required":["data","provenance"],"properties":{"data":{"type":"object","required":["region","games"],"properties":{"region":{"type":"string"},"games":{"type":"array","items":{"$ref":"#/components/schemas/GamingGame"}}}},"provenance":{"$ref":"#/components/schemas/Provenance"}}}}}},"400":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/rankings/official":{"get":{"summary":"Get an official (TikTok-observed) rank board with avatar, live status, movement, and honest coverage. Gated boards distinguish incomplete collection (not-covered) from boards TikTok does not publish in that region (not-offered). Creator identity (handle/nickname/avatar) is masked below the unlock tier; rank/score/movement/live always show. Board keys include `hourly`, `daily`, `popular_live`, `gaming_daily`, `gaming_weekly`, the per-game gaming board `gaming_game` (requires the `game` parameter — a game_key from /v1/rankings/gaming/games; the `game` parameter is refused on every other board), the `league_a1`..`league_d5` league boards, and the LIVE Shopping boards `shopping_daily` (rank_type 29, daily, SEA incl. SG) and `shopping_weekly` (rank_type 6, weekly Mon-reset, US/UK/BR/JP). Shopping score is ranking POINTS (not GMV/currency) and its two cadences are not comparable as one unit. The two shopping boards additionally require the `shop:read` scope (on top of `rank:read`).","security":[{"bearerAuth":["rank:read"]}],"parameters":[{"name":"board","in":"query","required":true,"schema":{"type":"string"}},{"name":"region","in":"query","schema":{"type":"string"}},{"name":"game","in":"query","description":"game_key for board=gaming_game (required there, refused elsewhere)","schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"string","pattern":"^(?:[1-9][0-9]?|1[0-9][0-9]|200)$"}},{"name":"leagueTier","in":"query","description":"League class filter A1..D5 (league boards only)","schema":{"type":"string","pattern":"^[A-Da-d][1-5]$"}},{"name":"period","in":"query","description":"current (default, live board) or history (the prior published period)","schema":{"type":"string","enum":["current","history"]}},{"name":"liveOnly","in":"query","description":"Only creators live right now in a room the platform observes","schema":{"type":"string","enum":["true","false"]}}],"responses":{"200":{"description":"Provenance-wrapped official board","content":{"application/json":{"schema":{"type":"object","required":["data","provenance"],"properties":{"data":{"type":"object","required":["board"],"properties":{"board":{"$ref":"#/components/schemas/OfficialRankingBoard"}}},"provenance":{"$ref":"#/components/schemas/Provenance"}}}}}},"400":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/rankings/teams":{"get":{"summary":"Get the Teams & Clubs board (rank_type=18) for a region: TikTok LIVE fan-club COMMUNITIES ranked by combined diamonds, not creators. Each row carries the community (name, level, member count, image) + its representative host and score. Gated on the board's own capture like every board. The club name and host handle/name mask below the unlock tier; level/members/image/score always show.","security":[{"bearerAuth":["rank:read"]}],"parameters":[{"name":"region","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Provenance-wrapped teams board","content":{"application/json":{"schema":{"type":"object","required":["data","provenance"],"properties":{"data":{"type":"object","required":["board"],"properties":{"board":{"$ref":"#/components/schemas/TeamRankingBoard"}}},"provenance":{"$ref":"#/components/schemas/Provenance"}}}}}},"400":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/rankings/teams/{hostUid}/roster":{"get":{"summary":"Get the on-demand roster for one Teams & Clubs community host, keyed on the hostCreatorUid the board row exposes (the TikTok user id, or on a masked row the opaque `mk1_…` token, which opens only for the caller it was issued to — 404 otherwise), or on a TikTok @handle (`hostUid` all digits = uid, anything else = handle, resolved through TikTok; the response carries the numeric `creatorUid`, or a token when the host is masked): the persistent fan-club member list (\"thành viên hàng đầu\", ranked by lifetime member diamonds, with active/total counts) plus today's contributors (\"người đóng góp hôm nay\", with the next-reset countdown). Live-fetched from TikTok on request (never crawled/stored) and works whether or not the host is currently live. Member + host handle/name mask below the unlock tier (full roster unmasked at Agency); level/score/avatar always show. `section` (members|today) + `offset` page ONE list for load-more (absent = both lists, first page). 404 when the roster feature is disabled or the host does not resolve.","security":[{"bearerAuth":["rank:read"]}],"parameters":[{"name":"hostUid","in":"path","required":true,"description":"hostCreatorUid from the Teams board (a uid, or a masked row's mk1_ token), or a TikTok handle (with or without @).","schema":{"type":"string"}},{"name":"section","in":"query","description":"Page one list for load-more: members | today (absent = both, first page)","schema":{"type":"string","enum":["members","today"]}},{"name":"offset","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Provenance-wrapped team host roster","content":{"application/json":{"schema":{"type":"object","required":["data","provenance"],"properties":{"data":{"type":"object","required":["roster"],"properties":{"roster":{"$ref":"#/components/schemas/TeamRoster"}}},"provenance":{"$ref":"#/components/schemas/Provenance"}}}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/rankings/movers":{"get":{"summary":"Region movers (LT1.3): the creators whose rank changed most since the board's previous period, split into `gainers` (moved up) and `losers` (moved down), each biggest-move-first and capped by `limit` (1..99, default 20). Derived from the same official board read, so identity is masked by the caller's plan tier exactly as /v1/rankings/official — never an unmask backdoor. A gated/unpublished board returns empty lists. Shopping boards additionally require `shop:read`; `board=gaming_game` requires `game`.","security":[{"bearerAuth":["rank:read"]}],"parameters":[{"name":"board","in":"query","required":true,"schema":{"type":"string"}},{"name":"region","in":"query","schema":{"type":"string"}},{"name":"game","in":"query","description":"game_key for board=gaming_game (required there, refused elsewhere)","schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Provenance-wrapped movers board","content":{"application/json":{"schema":{"type":"object","required":["data","provenance"],"properties":{"data":{"type":"object","required":["board"],"properties":{"board":{"$ref":"#/components/schemas/RankMoversBoard"}}},"provenance":{"$ref":"#/components/schemas/Provenance"}}}}}},"400":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/rankings/league-window":{"get":{"summary":"ES.2 — League \"everyone seen\": every creator of a region with League diamonds over a window — `today` (the open board day so far), `yesterday` (the newest closed day), or the last `7d` / `30d` / `60d` / `90d` / `180d` / `365d` closed days (RW.8: 60d / 180d / 365d; > 90 days the strip is 30-day bars) — whether or not they were in their class's top 99 when a day closed. Biggest first; at least 1,000 diamonds (`min` raises it). A closed day counts TikTok's sealed number when the creator was in the class's top 99 at the close, else the highest reading of that day (a lower bound). `belowTop99=true` keeps creators never in the top 99 at a day's close (today: not on the class's current board). Identity follows the League board rule: below Scale the 3 biggest creators of the region's unfiltered list for the window show (wherever a filter places them) and every other row is masked (sealed `mk1_` uid, `•••••xx` handle and name). Today: `boardKnown` false = the creator's class has no League read in the last 30 min, so `rankNow` is unknown. An unknown `region` (no stored League day) is 400. `status: building` = the region's list is not built yet. Paged by `offset` + `limit` (≤ 100). 404 while the feature is off.","security":[{"bearerAuth":["rank:read"]}],"parameters":[{"name":"region","in":"query","required":true,"description":"Board region bucket (VN, US+, IT+…); not GLOBAL","schema":{"type":"string"}},{"name":"window","in":"query","schema":{"type":"string","enum":["today","yesterday","7d","30d","60d","90d","180d","365d"]},"description":"Default 7d. RW.8 — 60d / 180d / 365d: a list not built (the store keeps fewer days than the window + 2) answers status building; one younger than its window says so in daysCovered (never a fake total)"},{"name":"leagueClass","in":"query","schema":{"type":"string"},"description":"One class (A1..D5); absent = all classes"},{"name":"min","in":"query","schema":{"type":"string"},"description":"Minimum diamonds in the window (values under 1,000 read as 1,000)"},{"name":"belowTop99","in":"query","schema":{"type":"string","enum":["true","false"]}},{"name":"q","in":"query","schema":{"type":"string"},"description":"Handle search: rows whose handle contains this text (`@` and case ignored; letters, digits, `.`, `_`, ≤ 24). The plan that shows every League handle (Scale) only — below it 403 `plan_required` (not billed)"},{"name":"offset","in":"query","schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"string"},"description":"1..100, default 50"}],"responses":{"200":{"description":"Provenance-wrapped everyone-seen page","content":{"application/json":{"schema":{"type":"object","required":["data","provenance"],"properties":{"data":{"$ref":"#/components/schemas/LeagueWindowView"},"provenance":{"$ref":"#/components/schemas/Provenance"}}}}}},"400":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/rankings/league-window/access":{"get":{"summary":"ES.2 — whether League \"everyone seen\" is on for the caller and what the caller's plan opens: `unmaskAll` (every handle, search, Copy all), `unmaskTier` (the plan that does, null when the caller has it) and `historyWindowDays` (how many board days back the plan reads; null = no limit — a longer window is 403 `plan_required`). Reads no row and is free (no credit), so a client can decide to show the list without spending one. 404 while the feature is off.","security":[{"bearerAuth":["rank:read"]}],"parameters":[],"responses":{"200":{"description":"The caller's access to the list","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/LeagueWindowAccess"}}}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/rankings/league-window/handles":{"get":{"summary":"ES.2 — every handle (no `@`) of an \"everyone seen\" list under the same filters, biggest first, at most 50,000 (`truncated` when the list is longer) — \"Copy all\". Billed as one export. Needs the plan that shows every League handle (Scale); below it 403 `plan_required` (not billed). 404 while the feature is off.","security":[{"bearerAuth":["rank:read"]}],"parameters":[{"name":"region","in":"query","required":true,"schema":{"type":"string"}},{"name":"window","in":"query","schema":{"type":"string","enum":["today","yesterday","7d","30d","90d"]}},{"name":"leagueClass","in":"query","schema":{"type":"string"}},{"name":"min","in":"query","schema":{"type":"string"}},{"name":"belowTop99","in":"query","schema":{"type":"string","enum":["true","false"]}},{"name":"q","in":"query","schema":{"type":"string"},"description":"Handle search, as on the list"}],"responses":{"200":{"description":"Provenance-wrapped handle list","content":{"application/json":{"schema":{"type":"object","required":["data","provenance"],"properties":{"data":{"type":"object","required":["region","window","handles","total","truncated"],"properties":{"region":{"type":"string"},"window":{"type":"string"},"handles":{"type":"array","items":{"type":"string"}},"total":{"type":"integer"},"truncated":{"type":"boolean"}}},"provenance":{"$ref":"#/components/schemas/Provenance"}}}}}},"400":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/rankings/history":{"get":{"summary":"List retained periods of an official rank board, newest first, with cursor pagination. Each period carries its own coverage status — partially captured periods are shown, not hidden. Identity masking follows the caller's plan tier, never the public teaser rule. The `shopping_daily`/`shopping_weekly` boards additionally require the `shop:read` scope (on top of `rank:read`); `board=gaming_game` requires `game`.","security":[{"bearerAuth":["rank:read"]}],"parameters":[{"name":"board","in":"query","required":true,"schema":{"type":"string"}},{"name":"region","in":"query","schema":{"type":"string"}},{"name":"game","in":"query","description":"game_key for board=gaming_game (required there, refused elsewhere)","schema":{"type":"string"}},{"name":"limit","in":"query","description":"Periods per page (not rows)","schema":{"type":"integer","minimum":1,"maximum":24}},{"name":"cursor","in":"query","schema":{"type":"string"}},{"name":"leagueTier","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Provenance-wrapped retained period page","content":{"application/json":{"schema":{"type":"object","required":["data","provenance"],"properties":{"data":{"type":"object","required":["board","region","periods","nextCursor","hasMore"],"properties":{"board":{"type":"string"},"region":{"type":"string"},"periods":{"type":"array","items":{"$ref":"#/components/schemas/RankingHistoryPeriod"}},"nextCursor":{"type":["string","null"]},"hasMore":{"type":"boolean"},"historyWindowDays":{"type":["integer","null"]},"historyTruncated":{"type":"boolean"}}},"provenance":{"$ref":"#/components/schemas/Provenance"}}}}}},"400":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/gifters":{"get":{"summary":"List top observed gifters (whales) by diamonds in a window (24h/yesterday/7d/30d), optionally for one creator","security":[{"bearerAuth":["gifter:read"]}],"parameters":[{"name":"creator","in":"query","schema":{"type":"string"}},{"name":"from","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"description":"GW.26 — first UTC day of a day range (YYYY-MM-DD, inclusive). With `to`, both or neither, never with `window`; at most 366 days. A `from` earlier than the plan's history window (today − (historyWindowDays − 1)) is 403 `plan_range_exceeded`, never silently shortened. Without `creator` (GW.26c, where the workspace has it): the whole board over up to 31 days, or the last 90 / 180 / 365 days ending today (any other longer range → 400); it counts a gifter's days of 100+ diamonds; days not built yet → 503 `gifter_board_not_ready`, a busy reader → 503 `gifter_board_busy` (retry). Elsewhere the whole board reads windows only (400)."},{"name":"to","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"description":"GW.26 — last UTC day (inclusive); today means up to now; after today is 400. Without `creator` (GW.26c, where the workspace has it): the whole board over up to 31 days, or the last 90 / 180 / 365 days ending today (any other longer range → 400); it counts a gifter's days of 100+ diamonds; days not built yet → 503 `gifter_board_not_ready`, a busy reader → 503 `gifter_board_busy` (retry). Elsewhere the whole board reads windows only (400)."},{"name":"window","in":"query","schema":{"type":"string","enum":["24h","yesterday","7d","30d"]},"description":"Observation window (default 7d). `24h` is \"Today\": each gift counts from the last TikTok Daily reset of its region (the Daily board's day, e.g. US+ 04:00 UTC), not a sliding 24 hours; `yesterday` (YD.1) is the closed Daily day before it, per region (exact across DST; a region with no Daily board, the previous UTC day) — `filter.closedDay` says which day and whether late rows may still land; `7d` / `30d` are sliding. Every figure is observed diamonds in this window, not a lifetime total."},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":200}}],"responses":{"200":{"description":"Provenance-wrapped gifter list","content":{"application/json":{"schema":{"type":"object","required":["data","provenance"],"properties":{"data":{"type":"object","required":["gifters","filter"],"properties":{"gifters":{"type":"array","items":{"$ref":"#/components/schemas/GifterSummary"}},"filter":{"type":"object","required":["window","creatorUniqueId"],"properties":{"window":{"type":["string","null"]},"creatorUniqueId":{"type":["string","null"]},"closedDay":{"$ref":"#/components/schemas/GifterClosedDay"},"range":{"oneOf":[{"$ref":"#/components/schemas/GifterDateRange"},{"type":"null"}],"description":"GW.26 — present when the read used from/to (then `window` is null)."}}}}},"provenance":{"$ref":"#/components/schemas/Provenance"}}}}}},"400":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/gifters/{gifterKey}":{"get":{"summary":"Get one gifter's observed totals in a window and the creators they fund (who-funds-whom)","security":[{"bearerAuth":["gifter:read"]}],"parameters":[{"name":"window","in":"query","schema":{"type":"string","enum":["24h","yesterday","7d","30d"]},"description":"Observation window (default 7d). `24h` = Today (since each region's TikTok Daily reset); `yesterday` = the closed Daily day before it (per region; `filter.closedDay`); `7d` / `30d` sliding."},{"name":"from","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"description":"GW.26 — first UTC day of a day range (YYYY-MM-DD, inclusive). With `to`, both or neither, never with `window`; at most 366 days. A `from` earlier than the plan's history window (today − (historyWindowDays − 1)) is 403 `plan_range_exceeded`, never silently shortened."},{"name":"to","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"description":"GW.26 — last UTC day (inclusive); today means up to now; after today is 400."},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":200}}],"responses":{"200":{"description":"Provenance-wrapped gifter profile","content":{"application/json":{"schema":{"type":"object","required":["data","provenance"],"properties":{"data":{"type":"object","required":["gifter","fundedCreators","filter"],"properties":{"gifter":{"$ref":"#/components/schemas/GifterSummary"},"fundedCreators":{"type":"array","items":{"$ref":"#/components/schemas/FundedCreator"}},"fundedAccess":{"$ref":"#/components/schemas/FundedCreatorsAccess"},"filter":{"type":"object","required":["window"],"properties":{"window":{"type":["string","null"]},"closedDay":{"$ref":"#/components/schemas/GifterClosedDay"},"range":{"oneOf":[{"$ref":"#/components/schemas/GifterDateRange"},{"type":"null"}],"description":"GW.26 — present when the read used from/to (then `window` is null)."}}}}},"provenance":{"$ref":"#/components/schemas/Provenance"}}}}}},"400":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/gifters/{gifterKey}/history":{"get":{"summary":"GH.3 — one gifter's daily history grouped by day|week|month|year (UTC) and split by the creators they gave to, from the long-term daily store. Pro or above; `range` (days, default and cap = the plan's historyWindowDays, 365 when unlimited) is clamped to the plan's read window (`historyTruncated`). The store keeps a gifter's day only when their day total reached `coverage.minDailyCoins` and holds days from `coverage.dataSince`; days the poller covered only in part are in `coverage.partialDays` (their figures are a minimum). Weeks start on Monday, all boundaries UTC.","security":[{"bearerAuth":["gifter:read"]}],"parameters":[{"name":"bucket","in":"query","schema":{"type":"string","enum":["day","week","month","year"]},"description":"Period size (default month)."},{"name":"range","in":"query","schema":{"type":"integer","minimum":1,"maximum":400},"description":"Days back from today, UTC (default: the plan's history window)."},{"name":"from","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"description":"GW.26 — first UTC day of a day range (YYYY-MM-DD, inclusive). With `to`, both or neither, never with `window`; at most 366 days. A `from` earlier than the plan's history window (today − (historyWindowDays − 1)) is 403 `plan_range_exceeded`, never silently shortened. Instead of `range` (400 with both); read exactly as asked (`historyTruncated` false)."},{"name":"to","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"description":"GW.26 — last UTC day (inclusive); today means up to now; after today is 400. Instead of `range` (400 with both); read exactly as asked (`historyTruncated` false)."}],"responses":{"200":{"description":"Provenance-wrapped gifter history","content":{"application/json":{"schema":{"type":"object","required":["data","provenance"],"properties":{"data":{"type":"object","required":["gifter","bucket","from","to","periods","totalsByCreator","totalCoins","firstGiftAt","lastGiftAt","status","coverage","historyWindowDays","historyTruncated"],"properties":{"gifter":{"type":"object","required":["gifterKey","nickname","uniqueId"],"properties":{"gifterKey":{"type":"string"},"nickname":{"type":["string","null"]},"uniqueId":{"type":["string","null"]}}},"bucket":{"type":"string"},"from":{"type":"string"},"to":{"type":"string"},"periods":{"type":"array","items":{"type":"object","required":["period","coins","byCreator"],"properties":{"period":{"type":"string"},"coins":{"type":"integer"},"byCreator":{"type":"array","items":{"$ref":"#/components/schemas/GifterHistoryCreator"}}}}},"totalsByCreator":{"type":"array","items":{"$ref":"#/components/schemas/GifterHistoryCreator"}},"totalCoins":{"type":"integer"},"firstGiftAt":{"type":["string","null"]},"lastGiftAt":{"type":["string","null"]},"status":{"type":"object","required":["state","lastGiftDay","quietDays"],"properties":{"state":{"type":"string"},"lastGiftDay":{"type":["string","null"]},"quietDays":{"type":["integer","null"]}}},"coverage":{"type":"object","required":["dataSince","minDailyCoins","partialDays"],"properties":{"dataSince":{"type":["string","null"]},"minDailyCoins":{"type":["integer","null"]},"partialDays":{"type":"array","items":{"type":"string"}}}},"historyWindowDays":{"type":["integer","null"]},"historyTruncated":{"type":"boolean"}}},"provenance":{"$ref":"#/components/schemas/Provenance"}}}}}},"400":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/creators/{handle}/gifters":{"get":{"summary":"List the gifters funding one creator in a window, ranked by diamonds given to them","security":[{"bearerAuth":["gifter:read"]}],"parameters":[{"name":"window","in":"query","schema":{"type":"string","enum":["24h","yesterday","7d","30d"]},"description":"Observation window (default 7d). `24h` = Today (since each region's TikTok Daily reset); `yesterday` = the closed Daily day before it (per region; `filter.closedDay`); `7d` / `30d` sliding."},{"name":"from","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"description":"GW.26 — first UTC day of a day range (YYYY-MM-DD, inclusive). With `to`, both or neither, never with `window`; at most 366 days. A `from` earlier than the plan's history window (today − (historyWindowDays − 1)) is 403 `plan_range_exceeded`, never silently shortened."},{"name":"to","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"description":"GW.26 — last UTC day (inclusive); today means up to now; after today is 400."},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":200}}],"responses":{"200":{"description":"Provenance-wrapped creator gifter list","content":{"application/json":{"schema":{"type":"object","required":["data","provenance"],"properties":{"data":{"type":"object","required":["creatorUniqueId","gifters","totals","filter"],"properties":{"creatorUniqueId":{"type":"string"},"gifters":{"type":"array","items":{"$ref":"#/components/schemas/CreatorGifter"}},"totals":{"oneOf":[{"$ref":"#/components/schemas/CreatorGifterTotals"},{"type":"null"}]},"filter":{"type":"object","required":["window"],"properties":{"window":{"type":["string","null"]},"closedDay":{"$ref":"#/components/schemas/GifterClosedDay"},"range":{"oneOf":[{"$ref":"#/components/schemas/GifterDateRange"},{"type":"null"}],"description":"GW.26 — present when the read used from/to (then `window` is null)."}}},"access":{"$ref":"#/components/schemas/CreatorGiftersAccess"},"asGuest":{"$ref":"#/components/schemas/CreatorAsGuest","description":"GW.19b — gifts received as a guest in other creators' rooms (TikTok does not count them in this creator's Daily; never in gifters/totals)."},"hostBonus":{"oneOf":[{"$ref":"#/components/schemas/CreatorHostBonus"},{"type":"null"}],"description":"GW.19b — the 30 % host bonus from this creator's guests; null when withheld with the totals or none."}}},"provenance":{"$ref":"#/components/schemas/Provenance"}}}}}},"400":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/creators/{handle}/gifters/live":{"get":{"summary":"List the gifters of one creator's current LIVE session by their cumulative coins in it (TikTok's in-room ranking); offline → their last session for ~2 h (session.isLive false); session null = no live or recent session tracked","security":[{"bearerAuth":["gifter:read"]}],"parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":200},"description":"Rows to return (default 99, like TikTok's list)."}],"responses":{"200":{"description":"Provenance-wrapped creator live-session gifter board","content":{"application/json":{"schema":{"type":"object","required":["data","provenance"],"properties":{"data":{"type":"object","required":["creatorUniqueId","session","gifters","totals"],"properties":{"creatorUniqueId":{"type":"string"},"session":{"oneOf":[{"$ref":"#/components/schemas/CreatorLiveSession"},{"type":"null"}]},"gifters":{"type":"array","items":{"$ref":"#/components/schemas/CreatorGifter"}},"totals":{"oneOf":[{"$ref":"#/components/schemas/CreatorGifterTotals"},{"type":"null"}]},"access":{"$ref":"#/components/schemas/CreatorGiftersAccess"},"asGuest":{"$ref":"#/components/schemas/CreatorAsGuest","description":"GW.19b — the guest rooms whose last gift is within 2 h (the creator's current / last guest seat)."},"hostBonus":{"oneOf":[{"$ref":"#/components/schemas/CreatorHostBonus"},{"type":"null"}],"description":"GW.19b — the host bonus of this session's room; null when withheld, no session, or none."}}},"provenance":{"$ref":"#/components/schemas/Provenance"}}}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/live/sessions":{"get":{"summary":"REMOVED 2026-09-24 — answers 410 endpoint_removed. Use /v1/live/creators/{uid}/performance.","deprecated":true,"security":[{"bearerAuth":["live:read"]}],"responses":{"410":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/live/sessions/{id}":{"get":{"summary":"REMOVED 2026-09-24 — answers 410 endpoint_removed.","deprecated":true,"security":[{"bearerAuth":["live:read"]}],"responses":{"410":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/live/creators/{uid}/performance":{"get":{"summary":"List creator LIVE performance","security":[{"bearerAuth":["live:read"]}],"parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"Provenance-wrapped performance page","content":{"application/json":{"schema":{"type":"object","required":["data","provenance"],"properties":{"data":{"type":"object","required":["items","nextCursor"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/LiveCreatorPerformanceRecord"}},"nextCursor":{"type":["string","null"]},"historyWindowDays":{"type":["integer","null"]},"historyTruncated":{"type":"boolean"}}},"provenance":{"$ref":"#/components/schemas/Provenance"}}}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/live/creators/{uid}/refresh":{"post":{"summary":"Queue an asynchronous LIVE refresh","security":[{"bearerAuth":["live:read"]}],"responses":{"202":{"description":"Refresh accepted — billed `live-refresh` on acceptance","content":{"application/json":{"schema":{"type":"object","required":["queued","jobId"],"properties":{"queued":{"type":"boolean"},"jobId":{"type":"string"}}}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/live/creators/{uid}/playback":{"get":{"summary":"Get the LIVE video playback sources (HLS/FLV) for a creator who is live now (D2.12). `live:stream`, not `live:read` — this is the video, not the metrics. The customer's browser fetches the stream directly from TikTok's CDN (`source: tiktok-cdn`). Answers `200` with `status: no_playback`/`offline` when there is nothing to play, and `202` (poll the same URL) while a room is being resolved.","security":[{"bearerAuth":["live:stream"]}],"responses":{"200":{"description":"Playback sources (status live) or a no_playback/offline marker","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LivePlayback"}}}},"202":{"description":"Room resolve in progress; poll this URL — not billed","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"retryAfterSeconds":{"type":"integer"}}}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/live/stream/token":{"post":{"summary":"Mint a short-lived realtime WS handshake token (present it via the Authorization header or the Sec-WebSocket-Protocol subprotocol when dialing wss://<host>/v1/live/stream — never in the URL)","security":[{"bearerAuth":["live:stream"]}],"responses":{"201":{"description":"Realtime handshake token","content":{"application/json":{"schema":{"type":"object","required":["token","tokenType","expiresIn","wsUrl"],"properties":{"token":{"type":"string"},"tokenType":{"type":"string"},"expiresIn":{"type":"integer"},"wsUrl":{"type":"string"}}}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/creators":{"get":{"summary":"Search/browse the already-observed creator set, most-followed first (never a live TikTok search). Without a search `q` (none, or under 3 characters after the `@`) it is always the finder below (most-followed first, masked below `agency`, ≤ 50 a page; RM — a bare or one-letter call no longer lists the corpus unmasked); a 3+ character `q` filters by handle/display-name substring (case-insensitive). Suppressed creators are excluded. **LT2.1 recruiting finder:** without `q`, the filters `region`, `minFollowers`, `liveNow` and `sort` (`followers` default | `rank` = the region's current Daily board order) browse the pool with `cursor`/`nextCursor` pagination. Creator identity (handle/name/avatar) is masked below the `agency` tier (`masked:true`, `unmaskTier`); `region`/`followerCount`/`isLive`/`verified` always show. A `q` search is never masked.","security":[{"bearerAuth":["creator:read"]}],"parameters":[{"name":"q","in":"query","schema":{"type":"string","maxLength":128}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"region","in":"query","schema":{"type":"string","maxLength":32}},{"name":"minFollowers","in":"query","schema":{"type":"integer","minimum":0}},{"name":"liveNow","in":"query","schema":{"type":"boolean"}},{"name":"sort","in":"query","schema":{"type":"string","enum":["followers","rank"]}},{"name":"cursor","in":"query","schema":{"type":"string","maxLength":128}}],"responses":{"200":{"description":"Provenance-wrapped search/finder result page","content":{"application/json":{"schema":{"type":"object","required":["data","provenance"],"properties":{"data":{"type":"object","required":["query","results","nextCursor"],"properties":{"query":{"type":"string"},"results":{"type":"array","items":{"$ref":"#/components/schemas/CreatorSearchResult"}},"nextCursor":{"type":["string","null"]}}},"provenance":{"$ref":"#/components/schemas/Provenance"}}}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/creators/batch":{"post":{"summary":"AR.13 — bulk handle lookup: 1–100 handles, @handles or tiktok.com profile / LIVE links → what the platform ALREADY STORES about each, in one call. Never reads TikTok on the call (a fresh live status is the in-app Live check, `POST /v1/watchlist/live-check`). Per item: `found`, `creatorUid`, `displayName`, `avatarUrl`, `followers`, `region` + `regionSource` (`profile` = ISO country from the creator's profile; `board` = the country board they rank on, which can be a multi-country bucket such as `MENA` or `US+`; null = unknown, never guessed), `live` (the newest stored reading from the last 15 minutes — our own tracking, or this workspace's watchlist — else null), `lastSeenLive` and `profileRefreshedAt`. Repeats collapse (first spelling wins); an input that is not a handle comes back with `handle: null` and is not charged; a creator we hold nothing about — or who asked to be removed — is `found: false`. Metered as one `cached-read` per DISTINCT valid handle (`creditsCharged` echoes the charge; 0 in the app).","security":[{"bearerAuth":["creator:read"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["handles"],"properties":{"handles":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"string","minLength":1,"maxLength":256}}}}}}},"responses":{"200":{"description":"Per-input stored facts and counts","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatorBatchResponse"}}}},"400":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/creators/{uid}":{"get":{"summary":"Get a public creator profile with metric history. An account we have no fresh copy of is resolved from TikTok on demand (billed `profile-resolve` once per upstream fetch — other reads riding the same resolve, in any spelling or workspace, are `cached-read`; a 202'd workspace's poll that delivers a resolve which ended after its 202 books it, once, within 10 minutes — CR.17/CR.4); a store hit is billed `cached-read`. A resolve that exceeds the synchronous budget, or whose signed fetch fails upstream (signer down, TikTok 429/5xx) with no real stored profile to serve, answers 202 — poll this same URL. A failure on a deployment with only the anonymous path, and a profile call that answers a non-zero status with no user, still read as a miss. A miss (TikTok says nobody holds the handle) is a 404 `creator_not_found`, not billed, when nothing real is stored under the handle — no row, or only a stub (counts / identity only, CR.10) — and no former holder matches. `{uid}`: a bare all-digit value is the stored user id first, then a numeric handle; `@N` or a profile URL is always the handle. A creator found by its user id is refreshed by its own identity (sec_uid, else user id; a 202 then carries jobId `resolve:uid:<id>`), never by searching the number as a handle, and an upstream answer for another account is never served (CR.14); see the Outcomes table in the API contracts.","security":[{"bearerAuth":["creator:read"]}],"responses":{"200":{"description":"Provenance-wrapped creator profile","content":{"application/json":{"schema":{"type":"object","required":["data","provenance"],"properties":{"data":{"type":"object","required":["creator"],"properties":{"creator":{"$ref":"#/components/schemas/CreatorProfileData"}}},"provenance":{"$ref":"#/components/schemas/Provenance"}}}}}},"202":{"description":"Resolve in progress, or held back after a signed-path upstream failure (Retry-After = the hold left, up to 120 s); poll this URL — not billed","content":{"application/json":{"schema":{"type":"object","required":["status"],"properties":{"status":{"type":"string"},"jobId":{"type":"string"},"handle":{"type":"string"},"retryAfterSeconds":{"type":"integer"}}}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/creators/{uid}/changes":{"get":{"summary":"Timeline of observed identity changes (handle, display name, avatar, bio, region, verification) for one creator. `{uid}`: a bare all-digit value is the stored user id first, then a numeric handle; `@N` or a profile URL is always the handle (CR.14).","security":[{"bearerAuth":["creator:read"]}],"parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":500}}],"responses":{"200":{"description":"Provenance-wrapped change timeline","content":{"application/json":{"schema":{"type":"object","required":["data","provenance"],"properties":{"data":{"type":"object","required":["tiktokUserId","uniqueId","changes"],"properties":{"tiktokUserId":{"type":"string"},"uniqueId":{"type":"string"},"changes":{"type":"array","items":{"$ref":"#/components/schemas/CreatorProfileChange"}}}},"provenance":{"$ref":"#/components/schemas/Provenance"}}}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/creators/{uid}/following":{"get":{"summary":"List the accounts a creator follows (R4.5). Collected on demand through the signed mobile list API when we hold nothing fresh (billed `follow-list-resolve` once per walk, to the read that receives it: the first poll waiting as the walk ends books it, the other polls riding the walk pay `cached-read`, and the first read after a walk that ended after its 202 books it for the workspace that was answered 202 or a partial 200, once, within 10 minutes — CR.4); a store hit is `cached-read`. The first call for an uncollected account normally answers 202 — poll this same URL. Paginate with the opaque `cursor`. `{uid}`: a bare all-digit value is the stored user id first, then a numeric handle; `@N` or a profile URL is always the handle (CR.14). An owner found by its user id is walked by its own stored handle, and a walk that comes back for another account is never served.","security":[{"bearerAuth":["creator:read"]}],"parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Provenance-wrapped following page","content":{"application/json":{"schema":{"type":"object","required":["data","provenance"],"properties":{"data":{"$ref":"#/components/schemas/FollowListData"},"provenance":{"$ref":"#/components/schemas/Provenance"}}}}}},"202":{"description":"Collection in progress, or held back after the walk failed upstream (Retry-After = the hold left, up to 120 s, CR.6); poll this URL — not billed","content":{"application/json":{"schema":{"type":"object","required":["status"],"properties":{"status":{"type":"string"},"jobId":{"type":"string"},"handle":{"type":"string"},"direction":{"type":"string"},"retryAfterSeconds":{"type":"integer"}}}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/creators/{uid}/followers":{"get":{"summary":"List a creator's followers (R4.5). Same collection path as `/following`, but TikTok streams followers newest-first and never declares an end, so the response is always a SAMPLE of the most recent followers — compare `storedCount` with `totalReported`. `{uid}`: a bare all-digit value is the stored user id first, then a numeric handle; `@N` or a profile URL is always the handle (CR.14).","security":[{"bearerAuth":["creator:read"]}],"parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Provenance-wrapped follower sample","content":{"application/json":{"schema":{"type":"object","required":["data","provenance"],"properties":{"data":{"$ref":"#/components/schemas/FollowListData"},"provenance":{"$ref":"#/components/schemas/Provenance"}}}}}},"202":{"description":"Collection in progress, or held back after the walk failed upstream (Retry-After = the hold left, up to 120 s, CR.6); poll this URL — not billed","content":{"application/json":{"schema":{"type":"object","required":["status"],"properties":{"status":{"type":"string"},"jobId":{"type":"string"},"handle":{"type":"string"},"direction":{"type":"string"},"retryAfterSeconds":{"type":"integer"}}}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/creators/{uid}/analysis":{"get":{"summary":"Full-analysis report for one creator (R4.4): engagement rates, posting cadence, top videos, audience signal from collected comments and follower growth — all derived from stored observations, never fetched at read time. Coverage is always `partial` and `limits` names each gap. `{uid}`: a bare all-digit value is the stored user id first, then a numeric handle; `@N` or a profile URL is always the handle (CR.14).","security":[{"bearerAuth":["creator:read"]}],"responses":{"200":{"description":"Provenance-wrapped analysis report","content":{"application/json":{"schema":{"type":"object","required":["data","provenance"],"properties":{"data":{"$ref":"#/components/schemas/CreatorAnalysisData"},"provenance":{"$ref":"#/components/schemas/Provenance"}}}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/creators/{uid}/videos":{"get":{"summary":"List a creator's public videos with current metrics. `{uid}`: a bare all-digit value is the stored user id first, then a numeric handle; `@N` or a profile URL is always the handle (CR.14).","security":[{"bearerAuth":["content:read"]}],"responses":{"200":{"description":"Provenance-wrapped video list","content":{"application/json":{"schema":{"type":"object","required":["data","provenance"],"properties":{"data":{"type":"object","required":["uniqueId","tiktokUserId","videos"],"properties":{"uniqueId":{"type":"string"},"tiktokUserId":{"type":"string"},"videos":{"type":"array","items":{"$ref":"#/components/schemas/VideoData"}}}},"provenance":{"$ref":"#/components/schemas/Provenance"}}}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/creators/{uid}/stories":{"get":{"summary":"Get a creator's active story tray (D6.1). Content, so it is `content:read` (grouped with videos, not the profile read). Resolves store-first like the profile read, then fetches the tray FRESH through the signed mobile path — stories are ephemeral and never stored. Degrades to an empty tray when no signed credential is configured. Priced like the profile read (CR.3): `profile-resolve` when this read resolved the creator from TikTok (once per fetch, CR.17), `cached-read` for a store hit — except the poll that delivers a resolve this workspace was answered 202 for (1,250, once, within 10 minutes, CR.4); a 202 (profile resolve pending, or its signed fetch failing upstream) and a 404 (the profile read's miss, CR.10 included) are not billed.","security":[{"bearerAuth":["content:read"]}],"responses":{"200":{"description":"Provenance-wrapped story tray","content":{"application/json":{"schema":{"type":"object","required":["data","provenance"],"properties":{"data":{"type":"object","required":["uniqueId","stories"],"properties":{"uniqueId":{"type":"string"},"stories":{"type":"array","items":{"$ref":"#/components/schemas/Story"}}}},"provenance":{"$ref":"#/components/schemas/Provenance"}}}}}},"202":{"description":"Profile resolve in progress or held back after a signed-path upstream failure; poll this URL — not billed","content":{"application/json":{"schema":{"type":"object","required":["status"],"properties":{"status":{"type":"string"},"jobId":{"type":"string"},"handle":{"type":"string"},"retryAfterSeconds":{"type":"integer"}}}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/videos/{videoId}":{"get":{"summary":"Get one public video with per-video metric history","security":[{"bearerAuth":["content:read"]}],"responses":{"200":{"description":"Provenance-wrapped video + history","content":{"application/json":{"schema":{"type":"object","required":["data","provenance"],"properties":{"data":{"type":"object","required":["video"],"properties":{"video":{"$ref":"#/components/schemas/VideoWithHistory"}}},"provenance":{"$ref":"#/components/schemas/Provenance"}}}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/videos/{videoId}/comments":{"get":{"summary":"List a public video's comments (R4.3). Collected anonymously from TikTok on demand when we hold nothing fresh (billed `comments-collect` once per collection, to the read that receives it — CR.4, as for follow lists); a store hit is billed `cached-read`. Paginate with the opaque `cursor` returned by the previous page, and pass `parentCommentId` to page one comment's replies. `503 comments_unavailable` (`retryable: false`, not billed) instead of a `404` when collection is off on this deployment and the thread was never collected (CR.20).","security":[{"bearerAuth":["content:read"]}],"parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","schema":{"type":"string"}},{"name":"parentCommentId","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Provenance-wrapped comment page","content":{"application/json":{"schema":{"type":"object","required":["data","provenance"],"properties":{"data":{"type":"object","required":["videoId","comments","nextCursor","hasMore"],"properties":{"videoId":{"type":"string"},"parentCommentId":{"type":["string","null"]},"comments":{"type":"array","items":{"$ref":"#/components/schemas/VideoCommentData"}},"nextCursor":{"type":["string","null"]},"hasMore":{"type":"boolean"},"totalReported":{"type":["integer","null"]},"storedCount":{"type":"integer"}}},"provenance":{"$ref":"#/components/schemas/Provenance"}}}}}},"202":{"description":"Collection in progress, or held back after the collection failed upstream (Retry-After = the hold left, up to 120 s, CR.7); poll this URL — not billed","content":{"application/json":{"schema":{"type":"object","required":["status"],"properties":{"status":{"type":"string"},"jobId":{"type":"string"},"videoId":{"type":"string"},"retryAfterSeconds":{"type":"integer"}}}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/trends":{"get":{"summary":"List public trending hashtags/sounds for a region (honest coverage)","security":[{"bearerAuth":["trend:read"]}],"parameters":[{"name":"region","in":"query","schema":{"type":"string"}},{"name":"type","in":"query","schema":{"type":"string","enum":["hashtag","sound"]}}],"responses":{"200":{"description":"Provenance-wrapped trend list","content":{"application/json":{"schema":{"type":"object","required":["data","provenance"],"properties":{"data":{"type":"object","required":["region","trends"],"properties":{"region":{"type":"string"},"trends":{"type":"array","items":{"$ref":"#/components/schemas/TrendData"}}}},"provenance":{"$ref":"#/components/schemas/Provenance"}}}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/watchlist":{"get":{"summary":"List the workspace's watchlist creators (D6.1). Sold under `watchlist:manage`; not credit-metered. `?roster=1` (AO.1) lists only the signed hosts: `404` while the roster is not enabled on this deployment, `403 plan_required` below Agency.","security":[{"bearerAuth":["watchlist:manage"]}],"parameters":[{"name":"roster","in":"query","required":false,"schema":{"type":"string","enum":["1"]}}],"responses":{"200":{"description":"Watchlist entries (newest-first), the per-workspace cap, (EX.1) whether this plan sees the gift totals, and (AO.1) whether the Roster tab is enabled / unlocked","content":{"application/json":{"schema":{"type":"object","required":["items","limit"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/WatchlistEntry"}},"limit":{"type":"integer"},"giftTotalsAccess":{"type":"object","required":["withheld","unlockTier"],"properties":{"withheld":{"type":"boolean"},"unlockTier":{"type":["string","null"]}}},"rosterAccess":{"type":"object","required":["enabled","allowed","unlockTier"],"properties":{"enabled":{"type":"boolean"},"allowed":{"type":"boolean"},"unlockTier":{"type":["string","null"]}}}}}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Add a creator to the workspace watchlist (D6.1). `409 watchlist_full` at the 25-entry cap; `409` on a duplicate handle (case-insensitive).","security":[{"bearerAuth":["watchlist:manage"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["creatorUniqueId"],"properties":{"creatorUniqueId":{"type":"string","minLength":1,"maxLength":64},"note":{"type":["string","null"],"maxLength":200}}}}}},"responses":{"201":{"description":"The created entry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WatchlistEntry"}}}},"400":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/watchlist/import":{"post":{"summary":"Bulk-import creators to the workspace watchlist (WL.8): add up to 500 handles at once (paste / CSV). Returns a per-input outcome (`added` / `duplicate` / `invalid` / `limit_reached`) plus counts; a repeated handle collapses to one result, a handle whose creator is already watched under another handle (same TikTok uid — they renamed) is `duplicate` with `watchedAs` (RN.6a), and new creators beyond the tier's pin cap are `limit_reached` rather than an error. With `asRoster: true` (Agency plan, roster enabled) the creators become signed hosts: new ones take a watchlist slot (same cap as a single add), already-watched non-hosts are `promoted` (no slot), existing hosts are `duplicate` and left untouched, and `assigneeUserId` assigns every host created; the response then also carries `summary.promoted` and `roster`. Sold under `watchlist:manage`; not credit-metered.","security":[{"bearerAuth":["watchlist:manage"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["creatorUniqueIds"],"properties":{"creatorUniqueIds":{"type":"array","minItems":1,"maxItems":500,"items":{"type":"string","minLength":1,"maxLength":64}},"note":{"type":["string","null"],"maxLength":200},"asRoster":{"type":"boolean","description":"Import the creators as signed HOSTS (roster status `active`). Needs the roster enabled (`404` otherwise) and the Agency plan (`403 plan_required`); a manager is refused. Omitted/false = the plain watchlist import, unchanged."},"assigneeUserId":{"type":["string","null"],"format":"uuid","description":"Only with `asRoster`: assign every host this import adds or promotes to this CURRENT member of THIS workspace (else `422 assignee_not_member`); omitted/`null` = unassigned. Sending it without `asRoster` is `400 assignee_requires_roster`."}}}}}},"responses":{"200":{"description":"Per-input import outcomes and counts","content":{"application/json":{"schema":{"type":"object","required":["results","summary","limit","count"],"properties":{"results":{"type":"array","items":{"type":"object","required":["input","handle","outcome"],"properties":{"input":{"type":"string"},"handle":{"type":["string","null"]},"outcome":{"type":"string","enum":["added","duplicate","invalid","limit_reached","promoted"]},"watchedAs":{"type":"string","description":"RN.6a — on a `duplicate`: the creator is already watched (or named earlier in this import) under this other handle — same TikTok uid, they renamed. Absent otherwise."}}}},"summary":{"type":"object","required":["requested","added","duplicate","invalid","limitReached"],"properties":{"requested":{"type":"integer"},"added":{"type":"integer"},"duplicate":{"type":"integer"},"invalid":{"type":"integer"},"limitReached":{"type":"integer"},"promoted":{"type":"integer"}}},"limit":{"type":"integer"},"count":{"type":"integer"},"roster":{"type":"object","required":["hosts","assigned","assigneeUserId"],"properties":{"hosts":{"type":"integer"},"assigned":{"type":"integer"},"assigneeUserId":{"type":["string","null"]}}}}}}}},"400":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/watchlist/live-check":{"post":{"summary":"Bulk live check (LC.1 + AR.13): paste up to 200 @handles or tiktok.com profile / LIVE links and get who is live RIGHT NOW (a fresh read from TikTok per handle, usually 5–15 s for 100). Each result is `live` (with the current `roomId` and, when TikTok sends it, `liveStartedAt`), `offline`, `not_found` (TikTok says no account has that handle — renamed or deleted), `unknown` (TikTok did not answer, even after one retry) or `invalid`; repeats collapse. AR.13 — every answer also carries what the platform already stores: `creatorUid`, `followers`, `region` + `regionSource` (`profile` = ISO country from the creator's profile; `board` = the country board they rank on, which can be a multi-country bucket such as `MENA` or `US+`; null = unknown, never guessed), `lastSeenLive` (our own tracking, or THIS workspace's watchlist) and `onLists` (this workspace's watchlist / roster / recruiting mark — never another workspace's). These AR.13 fields are filled for a signed-in (in-app) check only: an API key gets the LC.1 fields plus `not_found`, with the AR.13 fields null (the same facts are sold per handle by `POST /v1/creators/batch`). Nothing is saved to the watchlist. Sold under `watchlist:manage`; not credit-metered; limited to 30 checks per workspace per hour, one at a time (`429 live_check_rate_limited` / `live_check_busy`); a check where TikTok answered nothing is not counted. `quota` reports the budget after the check.","security":[{"bearerAuth":["watchlist:manage"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["handles"],"properties":{"handles":{"type":"array","minItems":1,"maxItems":200,"items":{"type":"string","minLength":1,"maxLength":256}}}}}}},"responses":{"200":{"description":"Per-input live status, stored facts and counts","content":{"application/json":{"schema":{"type":"object","required":["results","summary","checkedAt","durationMs","quota"],"properties":{"results":{"type":"array","items":{"type":"object","required":["input","handle","status","roomId","displayName","creatorUid","avatarUrl","followers","liveStartedAt","region","regionSource","lastSeenLive"],"properties":{"input":{"type":"string"},"handle":{"type":["string","null"]},"status":{"type":"string","enum":["live","offline","not_found","unknown","invalid"]},"roomId":{"type":["string","null"]},"displayName":{"type":["string","null"]},"creatorUid":{"type":["string","null"]},"avatarUrl":{"type":["string","null"]},"followers":{"type":["integer","null"]},"liveStartedAt":{"type":["string","null"],"format":"date-time"},"region":{"type":["string","null"]},"regionSource":{"type":["string","null"],"enum":["profile","board",null]},"lastSeenLive":{"oneOf":[{"$ref":"#/components/schemas/CreatorLastSeenLive"},{"type":"null"}]},"onLists":{"type":"object","required":["watchlist","rosterStatus","recruit"],"properties":{"watchlist":{"type":["string","null"],"enum":["watching","host",null]},"rosterStatus":{"type":["string","null"],"enum":["active","paused","left",null]},"recruit":{"type":["string","null"],"enum":["checked","eligible","ineligible","contacted","signed",null]}}}}}},"summary":{"type":"object","required":["requested","live","offline","notFound","unknown","invalid"],"properties":{"requested":{"type":"integer"},"live":{"type":"integer"},"offline":{"type":"integer"},"notFound":{"type":"integer"},"unknown":{"type":"integer"},"invalid":{"type":"integer"}}},"checkedAt":{"type":"string"},"durationMs":{"type":"integer"},"quota":{"$ref":"#/components/schemas/LiveCheckQuota"}}}}}},"400":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/watchlist/live-check/quota":{"get":{"summary":"AR.13 — this workspace's live-check budget in the rolling hour (`used` of `limit`; `nextSlotAt` = when the oldest counted check leaves the window). Read-only; never counts as a check. Sold under `watchlist:manage`; not credit-metered.","security":[{"bearerAuth":["watchlist:manage"]}],"responses":{"200":{"description":"Live-check budget","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LiveCheckQuota"}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/watchlist/liveness":{"get":{"summary":"Poll each watched creator's current live state (WL.1). The same `isLive` the list computes, minus enrichment, for a lightweight in-place refresh. Sold under `watchlist:manage`; not credit-metered.","security":[{"bearerAuth":["watchlist:manage"]}],"responses":{"200":{"description":"Per-entry liveness for the workspace's watchlist","content":{"application/json":{"schema":{"type":"object","required":["items"],"properties":{"items":{"type":"array","items":{"type":"object","required":["id","isLive"],"properties":{"id":{"type":"string"},"isLive":{"type":"boolean"}}}}}}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/watchlist/bulk-remove":{"post":{"summary":"Stop watching up to 100 creators in ONE transaction — the many-at-once form of `DELETE /v1/watchlist/{id}` (owner / member / API key; a manager is refused `403 forbidden_role`). A host on the roster leaves it too, because the entry itself is deleted. Handles are normalised (lowercase, `@` stripped) and de-duplicated. A handle that is not on THIS workspace's watchlist (or not a valid handle) is never touched and is returned in `skipped` — the answer does not reveal whether another workspace has it. 0 handles, more than 100, an unknown key or a non-array / non-string `handles` is `400`. Sold under `watchlist:manage`; not credit-metered.","security":[{"bearerAuth":["watchlist:manage"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["handles"],"properties":{"handles":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"string","minLength":1,"maxLength":64}}}}}}},"responses":{"200":{"description":"Counts and the skipped handles","content":{"application/json":{"schema":{"type":"object","required":["removed","skipped"],"properties":{"removed":{"type":"integer"},"skipped":{"type":"array","items":{"type":"string"}}}}}}},"400":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/watchlist/roster/bulk":{"post":{"summary":"Bulk roster action on up to 100 hosts in ONE transaction (owner / member / API key; a manager is refused `403 forbidden_role`). `assign` sets (or, with `assigneeUserId: null`, clears) the owner of every listed host that is on the roster; `remove` unflags them with exactly the single `DELETE /v1/watchlist/{handle}/roster` semantics (the creator stays on the watchlist; signed / left dates, roster note, owner, follow-up, contract end and commission % are cleared). Handles are normalised (lowercase, `@` stripped) and de-duplicated. A handle that is not on THIS workspace's roster (or not a valid handle) is never created or touched and is returned in `skipped` — the answer does not reveal whether another workspace has it. `assign` is idempotent: a host that already has that owner counts as `unchanged` and writes no history line; each changed host appends the same history line the single PUT would. The assignee must be a CURRENT member of this workspace (`422 assignee_not_member`). Agency plan only (`403 plan_required`); `404` while the roster is not enabled. 0 handles or more than 100 is `400`.","security":[{"bearerAuth":["watchlist:manage"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","required":["action","handles","assigneeUserId"],"properties":{"action":{"type":"string","enum":["assign"]},"handles":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"string","minLength":1,"maxLength":64}},"assigneeUserId":{"type":["string","null"],"format":"uuid"}}},{"type":"object","required":["action","handles"],"properties":{"action":{"type":"string","enum":["remove"]},"handles":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"string","minLength":1,"maxLength":64}}}}]}}}},"responses":{"200":{"description":"Counts and the skipped handles","content":{"application/json":{"schema":{"type":"object","required":["applied","unchanged","skipped"],"properties":{"applied":{"type":"integer"},"unchanged":{"type":"integer"},"skipped":{"type":"array","items":{"type":"string"}}}}}}},"400":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/watchlist/roster/health":{"get":{"summary":"Health band + reasons for every roster host (AO.3). Always the host's last 7 CLOSED UTC days against its own preceding 28 (never the KPI window selector). Bands: healthy | watch | at_risk | new (under 14 baseline days or a partly-covered recent week — not judged) | unscored (paused, left, or the handle is not matched). Every band carries at least one reason with a stable `code`; `evaluated` lists the signals that had enough data (league needs about a week of snapshots). Judged only from gifts the platform observed in the LIVEs it tracks: 'no gifts observed' is never 'not live', and a host with no observed gifts in its baseline is `watch`, not `at_risk`. Agency plan only (`403 plan_required` below it); `404` while the roster is not enabled on this deployment.","security":[{"bearerAuth":["watchlist:manage"]}],"responses":{"200":{"description":"Roster health","content":{"application/json":{"schema":{"type":"object","required":["throughDay","hosts"],"properties":{"throughDay":{"type":["string","null"]},"hosts":{"type":"array","items":{"type":"object","required":["creatorUniqueId","creatorUid","rosterStatus","health"],"properties":{"creatorUniqueId":{"type":"string"},"creatorUid":{"type":["string","null"]},"rosterStatus":{"type":"string","enum":["active","paused","left"]},"health":{"type":"object","required":["band","reasons","evaluated"],"properties":{"band":{"type":"string","enum":["healthy","watch","at_risk","new","unscored"]},"reasons":{"type":"array","items":{"type":"object","required":["code","severity","params"],"properties":{"code":{"type":"string"},"severity":{"type":"string","enum":["info","watch","at_risk"]},"params":{"type":"object","additionalProperties":{"type":["number","string"]}}}}},"evaluated":{"type":"array","items":{"type":"string","enum":["diamonds_drop","gift_gap","league_drop","league_gone"]}}}}}}}}}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/watchlist/roster/today":{"get":{"summary":"AO.11 — the 'Today' list: the roster hosts that need action now, at most 10, most urgent first, with the stable reason codes behind each row. Built ONLY from signals the platform already has: the host's health band (AO.3), the follow-up and contract-end days the agency typed (AO.5) and the contact log below. Order is fixed by the tier of the strongest reason (health_at_risk, follow_up_overdue, contract_ending, health_watch, no_contact, follow_up_due, unassigned), then more reasons first, then more observed diamonds in the last 7 closed days first, then handle. A host with a contact logged in the last 3 days is hidden; a host signed in the last 7 days is not flagged `no_contact`; `unassigned` only fires when at least one host of the workspace has an owner. `snoozed` counts the hosts that would qualify but are hidden by a recent contact. `notJudged` counts active hosts the health judgement cannot score yet (new or unmatched), so a short list is never read as 'all fine'. A `manager` session sees only its own assigned hosts (no owners, no `unassigned`). Agency plan only (`403 plan_required` below it); `404` while the roster is not enabled on this deployment.","security":[{"bearerAuth":["watchlist:manage"]}],"responses":{"200":{"description":"Today list","content":{"application/json":{"schema":{"type":"object","required":["day","total","snoozed","notJudged","items"],"properties":{"day":{"type":"string"},"total":{"type":"integer"},"snoozed":{"type":"integer"},"notJudged":{"type":"integer"},"items":{"type":"array","items":{"type":"object","required":["creatorUniqueId","creatorUid","reasons","lastContactAt","followUpOn","contractEndsOn","assigneeUserId"],"properties":{"creatorUniqueId":{"type":"string"},"creatorUid":{"type":["string","null"]},"reasons":{"type":"array","items":{"type":"object","required":["code","params"],"properties":{"code":{"type":"string","enum":["health_at_risk","follow_up_overdue","contract_ending","health_watch","no_contact","follow_up_due","unassigned"]},"params":{"type":"object","additionalProperties":{"type":["number","string"]}}}}},"lastContactAt":{"type":["string","null"]},"followUpOn":{"type":["string","null"]},"contractEndsOn":{"type":["string","null"]},"assigneeUserId":{"type":["string","null"]}}}}}}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/watchlist/{handle}/roster/contact":{"post":{"summary":"AO.11 — record that you contacted a roster host. Send a JSON object (`{}` for no note). Appends one `contact` line to the host's history (with your optional note, at most 200 characters, else `400 invalid_contact_note`) and hides the host from the Today list for 3 days. A `manager` may log on its own assigned hosts only; any other handle is the same `404 not_on_roster`. Agency plan only; `404` while the roster is not enabled.","security":[{"bearerAuth":["watchlist:manage"]}],"parameters":[{"name":"handle","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"note":{"type":["string","null"],"description":"At most 200 characters after trimming."}}}}}},"responses":{"200":{"description":"Contact recorded","content":{"application/json":{"schema":{"type":"object","required":["contactedAt","snoozedDays"],"properties":{"contactedAt":{"type":"string"},"snoozedDays":{"type":"integer"}}}}}},"400":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/watchlist/roster/kpi":{"get":{"summary":"Per-host KPIs for the workspace's roster (AO.2): observed diamonds over the last 7/30/90 CLOSED UTC days, the change against the previous equal window, days with gifts, a daily series, followers and the newest league standing. Every figure is a LOWER BOUND observed from the LIVEs the platform tracks (coins = diamonds 1:1) — never TikTok's number and never earnings. Each host also carries the agency's own `splitPct` and a `commission` ESTIMATE (observed diamonds x `diamondUsdRate` x that %), with `commissionTotals` over active hosts. A window reports `coverageDays`: `ok` when every day has data, `partial` (>= 7 days) with the real count, else `insufficient_history` with no number; a day without data is `null`, never 0, and nothing is interpolated. Agency plan only (`403 plan_required` below it); `404` while the roster is not enabled on this deployment.","security":[{"bearerAuth":["watchlist:manage"]}],"parameters":[{"name":"window","in":"query","required":false,"description":"7d (default) | 30d | 90d","schema":{"type":"string","enum":["7d","30d","90d"]}}],"responses":{"200":{"description":"Roster KPIs","content":{"application/json":{"schema":{"type":"object","required":["window","basis","unit","throughDay","historyStart","diamondUsdRate","commissionTotals","hosts"],"properties":{"window":{"type":"string","enum":["7d","30d","90d"]},"basis":{"type":"string","enum":["observed_lower_bound"]},"unit":{"type":"string","enum":["diamonds"]},"throughDay":{"type":["string","null"]},"historyStart":{"type":["string","null"]},"hosts":{"type":"array","items":{"type":"object","required":["creatorUniqueId","creatorUid","rosterStatus","kpi","followers","league","splitPct","commission"],"properties":{"creatorUniqueId":{"type":"string"},"creatorUid":{"type":["string","null"]},"rosterStatus":{"type":"string","enum":["active","paused","left"]},"kpi":{"oneOf":[{"type":"object","required":["window","windowDays","status","coverageDays","from","to","observedDiamonds","prevObservedDiamonds","deltaPct","daysWithGifts","series","readyOn"],"properties":{"window":{"type":"string","enum":["7d","30d","90d"]},"windowDays":{"type":"integer"},"status":{"type":"string","enum":["ok","partial","insufficient_history"]},"coverageDays":{"type":"integer"},"from":{"type":"string"},"to":{"type":"string"},"observedDiamonds":{"type":["integer","null"]},"prevObservedDiamonds":{"type":["integer","null"]},"deltaPct":{"type":["number","null"]},"daysWithGifts":{"type":"integer"},"series":{"type":"array","items":{"type":"object","required":["day","diamonds"],"properties":{"day":{"type":"string"},"diamonds":{"type":["integer","null"]}}}},"readyOn":{"type":["string","null"]},"hostBonus":{"type":["integer","null"],"description":"GW.19b — the host bonus over the window's covered days: floor(0.3 × each gift to a guest in the host's room), which TikTok adds to the host's Daily score; not in observedDiamonds nor the commission. Null = unknown."}}},{"type":"null"}]},"followers":{"type":"object","required":["current","delta"],"properties":{"current":{"type":["integer","null"]},"delta":{"type":["integer","null"]}}},"league":{"oneOf":[{"type":"object","required":["class","rank","country","observedAt"],"properties":{"class":{"type":"string"},"rank":{"type":["integer","null"]},"country":{"type":"string"},"observedAt":{"type":"string"}}},{"type":"null"}]},"leagueStatus":{"type":"string","enum":["ranked","outside","unknown"]},"splitPct":{"type":["number","null"]},"commission":{"oneOf":[{"type":"object","required":["splitPct","estimatedUsd","agencyUsd","hostUsd"],"properties":{"splitPct":{"type":"number"},"estimatedUsd":{"type":"number"},"agencyUsd":{"type":"number"},"hostUsd":{"type":"number"}}},{"type":"null"}],"description":"AO.8 — an ESTIMATE, never a payout: observed diamonds x diamondUsdRate (creator-received value), split by the % the agency typed. A minimum, because the diamonds are a lower bound. Null when no % was entered, the host has left, or the window has no observed figure."}}}},"diamondUsdRate":{"type":"number"},"commissionTotals":{"oneOf":[{"type":"object","required":["agencyUsd","activeHosts","hostsWithSplit","hostsCounted"],"properties":{"agencyUsd":{"type":"number"},"activeHosts":{"type":"integer"},"hostsWithSplit":{"type":"integer"},"hostsCounted":{"type":"integer"}}},{"type":"null"}],"description":"AO.8 — the agency's estimated share summed over ACTIVE hosts that have a % and an observed figure; the counts say how many hosts are inside the sum. Null when no active host has a %."}}}}}},"400":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/watchlist/{handle}/roster":{"put":{"summary":"Flag a watched creator as a signed host (AO.1). Agency plan only (`403 plan_required` below it); `404` while the roster is not enabled on this deployment. A creator not yet watched is added first and takes one slot (`409 watchlist_full` at the cap); an already-watched creator takes none. `status` defaults to `active`, `signedOn` to today (UTC); omitted fields keep their value. AO.5 — also accepts the owner / follow-up / contract-end fields below; each changed field appends one line to the host's history (an unchanged re-PUT appends none). Returns the entry with its roster fields.","security":[{"bearerAuth":["watchlist:manage"]}],"parameters":[{"name":"handle","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["active","paused","left"]},"signedOn":{"type":"string","pattern":"^[0-9]{4}-[0-9]{2}-[0-9]{2}$"},"note":{"type":["string","null"],"maxLength":500},"splitPct":{"type":["number","null"],"minimum":0,"maximum":100,"description":"AO.8 — the % of the host's estimated value the AGENCY keeps (0–100, at most two decimals), typed by the agency; `null` clears it; omitted keeps it. There is no default. Anything else answers `400 invalid_split_pct`."},"assigneeUserId":{"type":["string","null"],"format":"uuid","description":"AO.5 — the member who owns this host: a CURRENT member's users.id of THIS workspace (else `422 assignee_not_member`); `null` unassigns; omitted keeps."},"followUpOn":{"type":["string","null"],"pattern":"^[0-9]{4}-[0-9]{2}-[0-9]{2}$","description":"AO.5 — next follow-up, a real UTC day 2000–2100 (else `400 invalid_follow_up_on`); `null` clears; omitted keeps."},"contractEndsOn":{"type":["string","null"],"pattern":"^[0-9]{4}-[0-9]{2}-[0-9]{2}$","description":"AO.5 — the contract end the agency typed, a real UTC day 2000–2100 (else `400 invalid_contract_ends_on`); `null` clears; omitted keeps. Never read from a contract."}}}}}},"responses":{"200":{"description":"The entry, with its roster state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WatchlistEntry"}}}},"400":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"summary":"Remove a host from the roster (AO.1). The creator STAYS on the watchlist. `404 not_on_roster` when it was not a host; Agency plan only.","security":[{"bearerAuth":["watchlist:manage"]}],"parameters":[{"name":"handle","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Roster removal result","content":{"application/json":{"schema":{"type":"object","required":["cleared"],"properties":{"cleared":{"type":"boolean"}}}}}},"400":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/watchlist/{handle}/roster/events":{"get":{"summary":"AO.5 — the history of a roster host (roster status, owner, follow-up, contract-end and note changes), newest first, at most 50; it also carries the lines recorded while the same creator was a recruit mark (`subject: recruit`, matched through the host's pinned creator uid). Never another workspace's. Agency plan only (`403 plan_required` below it); `404` while the roster is not enabled, or when the handle is not on the roster.","security":[{"bearerAuth":["watchlist:manage"]}],"parameters":[{"name":"handle","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The host's history","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmEventsResponse"}}}},"400":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/watchlist/{id}":{"delete":{"summary":"Remove a creator from the workspace watchlist (D6.1)","security":[{"bearerAuth":["watchlist:manage"]}],"responses":{"200":{"description":"Removal result","content":{"application/json":{"schema":{"type":"object","required":["removed"],"properties":{"removed":{"type":"boolean"}}}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/gifter-watchlist":{"get":{"summary":"GA.2 — the workspace's GIFTER watchlist: gifters (any @handle) you watch, each with live status and the Gifters-board figures (diamonds, est. value, sessions, region, segment…) over `?window=24h|yesterday|7d|30d` (default 7d), plus its own alert settings. Pro plan or above uses it (below Pro returns 200 with `access.allowed: false` and an empty list). Cap: Pro 10 · Scale 30 · Agency 100 (enforced on add; a list already over a lowered cap keeps its gifters). The alert that fires when a listed gifter is gifting in a covered live is ONE alert rule with scope `gifter_watchlist` (POST /v1/alerts/rules). Sold under `watchlist:manage`; not credit-metered.","security":[{"bearerAuth":["watchlist:manage"]}],"parameters":[{"name":"window","in":"query","schema":{"type":"string","enum":["24h","yesterday","7d","30d"]}},{"name":"from","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"description":"GW.26 — first UTC day of a day range (YYYY-MM-DD, inclusive). With `to`, both or neither, never with `window`; at most 366 days. A `from` earlier than the plan's history window (today − (historyWindowDays − 1)) is 403 `plan_range_exceeded`, never silently shortened."},{"name":"to","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"description":"GW.26 — last UTC day (inclusive); today means up to now; after today is 400."}],"responses":{"200":{"description":"Entries (newest-first), the plan access and cap","content":{"application/json":{"schema":{"type":"object","required":["items","count","access","window"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/GifterWatchlistEntry"}},"count":{"type":"integer"},"access":{"$ref":"#/components/schemas/GifterWatchlistAccess"},"window":{"type":["string","null"],"enum":["24h","yesterday","7d","30d",null]},"range":{"$ref":"#/components/schemas/GifterDateRange","description":"GW.26 — present when the list used from/to (then `window` is null)."}}}}}},"400":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"GA.2 — add gifters to the workspace's gifter watchlist. Each item is `{ gifterKey }` (picked from observed data) or `{ handle }` (any @handle; unseen handles are resolved via TikTok and watched anyway). Up to 10 per request; per-item outcome `added` / `exists` / `not_found` / `limit_reached` / `invalid` / `unavailable`. 403 gifter_watchlist_upgrade_required below Pro. Sold under `watchlist:manage`; not credit-metered.","security":[{"bearerAuth":["watchlist:manage"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"properties":{"items":{"type":"array","minItems":1,"maxItems":10,"items":{"type":"object","properties":{"gifterKey":{"type":["string","null"],"maxLength":200},"handle":{"type":["string","null"],"maxLength":64}}}}}}}}},"responses":{"200":{"description":"Per-item outcomes, the list size and the plan access","content":{"application/json":{"schema":{"type":"object","required":["results","count","access"],"properties":{"results":{"type":"array","items":{"type":"object","required":["input","outcome","entry"],"properties":{"input":{"type":"string"},"outcome":{"type":"string","enum":["added","exists","not_found","limit_reached","invalid","unavailable"]},"entry":{"anyOf":[{"$ref":"#/components/schemas/GifterWatchlistEntry"},{"type":"null"}]}}}},"count":{"type":"integer"},"access":{"$ref":"#/components/schemas/GifterWatchlistAccess"}}}}}},"400":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/gifter-watchlist/{id}":{"patch":{"summary":"GA.2b — change ONE listed gifter's alert settings: `alertEnabled` (mute), `alertMinCoins` (fire only once the gifter has given at least this many coins in the live; null clears), `alertChannels` (narrow to a subset of the shared alert rule's channel types; null = all of them; on a workspace using \"Where to send\" it may also list place ids from GET /v1/alerts/destinations). Pro plan or above (403 gifter_watchlist_upgrade_required below it). Returns the updated entry.","security":[{"bearerAuth":["watchlist:manage"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"alertEnabled":{"type":"boolean"},"alertMinCoins":{"type":["integer","null"],"minimum":0,"maximum":1000000000},"alertChannels":{"type":["array","null"],"items":{"type":"string","maxLength":36,"description":"A channel type (webhook, email, in_app, telegram, discord) or, on a workspace using \"Where to send\", a place id."},"maxItems":50}}}}}},"responses":{"200":{"description":"The updated entry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GifterWatchlistEntry"}}}},"400":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"summary":"GA.2 — remove a gifter from the workspace's gifter watchlist","security":[{"bearerAuth":["watchlist:manage"]}],"responses":{"200":{"description":"Removal result","content":{"application/json":{"schema":{"type":"object","required":["removed"],"properties":{"removed":{"type":"boolean"}}}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/api-keys":{"get":{"summary":"List workspace API keys (metadata only — never a secret)","security":[{"bearerAuth":["keys:manage"]}],"responses":{"200":{"description":"Key metadata; never a token","content":{"application/json":{"schema":{"type":"object","required":["items"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/ApiKey"}}}}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Create an API key. The full secret token is returned ONCE in `token` — store it now.","security":[{"bearerAuth":["keys:manage"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["label"],"properties":{"label":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}},"expiresAt":{"type":["string","null"],"format":"date-time"}}}}}},"responses":{"201":{"description":"Key metadata and one-time token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatedApiKey"}}}},"400":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/api-keys/{id}":{"delete":{"summary":"Revoke a workspace API key","security":[{"bearerAuth":["keys:manage"]}],"responses":{"200":{"description":"Revocation result","content":{"application/json":{"schema":{"type":"object","required":["revoked"],"properties":{"revoked":{"type":"boolean"}}}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/usage":{"get":{"summary":"List workspace usage and per-key request charges for a billing period","security":[{"bearerAuth":["keys:manage"]}],"parameters":[{"name":"period","in":"query","description":"UTC month bucket YYYY-MM-01 (defaults to the current period)","schema":{"type":"string","pattern":"^\\d{4}-(?:0[1-9]|1[0-2])-01$"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":500}}],"responses":{"200":{"description":"Usage summary and ledger entries","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Usage"}}}},"400":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/entitlements":{"get":{"summary":"Get the workspace's plan tier, modules, limits (incl. exportFormats) and credit position","security":[{"bearerAuth":["keys:manage"]}],"responses":{"200":{"description":"Provenance-wrapped entitlement","content":{"application/json":{"schema":{"type":"object","required":["data","provenance"],"properties":{"data":{"$ref":"#/components/schemas/Entitlement"},"provenance":{"$ref":"#/components/schemas/Provenance"}}}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/exports":{"get":{"summary":"List workspace exports","security":[{"bearerAuth":["export"]}],"responses":{"200":{"description":"Export jobs","content":{"application/json":{"schema":{"type":"object","required":["items"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/ExportJob"}}}}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Create an export (format csv|xlsx). The job's filename names its main scope and the UTC minute it was made, kept short: toktik-<dataset>[-<scope>]-<YYYYMMDD>-<HHmm>.<format> (EX.7b). Datasets: rankings (needs region + either board or boards — several boards in one file, CSV stacked / XLSX one sheet per board; optional game for a per-game gaming board and period=current|history), gifters (optional region + segment + window=24h|yesterday|7d|30d: the board on screen; without window, rangeDays is bucketed to 24h/7d/30d), creator_roster (the watchlist as a file; with rosterOnly=true just the signed hosts + roster/KPI/commission-estimate columns over rosterWindow 7d|30d|90d), creator_gifters (needs creatorUniqueId; window=24h|yesterday|7d|30d|live, default 7d; Live module only; capped by plan like the read: Free top 3 / Starter top 3 / Pro+ all), gifter_funded_creators (the whale drill-in's funded-creators list; needs gifterKey; window=24h|yesterday|7d|30d default 7d; Live module only), teams (the Teams & Clubs board; needs region), team_roster (one community's roster; needs hostUid; optional section=members|today), live_pro (one region's LIVE Pro creator directory; needs region; Live-module data), gifter_watchlist (GA.2b — the workspace's gifter watchlist as a file: the board columns over window=24h|yesterday|7d|30d default 7d, plus live status and each gifter's alert settings; Pro+, 403 gifter_watchlist_upgrade_required below it), recruit (the recruiting pool of GET /v1/recruit as a file, up to 60000 rows — 400 export_too_large past it; optional region + excludeLivePro/newOnly/minFollowers/maxCoins30d/live/country/recruitWindow (RW.8 — the period) — the same filters as the read; the mark/mark_note columns are this workspace's own marks). league_window (ES.2 — Rankings › League \"everyone seen\" as a file; needs region (not GLOBAL) + optional leagueWindow (today|yesterday|7d|30d|60d|90d|180d|365d)/leagueClass/minDiamonds/belowTop99 — the same filters as GET /v1/rankings/league-window; the biggest 50000 rows when more match (GET /v1/rankings/league-window's `total` says how many); a window longer than the plan's history window is 403 plan_required; one diamonds column per bar of the window; a masked row keeps its numbers but its unique_id and nickname cells are empty, and its `masked` column is true — the file never carries a masked handle; 404 league_window_unavailable while the list is off). Rankings/teams/live_pro/recruit/league_window honour the caller's tier identity-mask (export is not an unmask backdoor). 400 invalid_format/invalid_request; 403 export_format_not_entitled if the plan lacks the format; rankings/gifters/creator_gifters/gifter_funded_creators/live_pro/recruit/league_window are Live-module data: 403 module_not_entitled without Live, 503 entitlement_unavailable when the entitlement cannot be resolved; team_roster: 404 team_roster_unavailable when the roster feature is off; rankings with boards: 404 board_unavailable when one of them is not published for the region","security":[{"bearerAuth":["export"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["dataset","format"],"properties":{"dataset":{"type":"string","enum":["rankings","gifters","creator_roster","creator_gifters","gifter_funded_creators","teams","team_roster","live_pro","recruit","gifter_watchlist","league_window"]},"format":{"type":"string","enum":["csv","xlsx"]},"rangeDays":{"type":"integer","minimum":1},"board":{"type":"string","description":"Board key for dataset:rankings (e.g. daily, gaming_game, league_a1). Either this or `boards`."},"boards":{"type":"array","minItems":1,"maxItems":25,"items":{"type":"string"},"description":"EX.6 — dataset:rankings, instead of `board`: several board keys (1–25, distinct, no gaming_game) exported as ONE file in this order, same region + period. CSV stacks the rows (the `board` column tells them apart); XLSX = one sheet per board. Each board is tier-masked like a single export. A board not published for the region fails the request (404 board_unavailable, naming it). Ignored otherwise."},"region":{"type":"string","description":"Region bucket for dataset:rankings or dataset:teams (e.g. VN); the whale board's region filter for dataset:gifters; the optional board bucket for dataset:recruit (absent = every bucket)."},"query":{"type":"string","description":"Handle / nickname search for dataset:recruit (Agency tier or above, ignored below it); ES.2 — the handle search for dataset:league_window (Scale; 403 plan_required below it); ignored otherwise."},"game":{"type":"string","description":"game_key for a per-game gaming board (board:gaming_game); ignored otherwise."},"period":{"type":"string","enum":["current","history"]},"creatorUniqueId":{"type":"string","description":"Creator handle for dataset:creator_gifters; ignored otherwise."},"gifterKey":{"type":"string","description":"gifterKey for dataset:gifter_funded_creators (the whale drill-in's funded-creators list); ignored otherwise."},"window":{"type":"string","enum":["24h","yesterday","7d","30d","live"]},"from":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"GW.26 — dataset:creator_gifters, gifter_funded_creators or gifter_watchlist: first UTC day of a day range instead of `window` (with `to`, both or neither, at most 366 days; 400 with `window`; 403 plan_range_exceeded before the plan's history window). The file's window column and filename then say from..to. Ignored otherwise."},"to":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"GW.26 — the last UTC day of that range (inclusive; today = up to now). Ignored otherwise."},"segment":{"type":"string","enum":["whale","one_time","rising","dormant","regular"]},"hostUid":{"type":"string","description":"Community host anchor (hostCreatorUid) for dataset:team_roster; ignored otherwise."},"section":{"type":"string","enum":["members","today"]},"excludeLivePro":{"type":"boolean","description":"dataset:recruit — hide current LIVE Pro badge holders (default true); ignored otherwise."},"newOnly":{"type":"boolean","description":"dataset:recruit — keep only creators new to this period; ignored otherwise."},"worthChecking":{"type":"boolean","description":"EC.19 — dataset:recruit: only creators worth checking (estimate ≥ 50,000, ≥ 4 days with a TikTok number); the rows then follow the Best-to-recruit order; ignored otherwise."},"recruitWindow":{"type":"integer","enum":[30,60,90,180,365],"description":"RW.8 — dataset:recruit: the page's period in days (the `window` query of GET /v1/recruit; absent = 30), so the wide file is the list on screen; ignored otherwise."},"minFollowers":{"type":"integer","minimum":0,"description":"dataset:recruit — minimum follower count; ignored otherwise."},"maxCoins30d":{"type":"integer","minimum":0,"description":"dataset:recruit — the 'not yet graduated' 30-day diamond ceiling; ignored otherwise."},"live":{"type":"string","enum":["live","offline"],"description":"EC.14 — dataset:recruit: live = only creators live now, offline = only the others; absent = both (live first); ignored otherwise."},"country":{"type":"string","description":"dataset:recruit — keep only creators whose RESOLVED country (row `region`) is this code (ISO RO / bucket US+; case-insensitive); distinct from the board-bucket `region`; ignored otherwise."},"rosterOnly":{"type":"boolean","description":"AO.8d — dataset:creator_roster only: export just the signed hosts with roster columns (status, dates, health band, observed diamonds + delta over rosterWindow, league, agency split %, ESTIMATED agency/host share — blank when not estimable, never 0). Same gate as GET /v1/watchlist?roster=1 (403 plan_required below Agency, 404 while the roster is off). Ignored for other datasets."},"rosterWindow":{"type":"string","enum":["7d","30d","90d"],"description":"AO.8d — the KPI window of a rosterOnly export; default 30d. Ignored otherwise."},"leagueWindow":{"type":"string","enum":["today","yesterday","7d","30d","60d","90d","180d","365d"],"description":"ES.2 — dataset:league_window: the window on screen (default 7d). Ignored otherwise."},"leagueClass":{"type":"string","pattern":"^[A-Da-d][1-5]$","description":"ES.2 — dataset:league_window: one League class (A1..D5); absent = every class. Ignored otherwise."},"minDiamonds":{"type":"integer","minimum":0,"description":"ES.2 — dataset:league_window: minimum diamonds in the window (under 1,000 reads as 1,000). Ignored otherwise."},"belowTop99":{"type":"boolean","description":"ES.2 — dataset:league_window: only creators never in their class top 99 at a day close (today: not on the current board). Ignored otherwise."}}}}}},"responses":{"201":{"description":"Export job (poll it, then download)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportJob"}}}},"400":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/exports/{id}":{"get":{"summary":"Get one export job","security":[{"bearerAuth":["export"]}],"responses":{"200":{"description":"Export job","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportJob"}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/exports/{id}/download":{"get":{"summary":"Download a completed export (CSV or XLSX, with a format-appropriate content-type)","security":[{"bearerAuth":["export"]}],"responses":{"200":{"description":"The export payload","content":{"text/csv":{"schema":{"type":"string"}},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{"schema":{"type":"string","format":"binary"}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/alerts/rules":{"get":{"summary":"List webhook/alert rules","security":[{"bearerAuth":["webhook:manage"]}],"responses":{"200":{"description":"Alert rules","content":{"application/json":{"schema":{"type":"object","required":["rules"],"properties":{"rules":{"type":"array","items":{"$ref":"#/components/schemas/AlertRuleView"}}}}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Create a webhook/alert rule. Any webhook channel's signing secret is returned ONCE in `webhookSecrets` — store it now.","security":[{"bearerAuth":["webhook:manage"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string"},"scope":{"type":"string","enum":["watchlist","creator","any","gifter_watchlist"],"description":"Subject. `watchlist` (default) matches only creators on the workspace watchlist; `creator` matches the one `creatorUniqueId`; `any` matches every creator; `gifter_watchlist` fires `gifter_live` when any gifter on the workspace's GIFTER watchlist (/v1/gifter-watchlist) is gifting in a covered live — Pro+ only (403 gifter_alert_upgrade_required), ONE per workspace (409 gifter_watchlist_rule_exists), event type forced to gifter_live. Omit to let the server infer it — `creator` when a `creatorUniqueId` is supplied, else `watchlist`. `region` stays an orthogonal filter for the creator scopes."},"creatorUniqueId":{"type":["string","null"]},"region":{"type":["string","null"]},"eventTypes":{"type":"array","items":{"type":"string"}},"minDiamondCount":{"type":["integer","null"]},"minFollowerMilestone":{"type":["integer","null"]},"enabled":{"type":"boolean"},"channels":{"type":"array","items":{"type":"object","properties":{"channelType":{"type":"string","enum":["webhook","email","in_app","telegram","discord"]},"target":{"type":["string","null"]},"enabled":{"type":"boolean"}}}},"destinationIds":{"type":"array","items":{"type":"string"},"description":"the places this alert sends to (ids from GET /v1/alerts/destinations; the in-app bell is always added). Send either this or `channels`. `channels` still works: each becomes (or reuses) a place in the list, and a new email waits for its confirmation link. A place named here that the caller may use sends again even if its link was switched off (\"Stop these emails\"); another member's own or a disconnected place stays as it is."}}}}}},"responses":{"201":{"description":"Created rule and any one-time webhook secrets","content":{"application/json":{"schema":{"type":"object","required":["rule","webhookSecrets"],"properties":{"rule":{"$ref":"#/components/schemas/AlertRuleView"},"webhookSecrets":{"type":"array","items":{"$ref":"#/components/schemas/WebhookSecretReveal"}}}}}}},"400":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/alerts/rules/{id}":{"patch":{"summary":"Update a webhook/alert rule (partial). Returns the updated rule. `scope`+`creatorUniqueId` are coupled — moving to `watchlist`/`any` drops the handle; `creator` requires one. A `gifter_watchlist` rule stays gifter-scoped (only name / channels / enabled are editable); re-enabling one is Pro+.","security":[{"bearerAuth":["webhook:manage"]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"scope":{"type":"string","enum":["watchlist","creator","any","gifter_watchlist"]},"creatorUniqueId":{"type":["string","null"]},"region":{"type":["string","null"]},"enabled":{"type":"boolean"},"eventTypes":{"type":"array","items":{"type":"string"}},"minDiamondCount":{"type":["integer","null"]},"minFollowerMilestone":{"type":["integer","null"]},"channels":{"type":"array","items":{"type":"object","properties":{"channelType":{"type":"string","enum":["webhook","email","in_app","telegram","discord"]},"target":{"type":["string","null"]},"enabled":{"type":"boolean"}}}},"destinationIds":{"type":"array","items":{"type":"string"},"description":"the places this alert sends to (ids from GET /v1/alerts/destinations; the in-app bell is always added). Send either this or `channels`. `channels` still works: each becomes (or reuses) a place in the list, and a new email waits for its confirmation link. A place named here that the caller may use sends again even if its link was switched off (\"Stop these emails\"); another member's own or a disconnected place stays as it is."}}}}}},"responses":{"200":{"description":"Updated rule","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertRuleView"}}}},"400":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"summary":"Delete a webhook/alert rule","security":[{"bearerAuth":["webhook:manage"]}],"responses":{"204":{"description":"Deleted"},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/alerts/deliveries":{"get":{"summary":"AR.5 — the delivery log: what happened to each alert / host alert / recruit digest / weekly report sent to this workspace's channels (delivered, failed with a short sanitized reason, or capped by the metering cap). Newest first; test sends are hidden unless `includeTest=true`. Telegram is `delivered` once handed to the Telegram sender and is settled to the real send result moments later. Rows are kept 90 days. Not credit-metered.","security":[{"bearerAuth":["webhook:manage"]}],"parameters":[{"name":"ruleId","in":"query","required":false,"description":"Only this alert rule / digest subscription","schema":{"type":"string","format":"uuid"}},{"name":"limit","in":"query","required":false,"description":"1–200, default 50","schema":{"type":"integer","minimum":1,"maximum":200}},{"name":"includeTest","in":"query","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"description":"Deliveries","content":{"application/json":{"schema":{"type":"object","required":["deliveries"],"properties":{"deliveries":{"type":"array","items":{"type":"object","required":["id","source","ruleId","ruleName","channelType","eventType","status","attempts","detail","isTest","at"],"properties":{"id":{"type":"string"},"source":{"type":"string","enum":["alert","recruit_digest","weekly_report"]},"ruleId":{"type":["string","null"]},"ruleName":{"type":"string"},"channelType":{"type":"string","enum":["webhook","email","in_app","telegram","discord"]},"eventType":{"type":"string"},"status":{"type":"string","enum":["delivered","failed","capped"]},"attempts":{"type":"integer"},"detail":{"type":["string","null"]},"isTest":{"type":"boolean"},"at":{"type":"string"}}}}}}}}},"400":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/alerts/destinations":{"get":{"summary":"\"Where to send\": the workspace's places its alerts go to (the bell, Telegram chats, Discord channels, emails, webhooks; the workspace's own and the caller's own). `enabled` is always true (every workspace uses \"Where to send\").","security":[{"bearerAuth":["webhook:manage"]}],"responses":{"200":{"description":"Places to send to","content":{"application/json":{"schema":{"type":"object","required":["enabled","destinations"],"properties":{"enabled":{"type":"boolean"},"destinations":{"type":"array","items":{"$ref":"#/components/schemas/AlertDestinationView"}}}}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Add an email, a Discord channel (a https://discord.com/api/webhooks/… URL) or a webhook. An email receives nothing until the link mailed to it is clicked (`confirmationSent`); a webhook's signing secret is returned ONCE (`signingSecret`). The same address again returns the existing place (200, `created` false). 409 destination_limit past 50; 429 after 10 confirmation emails a day.","security":[{"bearerAuth":["webhook:manage"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["kind","target"],"properties":{"kind":{"type":"string","enum":["email","discord","webhook"]},"target":{"type":"string"},"label":{"type":["string","null"]},"personal":{"type":"boolean","description":"Email only: the caller's own (true) or the workspace's (false, default)."}}}}}},"responses":{"200":{"description":"Already in the list","content":{"application/json":{"schema":{"type":"object","required":["destination","created"],"properties":{"destination":{"$ref":"#/components/schemas/AlertDestinationView"},"created":{"type":"boolean"}}}}}},"201":{"description":"Added","content":{"application/json":{"schema":{"type":"object","required":["destination","created"],"properties":{"destination":{"$ref":"#/components/schemas/AlertDestinationView"},"created":{"type":"boolean"},"signingSecret":{"type":"string"},"confirmationSent":{"type":"boolean"}}}}}},"400":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/alerts/destinations/{id}":{"patch":{"summary":"Rename (`label`) or pause / resume (`paused`) a place. The bell cannot be paused.","security":[{"bearerAuth":["webhook:manage"]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"label":{"type":["string","null"]},"paused":{"type":"boolean"}}}}}},"responses":{"200":{"description":"Updated","content":{"application/json":{"schema":{"type":"object","required":["destination"],"properties":{"destination":{"$ref":"#/components/schemas/AlertDestinationView"}}}}}},"400":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"summary":"Remove a place; the alerts that sent there stop sending there. The bell cannot be removed.","security":[{"bearerAuth":["webhook:manage"]}],"responses":{"204":{"description":"Removed"},"400":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/alerts/destinations/{id}/test":{"post":{"summary":"Send one sample alert to this place only (one per place per 30 s). 409 destination_unconfirmed / destination_paused.","security":[{"bearerAuth":["webhook:manage"]}],"responses":{"200":{"description":"Queued","content":{"application/json":{"schema":{"type":"object","required":["enqueued"],"properties":{"enqueued":{"type":"integer"}}}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/alerts/destinations/{id}/resend-confirmation":{"post":{"summary":"Mail an unconfirmed email's confirmation link again (the old link stops working; at most once a minute).","security":[{"bearerAuth":["webhook:manage"]}],"responses":{"200":{"description":"Sent","content":{"application/json":{"schema":{"type":"object","required":["destination"],"properties":{"destination":{"$ref":"#/components/schemas/AlertDestinationView"}}}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/alerts/rules/{id}/test":{"post":{"summary":"Fire a synthetic test event through a rule's channels to verify delivery (does not consume the live event stream)","security":[{"bearerAuth":["webhook:manage"]}],"responses":{"200":{"description":"Test delivery result","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}