All API requests require an x-api-key header. Get your key from the dashboard.
# Add this header to every request
x-api-key: mlk_your_key_here
1. Call POST /api/v1/connect/tiktok with your API key → receive an authUrl
2. Redirect your creator to the authUrl
3. TikTok redirects back to MetriqLab — creator is stored automatically
4. Call GET /api/v1/creators to get the new creator's ID
5. Call POST /api/v1/creators/:id/sync to pull their profile & stats (and /videos/sync for videos)
/api/v1/connect/tiktokGenerate a TikTok OAuth URL to connect a creator's account. No request body needed — open the authUrl in a popup or redirect. MetriqLab handles the callback internally.
Response
{
"success": true,
"data": {
"authUrl": "https://www.tiktok.com/v2/auth/authorize/?...",
"state": "abc123"
}
}/api/v1/creatorsList all creators connected under your API key. Optional query params: ?externalId=xxx (TikTok open_id), ?platform=TIKTOK|INSTAGRAM|YOUTUBE.
Response
{
"success": true,
"data": [
{
"id": "cmq...",
"platform": "TIKTOK",
"username": "Spikewmu",
"externalId": "...",
"stats": { "followers": 5618, "likes": 1203, ... }
}
]
}/api/v1/creators/:id/profileGet a creator's profile and latest synced stats.
Response
{
"success": true,
"data": {
"id": "cmq...",
"platform": "TIKTOK",
"username": "Spikewmu",
"stats": {
"followers": 5618,
"following": 838,
"likes": 1203,
"videoCount": 11,
"bio": "...",
"avatarUrl": "..."
},
"connectedAt": "2026-06-13T01:50:23.102Z"
}
}/api/v1/creators/:id/videosGet a paginated list of a creator's videos. Use ?limit=20&cursor= for pagination.
Response
{
"success": true,
"data": {
"items": [
{
"id": "cmq...",
"externalId": "...",
"title": "Video title",
"views": 12400,
"likes": 890,
"comments": 34,
"shares": 12,
"duration": 30,
"publishedAt": "2026-05-01T00:00:00.000Z"
}
],
"nextCursor": "cmq..."
}
}/api/v1/creators/:id/syncSync a creator's profile and stats from TikTok (fast, costs 1 request). The response includes the freshly synced profile + stats, so you don't need a follow-up call to /profile. Videos are synced separately — see POST /videos/sync.
Response
{
"success": true,
"data": {
"synced": true,
"creator": {
"id": "cmq...",
"platform": "TIKTOK",
"username": "Spikewmu",
"externalId": "...",
"stats": { "followers": 5618, "likes": 1203, ... },
"connectedAt": "2026-06-13T01:50:23.102Z"
}
}
}/api/v1/creators/:id/videos/syncPull the creator's videos from TikTok and store them. This is the heaviest operation, so it counts as 10 requests against your monthly quota. Returns the synced videos.
Response
{
"success": true,
"data": {
"synced": true,
"videosSynced": 11,
"videos": [
{
"id": "cmq...",
"title": "Video title",
"views": 12400,
"likes": 890,
"publishedAt": "2026-05-01T00:00:00.000Z"
}
]
}
}/api/v1/creators/:idDisconnect a single creator connection: deletes that creator and all its synced data under your account. If the same TikTok account is connected to other businesses, those connections are unaffected. The shared TikTok authorization is only revoked when this is the creator's last remaining connection across all businesses.
Response
{
"success": true,
"data": { "disconnected": true }
}