DMP Segments
Warning
Deprecation Notice
The Marketing Version 202310 (Marketing October 2023) and earlier versions (excluding 202306 and 202307) have been sunset. Additionally, the unversioned APIs will 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.
DMP Segments act as staging entities, which can take in user information from a third-party provider, map them to LinkedIn member profiles, and output Ad Segments, which can then be used with other LinkedIn ads APIs. A DMP segment is tied to a sponsored account.
The use of this API is restricted to those developers approved by LinkedIn and subject to applicable data restrictions in their agreements. All API requests are represented in protocol 2.0.0 and require the header:
X-Restli-Protocol-Version: 2.0.0
Permissions
Permission | Description |
---|---|
rw_dmp_segments | Access an authenticated member's DMP Segments. Can manage and read audience DMP segments. This permission belongs to the Audiences program and is not granted automatically as part of the LinkedIn Marketing API Program. |
Pagination
The dmpSegments
API implements pagination using the start
and count
parameters for finding DMP Segments by account.
For more information, see Pagination.
An exception to this is when when no start
or count
parameters are provided in the request. In this case, all the segments for an account will be returned in the first request.
Create DMP Segment
Creates an empty DMP Segment.
Schema
Field Name | Type | Description |
---|---|---|
accessPolicy | PRIVATE | The default access policy of this DMP segment. |
account | urn | The sponsored account urn that this DMP segment belongs to. Refer here to search for sponsored accounts that can be used. |
description | string (optional) | A description for this DMP segment. |
destinations | See DMP Segment Destinations | The destinations and various metadata that the content of this segment will be onboarded to. Currently, the only accepted value is LINKEDIN . |
name | string | The name of this DMP segment. |
sourcePlatform | string | The source platform from where users profiles are being imported. A dedicated ENUM will be provided to approved partners when they are granted access to these APIs. |
sourceSegmentId | string (optional) | The foreign key on the source platform. This is an optional field that will be indexed and can be used by the source platform to find their segments. |
type | USER, COMPANY, LIST_UPLOAD | The content type of the profiles being imported into this DMP segment. Possible values are USER , COMPANY , or LIST_UPLOAD . |
Field Name | Type | Description |
---|---|---|
account | urn | The sponsored account urn that this DMP segment belongs to. Refer here to search for sponsored accounts that can be used. |
description | string (optional) | A description for this DMP segment. |
destinations | See DMP Segment Destinations | The destinations and various metadata that the content of this segment will be onboarded to. Currently, the only accepted value is LINKEDIN . |
name | string | The name of this DMP segment. |
sourcePlatform | string | The source platform from where users profiles are being imported. A dedicated ENUM will be provided to approved partners when they are granted access to these APIs. |
sourceSegmentId | string (optional) | The foreign key on the source platform. This is an optional field that will be indexed and can be used by the source platform to find their segments. |
type | USER, COMPANY, LIST_UPLOAD | The content type of the profiles being imported into this DMP segment. Possible values are USER , COMPANY , or LIST_UPLOAD . |
Sample Request
A successful response returns a 201 Created
HTTP status code and the segment ID in the x-restli-id
response header.
Get DMP Segment
Retrieve details of a DMP segment using the segment ID. The response returns all the fields listed for the create request and the following additional fields.
Schema
Field Name | Type | Description |
---|---|---|
created, lastModified | long | creation timestamp and last updated timestamp. |
id | long | The DMP segment id. |
inputCount | long (optional) | The number of input entities (companies or users) that the source platform has pushed to this segment. |
destinations | Please refer destinations segment info to see additional fields returned. |
Sample Request
Sample Response
{
"created":1505229479000,
"destinations":[
{
"created":1505229479000,
"lastModified":1505229479000,
"status":"BUILDING",
"destinationSegmentId": "urn:li:adSegment:848336"
}
],
"name":"Test DMP Segment 2",
"sourcePlatform":"DMP_PARTNER_PLATFORM", // Name will be provided,
"accessPolicy":"PRIVATE",
"id":11204,
"lastModified":1505229479000,
"type":"USER",
"account":"urn:li:sponsoredAccount:516848833"
}
{
"created":1505229479000,
"destinations":[
{
"created":1505229479000,
"lastModified":1505229479000,
"status":"BUILDING",
"destinationSegmentId": "urn:li:adSegment:848336"
}
],
"name":"Test DMP Segment 2",
"sourcePlatform":"DMP_PARTNER_PLATFORM", // Name will be provided,
"id":11204,
"lastModified":1505229479000,
"type":"USER",
"account":"urn:li:sponsoredAccount:516848833"
}
Get Multiple DMP Segments
Fetch information on multiple DMP segments in one request.
Sample Request
Sample Response
{
"statuses": {},
"results": {
"10804": {
"created": 1505229200000,
"destinations": [
{
"created": 1505229200000,
"lastModified": 1505229200000,
"status": "BUILDING",
"destinationSegmentId": "urn:li:adSegment:848336"
}
],
"name": "Test DMP Segment 1",
"sourcePlatform": "DMP_PARTNER_PLATFORM", // Name will be provided,
"accessPolicy": "PRIVATE",
"id": 10804,
"lastModified": 1505229200000,
"type": "USER",
"account": "urn:li:sponsoredAccount:516848833"
},
"10814": {
"created": 1505229479000,
"destinations": [
{
"created": 1505229479000,
"lastModified": 1505229479000,
"status": "BUILDING",
"destinationSegmentId": "urn:li:adSegment:999336"
}
],
"name": "Test DMP Segment 2",
"sourcePlatform": "DMP_PARTNER_PLATFORM", // Name will be provided,
"accessPolicy": "PRIVATE",
"id": 10814,
"lastModified": 1505229479000,
"type": "USER",
"account": "urn:li:sponsoredAccount:516848833"
}
},
"errors": {}
}
{
"statuses": {},
"results": {
"10804": {
"created": 1505229200000,
"destinations": [
{
"created": 1505229200000,
"lastModified": 1505229200000,
"status": "BUILDING",
"destinationSegmentId": "urn:li:adSegment:848336"
}
],
"name": "Test DMP Segment 1",
"sourcePlatform": "DMP_PARTNER_PLATFORM", // Name will be provided,
"id": 10804,
"lastModified": 1505229200000,
"type": "USER",
"account": "urn:li:sponsoredAccount:516848833"
},
"10814": {
"created": 1505229479000,
"destinations": [
{
"created": 1505229479000,
"lastModified": 1505229479000,
"status": "BUILDING",
"destinationSegmentId": "urn:li:adSegment:999336"
}
],
"name": "Test DMP Segment 2",
"sourcePlatform": "DMP_PARTNER_PLATFORM", // Name will be provided,
"id": 10814,
"lastModified": 1505229479000,
"type": "USER",
"account": "urn:li:sponsoredAccount:516848833"
}
},
"errors": {}
}
This request always returns a 200 OK
HTTP status. If some of the IDs in the request are invalid, the results for the other IDs are returned. If none of the IDs in the batch are valid, the empty response { "statuses": {}, "results": {}, "errors": {}}
is returned.
Update DMP Segment
Perform partial updates to some of the fields of a DMP Segment. Only accessPolicy
, name
, description
, and sourceSegmentId
can be modified.
Perform partial updates to some of the fields of a DMP Segment. Only name
, description
, and sourceSegmentId
can be modified.
Sample Request
A successful response returns a 204 No Content
HTTP status code.
Find DMP Segments by Account
Use the q=account
parameter and the account URN to find DMP segments by the associated sponsored account. For more granular results, add sourcePlatform
and sourceSegmentId
query parameters to the query.
Sample Request
Sample Response
{
"elements": [
{
"accessPolicy": "PRIVATE",
"account": "urn:li:sponsoredAccount:516848833",
"created": 1505229200000,
"destinations": [
{
"created": 1505229200000,
"destinationSegmentId": "urn:li:adSegment:848336",
"lastModified": 1505229200000,
"status": "BUILDING"
}
],
"id": 10804,
"lastModified": 1505229200000,
"name": "Test DMP Segment 1",
"sourcePlatform": "DMP_PARTNER_PLATFORM",
"type": "USER"
},
{
"accessPolicy": "PRIVATE",
"account": "urn:li:sponsoredAccount:516848833",
"created": 1505229479000,
"destinations": [
{
"created": 1505229479000,
"destinationSegmentId": "urn:li:adSegment:999336",
"lastModified": 1505229479000,
"status": "BUILDING"
}
],
"id": 10814,
"lastModified": 1505229479000,
"name": "Test DMP Segment 2",
"sourcePlatform": "DMP_PARTNER_PLATFORM",
"type": "USER"
}
],
"paging": {
"count": 10,
"links": [],
"start": 0,
"total": 2
}
}
{
"elements": [
{
"account": "urn:li:sponsoredAccount:516848833",
"created": 1505229200000,
"destinations": [
{
"created": 1505229200000,
"destinationSegmentId": "urn:li:adSegment:848336",
"lastModified": 1505229200000,
"status": "BUILDING"
}
],
"id": 10804,
"lastModified": 1505229200000,
"name": "Test DMP Segment 1",
"sourcePlatform": "DMP_PARTNER_PLATFORM",
"type": "USER"
},
{
"account": "urn:li:sponsoredAccount:516848833",
"created": 1505229479000,
"destinations": [
{
"created": 1505229479000,
"destinationSegmentId": "urn:li:adSegment:999336",
"lastModified": 1505229479000,
"status": "BUILDING"
}
],
"id": 10814,
"lastModified": 1505229479000,
"name": "Test DMP Segment 2",
"sourcePlatform": "DMP_PARTNER_PLATFORM",
"type": "USER"
}
],
"paging": {
"count": 10,
"links": [],
"start": 0,
"total": 2
}
}
Delete DMP Segment
Delete a DMP segment using the segment ID. The response returns 204 No Content if the deletion succeeds. Everything related to this DMP segment will be deleted altogether as well, including the DMP segment destinations, the corresponding Ad segment, the DMP segment list (if there is any). You must have write access to the sponsored account that owns the dmp segment to be able to delete it. Otherwise, you will get a 403 Forbidden error response.
Sample Request
Sample Response
With http header enabled, you should see the following response.
HTTP/2 204
etag: W/"21"
x-restli-protocol-version: 2.0.0
Batch Delete DMP Segments
Delete a batch of DMP segments using segment ID's. Note that all the DMP segments must be under the same account. The response returns a 204 No Content for each segment that has been deleted successfully. Or an error with error message for each segment that has failed to be deleted. For each batch delete request, all the segments must belong to the same sponsored account. Also, you must have write access to the sponsored account that owns the dmp segments. Otherwise, you will get a 403 Forbidden error response for those segments. All API requests are represented in protocol 2.0.0 and require the header:
X-Restli-Protocol-Version: 2.0.0
Sample Request
Sample Response
{
"results": {
"10001": {
"status": 204
},
"10002": {
"status": 204
}
},
"errors": {}
}
Common Validation errors for DELETE Operation
The table below lists commonly encountered errors deleting a dmpSegment.
Code | Message | Description |
---|---|---|
400 | Bad request | Malformed requests, such as if the input dmp segment ID is not a number. |
400 | Error deleting AdSegments for dmp destination {dmpSegment ID}. | AdSegment is being used in active campaigns. |
403 | No WRITE access to {sponsored account URN}. | Viewer is not present or user is not authorized to delete the dmp segment. |
404 | Entity with key {adSegment ID} is not found. | DMP segment of the provided ID in the path doesn't exist. |