$919:30:53Claim
    xAutoDM LogoxAutoDM
    DMs

    Send a DM

    Send a direct message from a connected account.

    POST/v1/dm/send1,200 credits

    Send an Idempotency-Key header. Retrying with the same key never repeats the action. How it works

    Request body

    FieldTypeRequiredDescription
    account_idstringRequiredThe connected account to act from (from GET /v1/accounts).
    recipient_idstringOptionalNumeric X id of the recipient. Give this or recipient_username.
    recipient_usernamestringOptionalRecipient's handle, without the @.
    textstringRequiredMessage text.

    Request

    curl -X POST https://api.xautodm.com/v1/dm/send \
      -H "Authorization: Bearer $XAUTODM_API_KEY" \
      -H "Idempotency-Key: $(uuidgen)" \
      -H "Content-Type: application/json" \
      -d '{"account_id":"acc_...","recipient_username":"jack","text":"Hey Jack, quick question"}'

    Response

    Response
    {
      "data": { "sent": true, "message_id": "1849..." },
      "meta": { "credits_charged": 500, "credits_remaining": 49500, "request_id": "req_..." }
    }

    Errors use one shape for every endpoint. See errors and rate limits.