Customer service on X: direct messages, replies and mentions in one place
Many customers in Saudi Arabia reach businesses on X: they complain in mentions, ask in replies, and follow up by DM. This guide explains how direct messages work in the official X API, what you need to connect, and how to organise replies so no conversation gets lost.
Three places customers talk to you
Best practice: answer the mention or reply publicly and briefly, then move the details to DM. Everyone sees you responded fast, and the customer's data stays private.
How direct messages work in the X API
The X API lets you send and delete direct messages on behalf of an account that granted access. These are the operations available, according to X's documentation:
| Operation | What it does |
|---|---|
POST /2/dm_conversations | Creates a new conversation |
POST /2/dm_conversations/with/:participant_id/messages | Sends a message in a one-to-one conversation |
POST /2/dm_conversations/:dm_conversation_id/messages | Sends to an existing conversation, including group conversations |
DELETE /2/dm_events/:id | Deletes a message for yourself |
- Messages: text, with media attached through a media ID.
- Successful response: returns the conversation ID and the message event ID.
What you need to connect your account
Approved developer account
An X developer account with a Project and an App in the Developer Console.
Permission from the account owner
Connection uses OAuth 2.0 with PKCE, and the owner of the business account approves the permissions.
Access token
Every request carries the user access token, which is how the platform knows it's sending as your account.
Practical tips for customer service on X
- Set a response target: customers on X expect fast answers, especially to public mentions.
- Saved replies: prepare answers to common questions and personalise them before sending.
- Route conversations: sales questions to sales, complaints to support, instead of everyone answering everything.
- Never ask for sensitive data publicly: order numbers and phone numbers belong in DM.
- Keep history: link each conversation to the customer record so any agent can pick it up.
X alongside WhatsApp and your other channels
The X channel in Autorply brings direct messages, replies and mentions into one inbox with WhatsApp, Instagram and TikTok, so your team answers from one place and shares the work.
Autorply gets you set up
As an official Meta Business Partner, we connect your channels, prepare your accounts and run them with your team from one platform.
FAQ
Can I send X direct messages from an external tool?
Yes, through the official X API, once the account owner grants access with OAuth 2.0.
Can I attach images to DMs through the API?
Yes. According to X's documentation, you can attach media to a message.
Does deleting a message remove it for the customer too?
X's documentation describes deletion as removing the message for yourself.
What should I do when a customer complains in a public mention?
Reply publicly with a short, polite answer and ask them to continue by DM for the details.