Zernio
Zernio
API Reference

Creatives

List a catalog's product setsGETList Meta product catalogsGETCreative libraryGETAd image libraryGETAd video libraryGETList partnership ad contentGETList partnership permissionsGETCreate a standalone creativePOSTCreative detailsGETDirect video and image URLs for an adGETRender previews of an existing adGETSet partnership permissionPOSTRename a creativePUTDelete a creativeDELETEDelete an ad videoDELETERender pre-create ad previewsPOSTUpload an ad image from base64POSTUpload an ad videoPOST
Dashboard
llms.txtOpenAPI
OverviewPlatformsAPI ReferenceResources
Creatives

Upload an ad video

Standalone ad-video upload (parallel to POST /v1/ads/images), so a video creative can be rendered via POST /v1/ads/preview or attached via video.id on POST /v1/ads/create before an ad exists.

Accepts either an https videoUrl we download server-side (SSRF-guarded) or raw videoBase64 bytes; exactly one is required. videoBase64 is capped by Vercel's body limit, around 4.5 MB payload in practice, so larger videos must come via videoUrl.

Returns the Meta video.id (reusable wherever video.id is accepted) plus Meta's auto-generated poster URL when available. The endpoint waits until Meta reports the video ready (chunked upload + transcode can take minutes; the handler runs up to 800 s).


PlatformsMeta
POST
/v1/ads/videos

Authorization

bearerAuth
AuthorizationBearer <token>

API key authentication: send your Zernio API key in the Authorization header, prefixed with Bearer.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

{  "adAccountId": "string",  "video": {    "id": "string",    "thumbnailUrl": "string"  }}
Was this page helpful?

Upload an ad image from base64

Uploads raw image bytes to the Meta ad account's image library, for callers whose creatives aren't 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.

List custom audiences

Returns custom audiences for the given ad account. Supports Meta, Google, TikTok, Pinterest, LinkedIn, and X.

accountId*string

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

adAccountId*string

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

videoUrl?string

Public https URL of the video; downloaded server-side (SSRF-guarded) before chunked upload. Provide exactly one of videoUrl or videoBase64.

videoBase64?string

Raw base64 video bytes, or a full data URL (the data:video/...;base64, prefix is stripped). Capped by Vercel's body limit (~4.5 MB payload). Provide exactly one of videoUrl or videoBase64.

filename?string

Optional filename shown alongside the upload session. Applied only when uploading via videoBase64.