Skip to content

feat: add DSA fields (dsa_beneficiary/dsa_payor) and bid_amount to create_adset - #10

Open
jesperholstjh wants to merge 1 commit into
mikusnuz:masterfrom
jesperholstjh:feat-create-adset-dsa-bid-amount
Open

feat: add DSA fields (dsa_beneficiary/dsa_payor) and bid_amount to create_adset#10
jesperholstjh wants to merge 1 commit into
mikusnuz:masterfrom
jesperholstjh:feat-create-adset-dsa-bid-amount

Conversation

@jesperholstjh

Copy link
Copy Markdown

create_adset currently cannot create ad sets in two common situations:

  1. EU accounts: Since the Digital Services Act, Meta requires dsa_beneficiary (and accepts dsa_payor) on ad sets delivering to the EU. Without them the API rejects creation with code 100, subcode 3858081 ("Specify the person or organisation being promoted"). This currently makes create_adset unusable for EU advertisers.
  2. Capped bid strategies: bid_strategy: LOWEST_COST_WITH_BID_CAP or COST_CAP requires bid_amount, which exists on update_adset but not on create_adset, so a capped ad set cannot be created in one call.

This PR adds all three as optional params, forwarded to the API only when provided. No breaking changes.

Tested against the live Marketing API (v26.0, Danish ad account): ad set with DSA fields and bid cap created successfully; existing calls without the new fields behave as before.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant