Run approved submissions as ads on the brand's own ad accounts, and see what each creator's work drives. Connect an ad account first with a connection.
Create a campaign
A campaign runs on one Meta, TikTok, Google or Snapchat connection. Its creatives are approved submissions, and their creators earn what their program pays. This one spends $50 a day:
{
"name": "Spring launch – Meta",
"connection": "conn_02PEZI7pHWLT3UpakbRmfNB",
"destination": { "type": "website", "value": "https://acme.com/spring" },
"budget": { "daily": 5000 },
"schedule": { "startDate": "2026-10-10" },
"audience": { "countries": ["US"], "ageMin": 21 },
"creatives": ["sub_14XA4WGiSOmaVI3B4QLm4Fs"],
"ad": { "primaryText": "Made for spring.", "callToAction": "shop_now" }
}
Lucra sets the campaign up on the ad platform right away; it's processing until that's done. By default it then turns on. Send "launch": false to leave it paused, or scheduledLaunchAt to turn it on later.
Change its status to live, paused or archived with PATCH /v1/campaigns/:id. Webhooks report when publishing finishes (campaign.published) or needs attention.
How creators are credited
When creators earn a share of revenue or a fixed amount per lead, attribution sets what counts. lucra counts your Lucra Pixel's matches of one conversion from each ad's link; platform counts what the ad platform reports. New campaigns default to lucra when your pixel is verified and the destination is a website:
{ "attribution": { "source": "lucra", "conversion": "conv_1fK7pQ2wXy9LmN4bVc8RtZa" } }
Leave out conversion to use an active purchase (revenue share) or lead (per lead) conversion; Lucra creates one if you have none. It can't change once the campaign is on its ad platform. Ad-spend pay always counts the platform's spend.
Ad defaults
PATCH /v1/ad-defaults sets what new campaigns start with: objective, Meta Advantage+ audience, naming and tracking.
Tracking
tracking sets click tracking on a campaign: urlParameters on every platform, a Google trackingUrlTemplate, and TikTok click and impression trackers. You can change it on a live campaign.
Every ad's link also carries lucra_id (its video) and lucra_campaign (the campaign), which the Lucra Pixel reads; Lucra sets them, replacing any already in the URL.
Boost an existing TikTok post
Run a post that's already on TikTok as a Spark Ad, with no upload. Add it to the brand's library with POST /v1/submissions, by the creator's Spark code, the post's full link, or both:
{ "post": { "connection": "conn_02PEZI7pHWLT3UpakbRmfNB", "sparkCode": "#Abc123…" } }
With a code, the post is ready at once: its existingPost.ready is true and existingPost.authorizedUntil says when the code ends. Then put its sub_ ID in a TikTok campaign's creatives, on the same connection. A campaign runs either existing posts or uploaded videos, and existing posts run only on TikTok.
With just a link, Lucra asks the creator for a code. The submission's adAuthorization is the request (platform: "tiktok"). Read it with GET /v1/ad-authorizations/:id for its requestUrl: send that link to the creator, who pastes their code there, with no Lucra account needed. A creator who connected that TikTok account to Lucra also gets the request in the app. When the code arrives, you get ad_authorization.granted and the post is ready. If the creator sends you the code instead, send it with POST /v1/submissions again, or PATCH /v1/ad-authorizations/:id with { "status": "granted", "sparkCode": "…" }.
Three days before a code ends, Lucra asks the creator for a new one and sends ad_authorization.requested. An existing post never pays its creator through Lucra: it isn't part of a program.
Ad sets and ads
GET /v1/ad-sets and GET /v1/ads list what's running. PATCH renames, pauses, resumes or archives them. Meta and TikTok ad sets also take bidding and audience, including saved audiences (GET /v1/ad-audiences) and interests (GET /v1/ad-interests). Copy a campaign, ad set or ad with POST …/copies.
Ad fields
GET /v1/ad-fields lists every setting each platform takes, with the platform's own name and docs.
Run as the creator
To run a submission as a Meta Partnership Ad under the creator's own account, request an authorization with POST /v1/ad-authorizations. The creator grants it, and you get ad_authorization.granted. On TikTok, a campaign with identity: "creator" runs under the creator's whole account, which they approve once to your Business Center; until they have, the campaign save answers 422 saying what's missing.
Ads Lucra didn't launch
Lucra also reads back the other ads in each connected ad account: the last 90 days on the first 30-minute sync after the account connects, then on every sync like Lucra's own. List them with GET /v1/ads?source=external: each has source: "external", its platform ID, and its campaign and ad set on the platform (platformCampaign, platformAdSet). They're read-only, and they're never billed, settled or paid out. Their status is unknown: Lucra reports their results, not their state.
Analytics
GET /v1/analytics returns daily spend, revenue, clicks, conversions and paidViews between from and to. Paid views are each platform's own video view count: Meta's 3-second views, TikTok's video plays, Snapchat's 2-second views and Google's TrueView views. Split each day with group, by campaign, submission, creator, ad or platform. source=external reads the ads Lucra didn't launch instead, and source=all both:
const { data } = await lucra.analytics.retrieve({
query: { from: "2026-10-01", to: "2026-10-07", group: "creator" },
})
Endpoints
/v1/analyticsGet daily ad results, or creators' organic results, optionally filtered and split by campaign, submission, creator, ad or platform; as a creator, your own work's ad results across brands
const { data } = await lucra.analytics.retrieve({
query: { from: "…", to: "…" },
})Query parameters
fromstring· requiredtostring· requiredmodeenumpaid: ad results. organic: creators' own posts' views and engagement, for the last 90 days at most.
paidorganiccampaigncamp_…submissionsub_…programprog_…creatorcrtr_…platformenummetatiktokgooglesnapchatinstagramsourceenumPaid results of: lucra, the ads Lucra launched (the default); external, the other ads in your connected ad accounts (no campaign, submission or creator, and no usage fees); or all of them.
lucraexternalallgroupstringSplit each day by campaign, submission (the creative), creator, ad and/or platform, e.g. group=campaign,submission.
/v1/campaignsCreate and launch a campaign
const { data } = await lucra.campaigns.create({
body: { name: "…", destination: {}, budget: {} },
})Body
namestring· requiredobjectiveenumDefaults to the account's (GET /v1/ad-defaults), conversions unless set.
conversionstrafficawarenessdestinationobject· requiredShow 2 child fieldsHide child fields
typestring· requiredvaluestring
budgetobject· requiredbillingLimitintegerStop spending once the campaign has spent this much, in cents.
scheduleobject· requiredShow 2 child fieldsHide child fields
startDatestring· requiredendDatestring
scheduledLaunchAtstringnullableTurn the campaign on by itself at this time; null cancels. Until then it stays paused, and a create with a future time doesn't launch now.
audienceobjectShow 5 child fieldsHide child fields
countriesenum[]USCAGBAUNZATBECZDKFIFRDEGRHUIEITNLNOPLPTROESSECHBRMXJPKRSGZASAAEageMinintegerageMaxintegergenderenumallfemalemaleexpandbooleanMeta: let it reach people beyond this audience when it expects better results (Advantage+ audience).
creativessub_…[]· requiredadSetsobject[]How the creatives are split into ad sets; by default one ad per creative, packed into as few ad sets as the platform allows.
Show 4 child fieldsHide child fields
idadset_…An
adset_ID from the campaign'sadSets, to keep that ad set across edits; omit to add one.namestringbudgetSharenumberIts share of the campaign budget, in percent; shares add up to 100.
adsobject[]· requiredShow 3 child fieldsHide child fields
idad_…An
ad_ID from the ad set'sads, to keep it.creativesub_…· requirednamestring
adobject· requiredShow 3 child fieldsHide child fields
primaryTextstring· requiredcallToActionenum· requiredbook_nowcontact_usdownloadlearn_moreshop_nowsign_upsubscribeheadlinestring
optimizationEventenuminstallpurchasesubscriptiontrial_startinitiate_checkoutadd_to_cartview_contentcomplete_registrationleadcontactsettingsobjectShow 10 child fieldsHide child fields
pixelstringMeta, TikTok or Snapchat pixel ID in that platform's own format.
conversionstringMeta custom conversion ID, or Google conversion action resource name.
conversionGoalstringGoogle custom conversion goal resource name.
revenueConversionstringGoogle conversion action that reports revenue, for revenue-share campaigns.
appstringMeta or TikTok registered app ID, for app store destinations.
logostringGoogle: square logo asset resource name and business name, for website destinations.
businessNamestringtargetCpaintegerGoogle app campaigns: target cost per action in cents.
locationsstring[]TikTok location IDs.
budgetOptimizationenumTikTok only: ad_set (the default) gives each ad set its share of the budget; campaign lets TikTok's campaign budget optimization move one campaign budget (at least $20) between ad sets, ignoring the split. Fixed once the campaign is set up on TikTok.
ad_setcampaign
trackingobjectShow 4 child fieldsHide child fields
urlParametersstringAdded to every click's landing page: Meta's URL parameters, Google's final URL suffix, appended to TikTok's landing page.
trackingUrlTemplatestringGoogle: the tracking template clicks go through.
clickTrackingUrlstringTikTok campaigns set up before Smart+ only (Smart+ ads have no trackers): your measurement partner's click tracker.
impressionTrackingUrlstringTikTok campaigns set up before Smart+ only: your measurement partner's impression tracker.
attributionobjectHow creators' revenue-share or per-lead pay is counted: the ad platform's reported results (platform) or your Lucra pixel's conversions from the ad's link (lucra; the default when your pixel is verified and the destination is a website). Fixed once the campaign is on its ad platform; ad-spend pay is always platform.
Show 2 child fieldsHide child fields
sourceenum· requiredplatformlucraconversionconv_…With lucra: the
conv_whose matches count (GET /v1/conversions). Defaults to an active purchase (revenue pay) or lead (per-lead pay) conversion, created if you have none.
connectionconn_…· requiredidentityenumRun ads under the brand's identity (default) or the creator's.
brandcreatorlaunchbooleanEvery new campaign is set up on its ad platform right away, paused (status processing until done). launch (the default) also turns it on; false, or a future
scheduledLaunchAt, leaves it paused.
Response20129 fieldsShow
idcamp_…namestringstatusenumprocessing while it's set up or changed on the ad platform; in_review while the platform reviews its ads; then live or paused as the platform reports.
draftprocessingin_reviewlivepausedneeds_attentionarchivedobjectiveenumconversionsawarenesstrafficengagementleadsapp_promotionsalesconnectionconn_…nullableplatformstringnullabledestinationobjectShow 2 child fieldsHide child fields
typeenumwebsitemobile_appios_app_storegoogle_playdeep_linkvaluestringnullable
budgetobjectIn cents.
currencystringLowercase ISO 4217 code, e.g. usd.
scheduleobjectShow 2 child fieldsHide child fields
startDatestringendDatestringnullable
scheduledLaunchAtstringnullableaudienceobjectShow 5 child fieldsHide child fields
countriesenum[]USCAGBAUNZATBECZDKFIFRDEGRHUIEITNLNOPLPTROESSECHBRMXJPKRSGZASAAEageMinnumbernullableageMaxnumbernullablegenderenumnullableallfemalemaleexpandboolean
adobjectShow 3 child fieldsHide child fields
primaryTextstringnullablecallToActionenumnullablebook_nowcontact_usdownloadlearn_moreshop_nowsign_upsubscribeheadlinestringnullable
optimizationEventenumnullableinstallpurchasesubscriptiontrial_startinitiate_checkoutadd_to_cartview_contentcomplete_registrationleadcontactsettingsanytrackinganyidentityenumbrandcreatorcreativessub_…[]adSetsobject[]The campaign's ad sets as planned: each one's share of the budget and its ads. Names can use {{variables}}.
Show 4 child fieldsHide child fields
idadset_…namestringbudgetSharenumberIn percent.
adsobject[]Show 3 child fieldsHide child fields
idad_…creativesub_…namestring
billingLimitnumbernullableThe campaign stops spending at this amount, in cents.
creatorPayobjectWhat creators earn, as their programs' pay set it when the campaign was saved.
Show 5 child fieldsHide child fields
modelenumad_spendattributed_revenueleadcreatorSharenumbernullableThe creator's share of spend or revenue, in percent.
leadAmountintegernullableWhat a creator earns per lead, in cents.
capintegernullableThe most a creator earns from the campaign, in cents.
revenueEventstringnullable
attributionobjectHow creator pay is counted: the ad platform's results (platform) or the Lucra pixel's matches of
conversion(lucra).Show 2 child fieldsHide child fields
sourceenumplatformlucraconversionconv_…nullable
platformsobject[]How each ad platform reports the campaign.
Show 3 child fieldsHide child fields
platformstringstatusstringerrorstringnullable
pendingChangeobjectnullableA change still settling: waiting for the brand's approval (PATCH
pendingChange: "approved"), or running on the ad platforms.Show 2 child fieldsHide child fields
actionstringstatusenumawaiting_approvalin_progress
partnerApprovalobjectnullableShow 4 child fieldsHide child fields
statusenumdraftpendingapprovedrejectedchanges_requestednotestringnullablerequestedAtstringnullablereviewedAtstringnullable
createdByPartneracct_…nullableversionintegerSend it back on PATCH to reject edits based on a stale read.
createdAtstringupdatedAtstring
/v1/campaigns/:id/copiesCopy a campaign with its ad sets and ads, as a new campaign
const { data } = await lucra.campaigns.copies.create({
path: { id: "camp_…" },
body: { name: "…" },
})Path parameters
idcamp_…· required
Body
namestringDefaults to the source's name with " (copy)".
launchbooleanTurn the copy on once it's set up, or (default) leave it paused on the platform, to launch with PATCH status "live".
Response20129 fieldsShow
idcamp_…namestringstatusenumprocessing while it's set up or changed on the ad platform; in_review while the platform reviews its ads; then live or paused as the platform reports.
draftprocessingin_reviewlivepausedneeds_attentionarchivedobjectiveenumconversionsawarenesstrafficengagementleadsapp_promotionsalesconnectionconn_…nullableplatformstringnullabledestinationobjectShow 2 child fieldsHide child fields
typeenumwebsitemobile_appios_app_storegoogle_playdeep_linkvaluestringnullable
budgetobjectIn cents.
currencystringLowercase ISO 4217 code, e.g. usd.
scheduleobjectShow 2 child fieldsHide child fields
startDatestringendDatestringnullable
scheduledLaunchAtstringnullableaudienceobjectShow 5 child fieldsHide child fields
countriesenum[]USCAGBAUNZATBECZDKFIFRDEGRHUIEITNLNOPLPTROESSECHBRMXJPKRSGZASAAEageMinnumbernullableageMaxnumbernullablegenderenumnullableallfemalemaleexpandboolean
adobjectShow 3 child fieldsHide child fields
primaryTextstringnullablecallToActionenumnullablebook_nowcontact_usdownloadlearn_moreshop_nowsign_upsubscribeheadlinestringnullable
optimizationEventenumnullableinstallpurchasesubscriptiontrial_startinitiate_checkoutadd_to_cartview_contentcomplete_registrationleadcontactsettingsanytrackinganyidentityenumbrandcreatorcreativessub_…[]adSetsobject[]The campaign's ad sets as planned: each one's share of the budget and its ads. Names can use {{variables}}.
Show 4 child fieldsHide child fields
idadset_…namestringbudgetSharenumberIn percent.
adsobject[]Show 3 child fieldsHide child fields
idad_…creativesub_…namestring
billingLimitnumbernullableThe campaign stops spending at this amount, in cents.
creatorPayobjectWhat creators earn, as their programs' pay set it when the campaign was saved.
Show 5 child fieldsHide child fields
modelenumad_spendattributed_revenueleadcreatorSharenumbernullableThe creator's share of spend or revenue, in percent.
leadAmountintegernullableWhat a creator earns per lead, in cents.
capintegernullableThe most a creator earns from the campaign, in cents.
revenueEventstringnullable
attributionobjectHow creator pay is counted: the ad platform's results (platform) or the Lucra pixel's matches of
conversion(lucra).Show 2 child fieldsHide child fields
sourceenumplatformlucraconversionconv_…nullable
platformsobject[]How each ad platform reports the campaign.
Show 3 child fieldsHide child fields
platformstringstatusstringerrorstringnullable
pendingChangeobjectnullableA change still settling: waiting for the brand's approval (PATCH
pendingChange: "approved"), or running on the ad platforms.Show 2 child fieldsHide child fields
actionstringstatusenumawaiting_approvalin_progress
partnerApprovalobjectnullableShow 4 child fieldsHide child fields
statusenumdraftpendingapprovedrejectedchanges_requestednotestringnullablerequestedAtstringnullablereviewedAtstringnullable
createdByPartneracct_…nullableversionintegerSend it back on PATCH to reject edits based on a stale read.
createdAtstringupdatedAtstring
/v1/campaignsList campaigns
const { data } = await lucra.campaigns.list({
query: { status: "draft" },
})Query parameters
statusenumdraftlivepausedneeds_attentionarchivedplatformenummetatiktokgooglesnapchatconnectionconn_…
Plus paging: limit, cursor, createdAfter and createdBefore.
Response200A page of items, 29 fields each, and nextCursorShow
idcamp_…namestringstatusenumprocessing while it's set up or changed on the ad platform; in_review while the platform reviews its ads; then live or paused as the platform reports.
draftprocessingin_reviewlivepausedneeds_attentionarchivedobjectiveenumconversionsawarenesstrafficengagementleadsapp_promotionsalesconnectionconn_…nullableplatformstringnullabledestinationobjectShow 2 child fieldsHide child fields
typeenumwebsitemobile_appios_app_storegoogle_playdeep_linkvaluestringnullable
budgetobjectIn cents.
currencystringLowercase ISO 4217 code, e.g. usd.
scheduleobjectShow 2 child fieldsHide child fields
startDatestringendDatestringnullable
scheduledLaunchAtstringnullableaudienceobjectShow 5 child fieldsHide child fields
countriesenum[]USCAGBAUNZATBECZDKFIFRDEGRHUIEITNLNOPLPTROESSECHBRMXJPKRSGZASAAEageMinnumbernullableageMaxnumbernullablegenderenumnullableallfemalemaleexpandboolean
adobjectShow 3 child fieldsHide child fields
primaryTextstringnullablecallToActionenumnullablebook_nowcontact_usdownloadlearn_moreshop_nowsign_upsubscribeheadlinestringnullable
optimizationEventenumnullableinstallpurchasesubscriptiontrial_startinitiate_checkoutadd_to_cartview_contentcomplete_registrationleadcontactsettingsanytrackinganyidentityenumbrandcreatorcreativessub_…[]adSetsobject[]The campaign's ad sets as planned: each one's share of the budget and its ads. Names can use {{variables}}.
Show 4 child fieldsHide child fields
idadset_…namestringbudgetSharenumberIn percent.
adsobject[]Show 3 child fieldsHide child fields
idad_…creativesub_…namestring
billingLimitnumbernullableThe campaign stops spending at this amount, in cents.
creatorPayobjectWhat creators earn, as their programs' pay set it when the campaign was saved.
Show 5 child fieldsHide child fields
modelenumad_spendattributed_revenueleadcreatorSharenumbernullableThe creator's share of spend or revenue, in percent.
leadAmountintegernullableWhat a creator earns per lead, in cents.
capintegernullableThe most a creator earns from the campaign, in cents.
revenueEventstringnullable
attributionobjectHow creator pay is counted: the ad platform's results (platform) or the Lucra pixel's matches of
conversion(lucra).Show 2 child fieldsHide child fields
sourceenumplatformlucraconversionconv_…nullable
platformsobject[]How each ad platform reports the campaign.
Show 3 child fieldsHide child fields
platformstringstatusstringerrorstringnullable
pendingChangeobjectnullableA change still settling: waiting for the brand's approval (PATCH
pendingChange: "approved"), or running on the ad platforms.Show 2 child fieldsHide child fields
actionstringstatusenumawaiting_approvalin_progress
partnerApprovalobjectnullableShow 4 child fieldsHide child fields
statusenumdraftpendingapprovedrejectedchanges_requestednotestringnullablerequestedAtstringnullablereviewedAtstringnullable
createdByPartneracct_…nullableversionintegerSend it back on PATCH to reject edits based on a stale read.
createdAtstringupdatedAtstring
/v1/campaigns/:idGet a campaign
const { data } = await lucra.campaigns.retrieve({
path: { id: "camp_…" },
})Path parameters
idcamp_…· required
Response20029 fieldsShow
idcamp_…namestringstatusenumprocessing while it's set up or changed on the ad platform; in_review while the platform reviews its ads; then live or paused as the platform reports.
draftprocessingin_reviewlivepausedneeds_attentionarchivedobjectiveenumconversionsawarenesstrafficengagementleadsapp_promotionsalesconnectionconn_…nullableplatformstringnullabledestinationobjectShow 2 child fieldsHide child fields
typeenumwebsitemobile_appios_app_storegoogle_playdeep_linkvaluestringnullable
budgetobjectIn cents.
currencystringLowercase ISO 4217 code, e.g. usd.
scheduleobjectShow 2 child fieldsHide child fields
startDatestringendDatestringnullable
scheduledLaunchAtstringnullableaudienceobjectShow 5 child fieldsHide child fields
countriesenum[]USCAGBAUNZATBECZDKFIFRDEGRHUIEITNLNOPLPTROESSECHBRMXJPKRSGZASAAEageMinnumbernullableageMaxnumbernullablegenderenumnullableallfemalemaleexpandboolean
adobjectShow 3 child fieldsHide child fields
primaryTextstringnullablecallToActionenumnullablebook_nowcontact_usdownloadlearn_moreshop_nowsign_upsubscribeheadlinestringnullable
optimizationEventenumnullableinstallpurchasesubscriptiontrial_startinitiate_checkoutadd_to_cartview_contentcomplete_registrationleadcontactsettingsanytrackinganyidentityenumbrandcreatorcreativessub_…[]adSetsobject[]The campaign's ad sets as planned: each one's share of the budget and its ads. Names can use {{variables}}.
Show 4 child fieldsHide child fields
idadset_…namestringbudgetSharenumberIn percent.
adsobject[]Show 3 child fieldsHide child fields
idad_…creativesub_…namestring
billingLimitnumbernullableThe campaign stops spending at this amount, in cents.
creatorPayobjectWhat creators earn, as their programs' pay set it when the campaign was saved.
Show 5 child fieldsHide child fields
modelenumad_spendattributed_revenueleadcreatorSharenumbernullableThe creator's share of spend or revenue, in percent.
leadAmountintegernullableWhat a creator earns per lead, in cents.
capintegernullableThe most a creator earns from the campaign, in cents.
revenueEventstringnullable
attributionobjectHow creator pay is counted: the ad platform's results (platform) or the Lucra pixel's matches of
conversion(lucra).Show 2 child fieldsHide child fields
sourceenumplatformlucraconversionconv_…nullable
platformsobject[]How each ad platform reports the campaign.
Show 3 child fieldsHide child fields
platformstringstatusstringerrorstringnullable
pendingChangeobjectnullableA change still settling: waiting for the brand's approval (PATCH
pendingChange: "approved"), or running on the ad platforms.Show 2 child fieldsHide child fields
actionstringstatusenumawaiting_approvalin_progress
partnerApprovalobjectnullableShow 4 child fieldsHide child fields
statusenumdraftpendingapprovedrejectedchanges_requestednotestringnullablerequestedAtstringnullablereviewedAtstringnullable
createdByPartneracct_…nullableversionintegerSend it back on PATCH to reject edits based on a stale read.
createdAtstringupdatedAtstring
/v1/campaigns/:idChange a campaign, its ad sets' budgets, or its status: launch, pause, resume, retry or archive
const { data } = await lucra.campaigns.update({
path: { id: "camp_…" },
body: { name: "…" },
})Path parameters
idcamp_…· required
Body
namestringobjectiveenumconversions (default) optimizes for
optimizationEvent; traffic (link clicks) and awareness (reach) run on Meta websites (beta).conversionstrafficawarenessdestinationobjectShow 2 child fieldsHide child fields
typestring· requiredvaluestring
budgetobjectbillingLimitintegerStop spending once the campaign has spent this much, in cents.
scheduleobjectShow 2 child fieldsHide child fields
startDatestring· requiredendDatestring
scheduledLaunchAtstringnullableTurn the campaign on by itself at this time; null cancels. Until then it stays paused, and a create with a future time doesn't launch now.
audienceobjectShow 5 child fieldsHide child fields
countriesenum[]USCAGBAUNZATBECZDKFIFRDEGRHUIEITNLNOPLPTROESSECHBRMXJPKRSGZASAAEageMinintegerageMaxintegergenderenumallfemalemaleexpandbooleanMeta: let it reach people beyond this audience when it expects better results (Advantage+ audience).
creativessub_…[]adSetsobject[]How the creatives are split into ad sets; by default one ad per creative, packed into as few ad sets as the platform allows.
Show 4 child fieldsHide child fields
idadset_…An
adset_ID from the campaign'sadSets, to keep that ad set across edits; omit to add one.namestringbudgetSharenumberIts share of the campaign budget, in percent; shares add up to 100.
adsobject[]· requiredShow 3 child fieldsHide child fields
idad_…An
ad_ID from the ad set'sads, to keep it.creativesub_…· requirednamestring
adobjectShow 3 child fieldsHide child fields
primaryTextstring· requiredcallToActionenum· requiredbook_nowcontact_usdownloadlearn_moreshop_nowsign_upsubscribeheadlinestring
optimizationEventenuminstallpurchasesubscriptiontrial_startinitiate_checkoutadd_to_cartview_contentcomplete_registrationleadcontactsettingsobjectShow 10 child fieldsHide child fields
pixelstringMeta, TikTok or Snapchat pixel ID in that platform's own format.
conversionstringMeta custom conversion ID, or Google conversion action resource name.
conversionGoalstringGoogle custom conversion goal resource name.
revenueConversionstringGoogle conversion action that reports revenue, for revenue-share campaigns.
appstringMeta or TikTok registered app ID, for app store destinations.
logostringGoogle: square logo asset resource name and business name, for website destinations.
businessNamestringtargetCpaintegerGoogle app campaigns: target cost per action in cents.
locationsstring[]TikTok location IDs.
budgetOptimizationenumTikTok only: ad_set (the default) gives each ad set its share of the budget; campaign lets TikTok's campaign budget optimization move one campaign budget (at least $20) between ad sets, ignoring the split. Fixed once the campaign is set up on TikTok.
ad_setcampaign
trackingobjectShow 4 child fieldsHide child fields
urlParametersstringAdded to every click's landing page: Meta's URL parameters, Google's final URL suffix, appended to TikTok's landing page.
trackingUrlTemplatestringGoogle: the tracking template clicks go through.
clickTrackingUrlstringTikTok campaigns set up before Smart+ only (Smart+ ads have no trackers): your measurement partner's click tracker.
impressionTrackingUrlstringTikTok campaigns set up before Smart+ only: your measurement partner's impression tracker.
attributionobjectHow creators' revenue-share or per-lead pay is counted: the ad platform's reported results (platform) or your Lucra pixel's conversions from the ad's link (lucra; the default when your pixel is verified and the destination is a website). Fixed once the campaign is on its ad platform; ad-spend pay is always platform.
Show 2 child fieldsHide child fields
sourceenum· requiredplatformlucraconversionconv_…With lucra: the
conv_whose matches count (GET /v1/conversions). Defaults to an active purchase (revenue pay) or lead (per-lead pay) conversion, created if you have none.
statusenumlive turns a paused campaign on, creating it on its ad platform first if it never was; on a launch that needs attention it retries.
pausedlivearchivedadSetBudgetsobject[]New budgets, in cents, for launched Meta or Snapchat ad sets, by their IDs from the campaign's
adSets(GET /v1/campaigns/:id).Show 2 child fieldsHide child fields
idadset_…· requiredbudgetinteger· required
pendingChangestringAs the brand: approves the change a partner made, which
pendingChangeshows awaiting approval.approvedversioninteger
Response20029 fieldsShow
idcamp_…namestringstatusenumprocessing while it's set up or changed on the ad platform; in_review while the platform reviews its ads; then live or paused as the platform reports.
draftprocessingin_reviewlivepausedneeds_attentionarchivedobjectiveenumconversionsawarenesstrafficengagementleadsapp_promotionsalesconnectionconn_…nullableplatformstringnullabledestinationobjectShow 2 child fieldsHide child fields
typeenumwebsitemobile_appios_app_storegoogle_playdeep_linkvaluestringnullable
budgetobjectIn cents.
currencystringLowercase ISO 4217 code, e.g. usd.
scheduleobjectShow 2 child fieldsHide child fields
startDatestringendDatestringnullable
scheduledLaunchAtstringnullableaudienceobjectShow 5 child fieldsHide child fields
countriesenum[]USCAGBAUNZATBECZDKFIFRDEGRHUIEITNLNOPLPTROESSECHBRMXJPKRSGZASAAEageMinnumbernullableageMaxnumbernullablegenderenumnullableallfemalemaleexpandboolean
adobjectShow 3 child fieldsHide child fields
primaryTextstringnullablecallToActionenumnullablebook_nowcontact_usdownloadlearn_moreshop_nowsign_upsubscribeheadlinestringnullable
optimizationEventenumnullableinstallpurchasesubscriptiontrial_startinitiate_checkoutadd_to_cartview_contentcomplete_registrationleadcontactsettingsanytrackinganyidentityenumbrandcreatorcreativessub_…[]adSetsobject[]The campaign's ad sets as planned: each one's share of the budget and its ads. Names can use {{variables}}.
Show 4 child fieldsHide child fields
idadset_…namestringbudgetSharenumberIn percent.
adsobject[]Show 3 child fieldsHide child fields
idad_…creativesub_…namestring
billingLimitnumbernullableThe campaign stops spending at this amount, in cents.
creatorPayobjectWhat creators earn, as their programs' pay set it when the campaign was saved.
Show 5 child fieldsHide child fields
modelenumad_spendattributed_revenueleadcreatorSharenumbernullableThe creator's share of spend or revenue, in percent.
leadAmountintegernullableWhat a creator earns per lead, in cents.
capintegernullableThe most a creator earns from the campaign, in cents.
revenueEventstringnullable
attributionobjectHow creator pay is counted: the ad platform's results (platform) or the Lucra pixel's matches of
conversion(lucra).Show 2 child fieldsHide child fields
sourceenumplatformlucraconversionconv_…nullable
platformsobject[]How each ad platform reports the campaign.
Show 3 child fieldsHide child fields
platformstringstatusstringerrorstringnullable
pendingChangeobjectnullableA change still settling: waiting for the brand's approval (PATCH
pendingChange: "approved"), or running on the ad platforms.Show 2 child fieldsHide child fields
actionstringstatusenumawaiting_approvalin_progress
partnerApprovalobjectnullableShow 4 child fieldsHide child fields
statusenumdraftpendingapprovedrejectedchanges_requestednotestringnullablerequestedAtstringnullablereviewedAtstringnullable
createdByPartneracct_…nullableversionintegerSend it back on PATCH to reject edits based on a stale read.
createdAtstringupdatedAtstring
/v1/ad-fieldsList the settings each ad platform takes for campaigns, ad sets and ads
const { data } = await lucra.adFields.list({
query: { platform: "meta" },
})Query parameters
platformenumAlso returns the universal settings unless
universal.metatiktokgooglesnapchatuniversalresourceenumcampaignad_setadcreativestatusenumimplementedplannedprovider_gatedread_onlydeprecated
Plus paging: limit, cursor, createdAfter and createdBefore.
/v1/ad-defaultsGet what the account's new campaigns start with
const { data } = await lucra.adDefaults.retrieve()/v1/ad-defaultsChange what the account's new campaigns start with
const { data } = await lucra.adDefaults.update({
body: { objective: "conversions" },
})Body
objectiveenumnullableconversionstrafficawarenessaudienceExpansionbooleannullablenamingobjectShow 2 child fieldsHide child fields
adSetstringnullableadstringnullable
trackingobjectnullableShow 4 child fieldsHide child fields
urlParametersstringAdded to every click's landing page: Meta's URL parameters, Google's final URL suffix, appended to TikTok's landing page.
trackingUrlTemplatestringGoogle: the tracking template clicks go through.
clickTrackingUrlstringTikTok campaigns set up before Smart+ only (Smart+ ads have no trackers): your measurement partner's click tracker.
impressionTrackingUrlstringTikTok campaigns set up before Smart+ only: your measurement partner's impression tracker.
/v1/ad-audiencesList an ad account's saved audiences (Meta custom and lookalike audiences, TikTok audiences)
const { data } = await lucra.adAudiences.list({
query: { connection: "conn_…" },
})Query parameters
connectionconn_…· requiredA Meta or TikTok ad account
conn_from GET /v1/connections.
Plus paging: limit, cursor, createdAfter and createdBefore.
/v1/ad-interestsSearch the interests an ad set can target on Meta or TikTok
const { data } = await lucra.adInterests.list({
query: { connection: "conn_…", q: "…" },
})Query parameters
connectionconn_…· requiredA Meta or TikTok ad account
conn_from GET /v1/connections.qstring· requiredWhat to search for, e.g. running.
Plus paging: limit, cursor, createdAfter and createdBefore.
/v1/ad-setsList ad sets (Meta ad sets, TikTok and Google ad groups, Snapchat ad squads)
const { data } = await lucra.adSets.list({
query: { campaign: "camp_…" },
})Query parameters
campaigncamp_…platformenummetatiktokgooglesnapchatstatusenumdraftactivepausedarchiveddeletedunknown
Plus paging: limit, cursor, createdAfter and createdBefore.
/v1/ad-sets/:idGet an ad set
const { data } = await lucra.adSets.retrieve({
path: { id: "…" },
})Path parameters
idstring· required
/v1/ad-sets/:idRename, pause, resume, archive or re-budget an ad set on its platform
const { data } = await lucra.adSets.update({
path: { id: "…" },
body: { name: "…" },
})Path parameters
idstring· required
Body
namestringstatusenumactive resumes it, paused pauses it, archived stops and archives it.
activepausedarchivedbudgetobjectIn cents. Meta ad sets only: TikTok and Google budgets live on the campaign.
biddinganyMeta and TikTok ad sets (beta).
audienceanyMeta and TikTok ad sets (beta).
/v1/ad-sets/:id/copiesCopy an ad set (and run it paused) in its campaign or another one
const { data } = await lucra.adSets.copies.create({
path: { id: "…" },
body: { name: "…" },
})Path parameters
idstring· required
Body
namestringDefaults to the source's name with " (copy)".
intocamp_…Another launched campaign on the same ad account; defaults to the source's own.
Response2021 fieldsShow
idstringThe copy's ID; it reads back from GET once the platform confirms it.
/v1/adsList ads: the ones Lucra launched, or with source=external the other ads in your connected ad accounts
const { data } = await lucra.ads.list({
query: { campaign: "camp_…" },
})Query parameters
campaigncamp_…platformenummetatiktokgooglesnapchatstatusenumdraftactivepausedarchiveddeletedunknownadSetadset_…sourceenumlucra: ads Lucra campaigns launched (the default). external: the other ads in your connected ad accounts, read back for reporting (the last 90 days on connecting, then kept current).
lucraexternal
Plus paging: limit, cursor, createdAfter and createdBefore.
/v1/ads/:idGet an ad
const { data } = await lucra.ads.retrieve({
path: { id: "…" },
})Path parameters
idstring· required
/v1/ads/:idRename, pause, resume or archive an ad on its platform
const { data } = await lucra.ads.update({
path: { id: "…" },
body: { name: "…" },
})Path parameters
idstring· required
Body
namestringstatusenumactive resumes it, paused pauses it, archived stops and archives it.
activepausedarchived
/v1/ads/:id/copiesCopy an ad (and run it paused) in its ad set or another one
const { data } = await lucra.ads.copies.create({
path: { id: "…" },
body: { name: "…" },
})Path parameters
idstring· required
Body
namestringDefaults to the source's name with " (copy)".
intoadset_…Another launched ad set on the same ad account; defaults to the source's own.
Response2021 fieldsShow
idstringThe copy's ID; it reads back from GET once the platform confirms it.
/v1/ad-authorizationsList ad authorizations: a brand's requests, or, as a creator, the ones asked of you
const { data } = await lucra.adAuthorizations.list({
query: { submission: "sub_…" },
})Query parameters
submissionsub_…platformenummetatiktokstatusstringOne or more, comma-separated: requested, granted, revoked, expired.
Plus paging: limit, cursor, createdAfter and createdBefore.
Response200A page of items, 16 fields each, and nextCursorShow
idadauth_…submissionsub_…creatorcrtr_…nullableaccountacct_…The brand that asks.
brandNamestringplatformenummetatiktokstatusenumrequested by the brand, granted by the creator, revoked by either; expired once
expiresAtpasses.requestedgrantedrevokedexpiredhandlestringnullableOn TikTok, the handle of the post's creator.
postobjectnullableOn TikTok, the post the brand wants to run.
Show 4 child fieldsHide child fields
urlstringnullablehandlestringnullablecaptionstringnullablethumbnailUrlstringnullableTikTok's poster image; it expires, so read the authorization again for a fresh one.
requestUrlstringnullableOn TikTok, a link the creator opens, without a Lucra account, to send their Spark code.
authorizedAtstringnullableexpiresAtstringnullableWhen the creator's authorization (on TikTok, their Spark code) ends.
revokedAtstringnullableversionintegerSend it back on PATCH to reject edits based on a stale read.
createdAtstringupdatedAtstring
/v1/ad-authorizations/:idGet an ad authorization
const { data } = await lucra.adAuthorizations.retrieve({
path: { id: "adauth_…" },
})Path parameters
idadauth_…· required
Response20016 fieldsShow
idadauth_…submissionsub_…creatorcrtr_…nullableaccountacct_…The brand that asks.
brandNamestringplatformenummetatiktokstatusenumrequested by the brand, granted by the creator, revoked by either; expired once
expiresAtpasses.requestedgrantedrevokedexpiredhandlestringnullableOn TikTok, the handle of the post's creator.
postobjectnullableOn TikTok, the post the brand wants to run.
Show 4 child fieldsHide child fields
urlstringnullablehandlestringnullablecaptionstringnullablethumbnailUrlstringnullableTikTok's poster image; it expires, so read the authorization again for a fresh one.
requestUrlstringnullableOn TikTok, a link the creator opens, without a Lucra account, to send their Spark code.
authorizedAtstringnullableexpiresAtstringnullableWhen the creator's authorization (on TikTok, their Spark code) ends.
revokedAtstringnullableversionintegerSend it back on PATCH to reject edits based on a stale read.
createdAtstringupdatedAtstring
/v1/ad-authorizationsAsk a submission's creator to authorize it as a Meta partnership ad, or an existing TikTok post's creator for a Spark code
const { data } = await lucra.adAuthorizations.create({
body: { submission: "sub_…", platform: "meta" },
})Body
submissionsub_…· requiredAn approved submission of a creator, or on TikTok an existing post in your library.
platformenum· requiredmetatiktok
Response20116 fieldsShow
idadauth_…submissionsub_…creatorcrtr_…nullableaccountacct_…The brand that asks.
brandNamestringplatformenummetatiktokstatusenumrequested by the brand, granted by the creator, revoked by either; expired once
expiresAtpasses.requestedgrantedrevokedexpiredhandlestringnullableOn TikTok, the handle of the post's creator.
postobjectnullableOn TikTok, the post the brand wants to run.
Show 4 child fieldsHide child fields
urlstringnullablehandlestringnullablecaptionstringnullablethumbnailUrlstringnullableTikTok's poster image; it expires, so read the authorization again for a fresh one.
requestUrlstringnullableOn TikTok, a link the creator opens, without a Lucra account, to send their Spark code.
authorizedAtstringnullableexpiresAtstringnullableWhen the creator's authorization (on TikTok, their Spark code) ends.
revokedAtstringnullableversionintegerSend it back on PATCH to reject edits based on a stale read.
createdAtstringupdatedAtstring
/v1/ad-authorizations/:idGrant an ad authorization as its creator (on TikTok, with the post's Spark code), or revoke it
const { data } = await lucra.adAuthorizations.update({
path: { id: "adauth_…" },
body: { status: "granted" },
})Path parameters
idadauth_…· required
Body
statusenum· requiredgrantedrevokedsparkCodestringOn TikTok, with granted: the Spark code the creator made for the post. The brand may send one the creator gave them too. A new code renews an expired authorization.
expiresAtstringOn Meta, with granted: when the creator's authorization ends, as they set it on the platform.
versioninteger
Response20016 fieldsShow
idadauth_…submissionsub_…creatorcrtr_…nullableaccountacct_…The brand that asks.
brandNamestringplatformenummetatiktokstatusenumrequested by the brand, granted by the creator, revoked by either; expired once
expiresAtpasses.requestedgrantedrevokedexpiredhandlestringnullableOn TikTok, the handle of the post's creator.
postobjectnullableOn TikTok, the post the brand wants to run.
Show 4 child fieldsHide child fields
urlstringnullablehandlestringnullablecaptionstringnullablethumbnailUrlstringnullableTikTok's poster image; it expires, so read the authorization again for a fresh one.
requestUrlstringnullableOn TikTok, a link the creator opens, without a Lucra account, to send their Spark code.
authorizedAtstringnullableexpiresAtstringnullableWhen the creator's authorization (on TikTok, their Spark code) ends.
revokedAtstringnullableversionintegerSend it back on PATCH to reject edits based on a stale read.
createdAtstringupdatedAtstring