X Ads API to launch campaigns from code
Connect your X Ads account in a minute and launch your first campaign today.
Promote posts and launch campaigns on X without applying for its ads API.
- Promoted posts
- Campaigns
- Audiences
- Reports
{
"accountId": "acc_x",
"adAccountId": "act_…",
"name": "Winter sale",
"goal": "traffic",
"budget": {
"amount": 40,
"type": "daily"
},
"targeting": {
"countries": [
"GB",
"IE"
],
"ageMin": 25,
"ageMax": 45
}
}What Marsial does with X Ads
Marsial publishes and schedules content on your own X Ads accounts, always with your permission through OAuth, and shows you their statistics. It does not automate interactions (likes, follows or bulk messages) and does not read data from other people's accounts. You can disconnect the account at any time.
From zero to X Ads in minutes
- 1
Connect X Ads
You or your clients connect the account with OAuth from a screen with your brand.
- 2
Send a request
POST /v1/posts/pst_9f2a/boost with the content. We adapt it to the X Ads format.
- 3
Receive the webhooks
Posts, replies, messages and metrics arrive at your endpoint in the same format.
Everything you need for X Ads
All of this comes with your account, no plans: you only pay for what you use.
Create campaigns
Campaigns, ad groups and creatives in a single request.
Get started →Boost posts
Turn a post that works into an ad.
Get started →Budgets
Raise, lower or pause budgets on the fly, or let an agent do it.
Get started →Promoted posts
Promote any post with a daily budget.
Get started →Unified reports
Spend and results in the same format as every other network.
Get started →For AI agents
Your agent reads results and proposes changes over MCP; anything that spends money waits for your team to approve it, if you want.
Get started →And 29 more channels
The same API key, the same format and the same webhooks.
Questions about X Ads
Do I need my own access to the X Ads API?
No. You connect your ad account with OAuth from Marsial and that's it.
Do you take a percentage of ad spend?
No. You pay the spend directly to the network; we charge per connected account and, beyond 500 active ads, per ad.
Can an AI agent manage my campaigns?
Yes, through our MCP server: it reads results, pauses campaigns and adjusts budgets with the permissions of whoever connected it.
Connect X Ads today
Create your account in a minute, no card needed. Try it free for 7 days from your first post.