LinkedIn Marketing API AdAccounts API
The AdAccounts API from LinkedIn Marketing API — 5 operation(s) for adaccounts.
The AdAccounts API from LinkedIn Marketing API — 5 operation(s) for adaccounts.
openapi: 3.1.0
info:
title: LinkedIn Marketing AdAccounts API
description: 'Partial OpenAPI 3.1 representation of the LinkedIn Marketing API for
advertising, campaign management, audience targeting, and reporting. Uses
OAuth 2.0 three-legged (authorization code) flow and requires a
`LinkedIn-Version` header in YYYYMM format on every versioned request.
Reference documentation lives at
https://learn.microsoft.com/en-us/linkedin/marketing/.
'
version: '2026.05'
contact:
name: LinkedIn Marketing API Program
url: https://learn.microsoft.com/en-us/linkedin/marketing/
servers:
- url: https://api.linkedin.com/rest
description: Versioned REST endpoint.
security:
- OAuth2:
- rw_ads
tags:
- name: AdAccounts
paths:
/adAccounts:
post:
summary: Create an ad account
operationId: createAdAccount
security:
- OAuth2:
- rw_ads
parameters:
- $ref: '#/components/parameters/LinkedInVersion'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/AdAccount'
responses:
'201':
description: Ad account created. The created entity ID is returned in the `x-restli-id` response header.
headers:
x-restli-id:
schema:
type: string
tags:
- AdAccounts
/adAccounts/{adAccountId}:
get:
summary: Get an ad account
operationId: getAdAccount
security:
- OAuth2:
- r_ads
- rw_ads
parameters:
- $ref: '#/components/parameters/LinkedInVersion'
- name: adAccountId
in: path
required: true
schema:
type: string
responses:
'200':
description: The requested ad account.
content:
application/json:
schema:
$ref: '#/components/schemas/AdAccount'
tags:
- AdAccounts
/adAccounts/{adAccountId}/adCampaignGroups:
post:
summary: Create a campaign group
operationId: createAdCampaignGroup
security:
- OAuth2:
- rw_ads
parameters:
- $ref: '#/components/parameters/LinkedInVersion'
- name: adAccountId
in: path
required: true
schema:
type: string
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/AdCampaignGroup'
responses:
'201':
description: Campaign group created.
headers:
x-restli-id:
schema:
type: string
tags:
- AdAccounts
/adAccounts/{adAccountId}/adCampaigns:
post:
summary: Create a campaign
operationId: createAdCampaign
security:
- OAuth2:
- rw_ads
parameters:
- $ref: '#/components/parameters/LinkedInVersion'
- name: adAccountId
in: path
required: true
schema:
type: string
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/AdCampaign'
responses:
'201':
description: Campaign created.
headers:
x-restli-id:
schema:
type: string
tags:
- AdAccounts
/adAccounts/{adAccountId}/creatives:
post:
summary: Create an ad creative
operationId: createCreative
security:
- OAuth2:
- rw_ads
parameters:
- $ref: '#/components/parameters/LinkedInVersion'
- name: adAccountId
in: path
required: true
schema:
type: string
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/Creative'
responses:
'201':
description: Creative created.
headers:
x-restli-id:
schema:
type: string
tags:
- AdAccounts
components:
schemas:
AdCampaign:
type: object
properties:
account:
type: string
name:
type: string
type:
type: string
enum:
- TEXT_AD
- SPONSORED_UPDATES
- SPONSORED_INMAILS
costType:
type: string
enum:
- CPC
- CPM
- CPV
dailyBudget:
$ref: '#/components/schemas/MoneyAmount'
unitCost:
$ref: '#/components/schemas/MoneyAmount'
locale:
type: object
properties:
country:
type: string
language:
type: string
runSchedule:
type: object
properties:
start:
type: integer
format: int64
end:
type: integer
format: int64
targetingCriteria:
type: object
audienceExpansionEnabled:
type: boolean
creativeSelection:
type: string
offsiteDeliveryEnabled:
type: boolean
Creative:
type: object
properties:
campaign:
type: string
status:
type: string
enum:
- ACTIVE
- PAUSED
- ARCHIVED
- DRAFT
type:
type: string
enum:
- TEXT_AD
- SPONSORED_UPDATES
- SPONSORED_INMAILS
variables:
type: object
MoneyAmount:
type: object
properties:
amount:
type: string
currencyCode:
type: string
AdAccount:
type: object
required:
- currency
- name
- type
- reference
properties:
currency:
type: string
example: USD
name:
type: string
notifiedOnCampaignOptimization:
type: boolean
notifiedOnCreativeApproval:
type: boolean
notifiedOnCreativeRejection:
type: boolean
notifiedOnEndOfCampaign:
type: boolean
reference:
type: string
description: Owning organization URN, e.g. `urn:li:organization:101202303`.
type:
type: string
enum:
- BUSINESS
- ENTERPRISE
AdCampaignGroup:
type: object
properties:
account:
type: string
name:
type: string
runSchedule:
type: object
properties:
start:
type: integer
format: int64
end:
type: integer
format: int64
status:
type: string
enum:
- ACTIVE
- PAUSED
- ARCHIVED
- DRAFT
totalBudget:
$ref: '#/components/schemas/MoneyAmount'
parameters:
LinkedInVersion:
name: LinkedIn-Version
in: header
required: true
description: API version in `YYYYMM` format, e.g. `202605`.
schema:
type: string
pattern: ^\d{6}$
securitySchemes:
OAuth2:
type: oauth2
description: OAuth 2.0 three-legged (authorization code) flow.
flows:
authorizationCode:
authorizationUrl: https://www.linkedin.com/oauth/v2/authorization
tokenUrl: https://www.linkedin.com/oauth/v2/accessToken
scopes:
r_ads: Read ads accounts, campaigns, and creatives.
rw_ads: Read and write ads accounts, campaigns, and creatives.
r_ads_reporting: Read ad campaign reporting data.
r_basicprofile: Read basic profile.