Create and Manage Message Ads (Legacy)

Warning

Deprecation Notice
We’re discontinuing Message Ads, starting May 2023. For more information, refer to this help article help article. Alternatively, you can replace an existing Message Ad campaign with a Conversation Ad campaign as detailed in this guide. If you have questions, submit a request on the LinkedIn Developer Support Portal.

Warning

Deprecation Notice
The Marketing version 202304 (Marketing April 2023) and below has been sunset and the unversioned APIs are going to be sunset soon. We recommend that you migrate to the versioned APIs as well as migrate to the new Content and Community Management APIs to avoid disruptions. See the Migration page for more details. If you haven’t yet migrated and have questions, submit a request on the LinkedIn Developer Support Portal.

Important

The Message Ads API replaces the adInMailContentsV2 for creating AdInMailContent used in Message and Conversation Ads.

A Message Ad is a personalized message delivered to a LinkedIn member's InMail inbox. Message Ads provide a way for marketers to increase their LinkedIn reach by sending personalized messages to targeted audiences that most impact their business. Unlike InMail communications between members, a Message Ad is a branded message with a call-to-action button that takes the user to an advertiser's landing page.

Permissions

Permission Description
rw_ads Manage and read an authenticated member's ad accounts. Restricted to ad accounts in which the authenticated member has one of the following ad account roles.
  • ACCOUNT_BILLING_ADMIN
  • ACCOUNT_MANAGER
  • CAMPAIGN_MANAGER
  • CREATIVE_MANAGER
  • r_ads Read an authenticated member's ad accounts. Restricted to ad accounts in which the authenticated member has one of the following ad account roles.
  • ACCOUNT_BILLING_ADMIN
  • ACCOUNT_MANAGER
  • CAMPAIGN_MANAGER
  • CREATIVE_MANAGER
  • VIEWER
  • See Account Access Controls for more information on Ad Account roles.

    Requirements

    Before you get started, you must have the Message Ads Campaign and Creative details under an Ad Account.

    See the following documentation for more information:

    Create AdInMail Content for a Message Ad

    AdInMail is a targeted message delivered to a LinkedIn member's InMail inbox. InMail ads provide a way for marketers to increase their reach on LinkedIn by sending curated messages to the audiences that are most impactful to their business.

    You can call the adInMailContentsV2 endpoint to create an AdInMailContents object to use in an ad creative. For Message Ads you need to provide a AdInMailStandardSubContent as the subContent.

    Sample Request

    POST https://api.linkedin.com/v2/adInMailContentsV2
    
    {
        "account": "urn:li:sponsoredAccount:516413367",
        "body": {
            "rawText": "Legal Text"
        },
        "htmlBody": "<p>In Mail text goes here</p>",
        "name": "Sponsored In Mail content Name",
        "sender": {
            "from": "urn:li:person:K1RwyVNukt"
        },
        "subContent": {
            "com.linkedin.ads.AdInMailStandardSubContent": {
                "action": "http://landingPageUrlOnAction.com/checkoutcart",
                "actionText": "Buy (Call to action text)",
                "adUnit": "urn:li:media:/AAEAAQAAAAAAAAmzAAAAJDhjODg1NTQ5LTMwMWUtNDdmNS05NmZmLTJmNjA4OWFiY2VmZA.png"
            }
        },
        "subject": "Subject text "
    }
    

    A successful response returns a 201 Created HTTP status code and the ID in the x-linkedin-id response header.

    Note

    When creating or updating the Message Ads Content, only the "sender.from" parameter can be used to set a sender. Other AdInMailSender parameters are ignored.