Products / X API
x-api
X API
What version is X API?
X API current_version is v2. last_updated is 2026-10-29. The catalog lists no channel versions for this product. Catalog generated_at is 2026-11-10T06:03:03+00:00. Pay-per-usage X API v2, Activity API, and media. Catalog status is ga. Organization is x. Official source URL: https://docs.x.com/x-api/getting-started/pricing.
- id
- x-api
- current_version
- v2
- last_updated
- generated_at
- published_at (this UI deploy)
Features
X Activity API
Realtime user-activity webhooks. Successor path from legacy Account Activity API. Subscribe by user id; optional direction filter.
Pay-per-usage credits
No subscription SKUs. Buy credits, set spending limits, earn up to 20% back in xAI API credits. Owned reads vs public lookup priced separately.
Webhook event billing
Activity API events billed per delivery, same 24h UTC dedup window. Inbound events cost; many outbound actions do not.
Media upload
Chunked upload via v2 paths (initialize, append, finalize). Post-create size and duration limits follow the authenticated user's Premium/verified status and media_category.
Mute and block events
mute.mute / mute.unmute / block.block / block.unblock. Private events; OAuth 2.0 user-context with mute.read or block.read.
Lead Generation API
X Ads API for Lead Gen campaigns: create and manage native lead forms, attach LEAD_FORM destination cards, and export submissions as JSON, CSV, or XLSX. Requires Campaign user permission; lead exports restricted to account administrators.
Changelog
- Feature
Conversion API for App Events
can · Ads app conversion APIsource · docs.x.comConversion API for App Events
Advertisers can send app installs and in-app events to X without a mobile measurement partner. Create the app event in Events Manager, generate an access token, and post events to [
POST /12/accounts/:account_id/measurement/app_conversions](https://docs.x.com/x-ads-api/measurement/app-conversions).Pass the token in the
X-App-Conversion-Tokenheader. Each event needs an app ID, OS type, event name, timestamp, and at least one identifier (device_id, hashed email, hashed phone number, or IP address with user agent). A request can include up to 500 events.See [Conversion API for App Events](https://docs.x.com/x-ads-api/measurement/app-conversions.md). The website endpoint is unchanged and is now titled [Conversion API for Web](https://docs.x.com/x-ads-api/measurement/web-conversions.md).
- Fix
Improved Direct Message refusal error details
can · DM refusal error detailssource · docs.x.comImproved Direct Message refusal error details
Create Direct Message requests (
POST /2/dm_conversations,POST /2/dm_conversations/:id/messages, andPOST /2/dm_conversations/with/:participant_id/messages) still return HTTP 403 when a message is refused. The problem type now identifies the refusal (https://api.x.com/2/problems/dm-...).detailnames the cause when that was already specific, or when the new wording does not reveal a private fact about the recipient. Refusals we cannot explain safely stayabout:blankwith "This operation is not permitted." Clients that only check the status code are unaffected. The new types are part of the public OpenAPI Problem union and of generated SDKs. - Pricing
Free credit incentives for pay-per-use accounts
can · pay-per-use free creditssource · docs.x.comFree credit incentives for pay-per-use accounts
Pay-per-use accounts can now earn free X API credits two ways: a one-time $20 when an account saves its first eligible payment card, and a one-time match of the first successful auto-recharge, up to $50. A new account that earns both receives $70 in free credits. Credits are applied automatically with no code or form, appear in the Developer Console within about a minute, are spent before purchased credits, and expire 3 months after they are granted. The incentives are rolling out now.
See [Free credit incentives](https://docs.x.com/x-api/getting-started/free-credits) for eligibility rules, examples, and FAQ.
- Feature
Real-time reply moderation guide now uses Grok
can · reply moderation guide uses Groksource · docs.x.comReal-time reply moderation guide now uses Grok
We rewrote the [Manage replies in real time](/x-api/posts/hide-replies/integrate/manage-replies-in-realtime) integration guide. It now receives replies through the [X Activity API](/x-api/activity/introduction)
post.reply.createevent, classifies each reply with Grok through the [xAI API](https://docs.x.ai) using structured outputs, and hides high-confidence violations with the [Hide Replies](/x-api/posts/hide-reply) endpoint. The previous version relied on the deprecated Perspective API and the Account Activity API.The guide includes complete Python and Node.js webhook examples, guidance on writing the moderation policy, and recommendations for keeping users in control of what is hidden.
- Feature
Broadcast chat removal events for X Activity API
can · adds broadcast.chat.remove eventsource · docs.x.comBroadcast chat removal events for X Activity API
Today, we added the
broadcast.chat.removeevent to the [X Activity API](https://docs.x.com/x-api/activity/introduction). Subscribe by User ID with thebroadcast.readscope to be notified in real time when the host or a moderator removes a chat message from a broadcast the user owns. The payload carries thebroadcast_idand themessage_idof the removed message.See [Event payloads](/x-api/activity/event-payloads#broadcast-chat-remove) for a sample delivery.
- Feature
Migrate OAuth 1.0a user tokens to OAuth 2.0 with token exchange
can · documents OAuth 1.0a to 2.0 token exchangesource · docs.x.comMigrate OAuth 1.0a user tokens to OAuth 2.0 with token exchange
Apps with existing OAuth 1.0a users can now exchange each user's stored OAuth 1.0a access token and secret for an OAuth 2.0 access token and refresh token, with no consent screen or re-authorization. Send
grant_type=urn:ietf:params:oauth:grant-type:token-exchangetoPOST /2/oauth2/token; the granted scopes are derived from the permissions the user originally authorized, andoffline.accessis always included.See [Migrating OAuth 1.0a user tokens to OAuth 2.0](https://docs.x.com/fundamentals/authentication/oauth-2-0/oauth-1-0a-token-exchange) for the request format, permission-to-scope mapping, rate limits, and error handling.
- Feature
Conversion API Google Tag Manager server-side template
can · documents Conversion API GTM templatesource · docs.x.comConversion API Google Tag Manager server-side template
Advertisers can now send website conversions through the official X Ads Conversion API (Official) tag in a Google Tag Manager server container, without writing Conversion API request code.
See [Set up the Conversion API with Google Tag Manager](/x-ads-api/measurement/gtm-server-side) for Pixel ID, access token, event mapping, and Pixel + Conversion API deduplication steps. The template is published in the [Google Tag Manager Community Template Gallery](https://tagmanager.google.com/gallery/#/owners/twitter/templates/x-ads-conversion-api-gtm-template).
- Feature
REGIONS segmentation for Analytics
can · Analytics supports REGIONS segmentationsource · docs.x.comREGIONS segmentation for Analytics
Asynchronous analytics jobs now support
REGIONSas asegmentation_type. Thecountryparameter is required when requesting a regional breakdown.See [Metrics and Segmentation](/x-ads-api/analytics#metrics-and-segmentation) for the full list of enabled segmentation types.
- Feature
Lead Generation API
can · documents Lead Generation APIsource · docs.x.comLead Generation API
We documented the [Lead Generation API](/x-ads-api/lead-generation) for Lead Gen campaigns. You can now create and manage native lead forms, attach a form to a card with the
LEAD_FORMdestination, and export submitted leads as JSON, CSV, or XLSX.- [POST /12/accounts/:account_id/lead_forms](/x-ads-api/lead-generation/reference#post-accounts-account-id-lead-forms) creates a form (introduction, fields, privacy policy, and optional thank-you page)
- [POST /12/accounts/:account_id/cards](/x-ads-api/creatives/reference#post-accounts-account-id-cards) accepts destination type
LEAD_FORM - [POST /12/accounts/:account_id/ad-export/api/v1/exports](/x-ads-api/lead-generation/reference#post-accounts-account-id-ad-export-api-v1-exports) with
entity_type=leadsexports submissions for a form and time window
The Leads API requires the Campaign user permission. Lead exports are restricted to account administrators.
- Feature
Media upload and Post-create size and duration limits
can · documents Post media size/duration limitsX documented size and duration limits for media upload and POST /2/tweets, enforced separately. Limits follow the authenticated user's Premium/verified status and media_category, not the developer API plan. Default Post video caps are 20 minutes and 8 GB; Premium/verified up to 125 minutes and 16 GB. DM video limits unchanged. Exceeding the posting user's duration cap returns 403. The chunked upload quickstart now documents v2 paths (initialize, append, finalize) instead of the prior POST /2/media/upload flow.
source · docs.x.com - Fix
Updated video_total_views definition
can · Ads video_total_views now 100% in-view for 3sX Ads API Analytics VIDEO metric video_total_views now counts views that are 100% in-view for at least 3 seconds, plus any view where a user clicks play. The prior MRC 50%-in-view-for-2s definition no longer applies; video_3s100pct_views and VIEW_3S_100PCT bidding remain.
source · docs.x.com - Feature
Mute and block events for X Activity API
can · Activity API has mute/block eventsSubscribe by user id for mute/unmute and block/unblock. Private events requiring user-context OAuth 2.0.
source · docs.x.com - Feature
Post create and delete events
can · Activity API has post.create and post.deletepost.create and post.delete on the Activity API. For keyword filtering, continue to use Filtered Stream.
source · docs.x.com - Feature
Direction filter and event-type rename
Optional direction filter on Activity API subscriptions. Event type naming moved off PascalCase.
source · docs.x.com