CreativesScale / Test / Kill decisions

Scale / Test / Kill decisions

Scale / Test / Kill for every Meta ad with spend in the window, with CPMr x CPA quadrants and optional pooled attribute groups. Zones come from a Gamma-Poisson model (Jeffreys prior) of conversions per unit of spend: scale when P(CPA < target) >= confidence, kill when P(CPA > target) >= confidence, else test. They describe observed cost per conversion, not causality. Ads whose conversions are unknown are unclassifiable with a reason; ads in another currency or objective are listed in population.omitted. CPMr uses Meta's daily reach summed over the window (reach_summed_daily), which overcounts repeat reach.

curl -X GET "https://mythic-analytics.gulp.workers.dev/client/v1/creatives/decisions?location_id=example_string&conversion=meta%3Alead&from=2024-12-25&to=2024-12-25&window=7d_click&model=last&pipeline=example_string&account_id=example_string&objective=OUTCOME_LEADS&target_cpa=3.14&confidence=0.9&group_by=hook_type&new_customers=true" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN"
{
  "success": true,
  "data": {
    "window": {
      "from": "example_string",
      "to": "example_string",
      "days": 42
    },
    "conversion": {},
    "confidence": 3.14,
    "currency": "example_string",
    "objective": "example_string",
    "targets": {
      "client": 3.14,
      "campaigns": {},
      "currency": "example_string",
      "override": 3.14,
      "applied": true,
      "override_applied": true
    },
    "population": {
      "ads_with_spend": 42,
      "spend": 3.14,
      "decided_ads": 123,
      "zones": {
        "scale": 42,
        "test": 42,
        "kill": 42,
        "unclassifiable": 42
      },
      "unclassifiable_by_reason": {},
      "omitted_by_reason": {},
      "omitted": [
        {
          "ad_id": "example_string",
          "reason": "other_currency",
          "spend": 3.14
        }
      ],
      "currencies": [
        {}
      ],
      "objectives": [
        {}
      ],
      "ads_without_actions_copy": 42,
      "actions_coverage": {}
    },
    "medians": {
      "by_account": {}
    },
    "points": [
      {
        "zone": "scale",
        "reason": "no_spend",
        "band": "converting",
        "cpa": 3.14,
        "p_cpa_below_target": 3.14,
        "p_cpa_above_target": 3.14,
        "cpa_interval": [
          3.14
        ],
        "target_cpa": 3.14,
        "target_source": "request",
        "ad_id": "example_string",
        "ad_name": "John Doe",
        "account_id": "example_string",
        "campaign_id": "example_string",
        "campaign_name": "John Doe",
        "adset_id": "example_string",
        "adset_name": "John Doe",
        "currency": "example_string",
        "objective": "example_string",
        "attribution_settings": [
          "example_string"
        ],
        "first_date": "2024-12-25",
        "last_date": "2024-12-25",
        "days_with_spend": 42,
        "spend": 3.14,
        "spend_copy": 3.14,
        "impressions": 42,
        "reach_summed_daily": 42,
        "reach_missing_days": 42,
        "cpmr": 3.14,
        "conversions": 3.14,
        "outcome_missing": "not_in_actions_copy",
        "actions_coverage": "aligned",
        "quadrant": {
          "cpmr": "low",
          "cpa": "low"
        },
        "format": "example_string",
        "tags": {},
        "analysis_status": "example_string"
      }
    ],
    "groups": {
      "by": "example_string",
      "overlapping": true,
      "note": "example_string",
      "items": [
        {
          "zone": "scale",
          "reason": "no_spend",
          "band": "converting",
          "cpa": 3.14,
          "p_cpa_below_target": 3.14,
          "p_cpa_above_target": 3.14,
          "cpa_interval": [
            3.14
          ],
          "target_cpa": 3.14,
          "target_source": "request",
          "value": "example_string",
          "label": "example_string",
          "ad_ids": [
            "example_string"
          ],
          "ads": 42,
          "spend": 3.14,
          "conversions": 3.14,
          "excluded_missing_outcomes": 42,
          "untargeted_ads": 42
        }
      ],
      "without_value": {
        "ads": 42,
        "spend": 3.14,
        "not_analyzed": 42
      }
    },
    "group_values": {},
    "curves": [
      {
        "target_cpa": 3.14,
        "zero_conversion_kill_spend": 3.14,
        "points": [
          {
            "spend": 3.14,
            "scale_max_cpa": 3.14,
            "kill_min_cpa": 3.14,
            "scale_min_conversions": 3.14,
            "kill_max_conversions": 3.14,
            "killable": true,
            "kill_only_without_conversions": true
          }
        ]
      }
    ],
    "available_action_types": [
      {
        "action_type": "example_string",
        "count": 3.14
      }
    ],
    "notes": {}
  }
}
GET
/client/v1/creatives/decisions
GET
Base URLstring

Target server for requests. Edit to use your own host.

Bearer Token
Bearer Tokenstring
Required

Agency key (ak_), location secret key (sk_, reads only) or a scoped mcp_ key with creative_analysis:read or creative_analysis:write. See Using an mcp_ key over HTTP.

Agency key (ak_), location secret key (sk_, reads only) or a scoped mcp_ key with creative_analysis:read or creative_analysis:write. See Using an mcp_ key over HTTP.
query
location_idstring

Location to scope to. Required for ak_ keys or send X-Location-Id. Ignored for sk_.

query
conversionstring
Required

meta:<action_type> (Meta's count), mythic:event:<event> or mythic:deals (Mythic attribution; needs the Data API, refused for HIPAA locations).

query
fromstring

Default: 29 days before to. At most 366 days.

Format: date
query
tostring

Default: today (UTC).

Format: date
query
windowstring

Meta conversions only. Attribution window, default 7d_click. value is each ad set's own setting and answers 422 when the ads use several.

Options: 7d_click, 1d_click, 28d_click, 1d_view, 1d_ev, value
query
modelstring

Mythic conversions only. Default last; linear gives fractional counts.

Options: last, first, linear
query
pipelinestring

mythic:deals only: one pipeline by exact name.

query
account_idstring
Pattern: ^(act_)?[0-9]+$
query
objectivestring

Meta objective to compare within. Default: the top-spend objective.

query
target_cpanumber

What-if target for every ad, in the account currency. Never saved.

Min: 0
query
confidencenumber
Min: 0.5 • Max: 0.995
query
group_bystring
Options: hook_type, angle, offer, format, campaign
query
new_customersboolean

Not supported: true answers 422 new_customers_unsupported.

Request Preview
Response

Response will appear here after sending the request

Authentication

header
Authorizationstring
Required

Bearer token. Agency key (ak_), location secret key (sk_, reads only) or a scoped mcp_ key with creative_analysis:read or creative_analysis:write. See Using an mcp_ key over HTTP.

Query Parameters

location_idstring

Location to scope to. Required for ak_ keys or send X-Location-Id. Ignored for sk_.

conversionstring
Required

meta:<action_type> (Meta's count), mythic:event:<event> or mythic:deals (Mythic attribution; needs the Data API, refused for HIPAA locations).

Example:
meta:lead
fromstring

Default: 29 days before to. At most 366 days.

tostring

Default: today (UTC).

windowstring

Meta conversions only. Attribution window, default 7d_click. value is each ad set's own setting and answers 422 when the ads use several.

Allowed values:7d_click1d_click28d_click1d_view1d_evvalue
modelstring

Mythic conversions only. Default last; linear gives fractional counts.

Allowed values:lastfirstlinear
pipelinestring

mythic:deals only: one pipeline by exact name.

objectivestring

Meta objective to compare within. Default: the top-spend objective.

Example:
OUTCOME_LEADS
target_cpanumber

What-if target for every ad, in the account currency. Never saved.

group_bystring
Allowed values:hook_typeangleofferformatcampaign
new_customersboolean

Not supported: true answers 422 new_customers_unsupported.

Responses

successboolean
dataobject