First-party app
LinkedIn Ads

LinkedIn Ads

Manage LinkedIn ad accounts, campaign groups, campaigns, creatives and Matched Audiences segments, and read performance analytics, via the versioned LinkedIn Marketing (Ads) API.

stable MarketingAnalytics & BI

About

LinkedIn Ads ships in the w6w first-party pack. It declares 23 actions, 2 health checks, and the host runs its code in a sandbox that never sees the credential.

App id
io.w6w.linkedin-ads
Version
0.1.1
Author
w6w
Licence
MIT
Categories
Marketing · Analytics & BI

Overview

LinkedIn’s Marketing (Ads) API is how a business manages advertising on LinkedIn programmatically, and this app covers the campaign-management side of it: Ad Accounts, Campaign Groups, Campaigns and Creatives, plus performance analytics and Matched Audiences segments.

It handles the day-to-day campaign lifecycle — creating and updating campaign groups, campaigns and creatives, and pausing or retiring one when it’s done — alongside analytics reads that pull performance metrics by date range and up to three pivots at once, by campaign, by creative, by demographic, and more. Matched Audiences actions create and manage the audience segments a campaign can target, separately from the audience-population step, which is a higher-volume upload flow of its own.

Access to LinkedIn’s Advertising API is approval-gated by LinkedIn directly, and Matched Audiences segments require a second, separate approval on top of that — this app authenticates each surface with its own credential so a workflow’s campaign management doesn’t stall on an audience-program review it doesn’t need. A health check tracks LinkedIn’s own developer-API status page.

Build with LinkedIn Ads

Three routes to the same 23 actions. The Workflow tab is generated from LinkedIn Ads's own manifest and carries its real ids, so it is copy-pasteable; the Code and CLI examples are the same call for any action on any app, so every app-specific value in them is a blank you fill in.

Create Ad Account

ad-account-create

Create a Business Ad Account. Requires an authenticated user assigned as the account administrator once created.

Get Ad Account

ad-account-get

Fetch one Ad Account by ID.

List Ad Accounts

ad-account-list

Search Ad Accounts the connected app can access, by ID, name, reference, type or status.

Get Analytics (single pivot)

analytics-get

Performance or professional-demographic metrics, grouped by one dimension (pivot), for a set of accounts, campaigns, campaign groups, shares or companies.

Get Analytics (up to 3 pivots)

analytics-get-statistics

Performance metrics cross-tabulated by up to three grouping dimensions at once.

Create Audience Segment

audience-segment-create

Create an empty Matched Audiences (DMP) segment tied to an Ad Account. Requires the Matched Audiences auth method (a separately-approved LinkedIn program).

Delete Audience Segment

audience-segment-delete

Permanently delete a Matched Audiences (DMP) segment and its destinations.

Get Audience Segment

audience-segment-get

Fetch one Matched Audiences (DMP) segment by ID.

List Audience Segments

audience-segment-list

Find Matched Audiences (DMP) segments belonging to an Ad Account.

Update Audience Segment

audience-segment-update

Change a Matched Audiences (DMP) segment's name, description, source segment ID or access policy.

Create Campaign

campaign-create

Create a Campaign under a Campaign Group.

Delete Campaign

campaign-delete

Delete a Campaign. Soft-deletes (sets status to Pending Deletion) by default; hard DELETE only succeeds on a DRAFT campaign.

Get Campaign

campaign-get

Fetch one Campaign by ID.

Create Campaign Group

campaign-group-create

Create a Campaign Group in ACTIVE or DRAFT status. Not supported for ENTERPRISE accounts.

Get Campaign Group

campaign-group-get

Fetch one Campaign Group by ID.

List Campaign Groups

campaign-group-list

Search Campaign Groups within an Ad Account, by ID, name or status.

Update Campaign Group

campaign-group-update

Partially update a Campaign Group's name, status or total budget. Only the fields you set are changed.

List Campaigns

campaign-list

Search Campaigns within an Ad Account, by ID, Campaign Group, name, associated entity, type or status.

Update Campaign

campaign-update

Partially update a Campaign's name, status, budget or targeting. Only the fields you set are changed.

Create Creative (from existing content)

creative-create

Create a Creative that sponsors an already-published post/share or InMail content. Does not author new content — reference an existing urn:li:share:{id}, urn:li:ugcPost:{id} or urn:li:adInMailContent:{id}.

Get Creative

creative-get

Fetch one Creative by its URN.

List Creatives

creative-list

Search Creatives within an Ad Account, by campaign, creative ID, content reference or intended status.

Update Creative

creative-update

Change a Creative's intended status or name.

A workflow step names the app and the action, and the editor fills in the connection when you pick one. This is the Step shape from the workflow spec, carrying LinkedIn Ads's real ids.

{
  "manifestVersion": "2",
  "name": "linkedin-ads-example",
  "steps": [
    {
      "id": "ad-account-create",
      "uses": {
        "app": "io.w6w.linkedin-ads",
        "action": "ad-account-create",
        "connection": "conn_YOUR_CONNECTION_ID"
      },
      "with": {
        "name": "<name>"
      }
    }
  ]
}

Here are some of the things you can do

  • Create Ad Account

    perform
    ad-account-create
  • Get Ad Account

    read
    ad-account-get
  • List Ad Accounts

    search
    ad-account-list
  • Get Analytics (single pivot)

    read
    analytics-get
  • Get Analytics (up to 3 pivots)

    read
    analytics-get-statistics

+18 more actions available

Every app-specific value here is a blank you have to fill in. An app action is reached through the connection that authenticates it, so the address is a connection id, not the app id — and connections belong to your account, so a public page cannot know yours. Create one for LinkedIn Ads, then fill in the three blanks: conn_YOUR_CONNECTION_ID, the action key, and the parameters that action declares. The call itself is real — the shape is transcribed from the studio's own snippet builder, which prints the same kind of blanks — but nothing in it is specific to LinkedIn Ads. The Workflow tab is where this app's real ids are.

Install
npm install @w6w/sdk
yarn add @w6w/sdk
pnpm add @w6w/sdk
deno add npm:@w6w/sdk
Code
import { W6wClient, isActionRun } from "@w6w/sdk";

// Reads W6W_BASE_URL and W6W_TOKEN from the environment when omitted.
const client = new W6wClient();

const envelope = await client.run({
  urn: "conn_YOUR_CONNECTION_ID",
  action: "ad-account-create",
  payload: {
    name: "<value>",
    // currency: "<value>",
    // reference: "<value>",
    // notifiedOnCampaignOptimization: "<value>",
    // notifiedOnCreativeApproval: "<value>",
    // notifiedOnCreativeRejection: "<value>",
    // notifiedOnEndOfCampaign: "<value>",
  },
});

if (isActionRun(envelope)) console.log(envelope.value);
Install the CLI
npm install -g @w6w/cli
CLI
w6w run conn_YOUR_CONNECTION_ID --action ad-account-create --payload '{"name":"<value>"}'

Give an AI agent LinkedIn Ads — without giving it LinkedIn Ads's credentials. One MCP endpoint exposes every app, function and workflow the caller is entitled to, as tools it can discover and run. Access is granted per team while we onboard.

One tool call
{
  "name": "w6w_invoke",
  "arguments": {
    "ref": "app:io.w6w.linkedin-ads#ad-account-create",
    "input": {
      "name": "<name>"
    }
  }
}

Every tool names its target with a single ref. The app: form above doesn't name a connection at all — the host resolves which of the caller's LinkedIn Ads connections to sign with, and refuses rather than guesses when the answer is ambiguous.

What the agent gets

Credentials it can't read

The token is attached host-side, at the moment of the call. It is never a tool argument, never in the model's context, and never in a transcript — so a prompt injection has nothing to exfiltrate.

A tool surface scoped to the caller

Tools are derived per end user from what that person has actually connected and is entitled to — not one shared bot identity carrying the union of everyone's access.

A durable workflow in one call

Multi-step work runs on the workflow engine and returns a run handle the agent can poll — retries, branching and state survive the conversation that started them.

Health-aware discovery

LinkedIn Ads's declared health checks are on the surface too, so an agent can tell "the vendor is down" from "your credential expired" before it burns a retry on either.

The MCP surface is part of the hosted platform. LinkedIn Ads itself is MIT, and the runtime that executes it is source-available (FSL).

Request MCP access

Health checks

LinkedIn Ads declares its own checks, so its health is a property of the app rather than something the host guesses at.

service

LinkedIn API platform status

Atlassian Statuspage rollup for www.linkedin-apistatus.com, LinkedIn's official developer API status page, with per-component detail when the vendor publishes any. Unauthenticated and unsigned.

quota

Rate limit / analytics data-throttle headroom