MediaMath Marketplaces API V2.0

API for leveraging PMP Direct and Exchange supply sources, enabling programmatic access to private marketplace deals and exchange inventory within the MediaMath Platform.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/mediamath-marketplaces-api-v20"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no email required.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

mediamath-marketplaces-api-v2-openapi.yml Raw ↑
openapi: 3.0.0
info:
  title: Marketplaces API V2.0 API
  contact:
    url: https://support.infillion.com/
  license:
    url: http://www.apache.org/licenses/LICENSE-2.0.html
    name: Apache 2.0
  version: '2.0'
security:
- Bearer: []
paths:
  /deals:
    get:
      tags:
      - Private Marketplace Exchange (PMP-E)
      summary: List Deals
      description: List the Deals
      operationId: LIST-deals
      parameters:
      - name: ids
        in: query
        description: _
        schema:
          type: string
      - name: export
        in: query
        description: _
        schema:
          type: string
      - name: deal_type
        in: query
        description: Returns a list of deals that match the specified query
        schema:
          type: string
      - name: q
        in: query
        description: Returns a list of deals that match the specified query
        schema:
          type: string
      - name: sort_by
        in: query
        description: Returns a list of deals sorted by the specified parameter
        schema:
          type: string
          enum:
          - name
          - id
          - deal_identifier
          - supply_source_id
          - updated_on
          - created_on
          - start_datetime
          - end_datetime
          - price
          - description
      - name: sort_dir
        in: query
        description: Sort direction
        schema:
          type: string
          enum:
          - ASC
          - DESC
      - name: page_offset
        in: query
        description: Returns a list of deals starting from the specified page offset
        schema:
          type: string
      - name: page_limit
        in: query
        description: Returns a number of deals equal to the specified page limit
        schema:
          type: integer
      - name: currency_code
        in: query
        description: Returns a list of deals with price attributes converted to such currency
        schema:
          type: string
      - name: status
        in: query
        description: Returns a list of deals that match the specified status
        schema:
          type: boolean
      - name: owner.type
        in: query
        description: Returns a list of deals that match the specified owner type
        schema:
          type: string
          enum:
          - ORGANIZATION
      - name: strategy_id
        in: query
        description: Returns a list of deals that are currently targeted by the strategy with that id
        schema:
          type: integer
      - name: owner.advertiser_id
        in: query
        description: Returns a list of deals that are editable by users of the advertiser with that id
        schema:
          type: integer
      - name: owner.agency_id
        in: query
        description: Returns a list of deals that are editable by users of the agency with that id
        schema:
          type: integer
      - name: owner.organization_id
        in: query
        description: Returns a list of deals that are editable by users of the organization with that
          id
        required: true
        schema:
          type: integer
      - name: permissions.organization_ids
        in: query
        description: Comma-separated list of organization IDs to filter deals by. Returns deals permissioned
          to at least one of the specified organizations (OR within this parameter). If combined with
          permissions.agency_ids or permissions.advertiser_ids, a deal must match at least one ID from
          each provided parameter (AND between parameters). Users may only request IDs they have access
          to; unauthorized IDs return 400.
        required: false
        schema:
          type: string
      - name: permissions.agency_ids
        in: query
        description: Comma-separated list of agency IDs to filter deals by. Returns deals permissioned
          to at least one of the specified agencies (OR within this parameter). If combined with permissions.organization_ids
          or permissions.advertiser_ids, a deal must match at least one ID from each provided parameter
          (AND between parameters). Users may only request IDs they have access to; unauthorized IDs return
          400.
        required: false
        schema:
          type: string
      - name: permissions.advertiser_ids
        in: query
        description: Comma-separated list of advertiser IDs to filter deals by. Returns deals permissioned
          to at least one of the specified advertisers (OR within this parameter). If combined with permissions.organization_ids
          or permissions.agency_ids, a deal must match at least one ID from each provided parameter (AND
          between parameters). Users may only request IDs they have access to; unauthorized IDs return
          400.
        required: false
        schema:
          type: string
      - name: time_window
        in: query
        description: Filter deals by time window
        schema:
          type: string
          enum:
          - last_7_days
      responses:
        '200':
          description: Please note that currently bill_type does not disclose here.  GET /deals/{deal
            ID) will however disclose that parameter, and the creation or updating of the deal will both
            allow bill_type to be set and display it in the response.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        advertiser_id:
                          type: integer
                          description: Advertiser id is 0 for global deal
                        bill_type:
                          type: string
                          enum:
                          - EXCHANGE
                          - NONE
                          - PUBLISHER
                          description: Who will be billed for the deal
                        channels:
                          type: array
                          description: List of advertising channels associated with this deal
                          items:
                            type: object
                            properties:
                              id:
                                type: integer
                                description: Channel ID
                              name:
                                type: string
                                description: Channel name
                        created_on:
                          type: string
                          format: date-time
                        currency_code:
                          type: string
                          description: ISO 4217 3-character currency code
                          minLength: 3
                          maxLength: 3
                          x-examples:
                          - USD
                        deal_identifier:
                          type: string
                          description: ID used within a bid request to reference the deal
                          maxLength: 256
                        deal_type:
                          type: string
                          enum:
                          - PG
                          - STANDARD
                          description: deal_type is the type of deal. PG is for a Programmatic Guaranteed
                            deal, and STANDARD is the only other value allowed
                          default: STANDARD
                        description:
                          type: string
                          description: Description of the deal
                          maxLength: 4096
                        end_datetime:
                          type: string
                          description: 'string / timestamp as full RFC 3339 date strings including timezone
                            offsets: YYYY-MM-DDTHH:MM:SSZ or YYYY-MM-DDTHH:MM:SS-##:##'
                          format: date-time
                        entity_type:
                          type: string
                          enum:
                          - deal
                        id:
                          type: integer
                          description: ID of the deal
                        name:
                          type: string
                          description: Name of the deal
                          maxLength: 256
                        owner:
                          type: object
                          description: Level of ownership for the deal (i.e. who can edit the deal) and
                            the id of the ownership entity. for example, if the ownership level is set
                            to ADVERTISER, anyone with access to such advertiser can edit this deal.
                          properties:
                            id:
                              type: integer
                            type:
                              type: string
                              enum:
                              - ADVERTISER
                              - AGENCY
                              - INTERNAL
                              - ORGANIZATION
                              maxLength: 32
                        permissions:
                          type: object
                          description: List of entities that are allowed to target this deal. if a higher-level
                            entity is included, then do not include any lower-level entity that is part
                            of the included higher level entity. for example, if an organization X is
                            listed in this parameter, then automatically all agencies and advertisers
                            that are part of the organization X will be included and listing any such
                            agencies and adevertisers part of organization X will cause a validation error.
                          properties:
                            advertiser_ids:
                              type: array
                              items:
                                type: integer
                            agency_ids:
                              type: array
                              items:
                                type: integer
                            all_organizations:
                              type: boolean
                            organization_ids:
                              type: array
                              items:
                                type: object
                        price:
                          type: object
                          properties:
                            currency_code:
                              type: string
                              description: ISO 4217 3-character currency code
                              minLength: 3
                              maxLength: 3
                              default: USD
                            value:
                              type: string
                              description: Maximum is 9,999,999.9999
                        price_method:
                          type: string
                          enum:
                          - CPM
                          description: CPM is the only acceptable value for now
                          maxLength: 16
                        price_type:
                          type: string
                          enum:
                          - FIXED
                          - FLOOR
                          description: The deal is a "FLOOR" price deal (bids must be above this floor,
                            and will likely clear above this floor) or "FIXED" price deal (bids must be
                            at this price or above, and will clear at the fixed price)
                          maxLength: 16
                        start_datetime:
                          type: string
                          description: 'string / timestamp as full RFC 3339 date strings including timezone
                            offsets: YYYY-MM-DDTHH:MM:SSZ or YYYY-MM-DDTHH:MM:SS-##:##'
                          format: date-time
                        status:
                          type: boolean
                          description: Whether the deal is active
                          default: true
                        sub_supply_source_id:
                          type: integer
                          description: ID of the publisher if the supply_source_id is set to 83 (BidSwitch)
                          nullable: true
                        supply_source_id:
                          type: integer
                          description: Exchange providing the deal
                        supply_source:
                          type: object
                          description: Supply source details
                          properties:
                            id:
                              type: integer
                              description: Supply source ID
                            name:
                              type: string
                              description: Supply source name
                        publisher:
                          type: object
                          description: Publisher details
                          properties:
                            id:
                              type: integer
                              description: Publisher ID
                            name:
                              type: string
                              description: Publisher name
                          nullable: true
                        strategies_count:
                          type: integer
                          description: Number of strategies targeting this deal
                        organization_id:
                          type: integer
                          description: Organization ID that owns this deal
                        impressions:
                          type: integer
                          description: Number of impressions
                          nullable: true
                        effective_status:
                          type: string
                          description: Current effective status of the deal
                          enum:
                          - ready
                          - creating
                          - ssp_status_mismatch
                          - ssp_start_date_mismatch
                          - ssp_end_date_mismatch
                          - organization_contract_start_date_error
                          - organization_contract_end_date_error
                          - organization_inactive
                          - agency_inactive
                          - advertiser_inactive
                          - campaign_inactive
                          - campaign_start_date_error
                          - campaign_end_date_error
                          - campaign_pg_flag_error
                          - strategy_inactive
                          - strategy_start_date_error
                          - strategy_end_date_error
                          - strategy_pg_flag_error
                          - strategy_concept_inactive
                          - creative_inactive
                          - deal_status_inactive
                          - deal_start_date_error
                          - deal_end_date_error
                          - strategy_not_assigned
                        severity:
                          type: integer
                          description: Severity level
                          nullable: true
                        deal_groups:
                          type: array
                          description: Deal groups associated with this deal
                          items:
                            type: object
                            properties:
                              id:
                                type: integer
                                description: Deal group ID
                              name:
                                type: string
                                description: Deal group name
                        updated_on:
                          type: string
                          format: date-time
                  meta:
                    type: object
                    properties:
                      count:
                        type: integer
                      offset:
                        type: integer
                      status:
                        type: string
                      total_count:
                        type: integer
    post:
      tags:
      - Private Marketplace Exchange (PMP-E)
      summary: Create Deal
      description: Create Deal
      operationId: POST-deal
      parameters:
      - $ref: '#/components/parameters/trait_postHeader_Content-Type'
      - $ref: '#/components/parameters/trait_cookieAuth_Cookie'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/create-deal'
        description: _
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      bill_type:
                        type: string
                        enum:
                        - EXCHANGE
                        - NONE
                        - PUBLISHER
                        description: Who will be billed for the deal
                        default: EXCHANGE
                      channels:
                        type: array
                        description: List of advertising channels associated with this deal
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              description: Channel ID
                            name:
                              type: string
                              description: Channel name
                      created_on:
                        type: string
                        format: date-time
                      deal_identifier:
                        type: string
                        description: ID used within a bid request to reference the deal
                        maxLength: 255
                      deal_type:
                        type: string
                        enum:
                        - PG
                        - STANDARD
                        description: deal_type is the type of deal. PG is for a Programmatic Guaranteed
                          deal, and STANDARD is the only other value allowed
                        default: STANDARD
                      description:
                        type: string
                        description: Description of the deal
                        maxLength: 4095
                      end_datetime:
                        type: string
                        description: 'string / timestamp as full RFC 3339 date strings including timezone
                          offsets: YYYY-MM-DDTHH:MM:SSZ or YYYY-MM-DDTHH:MM:SS-##:##'
                        format: date-time
                      entity_type:
                        type: string
                        enum:
                        - deal
                      id:
                        type: integer
                        description: ID of the deal
                      name:
                        type: string
                        description: Name of the deal
                        maxLength: 255
                      owner:
                        type: object
                        description: Level of ownership for the deal (i.e. who can edit the deal) and
                          the id of the ownership entity. for example, if the ownership level is set to
                          ADVERTISER, anyone with access to such advertiser can edit this deal.
                        properties:
                          id:
                            type: integer
                          type:
                            type: string
                            enum:
                            - ADVERTISER
                            - AGENCY
                            - INTERNAL
                            - ORGANIZATION
                      permissions:
                        type: object
                        description: List of entities that are allowed to target this deal. if a higher-level
                          entity is included, then do not include any lower-level entity that is part
                          of the included higher level entity. for example, if an organization X is listed
                          in this parameter, then automatically all agencies and advertisers that are
                          part of the organization X will be included and listing any such agencies and
                          adevertisers part of organization X will cause a validation error.
                        properties:
                          advertiser_ids:
                            type: array
                            items:
                              type: object
                          agency_ids:
                            type: array
                            items:
                              type: integer
                          all_organizations:
                            type: boolean
                          organization_ids:
                            type: array
                            items:
                              type: object
                      price:
                        type: object
                        properties:
                          currency_code:
                            type: string
                            description: 3-character ISO 1427 currency code
                            default: USD
                          value:
                            type: string
                            description: Maximum is $9,999,999.9999
                      price_method:
                        type: string
                        enum:
                        - CPM
                        description: CPM is the only acceptable value for now
                      price_type:
                        type: string
                        enum:
                        - FIXED
                        - FLOOR
                        description: The deal is a "FLOOR" price deal (bids must be above this floor,
                          and will likely clear above this floor) or "FIXED" price deal (bids must be
                          at this price or above, and will clear at the fixed price)
                      start_datetime:
                        type: string
                        description: 'string / timestamp as full RFC 3339 date strings including timezone
                          offsets: YYYY-MM-DDTHH:MM:SSZ or YYYY-MM-DDTHH:MM:SS-##:##'
                        format: date-time
                      status:
                        type: boolean
                        description: Whether the deal is active
                        default: true
                      sub_supply_source_id:
                        type: integer
                        description: ID of the publisher if the supply_source_id is set to 83 (BidSwitch)
                        nullable: true
                      supply_source_id:
                        type: integer
                        description: Exchange providing the deal
                      supply_source:
                        type: object
                        description: Supply source details
                        properties:
                          id:
                            type: integer
                            description: Supply source ID
                          name:
                            type: string
                            description: Supply source name
                      publisher_id:
                        type: integer
                        description: Publisher ID
                        nullable: true
                      publisher:
                        type: object
                        description: Publisher details
                        properties:
                          id:
                            type: integer
                            description: Publisher ID
                          name:
                            type: string
                            description: Publisher name
                        nullable: true
                      strategies_count:
                        type: integer
                        description: Number of strategies targeting this deal
                      organization_id:
                        type: integer
                        description: Organization ID that owns this deal
                      impressions:
                        type: integer
                        description: Number of impressions
                        nullable: true
                      effective_status:
                        type: string
                        description: Current effective status of the deal
                        enum:
                        - ready
                        - creating
                        - ssp_status_mismatch
                        - ssp_start_date_mismatch
                        - ssp_end_date_mismatch
                        - organization_contract_start_date_error
                        - organization_contract_end_date_error
                        - organization_inactive
                        - agency_inactive
                        - advertiser_inactive
                        - campaign_inactive
                        - campaign_start_date_error
                        - campaign_end_date_error
                        - campaign_pg_flag_error
                        - strategy_inactive
                        - strategy_start_date_error
                        - strategy_end_date_error
                        - strategy_pg_flag_error
                        - strategy_concept_inactive
                        - creative_inactive
                        - deal_status_inactive
                        - deal_start_date_error
                        - deal_end_date_error
                        - strategy_not_assigned
                      severity:
                        type: integer
                        description: Severity level
                        nullable: true
                      deal_groups:
                        type: array
                        description: Deal groups associated with this deal
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              description: Deal group ID
                            name:
                              type: string
                              description: Deal group name
                      updated_on:
                        type: string
                        format: date-time
                      has_strategies:
                        type: boolean
                        description: Indicates if the deal has strategies assigned
                  meta:
                    type: object
                    properties:
                      status:
                        type: string
        '400':
          description: 'Reasons may include:


            * "deal_type", "unsupported feature, cannot change deal_type from " + db_deal_type + " to
            " + request_deal_type

            * ''{}'' format is invalid".format(field)

            * ''deal_type'' field is not present in db, requires manually investigations

            * end_datetime is required and must match the dates in the __ Programmatic Guaranteed agreement

            * Entities in the ''permissions'' field must be equivalent to or sub-entities of the owner
            entity

            * Invalid currency_code

            * Invalid owner.id

            * Invalid sub_supply_source_id

            * missing owner

            * overlap error: duplicate advertiserID

            * overlap error: duplicate agencyID

            * Owner type not found.

            * ''owner.id'' is a required property for this owner.type

            * ''permissions.advertiser_ids'' field must be present

            * ''permissions.agency_ids'' field must be present

            * ''permissions.organization_ids'' currently can have up to one id

            * ''permissions.organization_ids'' field must be present

            * ''price.value'' is invalid

            * Programmatic guaranteed deals must have a fixed price

            * start_datetime is required and must match the dates in the " + name + " Programmatic Guaranteed
            agreement

            * ''start_datetime'' must be earlier than ''end_datetime''

            * ''sub_supply_source_id'' is not necessary for this supply source

            * ''sub_supply_source_id'' is required for this supply source

            * This deal_identifier already exists

            * This supply source does not support programmatic guaranteed deals

            * Unauthorized to set ''permissions.all_organizations'' to true

            * Unauthorized to set this ''owner.type'''
  /deal_analytics:
    post:
      tags:
      - Private Marketplace Exchange (PMP-E)
      summary: List Deals and their reporting data
      description: "List the Deals\n\nThis call returns all information you get with a deal and also the\
        \ reporting data for a specified time interval (time_window : \"yesterday\", \"last_7_days\",\
        \ \"last_30_days\", \"month_to_date\", or a custom range using \"start_date\" and \"end_date\"\
        ). You should only send time_window or start_date/end_date but not a combination of the both.\
        \ \nThe filters field allows you to filter the results based on what you need, e.g: \"filters\"\
        : [{\"field\":\"id\", \"op\":\"in\", \"value\": [123]}] will look for deals that have 123 in their\
        \ ID. \n{\"field\" :\"match_rate\", \"op\":\">\", \"value\" :0} will return deals that have a\
        \ \"match_rate\" greater than 0. You can also use the \"sorting\" field to sort the results, eg:\
        \ \"sorting\":[{\"field\":\"viewability_rate\", \"dir\":\"asc\"}] will give the results sorted\
        \ by the viewability_rate field. \n\n```{\n  \"reporting\": {\n    \"organization_id\": 100048,\n\
        \    \"time_window\": \"last_7_days\",\n    \"start_date\": null,\n    \"end_date\": null\n  },\n\
        \  \"filters\": [\n   {\"field\": \"id\",\n               \"op\": \"in\",\n               \"value\"\
        \ : [447824]},\n               {\"field\": \"match_rate\",\n               \"op\": \">\",\n  \
        \             \"value\" : 0}\n  ],\n  \"sorting\": [\n      {\n               \"field\": \"viewability_rate\"\
        ,\n               \"dir\": \"asc\"\n           }\n \n  ],\n  \"paging\": {\n    \"page_offset\"\
        : 0\n  }\n}\n```\n"
      operationId: LIST-deals-and-reporting-data
      parameters:
      - $ref: '#/components/parameters/trait_postHeader_Content-Type'
      - $ref: '#/components/parameters/trait_cookieAuth_Cookie'
      - name: owner.organization_id
        in: query
        description: Organization ID that owns the deals
        required: true
        schema:
          type: integer
      - name: permissions.organization_ids
        in: query
        description: Comma-separated list of organization IDs to filter deals by. Returns deals permissioned
          to at least one of the specified organizations (OR within this parameter). If combined with
          permissions.agency_ids or permissions.advertiser_ids, a deal must match at least one ID from
          each provided parameter (AND between parameters). Users may only request IDs they have access
          to; unauthorized IDs return 400.
        required: false
        schem

# --- truncated at 32 KB (165 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/mediamath/refs/heads/main/openapi/mediamath-marketplaces-api-v2-openapi.yml