Ad Creatives

Upload an ad image from base64

Changed on

Uploads an image file to a Meta ad account's library, for creatives that are not hosted at a public URL.

Returns the image hash (Meta's identifier for the asset) and the Meta-hosted url, which can be used directly as imageUrl on the create endpoints. Max 30 MB decoded.

post/v1/ads/images

Request

  • Base URL: https://zernio.com/api
  • URL: https://zernio.com/api/v1/ads/images
  • Auth: HTTP bearer

Request body

accountIdstring required

Zernio SocialAccount id (posting or ads variant); its platform decides where the campaign is created.

adAccountIdstring required

Platform ad account id (Meta act_<n>, Google customer id, LinkedIn account id, ...).

imageBase64string required

Raw base64 image bytes, or a full data URL (the data:image/...;base64, prefix is stripped).

filenamestring

Optional filename shown in Meta's image library. Defaults to ad_image.jpg.

Response

Image uploaded

adAccountIdstring

Changes

    • info

      added the non-success response with the status

    • warning

      added the new account enum value to the / response property for the response status

    • warning

      added the new account enum value to the / response property for the response status

    • warning

      added the new account enum value to the / response property for the response status