{"openapi":"3.1.0","info":{"title":"Loopearn API","description":"Read your business's campaigns, participants and analytics from your own tools. A participant is only ever a name, a picture and an @handle (plus the social accounts they connected) — never a phone number or email.\n\n**Authentication.** Send your key in the `x-api-key` header. Create one in Loopearn Business › Settings › API keys. A key reads one business only, and can make 60 calls a minute.\n\n**Lists.** Every list answers `{ data, pageCount, totalRows }` and takes `page` (from 1), `perPage` (1–100, default 10), `sortCol` and `sortDir` (`asc` / `desc`). Filters that take several values accept `?statuses=live&statuses=ended` or `?statuses=live,ended`.\n\n**Top videos and accounts** come from the accounts you track in Analytics (yours, not competitors'), over the last 7, 30 or 90 India days, and answer `{ window, data }`.\n\n**Money** is in Indian rupees (INR), as numbers with up to two decimals.\n\n**Dates** are ISO 8601 in UTC. Campaigns run on India time (Asia/Kolkata).\n\n**Errors** answer `{ code, status, message }`, e.g. `{ \"code\": \"NOT_FOUND\", \"status\": 404, \"message\": \"Campaign not found\" }`. A `RATE_LIMITED` answer carries a `Retry-After` header.","version":"1.0.0"},"servers":[{"url":"/api"}],"paths":{"/campaigns":{"get":{"operationId":"campaigns-list","summary":"List campaigns","description":"Your business's campaigns, newest first by default.","tags":["Campaigns"],"security":[{"apiKey":[]}],"parameters":[{"in":"query","name":"page","schema":{"default":1,"description":"Page number, from 1.","type":"integer","minimum":1,"maximum":9007199254740991}},{"in":"query","name":"perPage","schema":{"default":10,"description":"Rows per page, 1–100.","type":"integer","minimum":1,"maximum":100}},{"in":"query","name":"search","schema":{"type":"string","maxLength":80}},{"in":"query","name":"statuses","schema":{"description":"Only these statuses. Repeat the parameter or separate with commas.","type":"array","items":{"type":"string","enum":["draft","upcoming","live","paused","ended"]}}},{"in":"query","name":"kinds","schema":{"description":"Only these kinds.","type":"array","items":{"type":"string","enum":["content","cashback","receipt_cashback","deal_drop","social","review","referral","survey","game","action","time","newsletter_subscription"]}}},{"in":"query","name":"sortCol","schema":{"default":"createdAt","type":"string","enum":["createdAt","name","startsAt","endsAt"]}},{"in":"query","name":"sortDir","schema":{"default":"desc","type":"string","enum":["asc","desc"]}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Campaign"}},"pageCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"totalRows":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["data","pageCount","totalRows"],"additionalProperties":false}}}},"400":{"description":"A parameter is not valid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Missing or unknown API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"429":{"description":"Too many calls","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.TOO_MANY_REQUESTS"}}}}}}},"/campaigns/{id}":{"get":{"operationId":"campaigns-get","summary":"Get a campaign","description":"One campaign: its status, reward, money and how many people joined.","tags":["Campaigns"],"security":[{"apiKey":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string","minLength":1},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Campaign"}}}},"401":{"description":"Missing or unknown API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"404":{"description":"No campaign with this id in your business","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"429":{"description":"Too many calls","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.TOO_MANY_REQUESTS"}}}}}}},"/campaigns/{id}/participants":{"get":{"operationId":"campaigns-participants","summary":"List a campaign's participants","description":"Everyone in one campaign, with the campaign page's numbers. Most recently active first by default.","tags":["Participants"],"security":[{"apiKey":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string","minLength":1},"required":true},{"in":"query","name":"page","schema":{"default":1,"description":"Page number, from 1.","type":"integer","minimum":1,"maximum":9007199254740991}},{"in":"query","name":"perPage","schema":{"default":10,"description":"Rows per page, 1–100.","type":"integer","minimum":1,"maximum":100}},{"in":"query","name":"search","schema":{"type":"string","maxLength":80}},{"in":"query","name":"steps","schema":{"description":"Only people who got this far.","type":"array","items":{"type":"string","enum":["joined","submitted","approved","paid","claimed","used"]}}},{"in":"query","name":"sortCol","schema":{"default":"lastActiveAt","type":"string","enum":["lastActiveAt","submissions","views","earned"]}},{"in":"query","name":"sortDir","schema":{"default":"desc","type":"string","enum":["asc","desc"]}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/CampaignParticipant"}},"pageCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"totalRows":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["data","pageCount","totalRows"],"additionalProperties":false}}}},"400":{"description":"A parameter is not valid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Missing or unknown API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"404":{"description":"No campaign with this id in your business","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"429":{"description":"Too many calls","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.TOO_MANY_REQUESTS"}}}}}}},"/campaigns/{id}/stats":{"get":{"operationId":"campaigns-stats","summary":"Get a campaign's stats","description":"The campaign page's numbers: videos sent in, views, videos per India day, paid out, cost per 1,000 views and its best videos.","tags":["Analytics"],"security":[{"apiKey":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string","minLength":1},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignStats"}}}},"400":{"description":"A parameter is not valid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Missing or unknown API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"404":{"description":"No campaign with this id in your business","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"429":{"description":"Too many calls","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.TOO_MANY_REQUESTS"}}}}}}},"/reviews":{"get":{"operationId":"reviews-list","summary":"List videos to review","description":"Videos from your campaigns, as Videos to review shows them. toReview and held are oldest first (the next to approve itself on top); all is newest first.","tags":["Reviews"],"security":[{"apiKey":[]}],"parameters":[{"in":"query","name":"page","schema":{"default":1,"description":"Page number, from 1.","type":"integer","minimum":1,"maximum":9007199254740991}},{"in":"query","name":"perPage","schema":{"default":10,"description":"Rows per page, 1–100.","type":"integer","minimum":1,"maximum":100}},{"in":"query","name":"tab","schema":{"default":"toReview","description":"toReview = waiting for you; held = waiting and looks risky; all = every video.","type":"string","enum":["toReview","held","all"]}},{"in":"query","name":"campaignIds","schema":{"description":"Only videos in these campaigns.","type":"array","items":{"type":"string","minLength":1}}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ReviewVideo"}},"pageCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"totalRows":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["data","pageCount","totalRows"],"additionalProperties":false}}}},"400":{"description":"A parameter is not valid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Missing or unknown API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"429":{"description":"Too many calls","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.TOO_MANY_REQUESTS"}}}}}}},"/reviews/{id}/approve":{"post":{"operationId":"reviews-approve","summary":"Approve a video","description":"Exactly what Approve does in Videos to review: what the creator has earned comes out of the campaign's money and lands in their wallet, ready for them to withdraw. Nothing is sent to them here. Needs a Read & write key.","tags":["Reviews"],"security":[{"apiKey":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string","minLength":1},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","const":"approved"},"basePay":{"anyOf":[{"type":"object","properties":{"amount":{"type":"number"},"status":{"type":"string","const":"owed","description":"owed = in the creator's wallet for them to withdraw."}},"required":["amount","status"],"additionalProperties":false},{"type":"null"}],"description":"Null when the campaign has no base pay for this video."}},"required":["id","status","basePay"],"additionalProperties":false}}}},"400":{"description":"A parameter is not valid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Missing or unknown API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"This key is read only","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"No campaign with this id in your business","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"429":{"description":"Too many calls","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.TOO_MANY_REQUESTS"}}}}}}},"/reviews/{id}/reject":{"post":{"operationId":"reviews-reject","summary":"Reject a video","description":"Exactly what Reject does in Videos to review: the creator is told why (your note if you give one). Needs a Read & write key.","tags":["Reviews"],"security":[{"apiKey":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","enum":["invalidProof","duplicateSubmission","outOfTimeWindow","didNotMeetCriteria","other"],"description":"One of: invalidProof (the proof was invalid), duplicateSubmission (it was a duplicate submission), outOfTimeWindow (it was outside the campaign window), didNotMeetCriteria (it didn't meet the campaign criteria), other (see the campaign details)."},"note":{"description":"Shown to the creator instead of the reason.","type":"string","maxLength":500}},"required":["reason"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","const":"rejected"}},"required":["id","status"],"additionalProperties":false}}}},"400":{"description":"A parameter is not valid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Missing or unknown API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"This key is read only","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"No campaign with this id in your business","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"429":{"description":"Too many calls","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.TOO_MANY_REQUESTS"}}}}}}},"/top/videos":{"get":{"operationId":"top-videos","summary":"Top videos","description":"The Analytics page's Top videos: your own accounts' videos posted in the window, best first by `sort`. Competitors' accounts are left out.","tags":["Analytics"],"security":[{"apiKey":[]}],"parameters":[{"in":"query","name":"days","schema":{"default":30,"description":"The last 7, 30 or 90 India days, today included.","type":"number"}},{"in":"query","name":"sort","schema":{"default":"views","type":"string","enum":["views","likes","comments"]}},{"in":"query","name":"limit","schema":{"default":5,"type":"integer","minimum":1,"maximum":10}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"window":{"type":"object","properties":{"days":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"from":{"type":"string"},"to":{"type":"string"},"timeZone":{"type":"string","const":"Asia/Kolkata"}},"required":["days","from","to","timeZone"],"additionalProperties":false},"data":{"type":"array","items":{"$ref":"#/components/schemas/TopVideo"}}},"required":["window","data"],"additionalProperties":false}}}},"400":{"description":"A parameter is not valid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Missing or unknown API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"429":{"description":"Too many calls","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.TOO_MANY_REQUESTS"}}}}}}},"/top/accounts":{"get":{"operationId":"top-accounts","summary":"Top accounts","description":"The Analytics page's Top accounts: your own accounts — or the creators who own them (`by=creators`) — ranked by the total of `sort` over videos posted in the window.","tags":["Analytics"],"security":[{"apiKey":[]}],"parameters":[{"in":"query","name":"days","schema":{"default":30,"description":"The last 7, 30 or 90 India days, today included.","type":"number"}},{"in":"query","name":"sort","schema":{"default":"views","type":"string","enum":["views","likes","comments"]}},{"in":"query","name":"limit","schema":{"default":5,"type":"integer","minimum":1,"maximum":10}},{"in":"query","name":"by","schema":{"default":"accounts","type":"string","enum":["accounts","creators"]}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"window":{"type":"object","properties":{"days":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"from":{"type":"string"},"to":{"type":"string"},"timeZone":{"type":"string","const":"Asia/Kolkata"}},"required":["days","from","to","timeZone"],"additionalProperties":false},"data":{"type":"array","items":{"$ref":"#/components/schemas/TopAccount"}}},"required":["window","data"],"additionalProperties":false}}}},"400":{"description":"A parameter is not valid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Missing or unknown API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"429":{"description":"Too many calls","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.TOO_MANY_REQUESTS"}}}}}}},"/participants":{"get":{"operationId":"participants-list","summary":"List participants","description":"Everyone who made content for one of your campaigns or was invited to one — the Participants tab. Latest video first by default.","tags":["Participants"],"security":[{"apiKey":[]}],"parameters":[{"in":"query","name":"page","schema":{"default":1,"description":"Page number, from 1.","type":"integer","minimum":1,"maximum":9007199254740991}},{"in":"query","name":"perPage","schema":{"default":10,"description":"Rows per page, 1–100.","type":"integer","minimum":1,"maximum":100}},{"in":"query","name":"standing","schema":{"default":"working","description":"working = made content; invited = invited, nothing yet; archived = removed or declined.","type":"string","enum":["working","invited","archived","banned"]}},{"in":"query","name":"search","schema":{"type":"string","maxLength":100}},{"in":"query","name":"campaignIds","schema":{"description":"Only people in these campaigns.","type":"array","items":{"type":"string","minLength":1}}},{"in":"query","name":"sortCol","schema":{"default":"lastVideo","type":"string","enum":["lastVideo","usualViews","videos"]}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Participant"}},"pageCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"totalRows":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["data","pageCount","totalRows"],"additionalProperties":false}}}},"400":{"description":"A parameter is not valid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Missing or unknown API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"429":{"description":"Too many calls","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.TOO_MANY_REQUESTS"}}}}}}},"/participants/{id}":{"get":{"operationId":"participants-get","summary":"Get a participant","description":"One person: totals, social accounts, their campaigns with you and their videos.","tags":["Participants"],"security":[{"apiKey":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string","minLength":1},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ParticipantDetail"}}}},"400":{"description":"A parameter is not valid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Missing or unknown API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"404":{"description":"No campaign with this id in your business","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"429":{"description":"Too many calls","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.TOO_MANY_REQUESTS"}}}}}}}},"components":{"schemas":{"Campaign":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"kind":{"type":"string","description":"What the campaign asks people to do.","example":"content"},"status":{"type":"string","enum":["draft","upcoming","live","paused","ended"]},"coverImageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"startsAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Scheduled start. Null = starts when launched."},"endsAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Scheduled end. Null = runs until ended."},"timeZone":{"type":"string","const":"Asia/Kolkata"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"reward":{"$ref":"#/components/schemas/CampaignReward"},"participantSummary":{"$ref":"#/components/schemas/CampaignParticipantSummary"},"money":{"$ref":"#/components/schemas/CampaignMoney"}},"required":["id","name","description","kind","status","coverImageUrl","startsAt","endsAt","timeZone","createdAt","updatedAt","reward","participantSummary","money"],"additionalProperties":false},"CampaignReward":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","description":"pay_per_views, pay_per_video, percent_off, amount_off, points, wallet_multiplier, free_delivery, free_product or buy_x_get_y.","example":"pay_per_video"},"headline":{"type":"string","example":"₹200 per approved video"},"terms":{"type":"array","items":{"type":"string"},"description":"Further terms, one sentence each."},"currency":{"type":"string","const":"INR"},"rules":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"The pay rules as numbers. Amounts in rupees. Fields depend on `type`."}},"required":["type","headline","terms","currency","rules"],"additionalProperties":false},{"type":"null"}]},"CampaignParticipantSummary":{"type":"object","properties":{"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"People who sent something in (deal drops: who claimed one)."},"active":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Of those, people not removed. 0 once the campaign has ended."}},"required":["total","active"],"additionalProperties":false},"CampaignMoney":{"type":"object","properties":{"currency":{"type":"string","const":"INR"},"locked":{"type":"number","description":"Rupees put into this campaign, Loopearn's fee included."},"paidOut":{"type":"number","description":"Rupees sent to participants."},"owed":{"type":"number","description":"Rupees you approved that haven't been sent yet."},"inReview":{"type":"number","description":"Rupees sent in but not decided yet. Drops when you reject; moves to owed when you approve."},"fees":{"type":"number","description":"Loopearn's fee taken so far."},"available":{"type":"number","description":"Rupees nobody has earned yet."},"returned":{"type":"number","description":"Once the campaign has ended: rupees that went back to your wallet. Then locked = paidOut + owed + fees + available + returned."}},"required":["currency","locked","paidOut","owed","inReview","fees","available","returned"],"additionalProperties":false},"error.BAD_REQUEST":{"type":"object","properties":{"message":{"type":"string","description":"The error message","example":"A parameter is not valid"},"code":{"type":"string","description":"The error code","example":"BAD_REQUEST"},"issues":{"description":"An array of issues that were responsible for the error","example":[],"type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false,"title":"A parameter is not valid error (400)","description":"The error information","example":{"code":"BAD_REQUEST","message":"A parameter is not valid","issues":[]}},"error.UNAUTHORIZED":{"type":"object","properties":{"message":{"type":"string","description":"The error message","example":"Missing or unknown API key"},"code":{"type":"string","description":"The error code","example":"UNAUTHORIZED"},"issues":{"description":"An array of issues that were responsible for the error","example":[],"type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false,"title":"Missing or unknown API key error (401)","description":"The error information","example":{"code":"UNAUTHORIZED","message":"Missing or unknown API key","issues":[]}},"error.TOO_MANY_REQUESTS":{"type":"object","properties":{"message":{"type":"string","description":"The error message","example":"Too many calls"},"code":{"type":"string","description":"The error code","example":"TOO_MANY_REQUESTS"},"issues":{"description":"An array of issues that were responsible for the error","example":[],"type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false,"title":"Too many calls error (429)","description":"The error information","example":{"code":"TOO_MANY_REQUESTS","message":"Too many calls","issues":[]}},"error.NOT_FOUND":{"type":"object","properties":{"message":{"type":"string","description":"The error message","example":"No campaign with this id in your business"},"code":{"type":"string","description":"The error code","example":"NOT_FOUND"},"issues":{"description":"An array of issues that were responsible for the error","example":[],"type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false,"title":"No campaign with this id in your business error (404)","description":"The error information","example":{"code":"NOT_FOUND","message":"No campaign with this id in your business","issues":[]}},"CampaignParticipant":{"type":"object","properties":{"id":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Their display name. Null if they haven't set one."},"pictureUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"handle":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Their Loopearn @username."},"step":{"type":"string","enum":["joined","submitted","approved","paid","claimed","used"],"description":"The furthest they got: joined, submitted, approved or paid (deal drops: claimed or used)."},"submissions":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Videos, bills or posts they sent in."},"views":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Views across their videos (video campaigns)."},"costPer1kViews":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Rupees paid per 1,000 views. Null without views."},"approvalRate":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Approved out of what you decided on, 0–1."},"earned":{"type":"number","description":"Rupees sent to them."},"owed":{"type":"number","description":"Rupees approved, not sent yet."},"lastActiveAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","pictureUrl","handle","step","submissions","views","costPer1kViews","approvalRate","earned","owed","lastActiveAt"],"additionalProperties":false},"CampaignStats":{"type":"object","properties":{"videos":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Videos sent in."},"totalViews":{"type":"number","description":"Views across videos that still count (not rejected or withdrawn)."},"viewsSyncedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"When views were last read from the platforms."},"videosPerDay":{"type":"array","items":{"type":"object","properties":{"day":{"type":"string","example":"2026-10-20"},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["day","count"],"additionalProperties":false}},"paidOut":{"type":"number","description":"Rupees sent to participants."},"costPer1kViews":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Rupees paid out per 1,000 views. Null without views."},"currency":{"type":"string","const":"INR"},"timeZone":{"type":"string","const":"Asia/Kolkata"},"bestVideos":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"participant":{"type":"object","properties":{"id":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"pictureUrl":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","pictureUrl"],"additionalProperties":false},"accountHandle":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The social account it was posted from."},"platform":{"anyOf":[{"type":"string"},{"type":"null"}]},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"thumbnailUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"postedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"sentInAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","description":"earning or paid."},"views":{"anyOf":[{"type":"number"},{"type":"null"}]},"paid":{"type":"number","description":"Rupees sent for this video so far."}},"required":["id","participant","accountHandle","platform","url","thumbnailUrl","postedAt","sentInAt","status","views","paid"],"additionalProperties":false},"description":"Up to 3 approved or paid videos, most views first. Videos still waiting for review (held or not) never appear here."}},"required":["videos","totalViews","viewsSyncedAt","videosPerDay","paidOut","costPer1kViews","currency","timeZone","bestVideos"],"additionalProperties":false},"ReviewVideo":{"type":"object","properties":{"id":{"type":"string"},"participant":{"type":"object","properties":{"id":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"pictureUrl":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","pictureUrl"],"additionalProperties":false},"accountHandle":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The social account it was posted from."},"platform":{"anyOf":[{"type":"string"},{"type":"null"}]},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"thumbnailUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"postedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"sentInAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","description":"toReview, held (looks risky), earning, paid, rejected or expired."},"views":{"anyOf":[{"type":"number"},{"type":"null"}]},"paid":{"type":"number","description":"Rupees sent for this video so far."},"campaign":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},{"type":"null"}]},"viewsSyncedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"autoApprovesAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Always null. Waiting videos are only approved by you; nothing approves itself."},"risk":{"type":"object","properties":{"level":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"low, medium or high. High = held for you to look at."},"reasons":{"type":"array","items":{"type":"string"}}},"required":["level","reasons"],"additionalProperties":false},"viewsPayNow":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Views pay at today's views (pay-per-views campaigns)."},"earned":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Rupees recorded as earned when it was approved."},"review":{"type":"object","properties":{"by":{"anyOf":[{"type":"string","enum":["you","automatic"]},{"type":"null"}]},"at":{"anyOf":[{"type":"string"},{"type":"null"}]},"rejectionReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"rejectionNote":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["by","at","rejectionReason","rejectionNote"],"additionalProperties":false}},"required":["id","participant","accountHandle","platform","url","thumbnailUrl","postedAt","sentInAt","status","views","paid","campaign","viewsSyncedAt","autoApprovesAt","risk","viewsPayNow","earned","review"],"additionalProperties":false},"error.FORBIDDEN":{"type":"object","properties":{"message":{"type":"string","description":"The error message","example":"This key is read only"},"code":{"type":"string","description":"The error code","example":"FORBIDDEN"},"issues":{"description":"An array of issues that were responsible for the error","example":[],"type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false,"title":"This key is read only error (403)","description":"The error information","example":{"code":"FORBIDDEN","message":"This key is read only","issues":[]}},"TopVideo":{"type":"object","properties":{"id":{"type":"string"},"caption":{"anyOf":[{"type":"string"},{"type":"null"}]},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"thumbnailUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"platform":{"type":"string"},"postedAt":{"type":"string"},"views":{"type":"number"},"likes":{"type":"number"},"comments":{"type":"number"},"account":{"type":"object","properties":{"handle":{"type":"string"},"pictureUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"platform":{"type":"string"}},"required":["handle","pictureUrl","platform"],"additionalProperties":false}},"required":["id","caption","url","thumbnailUrl","platform","postedAt","views","likes","comments","account"],"additionalProperties":false},"TopAccount":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"detail":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The account's display name, or how many accounts a creator has."},"pictureUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"platforms":{"type":"array","items":{"type":"string"}},"accounts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"total":{"type":"number","description":"Total of `sort` over their videos in the window."}},"required":["id","name","detail","pictureUrl","platforms","accounts","total"],"additionalProperties":false},"Participant":{"type":"object","properties":{"id":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Their display name. Null if they haven't set one."},"pictureUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"handle":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Their Loopearn @username."},"standing":{"type":"string","enum":["working","invited","archived","banned"]},"videos":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"usualViews":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Median views per video for you."},"lastVideoAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"campaigns":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Your campaigns they took part in."},"latestCampaign":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"status":{"type":"string","enum":["draft","upcoming","live","paused","ended"]}},"required":["id","name","status"],"additionalProperties":false},{"type":"null"}]},"socialAccounts":{"type":"array","items":{"type":"object","properties":{"platform":{"type":"string"},"handle":{"type":"string"}},"required":["platform","handle"],"additionalProperties":false}}},"required":["id","name","pictureUrl","handle","standing","videos","usualViews","lastVideoAt","campaigns","latestCampaign","socialAccounts"],"additionalProperties":false},"ParticipantDetail":{"type":"object","properties":{"id":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Their display name. Null if they haven't set one."},"pictureUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"handle":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Their Loopearn @username."},"totals":{"type":"object","properties":{"videos":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"totalViews":{"type":"number"},"usualViews":{"anyOf":[{"type":"number"},{"type":"null"}]},"earned":{"type":"number","description":"Rupees approved for them, paid or not."},"paid":{"type":"number","description":"Rupees sent to them."}},"required":["videos","totalViews","usualViews","earned","paid"],"additionalProperties":false},"socialAccounts":{"type":"array","items":{"type":"object","properties":{"platform":{"type":"string"},"handle":{"type":"string"},"followers":{"type":"number"},"posts":{"type":"number"}},"required":["platform","handle","followers","posts"],"additionalProperties":false}},"campaigns":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"status":{"type":"string","enum":["draft","upcoming","live","paused","ended"]},"standing":{"type":"string"},"videos":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["id","name","status","standing","videos"],"additionalProperties":false}},"videos":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"campaignId":{"anyOf":[{"type":"string"},{"type":"null"}]},"campaignName":{"anyOf":[{"type":"string"},{"type":"null"}]},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"thumbnailUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"platform":{"anyOf":[{"type":"string"},{"type":"null"}]},"postedAt":{"type":"string"},"metric":{"type":"string","enum":["views","likes"]},"count":{"anyOf":[{"type":"number"},{"type":"null"}]},"status":{"type":"string"},"amount":{"type":"number"}},"required":["id","campaignId","campaignName","url","thumbnailUrl","platform","postedAt","metric","count","status","amount"],"additionalProperties":false}}},"required":["id","name","pictureUrl","handle","totals","socialAccounts","campaigns","videos"],"additionalProperties":false}},"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"x-api-key","description":"Create a key in Loopearn Business › Settings › API keys."}}}}