Fields
productToken is not the same as productUrl (public TikTok Shop / listing URL used in Collab). Use productToken for your internal product primary key.
All tokens are optional strings, max 128 characters, scoped to your org. Pass null on PATCH to clear.
Widget filtering rule
Embed UIs should require anaccountToken from your session (brand dashboard or creator app). List endpoints accept ?accountToken=:
GET /digital-samples?accountToken=brand_nikeGET /digital-samples?accountToken=brand_nike&productToken=sku_123GET /actors?accountToken=creator_42GET /digital-samples/{id}/insta-swaps?accountToken=creator_42
Brand self-service vs creator application
Compare the swap token with the parent sample’s brand token:
The API exposes this on insta swap responses as read-only
isBrandSelfService (true when tokens match).
Typical setup:
- Brand creates sample with
accountToken: "brand_nike"and optionalproductToken. - Creator creates actor with
accountToken: "creator_42", thenPOST …/insta-swapswith that actor (swap storescreator_42). - Brand approval widgets list swaps where
sampleAccountTokenis the brand token andaccountTokendiffers (creator applications).
accountToken equals the brand token on samples, actors, and swaps.
Examples
Create a brand-scoped sample
Create a creator actor
Queue a creator swap (tokens differ → not self-service)
sampleAccountToken, productToken, and isBrandSelfService: false.
Security note
accountToken values are identifiers, not secrets. Never embed your yph_sk_* API key in client-side widgets. Phase-2 embed tokens will scope widget calls to a single token and resource set.
