Subir una imagen
POST /api/marketing/imagesSube el archivo a la biblioteca de la cuenta y devuelve el hash que va en link_data.image_hash. El contenido viaja en base64 y el archivo no puede superar los 7 MB: codificado pesa un tercio más y el body parser de Neike corta en 10 MB. 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 | optional | Nombre con el que queda archivada en Meta. |
bytes_base64 | string | required | Contenido del archivo en base64, sin el prefijo data:. Máximo 7 MB. |
Responses
Section titled “Responses”| Status | Description | Schema |
|---|---|---|
200 | — | UploadedImageDto |
Example
Section titled “Example”curl -X POST https://api.neike.dev/api/marketing/images \ -H "x-neike-api-key: whk_live_…" \ -H "Content-Type: application/json" \ -d '{ "ad_account_id": "act_123", "bytes_base64": "string" }'UploadedImageDto
Section titled “UploadedImageDto”| Field | Type | Description | |
|---|---|---|---|
hash | string | required | Hash a usar en link_data.image_hash. |
url | string | optional | — |
width | number | optional | — |
height | number | optional | — |
name | string | optional | — |