Поделиться через


DMP Segment Companies

Warning

Deprecation Notice
The Marketing Version 202402 (Marketing February 2024) has been sunset. 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.

Try in Postman

Try in Postman

DMP Segment Companies is a sub-resource of DMP segments that lets you add companies to a DMP Segment.

This API is restricted to approved LinkedIn developers and is subject to applicable data restrictions in their agreements.

Note

After you create a DMP segment, wait 5 seconds for it to become available before adding companies.

Permissions

Permission Description
rw_dmp_segments Access an authenticated member's DMP Segments with the ability to read and manage audience DMP segments. This permission is a part of the Audiences program and is not automatically granted under the LinkedIn Marketing API Program.
Managing audiences is restricted to ad accounts where the authenticated member has a role other than VIEWER.

Rate Limits

Since October 31, 2022, we have introduced a 1-minute rate limit per user (also known as a member) for our DMP streaming APIs Users & Companies. This measure helps prevent abuse, ensure service stability, and maintain consistent API availability. These limits will be enforced in addition to your existing daily limits, which can be found in the Developer Portal > My Apps > App > Analytics > Quotas and Usage.

For the /companies endpoint, an application has a 1-minute limit of 300 requests per user. This means an application can make up to 300 requests per user within a minute.

If your application calls /dmpSegments/users or /dmpSegments/companies too frequently, you may receive an HTTP 429 response, indicating that the rate limits have been exceeded.

If your application makes a large amount of automated data pushes, you can expect frequent throttling. While this may impact the throughput of your API calls, it will not affect the matched audience processing SLA.

To understand how to handle these rate limits see the FAQ

Schema

Field Name Data Type Description examples
action string The action to take on this entity. ADD or REMOVE
companyName string (optional) A string representing the company's name. Microsoft
companyWebsiteDomain URL (optional) A string representing the company's website domain in URL format. e.g. www.microsoft.com
companyEmailDomain URL (optional) The company email domain string in URL format (sometimes different from the website domain). linkedin.com
organizationUrn URN (optional) The LinkedIn company page URN of this particular company. urn:li:organizationUrn:123
companyPageUrl URL (optional) The LinkedIn company page URL of this particular company with a maximum length of 100 characters. linkedin.com/company/microsoft
stockSymbol String (optional) The stock symbol of this particular company with a maximum length of 5 letters. MSFT
industries List[String] (optional) Maximum three industry names of this particular company each with a maximum length of 50 letters. ["technology", "software"]
city String (optional) The city of this particular company with a maximum length of 50 letters. San Francisco
state String (optional) The state or province of this particular company with a maximum length of 50 letters. California or CA
country String (optional) ISO standardized two letter country code e.g. US US
postalCode String (optional) The postal code of this particular company with a maximum length of 20 letters. 94103

Input data requirements

Input data must provide at least one of the following fields:

  • companyName
  • organizationUrn
  • companyWebsiteDomain or companyEmailDomain
  • companyPageUrl

Add or Remove a Company

You can add or remove a single company from a DMP Segment.

Sample Request

POST https://api.linkedin.com/rest/dmpSegments/10804/companies
{
    "action": "ADD",
    "companyName": "LinkedIn",
    "companyWebsiteDomain": "linkedin.com",
    "companyPageUrl": "www.linkedin.com/company/linkedin",
    "stockSymbol": "MSFT",
    "industries": [
      "information technology",
      "software"
    ],
    "city": "Seattle",
    "state": "WA",
    "country": "US",
}
POST https://api.linkedin.com/v2/dmpSegments/10804/companies
{
    "action": "ADD",
    "companyName": "LinkedIn",
    "companyWebsiteDomain": "linkedin.com",
    "companyPageUrl": "www.linkedin.com/company/linkedin",
    "stockSymbol": "MSFT",
    "industries": [
      "information technology",
      "software"
    ],
    "city": "Seattle",
    "state": "WA",
    "country": "US",
}

A successful response returns a 201 Created HTTP status code.

Note

A 201 Created HTTP status code is returned if you add the same ID again or remove an already deleted ID. This is by design.

Add or Remove Multiple Companies

Add or remove multiple companies from a DMP Segment by passing the X-RestLi-Method: BATCH_CREATE header. This method is more efficient than sending individual requests to add or remove companies. You can stream up to 5000 companies in a single batch request. If you see issues with your batch request responses, try to resubmit with smaller batch size.

Sample Request

POST https://api.linkedin.com/rest/dmpSegments/10804/companies
{
   "elements": [
       {
            "action": "ADD",
            "companyName": "LinkedIn"
       },
       {
            "action": "ADD",
            "companyName": "Microsoft"
       }
   ]
}
POST https://api.linkedin.com/v2/dmpSegments/10804/companies
{
   "elements": [
       {
            "action": "ADD",
            "companyName": "LinkedIn"
       },
       {
            "action": "ADD",
            "companyName": "Microsoft"
       }
   ]
}

A 400 Bad Request is returned if the request syntax is incorrect. For valid syntax, we return a batch response array with HTTP response status for each element, including 201 status for success and 400 status for errors. If there is an error, the message field will reference the batchIndex, specifying the exact index of the invalid element that caused the error.

{
"elements":
  [ 
    {
	    "status”:201
    },
    {
        "status":201
    }
  ]
}