Authentication
Access to the DMP Segment Management REST API is authorized through the use of an API Key and cryptographic signature which is required for each request. Each request should set the HTTP Authorization header using the HTTP Basic authentication scheme where the username is the API Key and the secret is a shared secret known only to Magnite and you. Most programming libraries have support for this method of HTTP Authentication.
The base URL for all API requests is https://api.rubiconproject.com/.
Creates a new segment for a publisher.
POST /sellers/api/inventory/v1/account/{accountId}/segments
Parameter
Type
Required
Description
accountId
Numeric
Yes
The DV+ Publisher ID
The body of the request will be in JSON format:
Field
name
String
A short name for the segment. The value must be 100 characters
or less, start with an alpha character, and may only contain the
following: letters characters, numbers, spaces, ., _, &, -, $, (, ), /
value
The DMP's identifier for the segment. The value must be 100
characters or less, start with an alpha or numeric character, and
may only contain the following: letters characters, numbers,
spaces, ., _, &, -, $, (, ), /
description
An optional description of the segment to be used for display
purposes. If not provided the the name will be used.
Results are returned as JSON.
rubiconSegmentId
The DV+ Segment ID
A short name for the segment
The DMP's identifier for the segment
The description for the segment
Code
403
The user is not authorized for this call for the specified publisherId
422
Missing or invalid values
==request== POST /sellers/api/inventory/v1/13086/segments Content-Type: application/json { "name": "Baseball Enthusiast", "value": "42532", "description": "Baseball Enthusiast" }
==response== Content-Type: application/json { "rubiconSegmentId": 789, "name": "Baseball Enthusiast", "value": "42532", "description": "Baseball Enthusiast" }
Update an existing segment for a publisher.
PUT /sellers/api/inventory/v1/account/{accountId}/segments/{segmentId}
characters or less, start with an alpha or numeric character, and may only contain the following: letters characters, numbers,
An optional description of the segment to be used for display purposes. If not provided the name will be used.
404
The requested segment ID could not be found
==request== PUT /sellers/api/inventory/v1/account/13086/segments/789 Content-Type: application/json { "name": "Test Baseball Enthusiast", "value": "42532", "description": "Baseball Enthusiast" }
==response== Content-Type: application/json { "rubiconSegmentId": 789, "name": "Test Baseball Enthusiast", "value": "42532", "description": "Baseball Enthusiast" }
Get a list of the existing segments for a publisher.
GET /sellers/api/inventory/v1/account/{accountId}/segments
segments
Segment[]
An array of segments
==request== GET /sellers/api/inventory/v1/account/{accountId}/segments
==response== Content-Type: application/json { "segments":[ { "rubiconSegmentId": 789, "name": "Baseball Enthusiast", "value": "42532", "description": "Baseball Enthusiast" }, { "rubiconSegmentId": 3535, "name": "Basketball Enthusiast", "value": "23532", "description": "Basketball Enthusiast" }, { "rubiconSegmentId": 6422, "name": "Football Enthusiast", "value": "86564", "description": "Football Enthusiast" }] }
==To request a specific segment== GET /sellers/api/inventory/v1/account/{accountId}/segments/{segmentId}