X Ads
Create campaigns and promote tweets via Zernio API - OAuth 1.0a and approval handled for you
Requires the Ads add-on. No X Ads API approval application needed. OAuth 1.0a request signing is handled server-side.
What's Supported
| Feature | Status |
|---|---|
| Standalone campaigns (Campaign > Line Item > Promoted Tweet) | Yes |
| Promote existing tweets | Yes |
| Location + language targeting | Yes |
| Real-time analytics (spend, CPE, CPM, link clicks) | Yes |
| OAuth 1.0a signing handled | Yes |
| Keyword targeting | Roadmap |
| Follower look-alike targeting | Roadmap |
| Tailored Audiences | Roadmap |
Promote an Existing Tweet
const ad = await zernio.ads.boostPost({ body: {
postId: "POST_ID",
accountId: "ACCOUNT_ID",
adAccountId: "18ce54d4x5t",
name: "Boost launch tweet",
goal: "engagement",
budget: { amount: 50, type: "daily" },
schedule: { startDate: "2026-04-20", endDate: "2026-04-27" },
}});ad = client.ads.boost_post(
post_id="POST_ID",
account_id="ACCOUNT_ID",
ad_account_id="18ce54d4x5t",
name="Boost launch tweet",
goal="engagement",
budget={"amount": 50, "type": "daily"},
schedule={"startDate": "2026-04-20", "endDate": "2026-04-27"},
)curl -X POST "https://zernio.com/api/v1/ads/boost" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"postId": "POST_ID",
"accountId": "ACCOUNT_ID",
"adAccountId": "18ce54d4x5t",
"platform": "xads",
"name": "Boost launch tweet",
"goal": "engagement",
"budget": { "amount": 50, "type": "daily" },
"schedule": { "startDate": "2026-04-20", "endDate": "2026-04-27" }
}'Create a Standalone Campaign
const ad = await zernio.ads.createStandaloneAd({ body: {
accountId: "acc_xads_123",
adAccountId: "18ce54d4x5t",
name: "Q2 Product Awareness",
goal: "awareness",
budgetAmount: 75,
budgetType: "daily",
body: "Ship faster with platform engineering done right.",
imageUrl: "https://cdn.example.com/q2.jpg",
linkUrl: "https://example.com/platform",
headline: "Internal Developer Platforms",
countries: ["US"],
}});ad = client.ads.create_standalone_ad(
account_id="acc_xads_123",
ad_account_id="18ce54d4x5t",
name="Q2 Product Awareness",
goal="awareness",
budget_amount=75,
budget_type="daily",
body="Ship faster with platform engineering done right.",
image_url="https://cdn.example.com/q2.jpg",
link_url="https://example.com/platform",
headline="Internal Developer Platforms",
countries=["US"],
)curl -X POST "https://zernio.com/api/v1/ads/create" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"platform": "xads",
"accountId": "acc_xads_123",
"adAccountId": "18ce54d4x5t",
"name": "Q2 Product Awareness",
"goal": "awareness",
"budget": { "amount": 75, "type": "daily" },
"schedule": { "startDate": "2026-04-20", "endDate": "2026-06-20" },
"creative": {
"tweetText": "Ship faster with platform engineering done right.",
"imageUrl": "https://cdn.example.com/q2.jpg",
"websiteCard": {
"url": "https://example.com/platform",
"title": "Internal Developer Platforms"
}
},
"targeting": { "locations": ["US"], "languages": ["en"] }
}'OAuth 1.0a
The X Ads API uses OAuth 1.0a request signing (not OAuth 2.0 Bearer tokens). Zernio computes HMAC-SHA1 signatures server-side, so your integration uses a standard Bearer token like every other platform.
Media Requirements
| Type | Format | Max Size | Notes |
|---|---|---|---|
| Image | JPEG, PNG, GIF, WebP | 5 MB | 1200x675 (16:9) recommended |
| Video | MP4, MOV | 1 GB | 0.5-140 sec, H.264+AAC |
| Tweet text | UTF-8 | 280 chars | Standard limit |
| Website Card | URL + text | 70 char title | Landing page card |