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 stats and 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/syncTrigger a fresh sync of a creator's profile stats and videos from TikTok.
Response
{
"success": true,
"data": { "synced": true }
}/api/v1/creators/:idDisconnect a creator. Revokes the app's authorization on TikTok (so the creator must re-grant permissions on reconnect) and deletes the creator and all its synced data.
Response
{
"success": true,
"data": { "disconnected": true }
}