---
title: "POST /twitter/send_dm_to_user"
method: POST
path: "/twitter/send_dm_to_user"
---

# POST /twitter/send_dm_to_user

`POST /twitter/send_dm_to_user`

Send a direct message to a user.You must set the login_cookie..You can get the login_cookie from /twitter/user_login_v2.You can only send DMs to those who have enabled DMs. Sometimes it may fail, so be prepared to retry.Trial operation price: $0.003 per call.

## Request body

- object
  - `login_cookies` string, required — The login cookie of the user.You can get the login_cookies from /twitter/user_login_v2.Must be set
  - `user_id` string, required — The id of the user to send the direct message to.Must be set
  - `text` string, required — The text of the direct message.Must be set
  - `media_id` string — ID of a single media asset to attach. Optional. Obtain from /twitter/upload_media_v2.
  - `proxy` string, required — The proxy to use.Please use high-quality residential proxies and avoid free proxies.Required.Example: http://username:password@ip:port . You can get proxy from: https://www.webshare.io/?referral_code=4e0q1n00a504
  - `reply_to_message_id` string — The id of the message to reply to.Optional

## Response `200`

Login response

- object
  - `message_id` string — The id of the sent direct message.
  - `status` string — Status of the request.success or error
  - `msg` string — Message of the request.error message

## Other responses

- `400` — Unexpected error

---

[API](https://skmtc.net/twitterapi/apis/twitterapi-io-the-most-stable-fastest-cheapest-twitter-api.md) · [All operations](https://skmtc.net/twitterapi/apis/twitterapi-io-the-most-stable-fastest-cheapest-twitter-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/twitterapi/twitterapi-io-the-most-stable-fastest-cheapest-twitter-api/versions/1b1afaf3df76/schema)
