Overview
Base URL, authentication, response envelope, and what each route group does.
Create a campaign from a public Instagram or TikTok post, pull its comments, likers, and metrics, register creator handles, and confirm which registered creators engaged. Every route is authenticated with Authorization: Bearer <API_TOKEN> against your API base URL.
What you can do
| Capability | TikTok | Start here | |
|---|---|---|---|
| Create a campaign from a post URL | ✓ | ✓ | Create a campaign |
| Read and refresh comments on the post | ✓ | ✓ | Comments |
| Read and refresh post metrics (likes, comments, shares, views) | ✓ | ✓ | Post metrics |
| Fetch and list who liked the post | ✓ | — | Instagram likers |
| Register and refresh creator profiles | ✓ | ✓ | Creator profiles |
| Verify that a creator commented | ✓ | ✓ | Verify engagement |
| Verify that a creator liked | ✓ | — | Verify engagement |
| Receive signed webhooks on verification and reward | ✓ | ✓ | Webhooks |
Base URL and authentication
Examples write your API base URL as {API_BASE_URL}. Send your API token as a Bearer token on every request:
curl {API_BASE_URL}/campaigns \
-H "Authorization: Bearer <API_TOKEN>"A missing or invalid token returns 401. Routes under /admin/ need a token with admin rights and return 403 otherwise.
Core objects
- Brand: owns campaigns and webhooks. You pass
brandIdwhen creating a campaign and when registering a webhook. - Campaign: a reward program with a
title,pointsReward, and one challenge. - Challenge: the post to engage with, parsed from the campaign's
targetUrl. Every scrape and verification route takeschallengeId; you never pass the post URL again. - Creator: a user identified by your own
externalId, with linked Instagram or TikTok accounts. - Attempt: one creator's progress through one challenge, tracked as a state machine.
Response envelope
Successful responses wrap the result in data. List routes add pagination:
{
"data": [ ... ],
"pagination": { "page": 1, "limit": 20, "total": 150 }
}Errors return an error code and a human-readable message. Branch on error; message may be reworded.
{ "error": "NOT_FOUND", "message": "Campaign 42 not found" }Routes that read a post or profile can also return the scraping codes listed in Scraping errors.
Pagination
List routes accept page (default 1) and limit (default 20). The likers list caps limit at 100.
Typical integration
- Register a webhook for your brand and store the
whsec_*secret. - Create a campaign from the post URL. Keep the returned
challengeId. - Register each creator with your
externalIdand their handle. - When a creator takes part, create an attempt and advance it to
claim_completion. - Handle
creator.verifiedandreward.issuedon your webhook endpoint.
If you prefer to verify in batch, refresh comments and call verify-and-reward on the campaign instead of steps 4 and 5.
Parameter tables and schemas for every route are in the API reference.