Quickstart

Go from zero to your first API call in a few minutes.

Create an account

Go to the dashboard and sign up with your email and a password. You're taken straight in — no email confirmation needed. New accounts include 200 free starter credits.

Generate an API key

Open API keys in the dashboard and click Create live key. Your key is shown once — copy it immediately. Then set it as an environment variable so the examples below work verbatim:

export XAUTODM_API_KEY=xdm_live_your_key_here
Prefer to test without spending credits? Create a test key (xdm_test_…). Reads work normally and writes return realistic mocks — all free.

Make your first call

GET/v1/users/{handle}5 credits
curl https://api.xautodm.com/v1/users/nasa \
  -H "Authorization: Bearer $XAUTODM_API_KEY"

Every response uses the same envelope — data plus a meta block with what the call cost and your remaining balance.

Connect an X account

DMs and engagement actions run from your connected X account. Subscribe to a plan, then connect one and reference it by account_id:

curl -X POST https://api.xautodm.com/v1/accounts/connect \
  -H "Authorization: Bearer $XAUTODM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"method":"login","username":"yourhandle","password":"your-password"}'

Send a DM

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_1a2b3c","recipient_username":"jack","text":"Hey!"}'
API keys & authConnect an X accountSend DMs