跳转到主要内容
PUT
Update an ad set

请求规范

  • 方法与路径: PUT /apis/v1/ads/ad-sets/{adSetId}
  • 可用状态: enabled
  • 请求 URL 模板: https://api.aisa.one/apis/v1/ads/ad-sets/{adSetId}
  • adSetId: path; 必填
  • connectionId: query; 必填
  • X-Aisa-Confirm: header; 可选
  • Runtime 事实版本: fe60122939c67dc98a3a6ac6b97bd5c326b526105150c8959304dd2160d4dd09
完整 OpenAPI 定义 有效请求与价格声明(包括认证和引用的 schema):

费用与请求规则

当前未提供请求参考价格;请使用接口支持的报价功能确认费用。 最终费用以账户适用价格及实际结算为准。 公开参考值不是你的账户报价或最终扣费。对于支持 X-AISA-Cost-Mode: quote 的接口,执行前请针对完整请求获取免费报价;执行后通过响应费用元数据和 Usage Logs 核对结算费用。1 USD 等于 1,000,000 个整数 micro-USD。

授权

Authorization
string
header
必填

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

请求头

X-Aisa-Confirm
enum<string>

Required with the value "spend" when the request can spend money or change spend. Without it the request is refused with 409 confirmation_required, which describes what would happen; nothing is sent to the ad platform.

可用选项:
spend

路径参数

adSetId
string
必填

Platform ad set ID

查询参数

connectionId
string
必填

The ads connection (adc_...) the request runs on: one of yours, from GET /apis/v1/ads/connections. On a request with a JSON body it may be sent as a top-level body member instead.

Pattern: ^adc_[0-9A-Za-z]+$

请求体

application/json
bidAmount
number

Bid cap in WHOLE currency units (USD: 5 = $5.00; JPY: 100 = ¥100). Required when bidStrategy is LOWEST_COST_WITH_BID_CAP or COST_CAP.

bidStrategy
enum<string>

Ad-set-level bid strategy. Overrides the campaign-level default. Meta (facebook, instagram): supported. TikTok: the Meta-style enum is mapped to bid_type / bid_price / deep_bid_type automatically.

可用选项:
LOWEST_COST_WITHOUT_CAP,
LOWEST_COST_WITH_BID_CAP,
COST_CAP,
LOWEST_COST_WITH_MIN_ROAS
budget
object

Omit if not updating budget

connectionId
string

The ads connection (adc_...), when not sent as the connectionId query parameter.

Pattern: ^adc_[0-9A-Za-z]+$
dsaBeneficiary
string

Meta only (400 elsewhere, before anything in the request is written). Writes the ad set's dsa_beneficiary, the legal entity that benefits from its ads. Same field and limits as dsaBeneficiary on POST /apis/v1/ads/create.

Required string length: 1 - 100
dsaPayor
string

Meta only (400 elsewhere, before anything in the request is written). Writes the ad set's dsa_payor, the legal entity that pays for its ads, same field and limits as dsaPayor on POST /apis/v1/ads/create.

Required string length: 1 - 100
endDate
string | null

Reddit only. The ad group's new end_time, ISO 8601, read in the ad account timezone when it has no offset; a date alone means the end of that day. null removes the end date so the ad group runs continuously.

name
string

Rename the ad set. At least one of budget/status/bidStrategy/name is required. Supported on Meta, Google (the ad group), TikTok, LinkedIn (the campaign), Pinterest, X (the line item name), OpenAI and Reddit.

Maximum string length: 255
placements
object | null

Meta only (400 elsewhere). Manual placements, with the same object and enums as placements on POST /apis/v1/ads/create.

platform
enum<string>

Filled from the connection when omitted.

可用选项:
facebook,
instagram,
tiktok,
linkedin,
pinterest,
google,
twitter,
openai,
reddit,
meta,
x
platformSpecificData
object

Platform-specific post-launch delivery settings. The platform is implied by the platform body param. Meta only; other platforms return 400. Unknown keys are rejected.

regionalRegulatedCategories
string[]

Meta only (400 elsewhere, before anything in the request is written).

Minimum string length: 1
regionalRegulationIdentities
object

Meta only (400 elsewhere, before anything in the request is written). Writes the ad set's regional_regulation_identities: the Verified identity IDs of the beneficiary and payer for each declared category.

roasAverageFloor
number

Minimum ROAS as a decimal multiplier (2.0 = 2.0x). Required when bidStrategy is LOWEST_COST_WITH_MIN_ROAS. Sent to Meta as bid_constraints.roas_average_floor × 10000. Not supported on OpenAI (422).

smartTargeting
object

TikTok only (a 400 elsewhere). TikTok Smart Targeting on the ad group: audience is TikTok's smart_audience_enabled, interestsBehaviors its smart_interest_behavior_enabled.

startDate
string

Reddit only: the ad group's new start_time, ISO 8601. A value without an offset (YYYY-MM-DD or YYYY-MM-DDTHH:MM:SS) is read in the ad account timezone.

status
enum<string>

Writes the ad set's own on/off switch (Meta: configured_status; X: the line item's entity_status ACTIVE / PAUSED), whatever delivery status its ads report. Omit if not toggling delivery state.

可用选项:
active,
paused
targeting
object

Targeting fields to change. Meta and Reddit (400 elsewhere). Reddit (see the description above):

valueRuleSetId
string

Meta only (other platforms return 501). Value rule set to attach to this ad set, from /apis/v1/ads/value-rule-sets. Sending a different id replaces the current association. To DETACH, send valueRulesApplied: false and omit this field.

Pattern: ^\d+$
valueRulesApplied
boolean

Meta only (other platforms return 501). false DETACHES the ad set's value rule set and must be sent WITHOUT valueRuleSetId; the combination returns 400.

响应

Ad set updated

bidAmount
number | null
bidStrategy
enum<string>

Meta bid strategy. Same enum applies at campaign and ad-set level; ad-set value (when set) overrides campaign-level. Cross-field rules: LOWEST_COST_WITHOUT_CAP (default): auto-bid, forbids bidAmount and roasAverageFloor.

可用选项:
LOWEST_COST_WITHOUT_CAP,
LOWEST_COST_WITH_BID_CAP,
COST_CAP,
LOWEST_COST_WITH_MIN_ROAS
budget
object

Budget amount in the ad account's native currency (see the campaign's currency field for the code).

budgetLevel
enum<string>
可用选项:
adset
endDate
string | null

Reddit: the end_time written, a UTC instant, or null when the end date was removed. Present when endDate was sent.

platformAdSetStatus
string | null

The ad set's status read back from the platform, as in PUT /apis/v1/ads/ad-sets/{adSetId}/status (Meta and Reddit return the ad set's effective_status); null when it could not be read.

platformCampaignStatus
string | null
platformSpecificData
object
roasAverageFloor
number | null
startDate
string

Reddit: the start_time written, a UTC instant. Present when startDate was sent.

status
enum<string>

As in PUT /apis/v1/ads/ad-sets/{adSetId}/status: delivery derived from the switches read back.

可用选项:
active,
paused
statusReadAt
string<date-time> | null
statusSkipped
enum<integer>

1 when a live read showed it already in the requested state.

可用选项:
0,
1
statusSkippedReasons
string[]
statusUpdated
enum<integer>

1 when the ad set's switch was written.

可用选项:
0,
1
targeting
object

Present when placements or targeting was sent. The ad set's full targeting as written, in the platform's own vocabulary (Meta or Reddit snake_case). Stored as the ad set's targeting. Meta stores the same object on its ads.