Account actions

Change DM settings

Change who can message you, read receipts and call settings. Settings you leave out stay as they are.

The API reads your current settings, applies the fields you send and saves the full set, like x.com does. Send at least one setting. No passcode needed.

Reference: https://www.twittrapi.com/docs/account-actions/client-dm-settings-update

post/client/dm/settings/update

Request

  • Base URL: https://api.twittrapi.com
  • URL: https://api.twittrapi.com/client/dm/settings/update
  • Auth: API key in header X-API-KEY

Query parameters

format'raw' | 'simple'

raw (default): X's JSON passed through. simple: flat camelCase JSON with a fixed schema and a {data, nextCursor, previousCursor, hasNextPage} envelope. Same price. The header X-Response-Format: simple does the same.

Request body

cookiestring required

Cookie header of your own logged-in X session. Must contain auth_token, ct0 and twid (your account ID, set by x.com at login); guest_id is used when present.

proxystring required

Your proxy, format http://user:pass@host:port. The requests to X go out through it. Used only for this request.

allow_dms_fromstring

Who can send you messages, X's value such as all or verified (/client/dm/settings shows your current one). Lower-case letters and underscore, up to 64 characters; X decides which values it accepts.

dm_receipt_settingsstring

Read receipts, X's value (same format as allow_dms_from).

always_allow_dms_from_subscribersboolean

Always accept messages from your subscribers.

av_calls_enabledboolean

Allow audio and video calls.

accept_calls_from_everyoneboolean

Accept calls from everyone.

accept_calls_from_followingboolean

Accept calls from people you follow.

accept_calls_from_verifiedboolean

Accept calls from verified users.

accept_calls_from_addressbookboolean

Accept calls from your contacts.

Response

Your DM settings after the change, like /client/dm/settings.

With format=simple: {data: {allowDmsFrom, readReceipts, qualityFilter, calls: {enabled, fromEveryone, fromFollowing, fromVerified, fromAddressBook}}}.

RawPassthrough required

X's own JSON (raw format, the default), passed through unchanged. The shape is X's and can change; see https://www.twittrapi.com/docs/response-format.

Changes

No recorded changes to this operation across all 1 revision of this API.