Send a DM
/v1/x/dm/sendx_dm_send10 creditsComingNeeds a connected X accountStage 6, not yet available. This arrives with connected X accounts and can't be called yet.
Updated
Description
Send a direct message on X from an account the user connected in the dashboard. Needs accountId, a recipient (handle or user id) and text, plus an idempotencyKey so a retry never sends twice. Costs 10 credits, charged only if X accepts the message. Tip: check the recipient with x.user first; if canDm is false the send will fail.
Parameters
| Name | In | Type | Required | Default | Description |
|---|---|---|---|---|---|
accountId | body | string | yes | Id of an X account you connected in the dashboard. | |
recipientHandle | body | string | no | Recipient handle. Pass this or recipientId. | |
recipientId | body | string | no | Recipient user id. Pass this or recipientHandle. | |
text | body | string | yes | Message text, up to 10,000 characters. Length 1 to 10000. |
- accountId body, string, required
- Id of an X account you connected in the dashboard.
- recipientHandle body, string
- Recipient handle. Pass this or recipientId.
- recipientId body, string
- Recipient user id. Pass this or recipientHandle.
- text body, string, required
- Message text, up to 10,000 characters. Length 1 to 10000.
Send an Idempotency-Key header with every write, so a retry never acts twice.
Request examples
curl -X POST "https://chatterapi.com/v1/x/dm/send" \
-H "Authorization: Bearer $CHATTERAPI_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"accountId": "8b0e6a52-1f7c-4a3e-9d2b-5c1e7f0a9b11",
"recipientId": "1615394519473549312",
"text": "Hi, saw your question about CRM and Meta ads. Happy to share what worked for us."
}'Response
data is one XWriteResult. Fields:
| Field | Type | Nullable | Description |
|---|---|---|---|
ok | boolean | no | Always true on success. |
action | enum | no | What was done. |
accountId | string | no | Connected account that acted. |
targetId | string | yes | Target user or tweet id. |
resultId | string | yes | Id of what was created, if any. |
dryRun | boolean | no | True when nothing was sent. |
{
"data": {
"ok": true,
"action": "dm_send",
"accountId": "8b0e6a52-1f7c-4a3e-9d2b-5c1e7f0a9b11",
"targetId": "1615394519473549312",
"resultId": "dry_k3v9x2ma",
"dryRun": true
},
"credits": {
"charged": 10,
"remaining": 24997
},
"requestId": "req_01JA7Q3V8K2N4P5R6S7T8V",
"cached": false
}Recorded live response captured 2026-10-14T00:00:00.000Z, truncated to 3 items. Credits and request id are illustrative.
Credits
10 credits per call. Failed calls cost 0. Cached responses cost the same. Test keys cost 0.
Errors this tool can return
Try it
Not callable yet.