Skip to main content
POST
/
x
/
accounts
Connect X account
curl --request POST \
  --url https://api.example.com/x/accounts \
  --header 'Content-Type: <content-type>' \
  --header 'x-api-key: <x-api-key>' \
  --data '
{
  "username": "<string>",
  "email": "<string>",
  "password": "<string>",
  "totp_secret": "<string>",
  "proxy_country": "<string>"
}
'
Free — does not consume credits
Credentials are encrypted at rest and used only for maintaining the connection. Xquik never stores plaintext passwords.
curl -X POST https://xquik.com/api/v1/x/accounts \
  -H "x-api-key: xq_YOUR_KEY_HERE" \
  -H "Content-Type: application/json" \
  -d '{
    "username": "elonmusk",
    "email": "elon@example.com",
    "password": "s3cureP@ss",
    "totp_secret": "JBSWY3DPEHPK3PXP"
  }' | jq

Headers

x-api-key
string
required
Your API key. Session cookie authentication is also supported. Generate a key from the dashboard.
Content-Type
string
required
Must be application/json.

Body

username
string
required
X username to connect. The @ prefix is automatically stripped if included.
email
string
required
Email address associated with the X account.
password
string
required
Password for the X account. Encrypted at rest immediately upon receipt.
totp_secret
string
TOTP secret key for accounts with 2FA enabled. This is the base32-encoded secret (not the 6-digit code).
proxy_country
string
Preferred proxy region for the connection (e.g. "US", "TR").

Response

id
string
Unique account ID.
xUsername
string
Connected X username.
xUserId
string
X user ID.
status
string
Account connection status (e.g. "active").
createdAt
string
ISO 8601 timestamp of when the account was connected.
{
  "id": "3",
  "xUsername": "elonmusk",
  "xUserId": "44196397",
  "status": "active",
  "createdAt": "2026-02-20T08:15:00.000Z"
}
Related: List X Accounts to see all connected accounts, or Re-authenticate if a session expires later.