Ads and boosts
Quick promote, ad payment methods, boosted posts and ad perks. Every method returns the raw GraphQL data with the outer wrapper removed. Methods marked untested are mutations that were never called live, because they spend money, start a checkout or change account data.
ads.promoteFlow(tweetId, opts?)
Get the quick promote flow for a post, with advertiser accounts.
ads.contentCheck(tweetId, opts?)
Check whether a post can be promoted.
ads.contentCheckReason(tweetId, opts?)
Get why a post can't be promoted.
ads.budgets(countryCode, opts?)
Get the budget options for a country.
ads.reach(userId, adAccountId, objective, dailyBudgetMicros, totalBudgetMicros, currency, targeting, opts?)
Estimate the reach of a promotion budget.
ads.locationSearch(adsAccountId, query, opts?)
Search locations to target.
ads.createCampaign(userId, adsAccountId, fundingInstrumentId, tweetId, objective, budget, targeting, cta, opts?)
Create a quick promote campaign. This spends money. Untested.
ads.paymentMethods(adsAccountId, opts?)
List the payment methods on an ads account. Pass fundingInstrumentId through opts.
ads.setupIntent(adsAccountId, opts?)
Create a Stripe setup intent for adding a card. Untested.
ads.confirmCard(adsAccountId, setupIntentId, opts?)
Confirm a card after its setup intent. Pass name, email, billingAddress and fundingInstrumentId through opts. Untested.
ads.setDefaultPaymentMethod(adsAccountId, paymentMethodId, stripeCustomerId, fundingInstrumentId, opts?)
Make a card the default payment method. Untested.
ads.deletePaymentMethod(adsAccountId, paymentMethodId, stripeCustomerId, fundingInstrumentId, opts?)
Delete a payment method. Untested.
ads.boosted(userId, opts?)
Get a user's boosted posts timeline.
ads.boostable(userId, opts?)
Get a user's posts that can be boosted.
ads.boostSearch(rawQuery, opts?)
Search posts to boost.
ads.promotable(userId, opts?)
Get the promotable posts shown on the professional home.
ads.promotedActivity(restId, fromTime, toTime, opts?)
Get a promoted post's activity between two times.
ads.rejectionReasons(restId, opts?)
Get why a promotion was rejected.
ads.freeTrials(opts?)
List the quick free trials available to the viewer.
ads.freeTrialStats(startMs, endMs, opts?)
Get the ad stats used on the free trial page.
ads.activateFreeTrial(productId, opts?)
Start a free trial. Untested.
ads.premiumBenefitStats(startMs, endMs, opts?)
Get the ad-free benefit stats for Premium.
ads.premiumBenefitSubscription(opts?)
Get the subscription behind the Premium ads benefit.
ads.verifiedAdvertising(opts?)
Get the Verified Organization's advertiser accounts and coupons.
ads.activateCoupon(adAccountRestId, programId, scheduledId, opts?)
Validate and activate an advertising coupon. Untested.