Ad Accounts

Update ad account settings

Changed on

Changes a Meta ad account's name, spend cap or default EU DSA beneficiary and payor.

Pass any combination of fields.

Spend cap. spendCap is the total the account may spend before Meta pauses every campaign in it, in whole units of the account currency. spendCap: null removes the cap and resetAmountSpent: true restarts the amount counted against it from zero. When name, spendCap or resetAmountSpent is passed, the response carries settings, the account's finances re-read after the write (same shape as GET /v1/ads/accounts/finance), so the effective cap can be confirmed in one call.

DSA defaults. Sets the default DSA beneficiary and payor on the ad account (EU DSA, Article 26). Set them once and every EU-targeted call to /v1/ads/create, /v1/ads/boost and /v1/ads/ctwa on that ad account can omit dsaBeneficiary/dsaPayor: Meta applies the defaults automatically.

The values are written to the ad account on Meta, the same setting Ads Manager edits. Nothing is stored in Zernio, and defaults already set in Ads Manager work identically. Zernio never guesses these values for you. Beneficiary and payor are legal disclosures shown to EU users, so you must provide the entity names explicitly. Use GET /v1/ads/dsa-recommendations to offer suggestions in your UI.

If defaultDsaPayor is omitted, the beneficiary is also set as the payor, which covers the common case where the same entity benefits from and pays for the ads. Read the current values back with GET /v1/ads/dsa-defaults.

Google: account-level URL tracking. On a Google Ads connection, adAccountId is the customer id and only trackingUrlTemplate / finalUrlSuffix are accepted (the Meta fields return 400). They write customer.tracking_url_template and customer.final_url_suffix, one update mask leaf per field sent; an empty string clears the field. The response carries urlTracking with the values written. For one campaign, send the same fields to PUT /v1/ads/campaigns/{campaignId}.

Other platforms return 400.

patch/v1/ads/accounts

Request

  • Base URL: https://zernio.com/api
  • URL: https://zernio.com/api/v1/ads/accounts
  • Auth: HTTP bearer

Request body

accountIdstring required

Account ID (metaads, or a facebook/instagram posting account)

adAccountIdstring required

Meta ad account ID (act_...)

namestring

New ad account name.

spendCapnumber nullable

Account spend cap in whole currency units; null removes it.

resetAmountSpentboolean

Restart the amount counted against the cap from zero. Cannot be combined with spendCap null.

defaultDsaBeneficiarystring

Legal entity benefiting from ads on this ad account

defaultDsaPayorstring

Legal entity paying for ads on this ad account. Defaults to defaultDsaBeneficiary when omitted. Requires defaultDsaBeneficiary.

trackingUrlTemplatestring

Google only. Account tracking template (customer.tracking_url_template); an empty string clears it.

finalUrlSuffixstring

Google only. Account final URL suffix (customer.final_url_suffix); an empty string clears it.

Response

Settings updated (each block re-read from Meta after the write)

adAccountIdstring

Changes

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the optional property to the response with the status

    • warning

      added the new account enum value to the / response property for the response status

    • warning

      added the new account enum value to the / response property for the response status

    • warning

      added the new account enum value to the / response property for the response status

    • warning

      added the new account enum value to the / response property for the response status