Skip to content

Upload a video

POST /api/marketing/videos

Returns the id that goes in video_data.video_id. It accepts two forms: the file in multipart/form-data (field file, up to 100 MB; anything heavier is 413) or file_url, a public URL that Meta downloads. Sending both is 400. Neike chooses on its own how to upload it to Meta: a small file goes in one request and a large one in parts. Meta encodes the video after accepting it: until GET /api/marketing/videos/{videoId} says ready, the video cannot be used in a creative. Requires the marketing:manage scope.

FieldTypeDescription
ad_account_idstringrequiredMeta ad account, with prefix. Example: "act_123".
namestringoptionalName under which it is stored in Meta.
file_urlstringoptionalPublic URL of the video: Meta downloads it from there. It is the alternative to sending the file in file; one of the two is required. Example: "https://cdn.mitienda.com/spot.mp4".
filestring (binary)optionalVideo file, in multipart/form-data. Maximum 100 MB.
StatusDescriptionSchema
200—UploadedVideoDto
Terminal window
curl -X POST https://api.neike.dev/api/marketing/videos \
-H "x-neike-api-key: whk_live_…" \
-F "ad_account_id=act_123" \
-F "file=@./file"
FieldTypeDescription
idstringrequiredId to use in video_data.video_id.