BYOA

Custom Brain

Custom Brain allows the client to use the BYOA API to upload a set of logistic coefficients corresponding to any of the variables currently in use by the MediaMath Brain. These coefficients will then be used by participating strategies to calculate the predicted response rate for each impression. The bidder will calculate bid price by multipling the predicted response rate by the strategy's goal value. Goal values can be modified using the MediaMath Platform campaign management API.

It is best for you to contact us early in your process by emailing developers@mediamath.com, as it may take about 48 hours before you are granted API access to begin work on your model.

BYOM

Download OpenAPI description
Languages
Servers
Mock server
https://apidocs.mediamath.com/_mock/apis/byoa-api/
https://api.byoa.mediamath.com/

Aggregate

Internal methods to create model from a group of campaigns

Operations

Bid Valuator

Internal - Bid valuator

Campaign Settings

BYOA (Bring Your Own Algorithm) allows advertisers to apply their own bidding algorithms within MediaMath. The participating campaigns and strategies are configured with the BYOA Campaign Settings

Operations

Strategy based Campaign Details

Request

Get strategy level Campaign Setting

Path
strategy_idintegerrequired

_

campaign_idintegerrequired

_

curl -i -X GET \
  'https://apidocs.mediamath.com/_mock/apis/byoa-api/campaign_settings/{campaign_id}/strategies/{strategy_id}' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

Bodyapplication/json
dataArray of objects
metaobject
Response
application/json
{ "data": [ {} ], "meta": { "status": "success" } }

Strategy based Campaign Delete

Request

Delete Campaign Setting with Campaign, Strategy

No request body for this type.

Path
strategy_idintegerrequired

_

campaign_idintegerrequired

_

curl -i -X DELETE \
  'https://apidocs.mediamath.com/_mock/apis/byoa-api/campaign_settings/{campaign_id}/strategies/{strategy_id}' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

Bodyapplication/json
dataArray of objects
metaobject
Response
application/json
{ "data": [ {} ], "meta": { "status": "success" } }

Strategy based Campaign Create/Modify

Request

Configure BYOA functionality at a Strategy Level for a Campaign

Path
strategy_idintegerrequired

_

campaign_idintegerrequired

_

Headers
Adama_sessionstringrequired

_

Adama_session_expstringrequired

_

Bodyapplication/json

uuid_type should be at the top layer and the rest should be in an array one layer deeper.

any
curl -i -X PUT \
  'https://apidocs.mediamath.com/_mock/apis/byoa-api/campaign_settings/{campaign_id}/strategies/{strategy_id}' \
  -H 'Adama_session: string' \
  -H 'Adama_session_exp: string' \
  -H 'Content-Type: application/json'

Responses

Example using cURL:

curl -X PUT "https://api.byoa.mediamath.com/campaign_settings/999999/strategies/888888" \
  -d '{
    "settings": [
      {
        "executor_id": 2,
        "high": 99,
        "low": 0,
        "model_id": "<ModelName>",
        "namespace": "<OrganizationID>"
      }
    ],
    "uuid_type": "UUID"
  }' \
  -H 'adama_session: <adama_session>'

Note that executor_id must be set to 2. This refers to the current version of the MediaMath BYOA Model executor.

Bodyapplication/json
dataArray of objects
metaobject
Response
application/json
{ "data": [ {} ], "meta": { "status": "success" } }

Campaign Delete

Request

Delete a Campaign

There is no request body for this endpoint command.

Path
campaign_idintegerrequired

Campaign ID

curl -i -X DELETE \
  'https://apidocs.mediamath.com/_mock/apis/byoa-api/campaign_settings/{campaign_id}' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

Bodyapplication/json
dataArray of objects
metaobject
Response
application/json
{ "data": [ {} ], "meta": { "status": "success" } }

Campaign Create/Modify

Request

Configure BYOA functionality at a Campaign Level

Path
campaign_idintegerrequired

Campaign ID

Bodyapplication/json

_

any
curl -i -X PUT \
  'https://apidocs.mediamath.com/_mock/apis/byoa-api/campaign_settings/{campaign_id}' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json'

Responses

Example using cURL:

$ curl -X PUT "https://api.byoa.mediamath.com/campaign_settings/999999" \
  -d '{
    "settings": [
      {
        "executor_id": 2,
        "high": 99,
        "low": 0,
        "model_id": "<ModelName>",
        "namespace": "<OrganizationID>"
      }
    ],
    "uuid_type": "UUID"
  }' \
  -H 'adama_session: <adama_session>'

Note that executor_id must be set to 2. This refers to the current version of the MediaMath BYOA Model executor.

Bodyapplication/json
dataArray of objects
metaobject
Response
application/json
{ "data": [ {} ], "meta": { "status": "success" } }

Campaign Details

Request

Get details on BYOA settings for a campaign

Query parameters like page_limit and with and sort_by do not work

Path
campaign_idintegerrequired

Campaign ID

curl -i -X GET \
  'https://apidocs.mediamath.com/_mock/apis/byoa-api/campaign_settings/{campaign_id}' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

Bodyapplication/json
dataArray of objects
metaobject
Response
application/json
{ "data": [ {}, {} ], "meta": { "status": "success" } }

Custom Bid Router

Custom Bid Router further extends the BYOA architecture allowing advertisers to apply their own bidding algorithms in their own ecosystem. The MediaMath system will invoke an external call to the client with the bid request and await a response that MediaMath can use in our internal auction. Forwarded bid requests adhere to OpenRTB v2.4 format and may be enriched with certain information such as segment membership and pixel recency.

Operations

Custom Brain

In Customized Brain, the client uses the BYOA API to upload a set of logistic coefficients corresponding to any of the variables currently in use by the MediaMath Brain. These coefficients will then be used by participating strategies to calculate the predicted response rate for each impression. The bidder will calculate bid price by multiplying the predicted response rate by the strategy's goal value. Goal values can be modified using the T1 campaign management API.

Operations

Executors

Internal methods used to configure Log Brain and Tree Brain executors

Operations

Jumpstart

Internal - Jumpstart campaigns

Operations

Serialize

Internal methods to update the BYOA execution engines with current campaigns and settings

Operations