Zernio
APIFor you
Zernio
APIFor you
Platforms

X Ads

Overview

Build

Create a CampaignPromote a Post

Target

Tailored Audiences

Measure

Pixel & Analytics

Reference

Limits & Errors
Dashboard
OverviewPlatformsAPI ReferenceResources
X Ads

Promote a Post

Promote a post you already published on X as an ad.


POST /v1/ads/boost promotes a post that is already published, keeping its engagement.

const { data: boosted } = await zernio.adcampaigns.boostPost({
  body: {
    postId: '65f1c0a9e2b5af0012ab34cd',
    accountId: '66b2e19d8c3f5a7e9d0b1c2d',
    adAccountId: '18ce54d4x5t',
    name: 'Boost launch post',
    goal: 'engagement',
    budget: { amount: 50, type: 'daily' },
    schedule: { startDate: '2027-01-04', endDate: '2027-01-11' }
  }
});

console.log(boosted.ad._id);

Response (201):

{
  "ad": {
    "_id": "66f0a1b2c3d4e5f6a7b8c9d1",
    "name": "Boost launch post",
    "platform": "twitter",
    "status": "pending_review",
    "adType": "boost",
    "goal": "engagement",
    "budget": { "amount": 50, "type": "daily" }
  },
  "message": "Ad created"
}

Boosts are not idempotent. Send an Idempotency-Key header to make a retry replay the original 201 instead of creating a second ad (idempotency).

Was this page helpful?

Create a Campaign

Create an X Ads campaign from ad text, a link and an optional website card, with targeting fields.

Tailored Audiences

Upload Tailored Audiences to an X Ads account.