List campaigns
Your campaigns with status (draft, live, paused, closed), price per video and how many creators are invited, working or done.
View as Markdownhttps://yapfactory.com/api/v1/campaigns| Who can use it | Brands |
| Tier | read: Reads. Changes nothing. |
| Scope | campaigns:read, or read |
| Idempotency-Key | Not used |
| Rate limit | Reads: 120 a minute |
| MCP tool | list_campaigns |
Parameters
statusOnly campaigns in this status. Default "any".
limitHow many to return. 1 to 50. Default 20.
cursorThe nextCursor from the previous page. Leave out for the first page.
Example request
curl "https://yapfactory.com/api/v1/campaigns?status=live" \
-H "Authorization: Bearer $YAP_API_KEY"Response
200 with a list. Each item in data is what the MCP tool returns in campaigns. Pass nextCursor back as cursor until hasMore is false. How paging works.
{
"data": [
{
"id": "8f14e45f-ceea-4e7a-9b1d-2c3b4a5d6e7f",
"title": "Morning routine with Sleepwell",
"status": "live",
"product": "Sleepwell",
"videosPerCreator": 1,
"budgetPerVideo": {
"minor": 3000,
"currency": "USD",
"formatted": "$30.00"
},
"deadline": "2026-12-16T12:00:00.000Z",
"creators": {
"shortlisted": 12,
"invited": 3,
"saidYes": 1,
"working": 1,
"done": 0
},
"url": "https://yapfactory.com/brand/campaigns/8f14e45f-ceea-4e7a-9b1d-2c3b4a5d6e7f"
}
],
"nextCursor": null,
"hasMore": false
}An example: fields that don't apply are null, and new fields can be added at any time, so ignore ones you don't know. Every response carries Request-Id and the RateLimit-* headers.
Errors
| Code | Status | When |
|---|---|---|
invalid_request | 400 | A field failed validation (see meta.issues), or an unknown query parameter. |
unauthorized | 401 | No token, or it's wrong, expired, revoked or from the other environment. |
insufficient_scope | 403 | The token doesn't have campaigns:read (or read). |
forbidden | 403 | Only for brands, or the account can't do this yet (email not confirmed, paused). |
rate_limited | 429 | Over the limit. Wait for Retry-After seconds. |
internal | 500 | Our fault. Retry later, and send us the requestId if it keeps happening. |
Every error has the same shape. See Errors for what to do about each one.