Skip to content
Last updated

Taxonomy Management

Using the Audience Segments API, customers and data providers have control to onboard and activate the data they need to target in MediaMath Platform. As it's a self-service solution, turnaround time for updates is reduced from business days to minutes. The API is built using industry standard, open source REST APIs and is a scaleable way to handle all requests for both global and permissioned taxonomies. The service brings transparency to data activation at MediaMath, allowing customers and data providers oversight of relevant 1st and 3rd party audience data sets as well as the permissioning of those data sets.

Audience Segments & Taxonomies

There are two ways to expose the data onboarded via server-to-server within MediaMath Platform:

  • Taxonomies
    • These can be global, meaning all MediaMath customers will have access to the segments within the taxonomy in MediaMath Platform.
    • These can be permissioned so that only select MediaMath customers have access to the segments within the taxonomy in MediaMath Platform.
  • External Data Segments
    • These represent a single segment and are always permissioned.
    • These are also referred to as Data Pixels.

It's possible to use both methods to achieve a mix of global and permissioned taxonomies & external data segments to suit your needs and the needs of your customers.

Note: The S2S data transfer is the same for both global and permissioned taxonomies, as well as external data segments.

Taxonomies (Global)

Taxonomies are presented in MediaMath Platform as a hierarchical tree, where the first node (root node) is the data provider's name. Within the tree, media traders can expand selections of categories of segments and view an estimated audience size (the number of unique users) and a CPM price (USD by default).

In this view, the Audience Targeting view has been annotated to show the elements of a taxonomy:

Audience Tab Annotated

Taxonomies (Permissioned)

Similar to global taxonomies, permissioned taxonomies are also presented in MediaMath Platform as a hierarchical tree, where the first node (root node) is the data provider's name. Within the tree, media traders can expand selections of categories of segments and view an estimated audience size (the number of unique users) and a CPM price (USD by default).

Permissioned taxonomies can include first and/or third party segments and are 'permissioned' or shared with specified entities, organizations, agencies and/or advertisers in MediaMath Platform.

As all taxonomy management utilizes the same underlying MediaMath API, the information shared in this section applies to both global and permissioned taxonomies, with the exception of the visibility of the taxonomy & permissioning.

Revenue Share at Taxonomy Level

Utilizing the API requires the data provider be set up as a data vendor in our system and that MediaMath act as a clearinghouse for all transactions. For third-party data providers, you'll work out terms with our partnerships team; for customers sharing first-party data, the revenue share will typically be set at 0 by our partnerships team.

Each data provider has a default revenue share, mutually agreed upon with the partnerships team; however, this default revenue share value can be overridden at a taxonomy level. For example, if a customer wants to target segments in MediaMath Platform at a rate which they have pre-negotiated with you, their data vendor, the customer's specific rate may require the use of a revenue share different from the default revenue share originally agreed upon between you & MediaMath. To facilitate this, you as the data provider, can create a permissioned taxonomy for the customer and work with the partnerships team to set a revenue share that relates to that specific taxonomy.

To override a revenue share at the taxonomy level, create the taxonomy with permissions and contact MediaMath Support with the following information:

  • the Taxonomy_ID,
  • the desired taxonomy-level revenue share.

Our team will respond once they have updated the revenue share for the specified taxonomy.

Taxonomy Management

The legacy Audience Segments taxonomy API is deprecated

The legacy Audience Segment Service (/dmp/v2.0/audience_segments/...) has been deprecated since 1st August 2026 and will be retired. Taxonomy management now lives in the Campaigns API v3.0, which is a new, more performant service with the same underlying concepts — vendor configuration, grants and taxonomy trees — under new paths.

Full endpoint reference: https://apidocs.mediamath.com/apis/campaigns-api/openapi

All new integrations must build against v3.0. Existing integrations should migrate using the guidance below.

What's changed

AreaLegacy (Audience Segment Service)Campaigns API v3.0
Base URL/dmp/v2.0//api/v3.0/
AuthenticationBearer token or sessionidBearer token only
Grants lookupBy vendor_idBy org_id
Taxonomy endpoint/audience_segments/audience_taxonomies
Taxonomy & node IDsLegacy IDsNew IDs, generated at recreation
Write processingAsynchronous (HTTP 202)Synchronous & atomic (HTTP 200)
Response wrappermeta + datadata only
Two breaking changes to plan for
  1. sessionid is not accepted. Bearer token is the only supported authentication scheme, and grant operations key off the owning organisation ID rather than vendor_id.
  2. IDs are not shared between the two services. Taxonomies are recreated in v3.0 and receive new taxonomy and node IDs. This is a planned, one-time change — your integration must capture and store the new IDs.

Authentication and base URL

All v3.0 endpoints require a Bearer token in the Authorization header, obtained through the standard MediaMath OAuth flow — see the Authentication guide for how to obtain and refresh one. Endpoint paths below are relative to https://api.mediamath.com/api/v3.0/.

curl --location 'https://api.mediamath.com/api/v3.0/<endpoint>' \
   --header 'Authorization: Bearer <token>' \
   --header 'Content-Type: application/json'

The new endpoints

Taxonomies — these are the endpoints your integration will spend most of its time in. Full schemas are in the Campaigns API v3.0 reference.

PurposeEndpointNotes
List taxonomiesGET /audience_taxonomiesPaginated. Supports q (e.g. q=visibility==RESTRICTED), sort_by, page_limit, page_offset.
Get one taxonomyGET /audience_taxonomies/{taxonomy_id}Returns the full tree. Use this as the authoritative read before building an update payload. Legacy IDs are not valid here.
Create a taxonomyPOST /audience_taxonomiesCreates the tree with visibility, permissions and pricing. Returns the generated taxonomy and node IDs.
Update a taxonomyPOST /audience_taxonomies/{taxonomy_id}Same body structure as create, but existing nodes must be sent with their current id.
Look up segments for targetingGET /path_audiences_segmentsUnchanged endpoint; the new legacy query parameter selects which segment set is read.

Vendor configuration and grants — these are provisioned and maintained by Infillion on your behalf. You will not normally call them, but they explain most validation errors you may hit.

PurposeEndpointWho calls it
Read grants for your organisationGET /grants/{org_id}?with=entity_infoClient integrations (read-only) and global admins
List / write grantsGET /grants, POST /grants/{org_id}Global admins only
Vendor audience configsGET/POST /vendor/audience_configs, GET/POST /vendor/{vendor_id}/audience_configsGlobal admins only
path_audiences_segments and the legacy flag

GET /path_audiences_segments takes a legacy boolean. legacy=false reads v3.0 segments; omitting the parameter or passing legacy=true reads DMP segments. The current default is legacy=true, so existing integrations are unaffected — but the default will switch to legacy=false as migration progresses, so pass the parameter explicitly. q is required; advertiser_id is required for private/custom taxonomy lookups.

How to use them

Every taxonomy create or update passes three checks before processing:

  1. Vendor audience config — does vendor_id have a configuration? This defines the owning organisation, bidder code, default revenue share and creation limit. (Managed by Infillion.)
  2. Organisation grants — are grants configured for the owning organisation? These define which organisations, agencies and advertisers you may permission a taxonomy to. (Managed by Infillion.)
  3. Request permissions — is everything in your permissions block inside that grant scope, and are the visibility rules satisfied? (Entirely client-controlled.)

Before your first create, read your grants with GET /grants/{org_id}?with=entity_info and treat them as the outer boundary for every permissions block you send. Requesting a subset of the grant scope always passes; anything outside it always fails.

Creating a taxonomyPOST /audience_taxonomies:

curl --location 'https://api.mediamath.com/api/v3.0/audience_taxonomies' \
   --request POST \
   --header 'Authorization: Bearer <token>' \
   --header 'Content-Type: application/json' \
   --data '{
     "vendor_id":   1024,
     "visibility":  "RESTRICTED",
     "use_hash":    true,
     "permissions": {
       "organizations": [2001],
       "agencies":      [3101],
       "advertisers":   [45001]
     },
     "taxonomy": {
       "name":     "Acme Data - (Private) - Interest Taxonomy",
       "buyable":  false,
       "children": [
         { "name": "Sports", "code": "sports_root",
           "buyable": true, "retail_cpm": 2.5, "children": [] },
         { "name": "Travel", "code": "travel_root",
           "buyable": true, "retail_cpm": 3.2, "children": [] }
       ]
     }
   }'

The response is an HTTP 200 with a data object containing the created taxonomy, its generated taxonomy and node IDs, the applied revenue_share_pct, visibility and vendor information. Unlike the legacy DMP API, which returned a temporary ID before the segment had synced, v3.0 returns the actual audience segment IDs assigned to Strategies immediately in this response. Store them — they are the handle for every subsequent read and update.

Key rules on create:

  • Name convention — the taxonomy name must start with <vendor name> - (Private) - for permissioned taxonomies. The root node is what traders see in the Audience Targeting tree.
  • VisibilityGLOBAL must not be combined with non-empty permissions; RESTRICTED requires at least one permission entity.
  • Buyable nodes require both code and retail_cpm. Non-buyable nodes are navigational categories only.
  • Wholesale CPM is computed recursively as retail_cpm × (revenue_share_pct / 100). When is_clearing_house is true, an explicit wholesale_cpm on a node is preserved instead.
  • Revenue sharerevenue_share_pct on the request wins; otherwise the vendor configuration default applies.
  • Tree limits — 60,000 nodes maximum; duplicate node codes are rejected.
  • use_hash must be true if any node code is not int32-like, and cannot be changed to false afterwards.

Updating a taxonomyPOST /audience_taxonomies/{taxonomy_id}. The body follows the same structure as create.

Carry existing node IDs — the single most important rule

On update, existing nodes must be sent with their current id. A node sent with its id is amended in place and live Strategies targeting it are unaffected. A node sent without an id is created as a brand new node with a new ID — the previous node is retired to retired_audience_segments / retired_strategy_audience_segments, and Strategies still pointing at the old ID stop delivering once users age out of the segment.

Always read the current tree with GET /audience_taxonomies/{taxonomy_id} and build your update payload from it. Never rebuild an update from a partial lookup.

Updates are also subject to: the taxonomy name must keep its existing prefix, use_hash cannot go true → false, and legacy (non-v3.0) taxonomy IDs are rejected.

Migrating an existing taxonomy

The two services store taxonomies independently, so creating in v3.0 does not touch the legacy service — your legacy integration keeps working until you switch, which makes rollback low-risk.

  1. Fetch each legacy taxonomy tree in full from the legacy API.
  2. Clean the payload — strip the legacy taxonomy_id and all node id fields, remove the deprecated top-level description, and replace audience_vendor_id with vendor_id.
  3. Validate locally — buyable nodes have code and retail_cpm; no duplicate codes; ≤ 60,000 nodes; use_hash=true if any code is not int32-like.
  4. Create in v3.0 (POST /audience_taxonomies) and record the returned taxonomy and node IDs in a legacy → new ID mapping store.
  5. Validate the result against the legacy original: name and hierarchy, permissions, retail CPMs, computed or preserved wholesale CPMs.
  6. Switch the integration's reads and writes to the v3.0 endpoints using the new IDs.
  7. Confirm with Infillion that all taxonomy traffic has moved.

Also worth noting when porting code:

  • The meta response wrapper is gone — parse data directly.
  • Writes are synchronous and atomic, so remove any status-polling logic. There is no asynchronous status endpoint.
  • There is no CSV format helper — convert CSV to JSON before submitting.
  • There is no supernode endpoint — use GET /audience_taxonomies with filters.
  • There is no DELETE /grants/{org_id}; grants are removed by POSTing empty permission arrays (a destructive synchronisation — coordinate with Infillion first).

Common errors

ErrorCauseResolution
vendor_id does not have an audience configurationNo vendor audience configuration existsContact Infillion to provision it
taxonomy vendor/organization has no grants configuredThe owning organisation has no grantsContact Infillion to configure grants
No permission to create/update taxonomy on the following resources…Requested permissions exceed grant scopeReduce the permissions block to entities within scope, or request a grant change
visibility GLOBAL is incompatible with permissionsGLOBAL sent with a non-empty permissions blockRemove the permissions block, or use RESTRICTED
when visibility is RESTRICTED, at least one permission entity must be setRESTRICTED sent with an empty permissions blockProvide at least one organisation, agency or advertiser
Authentication failureMissing/invalid Bearer token, or legacy sessionid usedUse Bearer token authentication only — see the Authentication guide
Missing segments

Incomplete pagination is the most common cause of a "missing" segment. Iterate page_offset until a page returns fewer results than page_limit before concluding a taxonomy or node is absent — and never delete and recreate a segment in response to a failed lookup, as recreation generates a new ID and disconnects any Strategies targeting the original. If an entity is genuinely absent after a complete read, contact MediaMath Support.

A full migration guide and implementation handbook, including the complete field dictionary, validation rules and endpoint mapping, is available from your Client Success contact.

External Data Segments

An external data segment (also known as a data pixel) is the output of a pixel mapping process that results in the creation of a single, permissioned audience segment. In contrast to a permissioned taxonomy, which can be managed via API and contain N segments, an external data segment represents one audience segment and is defined within the Onboard section of the Audiences module in MediaMath Platform.

External data segments are permissioned to specific agencies (MediaMath entity structure): organization > agency > advertiser) so all advertisers within the agency will have access to the external data segment. Prior to getting started, the data provider needs to be added to the agency in MediaMath Platform. To have a data provider added, contact your MediaMath representative.

If the data provider already has the appropriate access, follow these steps to get your external data segments created:

  1. Define an audience segment by creating an External Data Segment in the Onboard tab within the MediaMath Platform Audience module.

MediaMath Platform Data Pixel

  1. Provide the pixel IDs created in step 1 to your data provider.
  2. Data provider will then submit a ticket directly to pixelmapping@mediamath.com, including the following. Include each external data segment mapping in the body of the email (or Support ticket) in the line-separated format below.

Note: Requests to pixelmapping@mediamath.com are handled via an automated process, as long as the formatting below is followed in the subject and body of your email. If the format does not conform, requests will be handled within 1 business day.

External Data Segment Example Request

Subject Line: Data Provider Pixel Mapping Request

Description:

Please map the following

ns:8473,mm:679001

ns:8474,mm:679002

ns:8675,mm:679003

ns = the name space of the first pixel being mapped, refer below or reach out to MediaMath support if the namespace is unknown.

mm = MediaMath Namespace. This will always be "mm" in the mapping request.

XXXXXX = the partner's segment code sent to MediaMath via S2S.

YYYYYY = the MathTag ID ("MT_ID") associated with the MediaMath external data segment pixel created in step one.