Skip to main content
PUT
xurl

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Scopes

tweet.read

View all posts you can see, including those from protected accounts.

dm.write

Send and manage your Direct Messages.

users.read

View any account you can see, including protected accounts.

Body

application/json

At least one of allow_dms_from, always_allow_dms_from_subscribers, dm_quality_filter, dm_receipt_settings, av_settings is required.

allow_dms_from
enum<string>
required

Who can send the user messages: all (anyone), verified (verified accounts only), or following (accounts the user follows). A bot may get a 400 for choosing following when it doesn't already have it, and an org-only bot for choosing verified.

Available options:
all,
verified,
following
always_allow_dms_from_subscribers
boolean

Whether the user's subscribers can always message them regardless of allow_dms_from.

av_settings
object

Audio and video call settings.

dm_quality_filter
enum<string>

Low-quality message request filter: enabled (low-quality requests go to a separate folder) or disabled (all requests stay in the main inbox).

Available options:
enabled,
disabled
dm_receipt_settings
enum<string>

Read receipts: all_enabled (send and receive read receipts) or all_disabled (neither).

Available options:
all_enabled,
all_disabled

Response

The request has succeeded.

data
object
errors
object[]