Internal methods to create model from a group of campaigns
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.
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>'
{ "data": [ { … } ], "meta": { "status": "success" } }
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>'
{ "data": [ { … } ], "meta": { "status": "success" } }
uuid_type should be at the top layer and the rest should be in an array one layer deeper.
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'
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.
{ "data": [ { … } ], "meta": { "status": "success" } }
curl -i -X DELETE \
'https://apidocs.mediamath.com/_mock/apis/byoa-api/campaign_settings/{campaign_id}' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'
{ "data": [ { … } ], "meta": { "status": "success" } }
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'
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.
{ "data": [ { … } ], "meta": { "status": "success" } }
curl -i -X GET \
'https://apidocs.mediamath.com/_mock/apis/byoa-api/campaign_settings/{campaign_id}' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'