Autorply
AutorplyOfficial Meta Business Partner
عربي
X for business

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.

Why X

Three places customers talk to you

Direct messagesWhere the real conversation happens: order details, tracking numbers and anything that shouldn't be public.
RepliesQuestions under your posts, such as price, availability and opening hours.
MentionsA customer tags your account in a post, often a complaint or an urgent question everyone can see.

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.

The official connection

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:

OperationWhat it does
POST /2/dm_conversationsCreates a new conversation
POST /2/dm_conversations/with/:participant_id/messagesSends a message in a one-to-one conversation
POST /2/dm_conversations/:dm_conversation_id/messagesSends to an existing conversation, including group conversations
DELETE /2/dm_events/:idDeletes a message for yourself
Requirements

What you need to connect your account

  1. Approved developer account

    An X developer account with a Project and an App in the Developer Console.

  2. Permission from the account owner

    Connection uses OAuth 2.0 with PKCE, and the owner of the business account approves the permissions.

  3. Access token

    Every request carries the user access token, which is how the platform knows it's sending as your account.

Note: X API pricing and usage limits depend on your access plan, so always check X's official pages before you build expectations on them.
Running the team

Practical tips for customer service on X

With Autorply

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.

Official sources

  1. X Developer Platform: Manage Direct Messages introduction
  2. X Developer Platform: Manage Direct Messages integration guide