---
title: "Change DM settings"
method: POST
path: "/client/dm/settings/update"
tags: ["Account actions"]
---

# Change DM settings

`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`

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

## Query parameters

- `format` 'raw' | 'simple'

## Request body

- object
  - `cookie` string, 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.
  - `proxy` string, required: Your proxy, format http://user:pass@host:port. The requests to X go out through it. Used only for this request.
  - `allow_dms_from` string: 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_settings` string: Read receipts, X's value (same format as allow_dms_from).
  - `always_allow_dms_from_subscribers` boolean: Always accept messages from your subscribers.
  - `av_calls_enabled` boolean: Allow audio and video calls.
  - `accept_calls_from_everyone` boolean: Accept calls from everyone.
  - `accept_calls_from_following` boolean: Accept calls from people you follow.
  - `accept_calls_from_verified` boolean: Accept calls from verified users.
  - `accept_calls_from_addressbook` boolean: Accept calls from your contacts.

## Response `200`

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

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

- RawPassthrough: 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.

## Other responses

- `400`: The body is not valid JSON.
- `401`: Missing or unknown API key. Not charged.
- `402`: No balance left, or the trial expired. Not charged. Top up in the dashboard.
- `403`: Key deactivated, or the endpoint is not in your plan (trial keys and account actions). Not charged.
- `407`: The proxy is unreachable or timed out.
- `422`: cookie or proxy is missing, the cookie has no twid or ct0, or the passcode is neither a string nor a whole number or longer than 64 characters. No setting is sent, a string setting is empty, too long or has other characters than lower-case letters and underscore, or a boolean setting is not true or false. Also: the account is suspended, or X rejected the session ("Twitter temporarily rejected this session; refresh the login and try again").
- `429`: X's rate limit for this account: "X rate limit reached for this account, try again later".
- `500`: Something failed on our side or between us and X. Refunded (400, 407, 408, 409 or a 5xx error are refunded). Retry with backoff.
- `502`: X returned no DM settings. Refunded.
- `default`: X refused the request: answered with X's status and {"error": "X refused the request: <X's reason>"}. When X answers 200 with an error, the status is 422.

---

[API](https://skmtc.dev/twittrapi/apis/twittrapi-api.md) · [All operations](https://skmtc.dev/twittrapi/apis/twittrapi-api/llms.txt) · [OpenAPI document](https://skmtc.dev/twittrapi/apis/twittrapi-api/revisions/0618e38b54c2?raw)
