# LinkedIn Ads

Create, boost, target and measure LinkedIn campaigns on a linkedinads account with the ads endpoints.

import { PlatformCapabilities } from '@/components/platform-capabilities';

Every LinkedIn Ads endpoint runs on a `linkedinads` account:

- Create LinkedIn ads with `POST /v1/ads/create`.
- Boost a Company Page post with `POST /v1/ads/boost`.
- Read results with the Insights endpoints.

The pages in this section cover one job each. Every endpoint is explained once, with its response.

## Quick reference

<PlatformCapabilities rows={[
  { property: 'Hierarchy', value: 'Campaign Group > Campaign > Creative (created in one call, or reuse existing levels)' },
  { property: 'Goals (`goal`)', value: <>6 on <code>/v1/ads/create</code>: engagement, traffic, awareness, video_views, lead_generation, job_applicants. <code>conversions</code> is boost-only (see <a href="/platforms/linkedin-ads/boost">Boost a post</a>)</> },
  { property: 'Creative formats', value: <>Single image, video, carousel, document, event, text ad, spotlight, follower, jobs, conversation, thought-leader, article (see <a href="/platforms/linkedin-ads/creative-formats">Creative formats</a>)</> },
  { property: 'Bidding', value: 'CPM (default), CPC, CPV; manual `unitCost` or LinkedIn automated' },
  { property: 'Budget minimums', value: '$10/day per format; $100 lifetime for inactive campaigns' },
  { property: 'Targeting', value: <>Countries and regions, plus LinkedIn's B2B facets: <code>industries</code>, <code>companySizes</code>, <code>seniorities</code>, <code>jobFunctions</code> (see <a href="/platforms/linkedin-ads/targeting">Targeting</a>)</> },
  { property: 'Audiences', value: 'Contact list, company list, engagement retargeting, website retargeting' },
  { property: 'Insights', value: <>Spend, CPC and CPM plus firmographic breakdowns: job title, seniority, industry, company size (see <a href="/platforms/linkedin-ads/analytics">Analytics</a>)</> },
  { property: 'Pre-flight planning', value: 'Suggested bid and budget bounds, and impression, click and spend forecasts' },
  { property: 'Lead Gen Forms', value: 'Yes: create, list and archive forms, and pull responses (90-day retention)' },
  { property: 'Conversions API', value: 'Yes: rule CRUD, events and attribution read-back' },
  { property: 'URL tracking tags', value: 'Yes: campaign-level Dynamic UTM (read and update)' },
  { property: 'Image formats', value: 'JPEG, PNG, GIF, max 5 MB' },
  { property: 'Video formats', value: 'MP4 H.264/AAC, 3 seconds to 30 minutes, max 500 MB' },
]} />

## Before you start

LinkedIn Ads requires a connected LinkedIn account whose member can act on a sponsored ad account. You need:

- A LinkedIn ad account: the numeric sponsored account id, from [List ad accounts](/ad-accounts/list-ad-accounts).
- A Company Page. Ads built from scratch publish as Direct Sponsored Content ("dark posts") authored by the Page.
- An Administrator or Direct Sponsored Content Poster role on that Page for the authenticated member. The Page must also be associated with the ad account, or LinkedIn returns `403`.
- The ads scopes on the connection (below). An account connected before a scope existed must reconnect to pick it up.

LinkedIn reviews every ad, so a new campaign starts in `DRAFT` and review before it delivers.

## Connect

Call `GET /v1/connect/linkedin/ads` with `profileId` ([Connect ads](/connect/connect-ads)).

The `linkedinads` account reuses the token of the profile's LinkedIn account when one is connected. No second OAuth round trip happens.

Without one, the response carries an `authUrl` to send the user to, as in the [connecting accounts guide](/guides/connecting-accounts).

```bash
curl "https://zernio.com/api/v1/connect/linkedin/ads?profileId=66a1f0c2a4b9d3e8f1a2b3c4" \
  -H "Authorization: Bearer $ZERNIO_API_KEY"
```

Response (`200`):

```json
{
  "alreadyConnected": true,
  "accountId": "66b2e19d8c3f5a7e9d0b1c2d",
  "platform": "linkedinads"
}
```

`accountId` is the value every ads endpoint takes.

The standard LinkedIn connection already requests the ads scopes:

| Scope | What it enables |
|-------|-----------------|
| `r_ads` | Read ad accounts |
| `rw_ads` | Create and manage campaigns and creatives |
| `r_ads_reporting` | Ads reporting and analytics |
| `rw_conversions` | Conversions API (server-side conversion events) |
| `r_marketing_leadgen_automation` | Read Lead Gen Form responses |
| `rw_dmp_segments` | Add and remove people on customer lists right away |

Two scopes most often need a reconnect:

- `rw_conversions`: a `403` with `linkedin_reconnect_required` when missing
- `r_marketing_leadgen_automation`: lead-response reads return a `400` with code `ads_connection_required` asking for the reconnect

[Scopes](/guides/connecting-accounts#scopes) explains how a reconnect picks them up.

## The campaign hierarchy

Every LinkedIn ad lives in a three-level tree: Campaign Group, Campaign, Creative.

The Campaign owns bidding, targeting, schedule and budget. The Creative is the ad content.

`POST /v1/ads/create` provisions all three in one call.

Zernio's `adSetId` is the LinkedIn Campaign id. On Meta the same field is an ad set, on Google and TikTok an ad group.

To slot into levels you already have, pass `adSetId`, or `existingCampaignId` for a Campaign Group ([Create ads](/platforms/linkedin-ads/create-ads#reuse-an-existing-campaign-or-group)).

## Common errors

Connecting is where this page's own errors live.

[Media and limits](/platforms/linkedin-ads/reference#common-errors) collects the ones LinkedIn returns once you are creating ads.

| Error | Cause | Fix |
|-------|-------|-----|
| `400` with code `reconnect_required` | The profile holds a LinkedIn account whose stored token cannot reach ad accounts | Reconnect the LinkedIn account, then call the ads connect again. |
| `402` | The billing gate is closed for the team | Add a payment method and retry. |
| `403` with code `ads_addon_required` | The team is on a legacy plan that does not include ads access | Move the team to usage-based billing, where every account includes ads ([Pricing](/pricing)). |
| `404` | The `profileId` is unknown, or the profile has no LinkedIn account to inherit a token from | Check the profile id, and connect LinkedIn before its ads. |

[Error handling](/guides/error-handling) covers the envelope and the stable codes.

## In this section

<PlatformPages platform="linkedin-ads" />

## Related

- [Create standalone ad](/ad-campaigns/create-standalone-ad): group, campaign and creative in one call.
- [Boost post](/ad-campaigns/boost-post): promote an existing organic post.
- [List ad accounts](/ad-accounts/list-ad-accounts): the sponsored accounts a connection can reach.
- [Bid pricing](/ad-targeting/get-linkedin-bid-pricing) and [Supply forecast](/ad-targeting/get-linkedin-supply-forecast).
- [Send events](/conversions/send-events): server-side conversion events.