LinkedIn Use Cases > InMail Content API

You can set up the message contents sent to targeted LinkedIn members' inbox, either as a Message Ad or a Conversation Ad.

Business capability
Digital Marketing Management BC-400.60

Operations 5

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

POST /rest/inMailContents/ Create InMail ad content · LinkedIn Create InMail Content #
Ask an LLM
“Can I create the message content for a sponsored InMail?”
“What's the first step in building a Message Ad's InMail body?”
Tell an agent
Create new InMail content for my message ad.
Draft a sponsored InMail content item.
GET /rest/inMailContents/{adInMailContentId} Get one InMail content item · LinkedIn Get InMail Content #
Ask an LLM
“What does a specific InMail content item contain?”
“Can I retrieve a single sponsored InMail by its ID?”
Tell an agent
Get InMail content {adInMailContentId}.
Show the subject and body of InMail {adInMailContentId}.
POST /rest/inMailContents/{adInMailContentId} Update an InMail content item · LinkedIn Update InMail Content #
Ask an LLM
“Can I edit an InMail's content after creating it?”
“Is it possible to change the subject line of an existing InMail?”
Tell an agent
Update InMail content {adInMailContentId}.
Change the message text of InMail {adInMailContentId}.
GET /rest/inMailContents Batch get InMail content items · LinkedIn Batch Get InMail Content #
Ask an LLM
“Can I fetch several InMail contents in one request?”
“Which InMail items belong to a set of IDs I have?”
Tell an agent
Batch get InMail contents {ids}.
Retrieve the InMail content items {ids} together.
POST /rest/inMailContents Send a test InMail · LinkedIn Send Test InMail #
Ask an LLM
“Can I send myself a test copy of an InMail before launch?”
“Is there a way to preview a sponsored InMail in a real inbox on LinkedIn?”
Tell an agent
Send a test InMail using action {action}.
Share a test copy of my InMail content to check how it looks.

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:linkedin-use-cases-inmail-content-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-use-cases-inmail-content-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Use Cases > InMail Content API
  description: Please note that these are versioned set of APIs and they are different than the earlier one.
  version: 1.0.0
servers:
- url: https://api.linkedin.com
  description: LinkedIn Marketing API Production Server
security:
- oauth2Auth: []
tags:
- name: Use Cases > InMail Content
  description: You can set up the message contents sent to targeted LinkedIn members' inbox, either as a Message Ad or a Conversation Ad.
paths:
  /rest/inMailContents/:
    post:
      tags:
      - Use Cases > InMail Content
      summary: LinkedIn Create InMail Content
      description: API to create an inMail Content.
      requestBody:
        content:
          '*/*':
            schema:
              $ref: '#/components/schemas/CreateInmailContentRequest'
      parameters:
      - name: Authorization
        in: header
        schema:
          type: string
        example: '{{insert_token}}'
      - name: LinkedIn-Version
        in: header
        schema:
          type: string
        example: '{{insert_version}}'
      - name: X-Restli-Protocol-Version
        in: header
        schema:
          type: string
        example: 2.0.0
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
      operationId: postCreateInmailContent
      x-microcks-operation:
        dispatcher: FALLBACK
        dispatcherRules: '{}'
        delay: 0
  /rest/inMailContents/{adInMailContentId}:
    get:
      tags:
      - Use Cases > InMail Content
      summary: LinkedIn Get InMail Content
      description: API to retrieve an inMail Content.
      parameters:
      - name: Authorization
        in: header
        schema:
          type: string
        example: '{{insert_token}}'
      - name: LinkedIn-Version
        in: header
        schema:
          type: string
        example: '{{insert_version}}'
      - name: X-Restli-Protocol-Version
        in: header
        schema:
          type: string
        example: 2.0.0
      - name: adInMailContentId
        in: path
        schema:
          type: string
        required: true
        example: '123456'
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
      operationId: getGetInmailContent
      x-microcks-operation:
        dispatcher: FALLBACK
        dispatcherRules: '{}'
        delay: 0
    post:
      tags:
      - Use Cases > InMail Content
      summary: LinkedIn Update InMail Content
      description: API to update an inMail Content.
      requestBody:
        content:
          '*/*':
            schema:
              $ref: '#/components/schemas/UpdateInmailContentRequest'
      parameters:
      - name: Authorization
        in: header
        schema:
          type: string
        example: '{{insert_token}}'
      - name: X-Restli-Protocol-Version
        in: header
        schema:
          type: string
        example: 2.0.0
      - name: LinkedIn-Version
        in: header
        schema:
          type: string
        example: '{{insert_version}}'
      - name: adInMailContentId
        in: path
        schema:
          type: string
        required: true
        example: '123456'
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
      operationId: postUpdateInmailContent
      x-microcks-operation:
        dispatcher: FALLBACK
        dispatcherRules: '{}'
        delay: 0
  /rest/inMailContents:
    get:
      tags:
      - Use Cases > InMail Content
      summary: LinkedIn Batch Get InMail Content
      description: API to retrieve an inMail Content in Batches.
      parameters:
      - name: LinkedIn-Version
        in: header
        schema:
          type: string
        example: '{{insert_version}}'
      - name: Authorization
        in: header
        schema:
          type: string
        example: '{{insert_token}}'
      - name: X-RestLi-Method
        in: header
        schema:
          type: string
        example: BATCH_CREATE
      - name: X-Restli-Protocol-Version
        in: header
        schema:
          type: string
        example: 2.0.0
      - name: ids
        in: query
        schema:
          type: string
        example: '{encoded adInMailContentId}'
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
      operationId: getBatchGetInmailContent
      x-microcks-operation:
        dispatcher: FALLBACK
        dispatcherRules: '{}'
        delay: 0
    post:
      tags:
      - Use Cases > InMail Content
      summary: LinkedIn Send Test InMail
      description: API to send/share an inMail Content.
      requestBody:
        content: {}
      parameters:
      - name: Authorization
        in: header
        schema:
          type: string
        example: '{{insert_token}}'
      - name: LinkedIn-Version
        in: header
        schema:
          type: string
        example: '{{insert_version}}'
      - name: X-Restli-Protocol-Version
        in: header
        schema:
          type: string
        example: 2.0.0
      - name: action
        in: query
        schema:
          type: string
        example: sendTestInMail
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
      operationId: postSendTestInmail
      x-microcks-operation:
        dispatcher: FALLBACK
        dispatcherRules: '{}'
        delay: 0
components:
  schemas:
    CreateInmailContentRequest:
      type: string
      example: '"{\n \"account\": \"<Account Number>\",\n \"name\": \"test strings\",\n \"subject\": \"test subject\",\n \"sender\": \"<person urn>\",\n \"customFooter\": \"terms and conditions\",\n \"htmlBody\":\"sample body\",\n \"subContent\": {\n   \"regular\": {\n     \"callToActionText\": \"sample string\",\n     \"callToActionLandingPageUrl\":\"http://www.linkedin.com\",\n     \"rightRailAdPicture\": \"<image urn>\"\n   }\n }\n}"'
    UpdateInmailContentRequest:
      type: string
      example: '"{\n \"patch\": {\n   \"$set\": {\n     \"name\": \"test strings new\"\n   }\n }\n}\n"'
  securitySchemes:
    oauth2Auth:
      type: http
      scheme: oauth2