OverviewProductsPlatformsAPI ReferenceResources
Creator Campaigns

Update creator campaign

PATCHhttps://zernio.com/api/v1/creator-campaigns/{campaignId}

Updates any subset of the campaign's settings. economics (and with it the campaign type) can only change while the campaign is a draft; afterwards that answers 409, and a live campaign's budget is raised with POST /v1/creator-campaigns/{campaignId}/budget. An empty body answers 400.

Authentication

AuthorizationBearer tokenRequired

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

Path parameters

campaignIdstringRequired

Campaign ID.

Body

application/json
Optional parameters21 fields
namestring, max 200
brandNamestring, max 200
platformsarray of strings
contentRulesstring or null, max 10000
startsAtstring or null (date-time)
endsAtstring or null (date-time)
trackingDaysinteger
holdDaysinteger
maxPostAgeMinutesinteger or null

Null removes the limit.

settlementstringOne of none | external | treasury
economicsone of 6 types

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.
capsCreatorCampaignCaps
authenticityThresholdnumberRequired

A submission whose authenticity score falls below this is flagged low_authenticity. It is never rejected automatically. Defaults to 40 on create.

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.

joinApprovalstringOne of auto | manual

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

requireDraftApprovalboolean

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).

sampleContentDueDaysinteger

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

Responses

Success· the request worked

Errors· the request failed

PATCH/v1/creator-campaigns/{campaignId}
import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.creatorcampaigns.updateCreatorCampaign({  path: {    campaignId: 'campaign_abc123',  },  body: {    name: 'Example',    brandName: 'Example',    platforms: [      'tiktok',    ],  },});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?