Editar una campaña
PATCH /api/marketing/campaigns/{campaignId}Solo se mandan a Meta los campos presentes; un null no borra el valor anterior. daily_budget y lifetime_budget siguen siendo excluyentes. Requiere scope marketing:manage.
Request body
Section titled “Request body”| Field | Type | Description | |
|---|---|---|---|
ad_account_id | string | required | Cuenta publicitaria dueña de la campaña. Example: "act_123". |
name | string | optional | — |
status | ACTIVE · PAUSED · DELETED · ARCHIVED | optional | — |
special_ad_categories | NONE · EMPLOYMENT · HOUSING · CREDIT · ISSUES_ELECTIONS_POLITICS · ONLINE_GAMBLING_AND_GAMING · FINANCIAL_PRODUCTS_SERVICES[] | optional | — |
daily_budget | number | optional | Presupuesto diario en centavos. |
lifetime_budget | number | optional | Presupuesto total en centavos. |
bid_strategy | LOWEST_COST_WITHOUT_CAP · LOWEST_COST_WITH_BID_CAP · COST_CAP · LOWEST_COST_WITH_MIN_ROAS | optional | — |
spend_cap | number | optional | Tope de gasto de la campaña, en centavos. |
start_time | string | optional | — |
stop_time | string | optional | — |
Responses
Section titled “Responses”| Status | Description | Schema |
|---|---|---|
200 | — | CampaignDto |
Example
Section titled “Example”curl -X PATCH https://api.neike.dev/api/marketing/campaigns/{campaignId} \ -H "x-neike-api-key: whk_live_…" \ -H "Content-Type: application/json" \ -d '{ "ad_account_id": "act_123" }'CampaignDto
Section titled “CampaignDto”| Field | Type | Description | |
|---|---|---|---|
id | string | required | Example: "120210000000000000". |
name | string | required | Example: "Tráfico · septiembre". |
objective | APP_INSTALLS · BRAND_AWARENESS · CONVERSIONS · EVENT_RESPONSES · LEAD_GENERATION · LINK_CLICKS · LOCAL_AWARENESS · MESSAGES · OFFER_CLAIMS · OUTCOME_APP_PROMOTION · OUTCOME_AWARENESS · OUTCOME_ENGAGEMENT · OUTCOME_LEADS · OUTCOME_SALES · OUTCOME_TRAFFIC · PAGE_LIKES · POST_ENGAGEMENT · PRODUCT_CATALOG_SALES · REACH · STORE_VISITS · VIDEO_VIEWS | optional | — |
status | ACTIVE · PAUSED · DELETED · ARCHIVED | optional | — |
effective_status | string | optional | Estado efectivo calculado por Meta (incluye los de revisión y los heredados de la cuenta). Es de solo lectura y tiene más valores que status. Example: "PAUSED". |
special_ad_categories | NONE · EMPLOYMENT · HOUSING · CREDIT · ISSUES_ELECTIONS_POLITICS · ONLINE_GAMBLING_AND_GAMING · FINANCIAL_PRODUCTS_SERVICES[] | optional | — |
buying_type | AUCTION · RESERVED | optional | — |
daily_budget | string | optional | Presupuesto diario en centavos. Example: "100000". |
lifetime_budget | string | optional | Presupuesto total en centavos. Example: "500000". |
spend_cap | string | optional | Tope de gasto en centavos. Example: "1000000". |
bid_strategy | LOWEST_COST_WITHOUT_CAP · LOWEST_COST_WITH_BID_CAP · COST_CAP · LOWEST_COST_WITH_MIN_ROAS | optional | — |
start_time | string | optional | Example: "2026-09-01T00:00:00-0300". |
stop_time | string | optional | Example: "2026-09-30T23:59:59-0300". |
created_time | string | optional | — |
updated_time | string | optional | — |