LinkedIn Ad Accounts API

APIs to retrieve and manage ad accounts

Business capability
Digital Marketing Management BC-400.60

Operations 6

GET /adAccounts LinkedIn Retrieve User Ad Accounts #
POST /rest/adAccounts Create an ad account (or batch create with X-RestLi-Method header) #
GET /rest/adAccounts/{adAccountID} Fetch an ad account #
POST /rest/adAccounts/{adAccountID} Update an ad account (partial update via patch payload) #
DELETE /rest/adAccounts/{adAccountID} Delete a DRAFT ad account #

Documentation

📖
Documentation
https://learn.microsoft.com/en-us/linkedin/marketing/
📖
GettingStarted
https://learn.microsoft.com/en-us/linkedin/marketing/getting-started
📖
Documentation
https://learn.microsoft.com/en-us/linkedin/learning/
📖
GettingStarted
https://learn.microsoft.com/en-us/linkedin/learning/getting-started
📖
Documentation
https://learn.microsoft.com/en-us/linkedin/learning/getting-started/terminology
📖
Documentation
https://learn.microsoft.com/en-us/linkedin/learning/integrations/xapi
📖
APIReference
https://learn.microsoft.com/en-us/linkedin/learning/reporting/reporting-docs/reporting-api
📖
Documentation
https://learn.microsoft.com/en-us/linkedin/talent/
📖
GettingStarted
https://learn.microsoft.com/en-us/linkedin/talent/getting-started
📖
Documentation
https://learn.microsoft.com/en-us/linkedin/talent/versioning
📖
Documentation
https://learn.microsoft.com/en-us/linkedin/compliance/
📖
GettingStarted
https://learn.microsoft.com/en-us/linkedin/compliance/getting-started
📖
Documentation
https://learn.microsoft.com/en-us/linkedin/compliance/compliance-api/overview
📖
Documentation
https://learn.microsoft.com/en-us/linkedin/sales/
📖
APIReference
https://learn.microsoft.com/en-us/linkedin/sales/display-services/
📖
APIReference
https://learn.microsoft.com/en-us/linkedin/sales/analytics-services/
📖
APIReference
https://learn.microsoft.com/en-us/linkedin/sales/sync-services/
📖
Documentation
https://learn.microsoft.com/en-us/linkedin/dma/
📖
Documentation
https://learn.microsoft.com/en-us/linkedin/dma/member-data-portability/
📖
Documentation
https://learn.microsoft.com/en-us/linkedin/dma/pages-data-portability-overview
📖
Documentation
https://learn.microsoft.com/en-us/linkedin/dma/transparency/advertiser-transparency

Specifications

Other Resources

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/linkedin-ad-accounts-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

linkedin-ad-accounts-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Linkedin Ad Accounts API
  version: 1.0.0
  contact:
    name: LinkedIn Marketing API Support
    url: https://docs.microsoft.com/en-us/linkedin/marketing/
  description: 'Operations tagged Ad Accounts across 2 of this provider''s published API definitions: linkedin-marketing-audience.yml, linkedin-ad-accounts-api-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://api.linkedin.com/rest
  description: LinkedIn REST API Server
security:
- OAuth2Auth:
  - rw_ads
tags:
- name: Ad Accounts
  description: APIs to retrieve and manage ad accounts
paths:
  /adAccounts:
    get:
      tags:
      - Ad Accounts
      summary: LinkedIn Retrieve User Ad Accounts
      description: Retrieve the authenticated user's ad accounts. Filter by type, status, and test flag to get relevant accounts.
      operationId: getAdAccounts
      x-microcks-operation:
        dispatcher: FALLBACK
        dispatcherRules: ''
      parameters:
      - name: X-Restli-Protocol-Version
        in: header
        required: true
        schema:
          type: string
        description: RestLi protocol version
        example: 2.0.0
      - name: LinkedIn-Version
        in: header
        required: true
        schema:
          type: string
        description: LinkedIn API version
        example: '202401'
      - name: q
        in: query
        required: true
        schema:
          type: string
          enum:
          - search
        description: Query type
        example: search
      - name: search
        in: query
        required: false
        schema:
          type: string
        description: Search criteria
        example: (type:(values:List(BUSINESS)),status:(values:List(ACTIVE)),test:false)
      - name: fields
        in: query
        required: false
        schema:
          type: string
        description: Fields to include in response
        example: id,name,test,reference
      responses:
        '200':
          description: Successfully retrieved ad accounts
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AdAccountsResponse'
              examples:
                SuccessResponse:
                  $ref: '#/components/examples/AdAccountsResponseExample'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    servers:
    - url: https://api.linkedin.com/rest
      description: LinkedIn REST API Server
  /rest/adAccounts:
    get:
      tags:
      - Ad Accounts
      summary: Search ad accounts
      operationId: adAccounts_search
      parameters:
      - name: q
        in: query
        required: true
        schema:
          type: string
          enum:
          - search
      - name: search
        in: query
        schema:
          type: string
          description: Search criteria, e.g. (type:(values:List(BUSINESS)),status:(values:List(ACTIVE)))
      - name: pageSize
        in: query
        schema:
          type: integer
          maximum: 1000
      - name: pageToken
        in: query
        schema:
          type: string
      - $ref: '#/components/parameters/linkedinVersion'
      - $ref: '#/components/parameters/restliProtocol'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AdAccountSearchResponse'
    post:
      tags:
      - Ad Accounts
      summary: Create an ad account (or batch create with X-RestLi-Method header)
      operationId: adAccounts_create
      parameters:
      - $ref: '#/components/parameters/linkedinVersion'
      - $ref: '#/components/parameters/restliProtocol'
      - name: X-RestLi-Method
        in: header
        schema:
          type: string
          enum:
          - BATCH_CREATE
      requestBody:
        required: true
        content:
          application/json:
            schema:
              oneOf:
              - $ref: '#/components/schemas/AdAccount'
              - type: object
                properties:
                  elements:
                    type: array
                    items:
                      $ref: '#/components/schemas/AdAccount'
      responses:
        '201':
          description: Created (account ID returned in x-restli-id header)
    servers:
    - url: https://api.linkedin.com/rest
      description: LinkedIn REST API Server
  /rest/adAccounts/{adAccountID}:
    get:
      tags:
      - Ad Accounts
      summary: Fetch an ad account
      operationId: adAccounts_get
      parameters:
      - $ref: '#/components/parameters/adAccountID'
      - $ref: '#/components/parameters/linkedinVersion'
      - $ref: '#/components/parameters/restliProtocol'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AdAccount'
    post:
      tags:
      - Ad Accounts
      summary: Update an ad account (partial update via patch payload)
      operationId: adAccounts_update
      parameters:
      - $ref: '#/components/parameters/adAccountID'
      - $ref: '#/components/parameters/linkedinVersion'
      - $ref: '#/components/parameters/restliProtocol'
      - name: X-RestLi-Method
        in: header
        schema:
          type: string
          enum:
          - PARTIAL_UPDATE
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                patch:
                  type: object
                  properties:
                    $set:
                      type: object
                      additionalProperties: true
      responses:
        '204':
          description: No Content
    delete:
      tags:
      - Ad Accounts
      summary: Delete a DRAFT ad account
      operationId: adAccounts_delete
      parameters:
      - $ref: '#/components/parameters/adAccountID'
      - $ref: '#/components/parameters/linkedinVersion'
      - $ref: '#/components/parameters/restliProtocol'
      responses:
        '204':
          description: No Content
    servers:
    - url: https://api.linkedin.com/rest
      description: LinkedIn REST API Server
components:
  examples:
    AdAccountsResponseExample:
      summary: List of ad accounts
      value:
        paging:
          start: 0
          count: 10
          total: 2
          links: []
        elements:
        - name: Test ad account
          reference: urn:li:organization:11223344
          id: 123456
          test: false
        - name: MDO ad account
          reference: urn:li:organization:2355689
          id: 456789
          test: false
  schemas:
    Paging:
      type: object
      properties:
        start:
          type: integer
          description: Starting index
          example: 0
        count:
          type: integer
          description: Number of results returned
          example: 10
        total:
          type: integer
          description: Total number of results
          example: 2
        links:
          type: array
          items:
            type: string
    AdAccount:
      type: object
      properties:
        id:
          type: integer
          format: int64
          description: Unique identifier for the ad account
          example: 123456
        name:
          type: string
          description: Display name of the ad account
          example: Test ad account
        reference:
          type: string
          description: Reference URN (organization) for the ad account
          example: urn:li:organization:11223344
        test:
          type: boolean
          description: Whether this is a test ad account
          example: false
      required:
      - id
      - name
      - test
    ErrorResponse:
      type: object
      properties:
        status:
          type: integer
          description: HTTP status code
          example: 400
        message:
          type: string
          description: Error message
          example: Invalid request parameters
        code:
          type: string
          description: Error code
          example: INVALID_PARAMS
    AdAccountsResponse:
      type: object
      properties:
        elements:
          type: array
          items:
            $ref: '#/components/schemas/AdAccount'
        paging:
          $ref: '#/components/schemas/Paging'
    AdAccountSearchResponse:
      type: object
      properties:
        elements:
          type: array
          items:
            $ref: '#/components/schemas/AdAccount'
        metadata:
          type: object
          properties:
            nextPageToken:
              type: string
  parameters:
    linkedinVersion:
      name: Linkedin-Version
      in: header
      required: true
      description: LinkedIn API version in YYYYMM format
      schema:
        type: string
        example: '202605'
    adAccountID:
      name: adAccountID
      in: path
      required: true
      schema:
        type: string
    restliProtocol:
      name: X-Restli-Protocol-Version
      in: header
      required: true
      schema:
        type: string
        enum:
        - 2.0.0
  securitySchemes:
    OAuth2Auth:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: https://www.linkedin.com/oauth/v2/authorization
          tokenUrl: https://www.linkedin.com/oauth/v2/accessToken
          scopes:
            rw_ads: Read and write advertising data
    oauth2:
      type: oauth2
      description: LinkedIn OAuth 2.0 (3-legged or 2-legged)
      flows:
        authorizationCode:
          authorizationUrl: https://www.linkedin.com/oauth/v2/authorization
          tokenUrl: https://www.linkedin.com/oauth/v2/accessToken
          scopes:
            rw_ads: Read and write LinkedIn ads data
            r_ads: Read LinkedIn ads data
            r_ads_reporting: Read LinkedIn ads reporting
            r_organization_social: Read organization social actions
            w_organization_social: Write organization social actions
x-refined-from:
- linkedin-marketing-audience.yml
- linkedin-ad-accounts-api-openapi.yml