AI-generated Key Takeaways
-
Data segments can be created using the
curators.dataSegments.create
method and are active upon creation, allowing for targeting in deals or packages. -
To make data segments visible for targeting by media planners, you must enable Segment visibility in the Curation UI.
-
When creating a data segment, the request body must include a unique
curatorDataSegmentId
in the name field for targeting. -
Existing data segments can be modified using the
curators.dataSegments.patch
method, for example, to adjust the CPM fee.
Create a new data segment
You can create a new data segment using the curators.dataSegments.create
method. After creation, your data segment is in the ACTIVE
state, enabling deals or
packages that serve in Real-time Bidding to target the data segment.
To make data segments visible to media planners for deal or package targeting, you must enable Segment visibility in the Data segment settings tab of the Curation UI.
The following example makes an HTTP POST
request with a JSON body containing a
DataSegment
object. The request is sent to an API endpoint that creates a data
segment with the specified configuration.
Example curl API call
Request
curl --request POST \ 'https://authorizedbuyersmarketplace.googleapis.com/v1beta/curators/[YOUR_ACCOUNT_ID]/dataSegments?key=[YOUR_API_KEY]' \ --header 'Authorization: Bearer [YOUR_ACCESS_TOKEN]' \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --data '{"cpmFee":{"nanos":100,"units":0,"currencyCode":"USD"},"name":"curators/[YOUR_ACCOUNT_ID]/dataSegments/test-data-segment-2"}' \ --compressed
Response
{ "name": "curators/[YOUR_ACCOUNT_ID]/dataSegments/test-data-segment-2", "createTime": "2025-08-14T17:45:08.744379Z", "updateTime": "2025-08-14T17:45:08.744379Z", "cpmFee": { "currencyCode": "USD", "nanos": 100 }, "state": "ACTIVE" }
Modify an existing data segment
To modify an existing data segment, you can use the
curators.dataSegments.patch
method. For example, use this method to adjust the
cpmFee
field for the data segment.
The following example makes an HTTP PATCH
request with a JSON body containing a
DataSegment
object. The request is sent to an API endpoint that modifies the specified
data segment, and only modifies the DataSegment.cpmFee.nanos
field specified in the
updateMask
.
Example curl API call
Request
curl --request PATCH \ 'https://authorizedbuyersmarketplace.googleapis.com/v1beta/curators/[YOUR_ACCOUNT_ID]/dataSegments/test-data-segment-2?updateMask=cpmFee.nanos&key=[YOUR_API_KEY]' \ --header 'Authorization: Bearer [YOUR_ACCESS_TOKEN]' \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --data '{"cpmFee":{"nanos":50}}' \ --compressed
Response
{ "name": "curators/[YOUR_ACCOUNT_ID]/dataSegments/test-data-segment-2", "createTime": "2025-08-14T17:45:08.744Z", "updateTime": "2025-08-14T17:56:02.200619Z", "cpmFee": { "currencyCode": "USD", "nanos": 50 }, "state": "ACTIVE" }
Next steps
- Learn how to activate and deactivate data segments with Marketplace API.
- Learn how to view your data segments with Marketplace API.
- Learn about the Real-time Curation specification.
- Learn how to parse incoming segment requests in Real-time Curation.