Advertisements

Create Advertisement Campaign

Create a new advertisement campaign with video content. The video is automatically processed into multiple quality levels (360p, 720p, original) for adaptive streaming, and a thumbnail is generated.

POST/nfthing/advertisement/create

Headers

FieldTypeRequiredDescription
X-API-KeystringYesYour Membrane API key.

Form fields

FieldTypeRequiredDescription
titlestringYesAdvertisement title.
descriptionstringYesAdvertisement description.
categorystringYesCategory (e.g. "tech", "fashion").
taglinestringYesShort tagline.
reward_amountintegerYesReward amount for watching/completing.
cta_namestringYesCall-to-action button text.
has_feedbackbooleanYestrue if you want to add feedback questions.
content_urlstringNoOptional landing page URL.
videofileYesVideo file (mp4 recommended).

Example response

200 OK
{
  "success": true,
  "message": "Advertisement campaign created successfully",
  "data": {
    "id": 85,
    "post_id": "6aadfa03-3a05-440e-a9d3-524b31a9f3bd",
    "type": "advertisement",
    "title": "Summer Sale Ad",
    "canonical_url": "https://nftimages.blr1.cdn.digitaloceanspaces.com/ads/hls/..._master.m3u8",
    "thumbnail_url": "https://nftimages.blr1.cdn.digitaloceanspaces.com/ads/thumbnails/..._thumb.jpg",
    "duration": 30,
    "aspect_ratio": {
      "width": 1920,
      "height": 1080
    },
    "has_feedback": true,
    "is_live": false
  }
}

Notes

  • Video processing may take a few seconds depending on file size. The video is converted into HLS format for adaptive streaming.