> ## Documentation Index
> Fetch the complete documentation index at: https://docs.consile.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# API reference: LinkedIn Ads

> All 64 tools in the LinkedIn Ads connector (read, ad-management write, and organic-social write) with arguments, return shapes, guardrail rules, and scope requirements.

LinkedIn Ads is a **read + guardrailed write** connector. Tools are called via
`tools/call` over `POST /linkedin-ads/mcp`. The connector is connected with OAuth
(LinkedIn login). See [Forbind din konto](/connect/forbind-din-konto).

<Info>
  Endpoint: `https://mcp.consile.ai/linkedin-ads/mcp`. LinkedIn Ads is its own
  named connector with only its own tools. Tool names are namespaced as
  `linkedin-ads__<tool>` in the transport (e.g. `linkedin-ads__list_ad_accounts`);
  the AI resolves these automatically.
</Info>

<Warning>
  **This connector can write.** Ad-management write tools create objects in
  **DRAFT** by default (no serving, no spend). Any action that spends
  (status → ACTIVE), changes a budget or bid, archives/deletes, or publishes
  public content requires explicit `confirm: true`; otherwise the tool returns a
  **dry-run preview** and calls no upstream API. See
  [Handlinger & guardrails](/essentials/handlinger-og-guardrails).
</Warning>

## Scopes & authentication

The connector requests three OAuth scopes from LinkedIn:

| Scope             | What it enables                                                                  |
| ----------------- | -------------------------------------------------------------------------------- |
| `r_ads`           | Read ad accounts, campaign groups, campaigns, creatives, users                   |
| `rw_ads`          | All ad-management write tools (create/update/status/budget)                      |
| `r_ads_reporting` | All analytics, demographics, ROAS, forecasts, audiences, conversions, lead forms |

The organization, member-profile, and organic-social scopes (`r_organization_admin`,
`r_organization_social`, `w_organization_social`, `w_member_social`,
`r_basicprofile`, `r_1st_connections_size`) are **not requested in v1** because
LinkedIn rejects the full authorization if any requested scope is unapproved. Until
the app receives Community Management API approval, the tools that need those scopes
are exposed but **fail with HTTP 403 "insufficient scope"**. That covers all 8
organic-social write tools **and** these reads:

* `get_organization`, `get_organization_follower_count`, `list_organization_posts`
* `get_organization_page_statistics`, `get_organization_follower_statistics`,
  `get_organization_share_statistics`
* `get_my_profile`, `get_my_connections_count`

The ad, reporting, targeting, conversion, and lead-form read tools work on the v1
scope set. The remaining organization, post, and social reads (`get_post`,
`get_post_social_metadata`, `list_post_comments`, `list_post_reactions`,
`list_administered_organizations`, `find_organization_by_vanity_name`) **also fail
with HTTP 403** under the current ad-scope access, alongside the tools listed above,
until Community Management API approval.

<Note>
  The connector is connected through the standard `GenericOAuthConnectFlow`, and the
  per-call access token is refreshed transparently on the read path by the platform's
  `RefreshingVault`. The connector itself is access-token only (it never refreshes).
  If LinkedIn rejects the token (**HTTP 401**), the tool surfaces a clear reconnect
  signal: re-authorize in the portal.
</Note>

***

## Guardrail model (write tools)

All 19 write tools pass through the connector-local `applyOrPreview` guardrail.
The rules are:

1. **New ad objects** (`create_campaign_group`, `create_campaign`) are created in
   `DRAFT` status by default. They do not serve and do not spend.
2. **New organic posts** (`create_organization_post`, `create_member_post`) default
   to `DRAFT` lifecycle. They are not publicly visible.
3. **Confirmation required** (`confirm: true`) whenever the action:
   * sets status to `ACTIVE` (starts serving / spending);
   * sets status to `ARCHIVED` (destructive);
   * changes a budget or bid amount;
   * publishes public content (a post, comment, or reaction);
   * removes a campaign↔conversion association.
4. **Without `confirm: true`**, the tool returns a `WritePreview` object (the exact
   method, path, and body it *would* send) and calls **no upstream API**.
5. Setting status to `PAUSED` or `DRAFT` is always safe and applies without
   confirmation (stops serving/spend immediately).

These are designed-in safety defaults enforced in connector application logic, not
an unbreakable platform gate. See
[Handlinger & guardrails](/essentials/handlinger-og-guardrails) for the full model.

### WritePreview shape

When a confirmation-gated tool is called without `confirm: true`, it returns:

```json theme={null}
{
  "preview": {
    "action": "create_campaign",
    "summary": "Create campaign \"Q3 brand\" under group 456 as DRAFT.",
    "request": {
      "method": "POST",
      "path": "/rest/adAccounts/123/adCampaigns",
      "body": { "...": "..." }
    },
    "confirmHint": "Re-run the same call with confirm: true to apply this change."
  }
}
```

***

## Shared parameters

### Numeric ids

Most tools take bare numeric id strings (digits only, no URN prefix). The connector
builds the required URNs internally.

<ParamField path="adAccountId" type="string" required>
  LinkedIn ad account id (digits only). Obtain from `list_ad_accounts` or
  `search_ad_accounts`.
</ParamField>

<ParamField path="campaignGroupId" type="string">
  Campaign group id (digits only). From `list_campaign_groups`.
</ParamField>

<ParamField path="campaignId" type="string">
  Campaign id (digits only). From `list_campaigns`.
</ParamField>

<ParamField path="organizationId" type="string">
  Organization (Company Page) id (digits only). From
  `list_administered_organizations`.
</ParamField>

### Money format

All money values (budgets, bids, conversion values) use LinkedIn's **major-unit**
format: a decimal string plus a currency code (**not micros**).

```json theme={null}
{ "amount": "500.00", "currencyCode": "DKK" }
```

The `currencyCode` must match the ad account's currency. Supply amounts as
`dailyBudgetAmount` / `totalBudgetAmount` / `unitCostAmount` (string) plus
`currencyCode` (ISO 4217 three-letter code).

### Limit

<ParamField path="limit" type="integer" default="100">
  Maximum rows returned by list/finder tools (max 1000). The client paginates
  internally and returns up to `limit` elements.
</ParamField>

### Analytics facet

The analytics tools (`get_ad_analytics`, `get_ad_statistics`, `get_ad_demographics`,
`get_attributed_revenue`) require **exactly one** of these facets:

<ParamField path="accounts" type="string[]">
  Ad account ids to report on (most common).
</ParamField>

<ParamField path="campaigns" type="string[]">
  Campaign ids to report on.
</ParamField>

<ParamField path="campaignGroups" type="string[]">
  Campaign group ids to report on.
</ParamField>

### Client limits

`client.ts` pins these transport limits:

* **API version:** requests to the versioned Marketing API (`/rest/*`) carry
  `LinkedIn-Version: 202605`. The legacy `/v2/*` surface (member profile,
  connections) carries no version header.
* **Timeout:** 15 seconds per call.
* **Pagination:** list/finder tools follow up to **25 pages** of \~50 rows. Every
  documented tool passes `limit ?? 100`, so the effective default is **100** rows per
  call; `limit` (max 1000) tightens or widens that, and a raw `getList` with no limit
  caps at 500 rows.

The analytics response caps are **LinkedIn-side** limits, not enforced in `client.ts`:
`get_ad_analytics` / `get_ad_statistics` return a single, non-paginated response that
LinkedIn caps at **15,000 elements**, and accept at most **20** metric `fields` per call.

***

## Read tools (45)

### Ad accounts & structure

#### list\_ad\_accounts

List every ad account the connected member can access, with account URN and role.
The entry point that yields the account ids all other tools take.

<ParamField path="limit" type="integer" default="100" />

#### search\_ad\_accounts

Search accessible ad accounts with full detail (currency, status, servingStatuses,
type). No filter returns all accessible accounts.

<ParamField path="status" type="string[]">
  Filter by account status. Enum: `ACTIVE` `DRAFT` `CANCELED`
  `PENDING_DELETION` `REMOVED`.
</ParamField>

<ParamField path="limit" type="integer" default="100" />

#### get\_ad\_account

Fetch one ad account by id: currency, status, type, servingStatuses, reference,
notification flags, test flag.

<ParamField path="adAccountId" type="string" required />

#### list\_ad\_account\_users

List all users and roles on a given ad account (audit who has access). Inverse of
`list_ad_accounts`.

<ParamField path="adAccountId" type="string" required />

<ParamField path="limit" type="integer" default="100" />

#### list\_campaign\_groups

Search/list campaign groups under an account (the budget/status container above
campaigns): name, status, runSchedule, totalBudget/dailyBudget, objective.

<ParamField path="adAccountId" type="string" required />

<ParamField path="status" type="string[]">
  Filter by status. Enum: `ACTIVE` `PAUSED` `DRAFT` `ARCHIVED` `REMOVED`.
</ParamField>

<ParamField path="limit" type="integer" default="100" />

#### get\_campaign\_group

Fetch one campaign group: name, status, runSchedule, totalBudget/dailyBudget,
servingStatuses, objective.

<ParamField path="adAccountId" type="string" required />

<ParamField path="campaignGroupId" type="string" required />

#### list\_campaigns

Search/list campaigns within an account: status, type, objectiveType, costType,
budgets, bid (unitCost), runSchedule, targetingCriteria, servingStatuses.

<ParamField path="adAccountId" type="string" required />

<ParamField path="status" type="string[]">
  Filter by status. Enum: `ACTIVE` `PAUSED` `DRAFT` `ARCHIVED` `COMPLETED`
  `REMOVED`.
</ParamField>

<ParamField path="campaignGroupId" type="string">
  Scope to one campaign group id.
</ParamField>

<ParamField path="limit" type="integer" default="100" />

#### get\_campaign

Fetch one campaign with full targetingCriteria, budgets, bid (unitCost),
runSchedule, objectiveType, optimizationTargetType, servingStatuses, versionTag.

<ParamField path="adAccountId" type="string" required />

<ParamField path="campaignId" type="string" required />

#### list\_creatives

Search/list creatives (ads) under an account: reference, status (intendedStatus),
variant content.

<ParamField path="adAccountId" type="string" required />

<ParamField path="limit" type="integer" default="100" />

#### get\_creative

Fetch one creative by its URN (status, content reference, variant/intendedStatus).

<ParamField path="adAccountId" type="string" required />

<ParamField path="creativeUrn" type="string" required>
  The creative URN, e.g. `urn:li:sponsoredCreative:123`.
</ParamField>

#### get\_ad\_preview

Render a preview of an existing creative in a placement, matching the render
LinkedIn Campaign Manager shows.

<ParamField path="adAccountId" type="string" required />

<ParamField path="creativeUrn" type="string" required>
  `urn:li:sponsoredCreative:123` to preview.
</ParamField>

***

### Reporting & analytics

#### get\_ad\_analytics

Core single-pivot performance report: group metrics by **one** dimension over a
date range and time granularity. Cost fields are decimal strings in the account
currency (not micros).

<ParamField path="pivot" type="string" required>
  Dimension to group by. One of: `COMPANY` `ACCOUNT` `SHARE` `CAMPAIGN`
  `CREATIVE` `CAMPAIGN_GROUP` `CONVERSION` `CONVERSION_COMPONENT`
  `OBJECTIVE_TYPE` `SERVING_LOCATION` `PLACEMENT_NAME`
  `IMPRESSION_DEVICE_TYPE`, plus the `MEMBER_*` demographic set (see
  `get_ad_demographics`).
</ParamField>

<ParamField path="timeGranularity" type="string" default="ALL">
  Time bucketing: `ALL` (one total) | `DAILY` | `MONTHLY` | `YEARLY`.
</ParamField>

<ParamField path="fromYmd" type="string" required>Report window start (YYYY-MM-DD).</ParamField>
<ParamField path="toYmd" type="string" required>Report window end (YYYY-MM-DD).</ParamField>
<ParamField path="accounts" type="string[]">Ad account ids (most common facet; provide exactly one facet).</ParamField>
<ParamField path="campaigns" type="string[]">Campaign ids (alternative facet).</ParamField>
<ParamField path="campaignGroups" type="string[]">Campaign group ids (alternative facet).</ParamField>

<ParamField path="fields" type="string">
  CSV of metric fields (max 20). Defaults to:
  `impressions,clicks,costInLocalCurrency,externalWebsiteConversions,oneClickLeads,landingPageClicks`.
</ParamField>

#### get\_ad\_statistics

Multi-dimensional report: group metrics by **up to three** pivots at once (e.g.
CAMPAIGN × CREATIVE × SERVING\_LOCATION) for cross-tabs the single-pivot finder
cannot express.

<ParamField path="pivots" type="string[]" required>1–3 dimensions from the same enum as `get_ad_analytics`.</ParamField>

<ParamField path="timeGranularity" type="string" default="ALL" />

<ParamField path="fromYmd" type="string" required />

<ParamField path="toYmd" type="string" required />

<ParamField path="accounts" type="string[]" />

<ParamField path="campaigns" type="string[]" />

<ParamField path="campaignGroups" type="string[]" />

<ParamField path="fields" type="string" />

#### get\_ad\_demographics

Professional-demographic breakdown: analytics pivoted by a `MEMBER_*` dimension
(company/size/industry/seniority/job title/function/country/region): "who saw or
engaged with my ads". Data is delayed approximately 12–24 hours; resolve the
returned URNs with `resolve_targeting_urns`.

<ParamField path="pivot" type="string" required>
  One of: `MEMBER_COMPANY` `MEMBER_COMPANY_SIZE` `MEMBER_INDUSTRY`
  `MEMBER_SENIORITY` `MEMBER_JOB_TITLE` `MEMBER_JOB_FUNCTION`
  `MEMBER_COUNTRY_V2` `MEMBER_REGION_V2` `MEMBER_COUNTY`.
</ParamField>

<ParamField path="fromYmd" type="string" required />

<ParamField path="toYmd" type="string" required />

<ParamField path="accounts" type="string[]" />

<ParamField path="campaigns" type="string[]" />

<ParamField path="campaignGroups" type="string[]" />

<ParamField path="fields" type="string">Defaults to `impressions,clicks,costInLocalCurrency`.</ParamField>

#### get\_attributed\_revenue

CRM revenue-attribution report (ROAS, won/open opportunities, deal size,
days-to-close) by ACCOUNT / CAMPAIGN\_GROUP / CAMPAIGN. Returns empty results
unless the advertiser has connected a CRM to Business Manager.

<ParamField path="adAccountId" type="string" required />

<ParamField path="pivots" type="string[]" default="[&#x22;CAMPAIGN&#x22;]">
  1–3 from `ACCOUNT` `CAMPAIGN_GROUP` `CAMPAIGN`.
</ParamField>

<ParamField path="fromYmd" type="string" required />

<ParamField path="toYmd" type="string" required />

<ParamField path="fields" type="string">CSV of `revenueAttributionMetrics` fields.</ParamField>

#### get\_budget\_pricing

Suggested, minimum and maximum bids plus daily-budget limits for a bid/campaign
type on an account. Forecast only. No spend.

<ParamField path="adAccountId" type="string" required />

<ParamField path="bidType" type="string" required>e.g. `CPM`, `CPC`, `CPV`.</ParamField>
<ParamField path="campaignType" type="string" required>e.g. `SPONSORED_UPDATES`, `TEXT_AD`, `DYNAMIC`.</ParamField>
<ParamField path="matchType" type="string">Optional bid match type.</ParamField>
<ParamField path="targetingCriteria" type="string">Advanced: a pre-built RestLi targetingCriteria fragment (passed verbatim).</ParamField>

Returns `{amount, currencyCode}` money objects.

#### forecast\_ad\_supply

Forecast impressions, clicks, spend, reach, and leads for a hypothetical
campaign's targeting + competing bid over a time range.

<ParamField path="campaignType" type="string" required>e.g. `SPONSORED_UPDATES`.</ParamField>
<ParamField path="target" type="string" required>A pre-built RestLi targeting fragment (`target.includedTargetingFacets:...`).</ParamField>
<ParamField path="startMs" type="integer" required>Forecast window start (epoch ms).</ParamField>
<ParamField path="endMs" type="integer" required>Forecast window end (epoch ms).</ParamField>
<ParamField path="competingBid" type="string">Optional competing bid fragment.</ParamField>

#### get\_organization\_page\_statistics

Organization page view and click statistics. Lifetime breakdown (by geo, country,
function, industry, seniority, staffCountRange) is shown when no time interval is given.
**Returns HTTP 403** until the app is approved for the Community Management API.

<ParamField path="organizationId" type="string" required />

#### get\_organization\_follower\_statistics

Follower demographics (lifetime, by 7 facets). The total count is **not** here. Use
`get_organization_follower_count` for that. **Returns HTTP 403** until Community
Management API approval.

<ParamField path="organizationId" type="string" required />

#### get\_organization\_share\_statistics

Organic engagement stats for an org's posts: aggregate lifetime stats (impressions,
clicks, likes, comments, shares, engagement rate). **Organic only.** For
sponsored content use `get_ad_analytics`. **Returns HTTP 403** until Community
Management API approval.

<ParamField path="organizationId" type="string" required />

***

### Audiences & targeting

#### get\_audience\_count

Estimate the reachable LinkedIn audience size (active + total) for a
targetingCriteria expression. Validates the 300-member campaign minimum before
launch. Returns `total: 0` when the audience is below LinkedIn's privacy floor.

<ParamField path="targetingCriteria" type="string" required>
  A pre-built RestLi targetingCriteria fragment. Build facet URNs with the
  targeting tools below.
</ParamField>

#### list\_targeting\_facets

List all targeting facet categories (industries, titles, seniorities, skills,
locations, jobFunctions, staffCountRanges, interests, etc.) and which entity
finders each supports. The catalog you build `targetingCriteria` from.

No arguments.

#### list\_targeting\_entities

Enumerate all values for an **enumerable** facet (e.g. seniorities, genders,
jobFunctions, ageRanges), resolving closed-list facets to URNs.

<ParamField path="facet" type="string" required>The facet name (e.g. `seniorities`) or a full adTargetingFacet URN.</ParamField>
<ParamField path="locale" type="string">Optional locale, e.g. `en_US`.</ParamField>

<ParamField path="limit" type="integer" default="100" />

#### typeahead\_targeting\_entities

Free-text search for targeting entity URNs within a facet (find geo / skill /
company / title / field-of-study URNs). The main way to turn natural-language
words into targeting URNs.

<ParamField path="facet" type="string" required>The facet name (e.g. `locations`, `skills`) or a full adTargetingFacet URN.</ParamField>
<ParamField path="query" type="string" required>Free-text search, e.g. `Copenhagen` or `machine learning`.</ParamField>
<ParamField path="locale" type="string">Optional locale, e.g. `en_US`.</ParamField>

<ParamField path="limit" type="integer" default="100" />

#### similar\_targeting\_entities

Given seed entity URN(s) in a facet, return similar entities (lookalike
companies / industries / skills / titles) for audience expansion.

<ParamField path="facet" type="string" required>The facet name or a full adTargetingFacet URN.</ParamField>
<ParamField path="entities" type="string[]" required>Seed entity URNs (at least one).</ParamField>

<ParamField path="limit" type="integer" default="100" />

#### resolve\_targeting\_urns

Resolve a batch of entity URNs to human-readable names and facet membership
(e.g. `urn:li:geo:102095887` → `"California, United States"`) to display a
campaign's stored targeting or demographics.

<ParamField path="urns" type="string[]" required>Entity URNs to resolve (at least one).</ParamField>

***

### Conversions & Insight Tag

#### list\_conversion\_rules

List all conversion rules for an ad account (including `conversionMethod=CONVERSIONS_API`
and enabled flags). The `value` field is `{currencyCode, amount}` in major units.

<ParamField path="adAccountId" type="string" required />

<ParamField path="limit" type="integer" default="100" />

#### get\_conversion\_rule

Fetch one conversion rule by id: type, attribution windows, value,
urlMatchRuleExpression, associated campaigns, imagePixelTag.

<ParamField path="adAccountId" type="string" required />

<ParamField path="conversionId" type="string" required>Numeric conversion id (digits only).</ParamField>

#### get\_insight\_tag

Find the Insight Tag for an ad account and retrieve its tracking snippet and
firstParty state.

<ParamField path="adAccountId" type="string" required />

#### list\_insight\_tag\_domains

List domains observed firing the account's Insight Tag (most recent first) with
blocked status and last-callback time. Verify tag installation.

<ParamField path="adAccountId" type="string" required />

<ParamField path="limit" type="integer" default="100" />

#### list\_campaign\_conversions

List all conversion-rule associations for one or more campaigns (which campaigns
attribute which conversions).

<ParamField path="campaignIds" type="string[]" required>Campaign ids to look up (at least one).</ParamField>

<ParamField path="limit" type="integer" default="100" />

***

### Lead form definitions

<Note>
  These tools expose form **structure** only: questions, hidden fields,
  consent text, post-submission CTA. Retrieving actual submitted lead PII requires
  the separate LinkedIn Lead Sync API program (`r_marketing_leadgen_automation`),
  which is not part of this connector.
</Note>

#### list\_lead\_forms

List lead gen form definitions for an ad account.

<ParamField path="adAccountId" type="string" required />

<ParamField path="limit" type="integer" default="100" />

#### get\_lead\_form

Fetch one lead gen form definition by id (full questions, hidden fields, consents,
post-submission CTA).

<ParamField path="formId" type="string" required>Numeric form id (digits only).</ParamField>

***

### Organization pages & organic content (read)

<Note>
  These reads need org/social scopes that v1 does not request, so they **return HTTP
  403** under the current ad-scope access until Community Management API approval: the
  org-profile, follower-count, feed, and page/follower/share statistics reads, the
  individual post/social reads (`get_post`, `get_post_social_metadata`,
  `list_post_comments`, `list_post_reactions`), `list_administered_organizations`, and
  `find_organization_by_vanity_name`.
</Note>

#### list\_administered\_organizations

List the organizations the connected member administers (org URN, role, state).
The entry point for organization selection. Filter to `ADMINISTRATOR` + `APPROVED`
for usable organizations. **Returns HTTP 403** under the current ad-scope access,
until Community Management API approval.

<ParamField path="role" type="string" default="ADMINISTRATOR" />

<ParamField path="state" type="string" default="APPROVED" />

<ParamField path="limit" type="integer" default="100" />

#### get\_organization

Fetch full admin-visible org profile by id (name, website, industries, locations,
logo, staffCountRange). **Returns HTTP 403** until Community Management API approval.

<ParamField path="organizationId" type="string" required />

#### find\_organization\_by\_vanity\_name

Resolve an organization by its vanityName (URL slug) to its URN and profile.
**Returns HTTP 403** under the current ad-scope access, until Community Management
API approval.

<ParamField path="vanityName" type="string" required>The URL slug, e.g. `microsoft`.</ParamField>

#### get\_organization\_follower\_count

Total first-degree follower count for an organization (the headline number).
**Returns HTTP 403** until Community Management API approval.

<ParamField path="organizationId" type="string" required />

#### list\_organization\_posts

List organic posts authored by an organization (the page's content feed), newest
first. **Returns HTTP 403** until Community Management API approval.

<ParamField path="organizationId" type="string" required />

<ParamField path="sortBy" type="string" default="LAST_MODIFIED">
  `LAST_MODIFIED` or `CREATED`.
</ParamField>

<ParamField path="limit" type="integer" default="100" />

#### get\_post

Fetch a single organic post by its share/ugcPost URN (commentary, author,
visibility, content). **Returns HTTP 403** under the current ad-scope access, until
Community Management API approval.

<ParamField path="postUrn" type="string" required>`urn:li:share:123` or `urn:li:ugcPost:123`.</ParamField>

#### get\_post\_social\_metadata

Reaction and comment summary for a post (commentsState, commentSummary,
reactionSummaries by type). **Returns HTTP 403** under the current ad-scope access,
until Community Management API approval.

<ParamField path="entityUrn" type="string" required>The post/share/ugcPost URN.</ParamField>

#### list\_post\_comments

List comments on a post (or nested replies on a comment). **Returns HTTP 403** under
the current ad-scope access, until Community Management API approval.

<ParamField path="entityUrn" type="string" required>The post/share/ugcPost URN.</ParamField>

<ParamField path="limit" type="integer" default="100" />

#### list\_post\_reactions

List reactions on a post or comment with `reactionType`
(LIKE / PRAISE / EMPATHY / INTEREST / APPRECIATION / ENTERTAINMENT). **Returns HTTP
403** under the current ad-scope access, until Community Management API approval.

<ParamField path="entityUrn" type="string" required>The post/share/ugcPost URN.</ParamField>

<ParamField path="limit" type="integer" default="100" />

***

### Member profile

<Note>
  Both member-profile reads use the profile scopes that v1 does not request, so they
  **return HTTP 403** until Community Management API approval. `get_my_profile` still
  doubles as a connect-confirmation once those scopes are granted.
</Note>

#### get\_my\_profile

The connected member's own profile: id (person URN), name, headline, vanityName
(public-URL slug), photo. Also useful as a connect-confirmation / whoami check.
**Returns HTTP 403** until Community Management API approval.

No arguments.

#### get\_my\_connections\_count

The connected member's number of first-degree connections (count only, not the
list). The viewer is implied by the access token. **Returns HTTP 403** until
Community Management API approval.

No arguments.

<ResponseField name="count" type="integer">Number of first-degree connections.</ResponseField>

***

### Advanced: query (read escape-hatch)

#### query

GET any allow-listed LinkedIn REST or v2 path with a safelisted set of read
parameters, for the long tail not covered by a dedicated tool. Read-only by
construction (GET-only + path and param guard).

<ParamField path="path" type="string" required>
  A bare path under `/rest` or `/v2`, e.g. `/rest/adCampaigns/123` or `/v2/me`
  (no scheme, no traversal).
</ParamField>

<ParamField path="params" type="object">
  Read params as a string/number record. Only safelisted keys are forwarded;
  others are dropped silently. Percent-encode URN values. Allowed keys include:
  `q`, `fields`, `projection`, `start`, `count`, `pageSize`, `pageToken`,
  `search`, `pivot`, `pivots`, `timeGranularity`, `dateRange`, `facet`,
  `query`, `urns`, `entities`, `ids`, `owner`, `account`, `organization`,
  `sort`, `sortBy`, `sortOrder`, `edgeType`.
</ParamField>

Allow-listed path resources: `adAccounts`, `adAccountUsers`,
`adCampaignGroups`, `adCampaigns`, `creatives`, `adPreviews`, `adAnalytics`,
`adBudgetPricing`, `adSupplyForecasts`, `audienceCounts`, `adTargetingFacets`,
`adTargetingEntities`, `conversions`, `insightTags`, `insightTagDomains`,
`campaignConversions`, `leadForms`, `organizations`, `organizationAcls`,
`organizationPageStatistics`, `organizationalEntityFollowerStatistics`,
`organizationalEntityShareStatistics`, `networkSizes`, `posts`,
`socialMetadata`, `socialActions`, `reactions`, `me`, `connections`, `geo`.

***

## Ad-management write tools (11)

All 11 tools go through the guardrail described above. See
[Handlinger & guardrails](/essentials/handlinger-og-guardrails) for the full model.

### Campaign groups

#### create\_campaign\_group

Create a campaign group (the budget/status container above campaigns).
Created **DRAFT** by default (no serving); `status: "ACTIVE"` requires `confirm: true`.

<ParamField path="adAccountId" type="string" required />

<ParamField path="name" type="string" required>1–100 characters.</ParamField>
<ParamField path="startMs" type="integer" required>runSchedule.start (epoch ms).</ParamField>
<ParamField path="endMs" type="integer">runSchedule.end (epoch ms; required if totalBudget is set).</ParamField>

<ParamField path="status" type="string" default="DRAFT">
  `DRAFT` | `ACTIVE` | `PAUSED` | `ARCHIVED`. ACTIVE requires `confirm: true`.
</ParamField>

<ParamField path="totalBudgetAmount" type="string">Total budget as a decimal string (major units).</ParamField>
<ParamField path="currencyCode" type="string">ISO 4217 code; required when a budget amount is provided.</ParamField>
<ParamField path="confirm" type="boolean">Set `true` to apply when confirmation is required.</ParamField>

#### update\_campaign\_group

Edit a campaign group's name, schedule, or total budget. A budget change always
requires `confirm: true`.

<ParamField path="adAccountId" type="string" required />

<ParamField path="campaignGroupId" type="string" required />

<ParamField path="name" type="string" />

<ParamField path="totalBudgetAmount" type="string" />

<ParamField path="currencyCode" type="string" />

<ParamField path="endMs" type="integer">New runSchedule.end (epoch ms).</ParamField>

<ParamField path="confirm" type="boolean" />

#### set\_campaign\_group\_status

Set a campaign group to DRAFT / ACTIVE / PAUSED / ARCHIVED. PAUSED stops serving
immediately and applies without confirmation. ACTIVE and ARCHIVED require
`confirm: true`.

<ParamField path="adAccountId" type="string" required />

<ParamField path="campaignGroupId" type="string" required />

<ParamField path="status" type="string" required>`DRAFT` | `ACTIVE` | `PAUSED` | `ARCHIVED`.</ParamField>

<ParamField path="confirm" type="boolean" />

### Campaigns

#### create\_campaign

Create a campaign under a group. Created **DRAFT** by default (no spend).
`status: "ACTIVE"` requires `confirm: true`. Money is major units.

<ParamField path="adAccountId" type="string" required />

<ParamField path="campaignGroupId" type="string" required>Parent campaign group id.</ParamField>

<ParamField path="name" type="string" required />

<ParamField path="type" type="string" required>Campaign type, e.g. `SPONSORED_UPDATES`, `TEXT_AD`, `DYNAMIC`.</ParamField>
<ParamField path="costType" type="string" required>Bidding cost type: `CPM` | `CPC` | `CPV`.</ParamField>
<ParamField path="country" type="string" default="us">locale.country (ISO 3166-1 alpha-2).</ParamField>
<ParamField path="language" type="string" default="en">locale.language (ISO 639-1).</ParamField>
<ParamField path="dailyBudgetAmount" type="string">Daily budget (decimal string). Provide daily OR total.</ParamField>
<ParamField path="totalBudgetAmount" type="string">Total budget (decimal string). Provide daily OR total.</ParamField>
<ParamField path="currencyCode" type="string">Required when a budget amount is provided.</ParamField>
<ParamField path="unitCostAmount" type="string">Bid (unitCost) amount (decimal string).</ParamField>
<ParamField path="targetingCriteria" type="string" required>targetingCriteria as a JSON object string. Build URNs with the targeting read tools.</ParamField>
<ParamField path="objectiveType" type="string">e.g. `WEBSITE_VISITS`, `LEAD_GENERATION`, `BRAND_AWARENESS`.</ParamField>
<ParamField path="politicalIntent" type="string">Required by LinkedIn (2025-08+) on create; set the value appropriate to your account/region.</ParamField>
<ParamField path="status" type="string" default="DRAFT">`DRAFT` | `ACTIVE` | `PAUSED` | `ARCHIVED`. ACTIVE requires `confirm: true`.</ParamField>

<ParamField path="confirm" type="boolean" />

#### update\_campaign

Edit a campaign's name, budgets, bid (unitCost), or targetingCriteria. A
budget or bid change always requires `confirm: true`.

<ParamField path="adAccountId" type="string" required />

<ParamField path="campaignId" type="string" required />

<ParamField path="name" type="string" />

<ParamField path="dailyBudgetAmount" type="string" />

<ParamField path="totalBudgetAmount" type="string" />

<ParamField path="unitCostAmount" type="string" />

<ParamField path="currencyCode" type="string" />

<ParamField path="targetingCriteria" type="string">New targetingCriteria as a JSON object string.</ParamField>

<ParamField path="confirm" type="boolean" />

#### set\_campaign\_status

Set a campaign to DRAFT / ACTIVE / PAUSED / ARCHIVED. PAUSED stops spend
immediately (no confirmation needed). ACTIVE and ARCHIVED require `confirm: true`.

<ParamField path="adAccountId" type="string" required />

<ParamField path="campaignId" type="string" required />

<ParamField path="status" type="string" required>`DRAFT` | `ACTIVE` | `PAUSED` | `ARCHIVED`.</ParamField>

<ParamField path="confirm" type="boolean" />

### Creatives

#### set\_creative\_status

Set a creative (ad) to DRAFT / ACTIVE / PAUSED / ARCHIVED. PAUSED is immediate.
ACTIVE (starts serving and spending) and ARCHIVED require `confirm: true`.

<ParamField path="adAccountId" type="string" required />

<ParamField path="creativeUrn" type="string" required>`urn:li:sponsoredCreative:123`.</ParamField>
<ParamField path="status" type="string" required>`DRAFT` | `ACTIVE` | `PAUSED` | `ARCHIVED`.</ParamField>

<ParamField path="confirm" type="boolean" />

### Conversion tracking

#### create\_conversion\_rule

Create a conversion rule for an account (measurement setup; does not spend).
Returns the new id and the imagePixelTag snippet. Applies without `confirm: true`
by default (measurement only, no spend or publish).

<ParamField path="adAccountId" type="string" required />

<ParamField path="name" type="string" required />

<ParamField path="type" type="string" required>e.g. `LEAD`, `PURCHASE`, `SIGN_UP`, `ADD_TO_CART`, `DOWNLOAD`, `KEY_PAGE_VIEW`.</ParamField>
<ParamField path="attributionType" type="string" default="LAST_TOUCH_BY_CAMPAIGN">`LAST_TOUCH_BY_CAMPAIGN` | `LAST_TOUCH_BY_CONVERSION`.</ParamField>
<ParamField path="postClickAttributionWindowSize" type="integer" default="30">Post-click attribution window (days).</ParamField>
<ParamField path="viewThroughAttributionWindowSize" type="integer" default="7">View-through attribution window (days).</ParamField>
<ParamField path="valueAmount" type="string">Optional fixed conversion value (decimal string, major units).</ParamField>
<ParamField path="currencyCode" type="string">Required when `valueAmount` is provided.</ParamField>

<ParamField path="confirm" type="boolean" />

#### update\_conversion\_rule

Edit a conversion rule's name, enabled state, or value. Editing the value does
not retroactively re-attribute past events. Applies without `confirm: true`.

<ParamField path="adAccountId" type="string" required />

<ParamField path="conversionId" type="string" required />

<ParamField path="name" type="string" />

<ParamField path="enabled" type="boolean" />

<ParamField path="valueAmount" type="string" />

<ParamField path="currencyCode" type="string" />

<ParamField path="confirm" type="boolean" />

#### associate\_campaign\_conversion

Attach a conversion rule to a campaign so that campaign attributes that
conversion. Use the `urn:lla` conversion URN form (e.g.
`urn:lla:llaPartnerConversion:123`). Applies without `confirm: true`.

<ParamField path="campaignId" type="string" required />

<ParamField path="conversionUrn" type="string" required>`urn:lla:llaPartnerConversion:123` (note the `urn:lla` namespace).</ParamField>

<ParamField path="confirm" type="boolean" />

#### remove\_campaign\_conversion

Detach a conversion rule from a campaign (stops conversion attribution for that
campaign). Destructive to reporting and optimization. Requires `confirm: true`.

<ParamField path="campaignId" type="string" required />

<ParamField path="conversionUrn" type="string" required>`urn:lla:llaPartnerConversion:123`.</ParamField>

<ParamField path="confirm" type="boolean" />

***

## Organic-social write tools (8): requires Community Management API approval

<Warning>
  These 8 tools are built and exposed but **not yet active**. They return
  **HTTP 403** until Consile's LinkedIn app is approved for the **Community
  Management API**. The organic-social read tools (`list_organization_posts`,
  `get_post`, `get_post_social_metadata`, `list_post_comments`, `list_post_reactions`)
  **also return HTTP 403** under the current ad-scope access. The scopes
  `w_organization_social` and `w_member_social` are not requested in v1.
</Warning>

When activated, the same guardrail applies: new posts default to **DRAFT**
lifecycle (not publicly visible), and publishing public content (a published post,
a comment, or a reaction) and deleting content require `confirm: true`.

### Posts

#### create\_organization\_post

Publish an organic post authored by an organization (Company Page). Defaults to
`DRAFT` lifecycle (not publicly visible); `lifecycleState: "PUBLISHED"` publishes
public content under the brand and requires `confirm: true`.

<ParamField path="organizationId" type="string" required />

<ParamField path="commentary" type="string" required>Post text (supports #hashtags).</ParamField>
<ParamField path="visibility" type="string" default="PUBLIC">`PUBLIC` | `CONNECTIONS` | `LOGGED_IN`.</ParamField>
<ParamField path="lifecycleState" type="string" default="DRAFT">`DRAFT` | `PUBLISHED`. PUBLISHED requires `confirm: true`.</ParamField>

<ParamField path="confirm" type="boolean" />

#### create\_member\_post

Publish an organic post authored by the **connected member** (person). Defaults to
`DRAFT`; `PUBLISHED` posts public content under the member's name and requires
`confirm: true`. The author is resolved from `/v2/me` and is never taken from tool input.

<ParamField path="commentary" type="string" required>Post text.</ParamField>
<ParamField path="visibility" type="string" default="PUBLIC">`PUBLIC` | `CONNECTIONS` | `LOGGED_IN`.</ParamField>
<ParamField path="lifecycleState" type="string" default="DRAFT">`DRAFT` | `PUBLISHED`. PUBLISHED requires `confirm: true`.</ParamField>

<ParamField path="confirm" type="boolean" />

#### update\_post

Edit a post's commentary or lifecycleState. Editing the text of a (possibly
public) post, or publishing a DRAFT (`lifecycleState: "PUBLISHED"`), mutates
public content and requires `confirm: true`.

<ParamField path="postUrn" type="string" required>`urn:li:share:123` or `urn:li:ugcPost:123`.</ParamField>

<ParamField path="commentary" type="string" />

<ParamField path="lifecycleState" type="string">`DRAFT` | `PUBLISHED`.</ParamField>

<ParamField path="confirm" type="boolean" />

#### delete\_post

Permanently delete a post. Irreversible removal of (possibly public) content.
Requires `confirm: true`.

<ParamField path="postUrn" type="string" required>`urn:li:share:123` or `urn:li:ugcPost:123`.</ParamField>

<ParamField path="confirm" type="boolean" />

### Comments & reactions

#### create\_comment

Post a public comment on a post, as the organization (pass `organizationId`) or
the connected member. Public content under the brand or member identity. Requires
`confirm: true`.

<ParamField path="postUrn" type="string" required>The post/share/ugcPost URN to comment on.</ParamField>
<ParamField path="text" type="string" required>The comment text.</ParamField>
<ParamField path="organizationId" type="string">Comment AS this organization; omit to comment as the connected member.</ParamField>

<ParamField path="confirm" type="boolean" />

#### delete\_comment

Delete a comment on a post (your own, or moderating others' comments on your
post), as the organization or the connected member. Destructive. Requires
`confirm: true`.

<ParamField path="postUrn" type="string" required>The post/share/ugcPost URN the comment is on.</ParamField>
<ParamField path="commentId" type="string" required>The comment id (numeric id or full comment URN).</ParamField>
<ParamField path="organizationId" type="string">Acting AS this organization; omit to act as the connected member.</ParamField>

<ParamField path="confirm" type="boolean" />

#### create\_reaction

React (LIKE / PRAISE / EMPATHY / INTEREST / APPRECIATION / ENTERTAINMENT) to a
post, as the organization or the connected member. A public brand or member action.
Requires `confirm: true`.

<ParamField path="postUrn" type="string" required>The post/share/ugcPost URN to react to.</ParamField>

<ParamField path="reactionType" type="string" default="LIKE">
  `LIKE` | `PRAISE` | `EMPATHY` | `INTEREST` | `APPRECIATION` | `ENTERTAINMENT`.
</ParamField>

<ParamField path="organizationId" type="string">React AS this organization; omit to react as the connected member.</ParamField>

<ParamField path="confirm" type="boolean" />

#### delete\_reaction

Remove a reaction previously made (as the organization or the connected member)
from a post. Low-stakes cleanup. Applies **without** `confirm: true`.

<ParamField path="postUrn" type="string" required>The post/share/ugcPost URN the reaction is on.</ParamField>
<ParamField path="organizationId" type="string">The reaction's actor was this organization; omit for the connected member.</ParamField>

<ParamField path="confirm" type="boolean" />

***

## Code examples

<CodeGroup>
  ```json Request: list_campaigns theme={null}
  {
    "name": "list_campaigns",
    "arguments": {
      "adAccountId": "503456789",
      "status": ["ACTIVE", "PAUSED"],
      "limit": 50
    }
  }
  ```

  ```json Request: get_ad_analytics theme={null}
  {
    "name": "get_ad_analytics",
    "arguments": {
      "pivot": "CAMPAIGN",
      "timeGranularity": "DAILY",
      "fromYmd": "2025-06-01",
      "toYmd": "2025-06-30",
      "accounts": ["503456789"]
    }
  }
  ```

  ```json Request: create_campaign_group (dry-run) theme={null}
  {
    "name": "create_campaign_group",
    "arguments": {
      "adAccountId": "503456789",
      "name": "Q3 Brand Awareness",
      "startMs": 1751328000000,
      "totalBudgetAmount": "5000.00",
      "currencyCode": "DKK",
      "status": "DRAFT"
    }
  }
  ```

  ```json Response: WritePreview (no confirm) theme={null}
  {
    "preview": {
      "action": "create_campaign_group",
      "summary": "Create campaign group \"Q3 Brand Awareness\" as DRAFT.",
      "request": {
        "method": "POST",
        "path": "/rest/adAccounts/503456789/adCampaignGroups",
        "body": { "name": "Q3 Brand Awareness", "status": "DRAFT", "..." : "..." }
      },
      "confirmHint": "Re-run the same call with confirm: true to apply this change."
    }
  }
  ```
</CodeGroup>

<Note>
  The token is refreshed transparently on the read path. A revoked token (or one
  LinkedIn otherwise rejects) surfaces as **HTTP 401** / `AccessTokenExpiredError`;
  re-authorize in the portal. See [Errors & limits](/developers/errors-and-limits).
</Note>
