CreativesSet target CPAs

Set target CPAs

Replace every saved target of one conversion in one transaction. Needs an agency key or creative_analysis:write. Every field is required: a missing or invalid value answers 400 and changes nothing. null clears the client default and {} clears every campaign target.

curl -X PUT "https://mythic-analytics.gulp.workers.dev/client/v1/creatives/decisions/targets?location_id=example_string" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -d '{
  "conversion": "meta:lead",
  "currency": "USD",
  "client_target_cpa": 40,
  "campaigns": {
    "120212345678901234": 60
  }
}'
{
  "success": true,
  "data": {
    "conversion": "example_string",
    "client": 3.14,
    "campaigns": {},
    "currency": "example_string"
  }
}
PUT
/client/v1/creatives/decisions/targets
PUT
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_.

Content-Typestring
Required

The media type of the request body

Options: application/json
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_.

Body

application/json
conversionstring
Required
Example:
meta:lead
campaignsobject
Required
Example:
{"120212345678901234":60}

Responses

successboolean
dataobject