OverviewProductsPlatformsAPI ReferenceResources
Migrations

Migrate from LinkedIn Ads

Every LinkedIn Marketing API ads call you make today, the Zernio endpoint that replaces it and the fields to send, plus the calls with no Zernio equivalent.


Each table maps a LinkedIn Marketing API call to the Zernio endpoint that does the same job, with the fields to send.

Read the first two tables before migrating any call. Every row below assumes them.

Rules for every call

TopicLinkedIn Marketing APIZernio
Base URLhttps://api.linkedin.com/rest/...https://zernio.com/api/v1/...
AuthOAuth token with rw_ads, r_ads, r_ads_reporting, rw_conversions, r_marketing_leadgen_automation, rw_dmp_segmentsAuthorization: Bearer YOUR_ZERNIO_API_KEY only. Zernio holds the LinkedIn token and its scopes
HeadersLinkedin-Version: YYYYMM, X-Restli-Protocol-Version: 2.0.0None. Zernio sends them and moves the version
UpdatesPOST with X-RestLi-Method: PARTIAL_UPDATE and {"patch": {"$set": {...}}}PUT or PATCH with the fields to change
BatchesBATCH_CREATE, BATCH_PARTIAL_UPDATE with ids=List(...)One call per object, except POST /v1/ads/campaigns/bulk-status and conversion events
URNsEncoded URNs in queries and bodies (urn%3Ali%3AsponsoredCampaign%3A123)Plain numeric ids in paths and bodies (123). See the ids table
Money{"amount": "50.00", "currencyCode": "USD"}Create: budgetAmount: 50 and budgetType (daily or lifetime). Updates: budget: {amount: 50, type: "daily"}. Whole units of the ad account's currency
Status on status endpointsACTIVE, PAUSED; creatives use intendedStatusactive, paused (lowercase) on every /status endpoint
Status on create bodiesACTIVE, PAUSED, DRAFTACTIVE, PAUSED on POST /v1/ads/create
DeleteDELETE on drafts, PENDING_DELETION otherwiseDELETE on the resource; Zernio picks the right one
Several objects in one requestGroup, campaign, post and creative as separate callsPOST /v1/ads/create builds them all in one call
PaginationpageSize and pageToken, or start and countpage and limit on synced lists; cursor or after where an endpoint says so
ReadsAlways live/v1/ads, /v1/ads/campaigns, /v1/ads/ad-sets, /v1/ads/tree and /v1/ads/performance read Zernio's synced copy. Accounts, audiences, leads, forms, targeting, conversions, tags and analytics breakdowns are live
Rate limitsPer app and per member, shown in the Developer PortalLinkedIn's own limits still apply; Zernio retries a 429 three times before returning it

Ids

WhatLinkedIn Marketing APIZernio
ConnectionYour OAuth tokenaccountId: connect with GET /v1/connect/{platform}/ads, platform set to linkedin and profileId. The connection has platform linkedinads in GET /v1/accounts
Posting connectionA member or Page tokenThe linkedin account that posts to the Company Page. POST /v1/ads/boost takes this one, not the linkedinads one
Ad accounturn:li:sponsoredAccount:507404993adAccountId = 507404993. List with GET /v1/ads/accounts?accountId=... (accounts[].id)
Campaign groupurn:li:sponsoredCampaignGroup:111campaignId = 111. A Zernio campaign is a LinkedIn campaign group and has no Zernio id
Campaignurn:li:sponsoredCampaign:222adSetId = 222. A Zernio ad set is a LinkedIn campaign
Creativeurn:li:sponsoredCreative:333adId = Zernio's ad _id, or 333 once synced. GET /v1/ads/{adId}/analytics needs the _id. Find it with GET /v1/ads?accountId=...&platformAdId=333
Matched audienceurn:li:dmpSegment:444 or urn:li:adSegment:555In targeting: audienceInclude, audienceExclude take the LinkedIn id or URN. On audience endpoints: audienceId = Zernio's id
Lead formurn:li:leadGenForm:666formId and leadGenFormId = 666
Conversion ruleurn:lla:llaPartnerConversion:777destinationId = 777
Insight Tagurn:tscp:insightTag:888tagId = the tag's partner id
Platform filter on ads endpointsplatform=linkedin

Campaign group and campaign endpoints find the ad account through ads Zernio has synced. A group or campaign with no synced creatives returns 404 or 409, except on DELETE with accountId.

Accounts

LinkedIn Marketing APIZernioSendWatch out
3-legged OAuthGET /v1/connect/{platform}/ads with linkedinprofileIdReuses the profile's LinkedIn token when it has one, otherwise returns authUrl
GET /rest/adAccounts?q=search, GET /rest/adAccountUsers?q=authenticatedUserGET /v1/ads/accountsaccountId, optional adAccountId, limit up to 1000, inScopeOnlyLive. Active ad accounts only

Campaign groups

LinkedIn Marketing APIZernioSendWatch out
GET /rest/adAccounts/{id}/adCampaignGroups?q=searchGET /v1/ads/campaignsaccountId, adAccountId, platform=linkedin, campaignId, page, limit up to 100. Add live=true for live statusSynced copy. Groups with no creatives are not listed
POST /rest/adAccounts/{id}/adCampaignGroupsPOST /v1/ads/campaignsaccountId, adAccountId, name, goalCreated as a draft with no budget. Fill it with POST /v1/ads/create and existingCampaignId
Partial update statusPUT /v1/ads/campaigns/{campaignId}/statusstatus: active or pausedReturns updated or skipped
BATCH_PARTIAL_UPDATE on statusPOST /v1/ads/campaigns/bulk-statusstatus, campaigns: [{platformCampaignId, platform: "linkedin"}], up to 50
Partial update name, totalBudget, dailyBudgetPUT /v1/ads/campaigns/{campaignId}name, budget: {amount, type}A lifetime budget needs an end date on the group. A daily budget needs dynamic budget optimization on the group
DELETE (draft) or status: PENDING_DELETIONDELETE /v1/ads/campaigns/{campaignId}accountId when Zernio holds no ads for itIts ads are marked cancelled
No native copyPOST /v1/ads/campaigns/{campaignId}/duplicatestatusOption (PAUSED, ACTIVE, INHERITED_FROM_SOURCE), renameStrategy, renamePrefix, renameSuffix, startTime, endTimeReturns copiedCampaignId, adSetIdMap, adIdMap

Campaigns

LinkedIn Marketing APIZernioSendWatch out
GET /rest/adAccounts/{id}/adCampaigns?q=searchGET /v1/ads/ad-setsaccountId, adAccountId, platform=linkedin, campaignId, page, limit up to 500. Add live=true for live statusSynced copy, with targeting, budget, bidAmount, optimizationGoal
POST /rest/adAccounts/{id}/adCampaignsPOST /v1/ads/createSee creating adsCreated together with its first creative. POST /v1/ads/ad-sets returns 501
Partial update statusPUT /v1/ads/ad-sets/{adSetId}/statusstatus: active or paused
Partial update name, dailyBudget, totalBudgetPUT /v1/ads/ad-sets/{adSetId}name, budget: {amount, type}
Partial update targetingCriteriaPUT /v1/ads/{adId}targeting (see creating ads)Writes the ad's campaign. Merged per facet; an empty facet removes it; sending locations replaces them all
DELETE (draft) or status: PENDING_DELETIONDELETE /v1/ads/ad-sets/{adSetId}Its ads are marked cancelled
GET, PUT /rest/adTrackingParameters/(adEntity:(sponsoredCampaign:...))GET, PATCH /v1/ads/{adId}/tracking-tagsdynamicValueParameters, customValueParameters; an omitted map is kept, {} clears itWrites the ad's campaign. Not on conversation, message or lead form ads

Creating ads

POST /v1/ads/create replaces the chain of group, campaign, post and creative calls. Every format needs accountId, adAccountId and budgetAmount. It returns ad._id, platformCampaignId, platformAdSetId and platformAdId.

What you buildSendWatch out
Any new campaignbudgetAmount, budgetType (daily default, or lifetime), goal (engagement, traffic, awareness, video_views, lead_generation, job_applicants), optional name, campaignName, adSetName, startDate, endDate, statusgoal is inferred when left out, except for spotlight, follower and jobs
BiddingplatformSpecificData: {costType (CPM, CPC, CPV), unitCost, optimizationTargetType, audienceExpansionEnabled, offsiteDeliveryEnabled}unitCost in whole currency and needs costType. Unknown keys return 400
Single imageheadline, body, imageUrl, linkUrl for traffic, optional callToActionZernio uploads the image from its public URL
Videoheadline, body, video: {url}
Carouselheadline, body, platformSpecificData.carousel.cards (2 to 10, each {imageUrl, headline, landingUrl})Each card needs landingUrl, or set linkUrl
Documentbody, document: {url, title}, linkUrl for traffic
Eventbody, event: {urn: "urn:li:event:123"}
Text adtextAd: {headline (up to 25), description (up to 75), landingUrl, imageUrl}No body
Spotlightgoal, spotlight: {headline, callToAction, landingUrl, description, logoUrl}goal traffic or awareness
Followergoal, follower: {headline, description, callToAction}goal engagement or awareness
Jobsgoal: "job_applicants", jobs: {headline, buttonLabel}
Conversationconversation: {subject, firstMessageId, messages: [{id, text, buttons: [{text, nextMessageId or url}]}]} (1 to 25 messages, 1 to 5 buttons)Guided conversations only
Sponsor an existing post (thought leader)thoughtLeader: {postUrn}
Lead gengoal: "lead_generation", leadGenFormIdThe form attaches to image, video and document creatives only
New creative in an existing campaignThe format fields, plus adSetIdBudget, endDate, targeting and bidding are ignored or return 400
New campaign in an existing groupThe campaign fields, plus existingCampaignId and goalNeeds a budget. Not together with adSetId
Targetingcountries (two-letter codes), regions: [{key: "urn:li:geo:123"}], excludedLocations: {countries}, industries, companySizes, seniorities, jobFunctions, jobTitles, skills, interests, behaviors, audienceInclude, audienceExclude, ageMin, ageMax, gender, languagesjobTitles cannot go with seniorities or jobFunctions. No cities, postal codes or company names. With no location LinkedIn targets the US

Creatives

LinkedIn Marketing APIZernioSendWatch out
POST /rest/posts (dark post), then POST /rest/adAccounts/{id}/creativesPOST /v1/ads/createSee creating ads
POST /rest/adAccounts/{id}/creatives?action=createInlinePOST /v1/ads/createImage, video, carousel and document
/rest/conversationAds, /rest/conversationAds/{id}/sponsoredMessageContentsPOST /v1/ads/create with conversationGuided conversations only
POST /rest/images (or videos, documents) ?action=initializeUploadMedia URLs in POST /v1/ads/createPublic URLsNo standalone upload
Creative on an existing organization postPOST /v1/ads/boostaccountId (the posting linkedin account), adAccountId, name, goal, platformPostId (urn:li:share:... or urn:li:ugcPost:...), budget: {amount, type}Always a new group and campaign. Organization posts only. To add one to an existing campaign, use thoughtLeader with adSetId on POST /v1/ads/create
GET /rest/adAccounts/{id}/creatives?q=criteriaGET /v1/adsaccountId, adAccountId, platform=linkedin, campaignId, adSetId, platformAdId, page, limit up to 500Synced copy. Returns _id
GET /rest/adAccounts/{id}/creatives/{encoded urn}GET /v1/ads/{adId}?live=trueStatus read live, the rest from the synced copy
Partial update intendedStatusPUT /v1/ads/{adId}/statusstatus: active or paused
A new creative replacing the old one (LinkedIn cannot edit creative content)PUT /v1/ads/{adId}creative: {imageUrl or videoUrl, headline, body, description, callToAction, linkUrl}The old creative is deleted, so platformAdId changes. name returns 501
DELETE (draft) or intendedStatus: PENDING_DELETIONDELETE /v1/ads/{adId}Also removes the dark post and empty parents Zernio created

Targeting and forecasts

LinkedIn Marketing APIZernioSendWatch out
GET /rest/adTargetingEntities?q=typeahead or q=adTargetingFacetGET /v1/ads/targeting/searchaccountId, q, dimension (geo, interest, behavior, industry, jobFunction, seniority, companySize, skill)No job title, company or school search
GET /rest/audienceCounts?q=targetingCriteriaV2POST /v1/ads/targeting/reach-estimateaccountId, adAccountId, spec (the targeting fields above)Returns available, lower, upper
GET /rest/adBudgetPricing?q=criteriaV2POST /v1/ads/targeting/bid-pricingspec, campaignType (TEXT_AD, SPONSORED_UPDATES, SPONSORED_INMAILS), bidType, matchType, currency, objectiveType, optimizationTargetType, dailyBudgetSend the ad account's currency; the default is USD
GET /rest/adSupplyForecasts?q=criteriaV2POST /v1/ads/targeting/supply-forecastspec, timeRangeStart, timeRangeEnd (future, Unix ms), dailyBudget or totalBudget, competingBid: {bidType, amount} or optimizationTarget, objectiveTypeobjectiveType is required by Zernio, optional at LinkedIn

Matched audiences

LinkedIn Marketing APIZernioSendWatch out
GET /rest/dmpSegments?q=account, GET /rest/adSegments?q=accountsGET /v1/ads/audiencesaccountId, adAccountIdLive. Audiences not created in Zernio have id: null and cannot be uploaded to or deleted
POST /rest/dmpSegments, /rest/adPageSets, /rest/adSegmentSourcesPOST /v1/ads/audiencesaccountId, adAccountId, name, type (customer_list, company_list, website_retargeting, engagement); companies (up to 300,000), matchRules, or sourceType, trigger, lookbackDays, engagementSourcesReturns Zernio's id and platformAudienceId
dmpSegments?action=generateUploadUrl, then POST /rest/dmpSegments/{id}/listUploadsPOST /v1/ads/audiences/{audienceId}/usersusers: [{email}], up to 10,000Replaces the whole list. Company lists return 422
The same flow with a company listPOST /v1/ads/audiences/{audienceId}/companiescompanies: [{name, domain, website, linkedinPageUrl}]Replaces the whole list
DELETE /rest/dmpSegments/{id}DELETE /v1/ads/audiences/{audienceId}

Conversions

LinkedIn Marketing APIZernioSendWatch out
POST /rest/conversionEvents (single or BATCH_CREATE)POST /v1/eventsprofileId, destinations: [{accountId, destinationId}] (destinationId is the rule id), events: [{eventName, eventTime (Unix seconds), eventId, user, value, currency}]eventId is required. Sent in chunks of 5,000
GET /rest/conversions?q=accountGET /v1/ads/conversions/destinationsConversions API rules only. Insight Tag rules are under the tag's events
POST /rest/conversionsPOST /v1/ads/conversions/destinationsadAccountId, name, type, attribution windows (1, 7, 30, 90 or 365 days), autoAssociationType, valueType, value: {currencyCode, amount}Not idempotent
GET /rest/conversions/{id}?account=...GET /v1/ads/conversions/destinations/{destinationId}adAccountId
Partial update /rest/conversions/{id}?account=...PATCH /v1/ads/conversions/destinations/{destinationId}adAccountId and the fields to change
Partial update enabled: falseDELETE /v1/ads/conversions/destinations/{destinationId}adAccountIdDisables the rule; LinkedIn has no hard delete
PUT, GET, DELETE /rest/campaignConversions/(campaign:...,conversion:...)GET, POST, DELETE /v1/ads/conversions/destinations/{destinationId}/associationsadAccountId, campaignIds (LinkedIn campaign ids, up to 100)
GET /rest/adAnalytics?q=analytics&pivot=CONVERSIONGET /v1/ads/conversions/destinations/{destinationId}/metricsadAccountId, startDate, endDate, granularity

Insight Tag

LinkedIn Marketing APIZernioSendWatch out
GET /rest/insightTags?q=accountGET /v1/accounts/{accountId}/tracking-tags
POST /rest/insightTagsPOST /v1/accounts/{accountId}/tracking-tagsadAccountId, nameReturns the existing tag when the account has one
GET /rest/insightTags/{id}, GET /rest/insightTagDomains?q=accountGET /v1/accounts/{accountId}/tracking-tags/{tagId}Adds installed and lastFiredTime
Partial update firstPartyTrackingEnabledPATCH /v1/accounts/{accountId}/tracking-tags/{tagId}firstPartyCookieStatusThe only field you can change
/rest/conversions with Insight Tag rules/v1/accounts/{accountId}/tracking-tags/{tagId}/events and .../events/{eventId}name, type, enabled, defaultValue, currency, clickWindowDays, viewWindowDaysDELETE disables the rule
GET /rest/insightTagsPermission, ?action=grantAccess, ?action=revokeAccessGET, POST, DELETE /v1/accounts/{accountId}/tracking-tags/{tagId}/shared-accounts
No equivalent/v1/accounts/{accountId}/tracking-tags/{tagId}/stats and .../installInstall the tag on Shopify or WordPress through Zernio

Lead gen forms

LinkedIn Marketing APIZernioSendWatch out
POST /rest/leadFormsPOST /v1/ads/lead-formsaccountId, name, privacyPolicyUrl, platformSpecificData: {adAccountId, headline, description, questions, consents, locale, state}Text and multiple-choice questions. Returns form.id
GET /rest/leadForms?q=ownerGET /v1/ads/lead-formsaccountId, adAccountId
GET /rest/leadForms/{id}GET /v1/ads/lead-forms/{formId}accountId
Partial update state: ARCHIVEDDELETE /v1/ads/lead-forms/{formId}accountIdArchives the form
GET /rest/leadFormResponses?q=owner&leadType=(leadType:SPONSORED)GET /v1/ads/leadsaccountId, adAccountId, platform=linkedin, formId, since (Unix seconds), limit up to 100, cursorRead live on every call. LinkedIn keeps leads 90 days

Analytics

LinkedIn Marketing APIZernioSendWatch out
GET /rest/adAnalytics?q=analytics&pivot=CREATIVEGET /v1/ads/{adId}/analyticsfromDate, toDateadId must be Zernio's _id. Daily series
adAnalytics with a MEMBER_* pivotGET /v1/ads/{adId}/analyticsbreakdowns: job_title, job_function, seniority, industry, company, company_size, country, regionTotals for the range, not daily
adAnalytics filtered to a campaign groupGET /v1/ads/campaigns/{campaignId}/analyticsfromDate, toDate, platform, breakdowns
adAnalytics across the accountGET /v1/ads/performanceaccountId, fromDate, toDate (both required), adAccountId, platform=linkedin, sortBy, limit up to 100Synced store; 90 days imported at connect

Ad library

LinkedInZernioSendWatch out
LinkedIn Ad Library searchGET /v1/ads/libraryaccountId (a LinkedIn connection), q or advertiser, countries, since, until, limit up to 25, afteraccountId picks LinkedIn; without it the search runs on Meta

No Zernio equivalent

Keep these on the LinkedIn Marketing API, or drop them:

  • Accounts: creating or editing ad accounts (POST /rest/adAccounts), and adAccountUsers roles (PUT, DELETE /rest/adAccountUsers/...).
  • Batches: BATCH_CREATE, BATCH_GET and BATCH_PARTIAL_UPDATE on groups, campaigns and creatives, beyond bulk status.
  • Campaigns: creating a campaign without a creative, duplicating one campaign or one creative, reactivating a COMPLETED campaign, DRAFT objects.
  • Targeting: GET /rest/adTargetingFacets, adTargetingEntities?q=similarEntities and q=urns, job title, company and school search, city and postal code targeting.
  • Creatives: classic single-message ads, standalone image, video and document uploads, previews, comments on sponsored posts, lead forms on carousel and other formats.
  • Audiences: streaming users or companies with ADD and REMOVE (/rest/dmpSegments/{id}/users), removing users, renaming an audience, predictive audiences.
  • Reporting: adAnalytics?q=statistics, q=attributedRevenueMetrics, and pivots other than creative, campaign group, conversion and the member pivots above.
  • Leads: leadNotifications webhooks and test leads. Poll GET /v1/ads/leads instead.
  • Tracking: account-level adTrackingParameters, and editing blocked domains on insightTagDomains.
Was this page helpful?

On this page