Crear un anuncio
POST /api/marketing/adsUne un conjunto con una creatividad ya existente (creative.creative_id) y devuelve el anuncio releído. Sin status nace PAUSED. Requiere scope marketing:manage.
Request body
Section titled “Request body”| Field | Type | Description | |
|---|---|---|---|
ad_account_id | string | required | Cuenta publicitaria de Meta, con prefijo. Example: "act_123". |
name | string | required | Example: "Anuncio tráfico · imagen". |
adset_id | string | required | Conjunto al que cuelga el anuncio. Después no se puede cambiar. |
creative | object | required | Creatividad a mostrar, por id: { "creative_id": "123" }. |
status | ACTIVE · PAUSED · DELETED · ARCHIVED | optional | Si no viene, el anuncio se crea PAUSED. Default: "PAUSED". |
tracking_specs | object[] | optional | Specs de seguimiento de Meta. Se pasan tal cual. |
Responses
Section titled “Responses”| Status | Description | Schema |
|---|---|---|
201 | — | AdDto |
Example
Section titled “Example”curl -X POST https://api.neike.dev/api/marketing/ads \ -H "x-neike-api-key: whk_live_…" \ -H "Content-Type: application/json" \ -d '{ "ad_account_id": "act_123", "name": "Anuncio tráfico · imagen", "adset_id": "string" }'| Field | Type | Description | |
|---|---|---|---|
id | string | required | Example: "120210000000000000". |
name | string | required | Example: "Anuncio tráfico · imagen". |
adset_id | string | optional | — |
campaign_id | string | optional | — |
status | ACTIVE · PAUSED · DELETED · ARCHIVED | optional | — |
effective_status | string | optional | Estado calculado por Meta, incluye el de revisión. |
creative | AdCreativeRefDto | optional | — |
created_time | string | optional | — |
updated_time | string | optional | — |