OverviewProductsPlatformsAPI ReferenceResources
Creator Campaigns

Create creator campaign

POSThttps://zernio.com/api/v1/creator-campaigns

Creates a campaign in draft. Creators are paid for verified performance of the posts they submit: Zernio tracks each post through a tracking window, scores its authenticity and records every earning in a ledger. Activate the campaign to start accepting submissions.

Creator campaigns run on usage-based billing; a workspace not on it gets 403 feature_not_available. profileId must be a profile this key can reach, otherwise 404.

Authentication

AuthorizationBearer tokenRequired

API key authentication: send your Zernio API key in the Authorization header, prefixed with Bearer.

Body

application/json

What every request needs

profileIdstringRequired

Profile the campaign lives in. Creator accounts connect into the same workspace.

namestring, max 200Required
brandNamestring, max 200Required
economicsone of 6 typesRequired

How the campaign pays, picked by type. Amounts are USD cents.

Every type carries budgetCents, the most the campaign can pay out in total. Once earnings reach it, the campaign stops accruing and creator_campaign.budget_exhausted fires.

  • cpm: ratePer1kCents per 1,000 of the counted metric (views by default), earned once a post reaches minViewsToEarn of it, capped per post by maxPayoutPerClipCents.
  • per_post: perApprovedPostCents for each approved post, at most maxPostsPerParticipant per participant.
  • pool: budgetCents is split at close among approved posts by eligible views; a post needs minViewsToQualify views to share.
  • ad_performance: pays on the results of the ads that run each post (see GET /v1/creator-campaigns/{campaignId}/ad-results), counted once a day through the previous UTC day. Only Instagram, Facebook and TikTok posts.
  • retainer: amountCents per period once the creator has requiredApprovedPosts approved posts in it. mode: smart tops the period's commission up to amountCents.
  • commission: a share of the sales of the linked store (storeAccountId) credited to each creator by their discount code or tracking link.
Optional parameters18 fields
capsobject

Omitted, the campaign starts with authenticityThreshold 40 and no other caps.

platformsarray of strings

Platforms creators may post on. At least one is needed to activate. twitter (X) needs usage-based billing: X reads are billed at cost, up to caps.maxXReadSpendCents, and X views are the post's impressions. facebook takes Page reels and videos only.

contentRulesstring or null, max 10000
startsAtstring or null (date-time)
endsAtstring or null (date-time)
trackingDaysintegerDefault 30
holdDaysintegerDefault 10
maxPostAgeMinutesinteger or null

Optional maximum age in minutes of a post when it is submitted. Null or omitted (the default) accepts any age. Posts published before the campaign started are always refused.

settlementstringDefault noneOne of none | external | treasury
brandingone of 2 types
landingUrlstring or null (uri), max 2000

The page creator tracking links open. Required unless attribution is code.

codeDiscountPercentinteger or null

What each creator's discount code takes off an order. Required unless attribution is link.

autoPayoutone of 2 types

Treasury campaigns only. Pays every ready creator at 15:00 UTC, daily or on Mondays, with one payout batch on your saved card, paid out 7 days later. A refused card charges nothing and we email you. Needs a money mover and a saved card.

joinApprovalstringDefault autoOne of auto | manual

manual holds creators who join through the open link as pending until you approve them. Personal invites are never held.

requireDraftApprovalbooleanDefault false

Creators upload a draft for review before publishing, and each submitted post must name an approved draft.

storeAccountIdstring or null

A connected Shopify or WooCommerce store account. On commission and smart retainer economics its orders pay commission: required there, and fixed once such a campaign leaves draft.

On any campaign creators can ask for free samples of its products (sampleProductIds). Changing it without sampleProductIds clears the sample products; null removes the store and the products.

sampleProductIdsarray of string, max 64

Product ids in the store that creators can ask a free sample of. Each is read from the store and saved as sampleProducts; an unknown product answers 404 product_not_found. Needs a store, otherwise 400 missing_required_field (param: storeAccountId).

sampleContentDueDaysintegerDefault 14

Days after a sample is approved before a creator with no post since shows as owing content.

Headers

Optional
Idempotency-Keystring, max 255

Optional client-generated unique key (e.g. a UUID) that makes retries safe.

  • Same key + same body: replays the original response.
  • Same key + different body: 422.
  • Key still processing: 409.

A request cut off mid-handler (e.g. by a function timeout) can leave its key in progress, answering 409 until the key expires after 24 hours.

On the Ads create, boost and duplicate endpoints, a same-body retry runs again once the cut-off request started more than 15 minutes ago.

Responses

Success· the request worked

Errors· the request failed

Pay creators with one card payment

Pays exactly what is owed to the creators of a `treasury` campaign by charging the billing owner's saved card, with no redirect. Payouts are never paid from your balance. ### How it works 1. Every payable creator who finished payout setup (or only `participantIds`, minus `excludeParticipantIds`) is held in `settling`. 2. The saved card (the default one, or `paymentMethodId`) pays one invoice while the payer is present: the payouts, plus the fee (4%, 50 cents minimum per payout) and the VAT on the fee where it applies. 3. Card payments are held 7 days against chargebacks (`releasesAt`). Then each creator gets a transfer funded by the charge, and the batch ends `paid` or `partially_failed`. Zernio collects the payouts and pays each creator on your behalf and in your name, so the payouts carry no VAT. A creator whose payouts were disabled before the hold ended is skipped and stays payable. A charge refunded or disputed during the hold pays nobody: every amount is payable again. Preview the charge with `POST /v1/creator-campaigns/{campaignId}/payout-batches/preview`. ### 3D Secure `payment.status: requires_action` means the bank asked the payer to confirm. Complete it with Stripe.js `handleNextAction({ clientSecret })`, then call `POST /v1/payout-batches/{batchId}/confirm`. One left unfinished is cancelled after 30 minutes and every amount is payable again. Cancel it sooner with `POST /v1/payout-batches/{batchId}/cancel`. ### Limits and errors - 402 `payment_required`: no saved card. Nothing is held. - 402 `card_declined`: the bank's reason; every amount is payable again. - 402: card payouts are limited to $10,000.00 gross per rolling 30 days by default. Over it the call answers "Over your instant payout limit for the last 30 days. Contact support to raise it." - 402: your balance is negative after a dispute or refund. - 400: nothing payable ("Nothing is payable."). - 400 `invalid_billing_address`: Stripe cannot place your billing address, so it cannot tax the fee. Nothing is held. - 429 `payment_attempts_limited`: five card payments were declined in 24 hours. Nothing is held and nothing reaches the bank until `Retry-After` runs out. ### Access and retries Needs an owner, admin or billing admin, signed in or through a full-access key they created. Send an `Idempotency-Key` so a retry never opens a second batch.

Get campaign ad results

What the campaign's posts did as ads: totals, each post with its ads and launches, and the creators ranked by `rankBy`. An ad counts for a post when it was launched from the post, or when it runs the post (a boosted post, the Instagram media it shows, or a TikTok Spark item). Figures come from the ads' daily metrics; money is in the campaign currency, and ads billed in another currency are left out of money figures.

POST/v1/creator-campaigns
import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.creatorcampaigns.createCreatorCampaign({  body: {    profileId: 'profile_abc123',    name: 'Example',    brandName: 'Example',    economics: {      type: 'cpm',      ratePer1kCents: 1,      minViewsToEarn: 0,      budgetCents: 0,    },  },});console.log(data);
{  "campaign": {    "id": "string",    "userId": "string",    "profileId": "string",    "kind": "string",    "name": "string",    "brandName": "string",    "status": "draft",    "type": "cpm",    "currency": "string",    "platforms": [      "tiktok"    ],    "contentRules": "string",    "startsAt": "2019-08-24T14:15:22Z",    "endsAt": "2019-08-24T14:15:22Z",    "trackingDays": 0,    "holdDays": 0,    "maxPostAgeMinutes": 0,    "activatedAt": "2019-08-24T14:15:22Z",    "settlement": "none",    "economics": {      "type": "cpm",      "metric": "views",      "engagementTypes": [        "likes"      ],      "organicViewsOnly": false,      "ratePer1kCents": 1,      "minViewsToEarn": 0,      "maxPayoutPerClipCents": 1,      "budgetCents": 0    },    "caps": {      "maxParticipants": 1,      "maxSubmissionsPerParticipantPerDay": 1,      "maxAccountsPerParticipant": 1,      "maxXReadSpendCents": 1,      "authenticityThreshold": 0    },    "branding": {      "brandName": "string",      "primaryColor": "string",      "logoUrl": "string",      "theme": {}    },    "budgetExhaustedAt": "2019-08-24T14:15:22Z",    "closedAt": "2019-08-24T14:15:22Z",    "payableScannedAt": "2019-08-24T14:15:22Z",    "joinApproval": "auto",    "requireDraftApproval": true,    "storeAccountId": "string",    "sampleProducts": [      {        "productId": "string",        "title": "string",        "imageUrl": "string",        "variants": [          {            "id": "string",            "title": "string"          }        ]      }    ],    "sampleContentDueDays": 1,    "createdAt": "2019-08-24T14:15:22Z",    "updatedAt": "2019-08-24T14:15:22Z",    "hasOpenInvite": true,    "consumedCents": 0,    "participantCount": 0,    "submissionCounts": {      "received": 0,      "tracking": 0,      "pending_review": 0,      "approved": 0,      "rejected": 0,      "expired": 0,      "withdrawn": 0    },    "payableCents": 0,    "landingUrl": "string",    "codeDiscountPercent": 0,    "autoPayout": {      "enabled": true,      "cadence": "weekly"    },    "pendingParticipantCount": 0,    "draftCounts": {      "submitted": 0,      "approved": 0,      "revision_requested": 0,      "rejected": 0    },    "sampleCounts": {      "pending": 0,      "approved": 0,      "shipped": 0,      "declined": 0    }  }}
OpenAPI specification
Was this page helpful?