X (Twitter)

The X (Twitter) API, unified

Read replies, send DMs, track mentions, and publish tweets through the same REST endpoints you already use for every other platform. SocialAPI.ai handles X's OAuth 2.0 flow and token refresh, while you bring your own X Developer app to stay aligned with X's API access tiers.

Free tier available
Instant API key
MCP server included

What you can do with X (Twitter).

Supported

Comments

Read replies on your posts, reply back, hide replies, delete your own replies, and like or unlike.

Supported

Direct Messages

Read DM conversations and send messages through the unified inbox.

Supported

Mentions

Fetch tweets mentioning your authenticated account.

Supported

Publishing

Publish text tweets with optional media and reply settings (everyone, following, verified).

See it in action.

Post a tweet

api.social-api.ai
1curl -X POST https://api.social-api.ai/v1/posts \
2  -H "Authorization: Bearer <your-api-key>" \
3  -H "Content-Type: application/json" \
4  -d '{
5    "account_ids": ["<account-id>"],
6    "text": "Just launched our new API. Check it out!",
7    "platform_data": {
8      "twitter": {
9        "reply_settings": "everyone"
10      }
11    }
12  }' | jq
13
14# Response
15{
16  "id": "<post-id>",
17  "status": "published",
18  "platforms": {
19    "twitter": {
20      "status": "published",
21      "platform_post_id": "1834567890123456789"
22    }
23  }
24}

Publish a tweet through the unified publishing endpoint. The same shape you already use for Instagram, LinkedIn, and every other platform.

Why developers love X (Twitter) on SocialAPI.ai

1

Reply and thread management

Read replies on your tweets, post replies back, hide replies you do not want surfaced, and delete your own replies. Reply threads on X are normalized into the same unified comment schema you already use for every other platform.

2

Direct messages

Access X DMs through the unified conversation endpoint. List active conversations, read message history, and send replies. SocialAPI.ai handles X's DM API authentication and message formatting behind the same interface as Instagram and Facebook messaging.

3

Mention tracking

Fetch tweets mentioning your authenticated account through a single endpoint. Build brand monitoring, customer support inboxes, or automated response workflows that span X alongside every other platform.

4

BYOK with X Developer app

X is the one platform where you bring your own X Developer app, because X requires per-app review and access tiers. Setup takes about ten minutes. After that, SocialAPI.ai manages OAuth, token refresh, and API normalization the same way it does for every managed connector.

FAQ

Frequently asked questions.

Why is X the only platform that needs my own Developer app?

X enforces per-app review and API access tiers. Running every customer through a single SocialAPI.ai-owned app would put every integration on one shared quota and one shared review status. BYOK keeps your access independent and aligned with the X access tier you have chosen.

How long does the X BYOK setup take?

About ten minutes. Register an app in the X Developer Portal, enable OAuth 2.0, set your callback URL, and paste your Client ID and Client Secret into the SocialAPI.ai dashboard. The full walkthrough is in the docs.

Will X use the same API endpoints as other platforms?

Yes. X uses the same unified endpoints: /v1/inbox/comments for reply management, /v1/inbox/conversations for DMs, /v1/accounts/{id}/mentions for mentions, and /v1/posts for publishing. The response schema matches every other platform.

Is X available on the free tier?

Yes. X is included in every SocialAPI.ai plan, including the free tier. The same pricing model applies: reads are free, and posts and interactions count against your monthly limits. X's own API tier limits apply on top.

Can I edit a tweet after posting?

No. X does not expose a public edit endpoint, so UpdatePost returns 501 for X accounts. To change a tweet, delete it and create a new one.

Get started today

Ready to unify your social interactions?

Free tier available · No credit card required · Ships with MCP server