API Reference

LinkedIn Ads API

LinkedIn's Advertising API is part of the Marketing Developer Platform, which requires a partner application and compliance review. Zernio wraps it behind a simple REST surface so you can launch campaigns, boost posts, and pull analytics without the gatekeeping.

Quick Start

  1. 1.
    Get API Key
    Sign up for free and get your API key in seconds.
  2. 2.
    Connect Account
    Use our OAuth flow to connect LinkedIn Ads accounts.
  3. 3.
    Start Posting
    Make API calls to post content to LinkedIn Ads.
Create a LinkedIn Campaign
JavaScript
const response = await fetch('https://zernio.com/api/v1/ads/create', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    platform: 'linkedinads',
    accountId: 'acc_linkedinads_123',
    adAccountId: 'urn:li:sponsoredAccount:12345',
    name: 'Q1 Enterprise Webinar',
    goal: 'engagement',
    budget: { amount: 100, type: 'daily' },
    schedule: { startDate: '2026-04-20', endDate: '2026-05-20' },
    creative: {
      headline: 'Scale your DevOps team with platform engineering',
      body: 'Join our live session April 25.',
      imageUrl: 'https://cdn.example.com/webinar.jpg',
      landingPageUrl: 'https://example.com/webinar'
    },
    targeting: {
      locations: ['us:0', 'ca:0', 'gb:0']
    }
  })
});

const ad = await response.json();
console.log(ad.ad.platformAdId);

LinkedIn Ads Endpoints

POST/v1/ads/create

Create a Campaign Group, Campaign, or Creative on LinkedIn

POST/v1/ads/boost

Promote an existing Company Page post as Sponsored Content

GET/v1/ads/{id}

Get details and current spend of a LinkedIn ad

PUT/v1/ads/{id}

Update status, budget, or schedule of a LinkedIn ad

DELETE/v1/ads/{id}

Archive a LinkedIn ad

GET/v1/ads/{id}/analytics

Impressions, clicks, CTR, CPC, CPM

GET/v1/ads/campaigns

List all campaigns across connected LinkedIn ad accounts

Media Requirements

TypeFormatMax SizeNotes
Single ImageJPEG, PNG, GIF5 MBRecommended 1200x627 (1.91:1)
VideoMP4200 MB3 sec to 30 min, 75 MB recommended
CarouselJPEG, PNG10 MB / card2-10 cards, 1080x1080
HeadlineText200 charsIntro text
BodyText600 charsPrimary description

Zernio automatically transcodes and optimizes media for LinkedIn Ads's requirements.

API Limits

LinkedIn enforces application-level and per-member rate limits. Zernio pools requests across customers and handles 429 responses automatically with exponential backoff.

Zernio handles all rate limiting automatically. We queue and retry requests as needed.

Features

  • Campaign Group → Campaign → Creative hierarchy
  • Boost existing Company Page posts
  • Location and language targeting
  • Matched Audiences (read across any account)
  • Real-time spend, CTR, CPC, CPM
  • Pause, edit, and resume via PUT /v1/ads/{id}
  • No Marketing Developer Platform application required

Response Example

Get Campaign Analytics
cURL
curl -X GET "https://zernio.com/api/v1/ads/AD_ID/analytics" \
  -H "Authorization: Bearer YOUR_API_KEY"

# Response:
# {
#   "metrics": {
#     "spend": 487.20,
#     "impressions": 52300,
#     "clicks": 1420,
#     "ctr": 2.72,
#     "cpc": 0.34,
#     "cpm": 9.32
#   }
# }

Start building with LinkedIn Ads API

Free tier available · No credit card required · 99.97% uptime

SOC 2 CompliantGDPR Compliant