Skip to content
X Ads

X Ads API (Twitter Ads) for Developers

Launch and manage X ad campaigns via API, or hand them to your AI agent over Tevanio MCP.

  • Campaigns
  • Promoted posts
  • Audiences
  • Analytics

Join 200,000+ of the world’s most ambitious developers and builders

  • Case study
  • Case study
Why Tevanio vs the X Ads API?

Save 4-6 weeks of development

X Ads API

Tevanio API

Recommended

An access application that can take weeks

No X Ads API application

OAuth 1.0a signatures on every request

OAuth 1.0a signing handled

Funding instruments and line items to wire up

Promote your scheduled posts

Location IDs to resolve before targeting

A standard Bearer token

A separate integration per ad network

One API for 9 ad networks

How to use the X Ads API with Tevanio

Get your first campaign under 10 minutes

  1. 01

    Connect your account

    Connect the X account you post from, then pick its ad account. Ads are included on every Tevanio account.

  2. 02

    Create or boost a campaign

    Pick a post to promote or write a new one, then set a budget, dates and countries. Do it via API or ask your AI agent through Tevanio MCP.

  3. 03

    Track and adjust

    Pause campaigns, change budgets or pull reports from your app or your agent, without opening X Ads Manager.

Skip the X Ads API application and OAuth 1.0a signing
Features

Everything you need to run X Ads

Campaigns and line items

Campaign, line item and promoted post in one call, with a daily budget and date range.

Custom audiences

Build audiences from hashed emails and include or exclude them on any campaign.

Promote existing posts

Promote any post from your connected X account, including ones scheduled through Tevanio.

Spend and results without opening another dashboard

Every campaign and its status in one table

Ad analytics

Spend, impressions, clicks, CTR, CPC, CPM, video views and web conversions over a date range, per campaign and promoted post.

Country targeting

Target campaigns by country, alongside your own audiences.

Campaign control

Pause, resume, rename or delete campaigns and line items, and change budgets.

Integrate

Three ways in. Same API behind all of them

Write it yourself with the SDKs, hand it to an agent over MCP, or run it from a shell.

import Tevanio from '@tevanio/node';const tevanio = new Tevanio(); // reads TEVANIO_API_KEY​const { data: ad } = await tevanio.adcampaigns.createStandaloneAd({  body: {    accountId: 'acc_xxx',    adAccountId: '18ce54d4x5t',    name: 'Spring launch',    goal: 'traffic',    budgetAmount: 25,    budgetType: 'daily',    body: 'Shipping today at Acme',    linkUrl: 'https://acme.com',    countries: ['US'],  },});
And more
Supported Platforms

Build one integration and run ads on 9 networks with it

  • Meta
  • Google Ads
  • LinkedIn
  • TikTok
  • Pinterest
  • X
  • OpenAI
  • Reddit
  • Microsoft Advertising

Frequently Asked Questions

The Ads API is separate from X’s paid API tiers, which cover the general API, and has its own approval process. Through Tevanio, ads are included on your account and your ad spend goes directly to X.

Not through Tevanio. Direct access needs an approved application, which can take weeks. Tevanio is already approved and you use that access for your own ad accounts.

The X Ads API signs every request with OAuth 1.0a rather than OAuth 2.0. Tevanio computes the signatures server-side, so your integration sends a standard Bearer token.

It is still running as the X Ads API. Endpoints moved from Twitter to X, but campaigns, line items, promoted posts and analytics all continue to work.

Yes. Any post from a connected X account can be promoted with POST /v1/ads/boost. Posts you scheduled through Tevanio are the easiest, since they are already linked.

Yes. Send purchases and sign-ups to an X Pixel event through Tevanio’s unified Conversions API, matched on the twclid click id and hashed email or phone. The Tevanio site tag captures twclid on landing.

Yes. One set of /v1/ads endpoints covers all 9 networks, and the connected account decides where each ad runs. One API key, one request shape, no SDK per network.

Yes. Anything that makes HTTP requests or connects over MCP, such as Claude, ChatGPT agents, n8n or Make, can create campaigns, promote posts and pull analytics.

Start running X Ads today

Full REST API for campaigns, promoted posts and audiences.

  • SOC 2
  • GDPR compliant
  • 99.97% uptime
  • Under 50ms response