Create an ad
POST /api/marketing/adsJoins an ad set with an existing creative (creative.creative_id) and returns the ad reread. Without status it is created PAUSED. Requires the marketing:manage scope.
Request body
Section titled “Request body”| Field | Type | Description | |
|---|---|---|---|
ad_account_id | string | required | Meta ad account, with prefix. Example: "act_123". |
name | string | required | Example: "Anuncio tráfico · imagen". |
adset_id | string | required | Ad set the ad belongs to. It cannot be changed afterwards. |
creative | object | required | Creative to show, by id: { "creative_id": "123" }. |
status | ACTIVE · PAUSED · DELETED · ARCHIVED | optional | If omitted, the ad is created PAUSED. Default: "PAUSED". |
tracking_specs | object[] | optional | Meta tracking specs. They are passed through as is. |
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 | Status computed by Meta, includes the review status. |
creative | AdCreativeRefDto | optional | — |
created_time | string | optional | — |
updated_time | string | optional | — |