Skip to main content
POST
/
x
/
account-connection-challenges
/
{id}
/
submit
Submit X account email code
curl --request POST \
  --url https://xquik.com/api/v1/x/account-connection-challenges/{id}/submit \
  --header 'Content-Type: <content-type>' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "email_code": "<string>"
}
'
Free - does not consume credits
Use this endpoint after Connect X Account returns 202 Email Code Required. Submit the one-time code from the account email inbox before expiresAt while the challenge is still active.
This endpoint cannot reopen an expired, failed, completed, or replaced challenge. After 409, 410, or 422, start Connect X Account again for a new account. For an existing account, use Re-authenticate X Account with the current password and any required TOTP secret key.

Continue the pending login

Use the returned challenge ID

Keep the id from the 202 response and submit the inbox code to that challenge. The challenge belongs to the same pending login attempt.

Enter the account email code

Use the one-time code X sent to the account email inbox. Xquik strips spaces before submission, so 123 456 and 123456 are handled the same way.

Handle another code prompt

If X asks for a new email code, this endpoint returns 202 again. Keep the same flow open and submit the next inbox code before expiresAt.

Start over when stale

410 means the code expired. 409 means the challenge was already completed, failed, expired, or replaced. Start Connect X Account again for a new account, or use Re-authenticate X Account for an existing account.
The dashboard follows the same flow: it keeps the pending row open, asks for the email code, accepts a new 202 prompt if X asks again, and refreshes the account list after the 201 response.
curl -X POST https://xquik.com/api/v1/x/account-connection-challenges/xch_8vGd8Y9JvH6dV0xA/submit \
  -H "x-api-key: xq_YOUR_KEY_HERE" \
  -H "Content-Type: application/json" \
  -d '{ "email_code": "123456" }' | 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.

Path Parameters

id
string
required
Challenge ID returned by Connect X Account.

Body

email_code
string
required
Email verification code for the pending connection. Codes from 4 to 64 characters are accepted. Spaces are stripped before submission.

Response

id
string
Unique account ID.
xUsername
string
Connected X username.
xUserId
string
X user ID.
status
string
Account connection status (e.g. "active").
health
string
Derived login/cookie health. One of healthy, locked, needsReauth, recovering, suspended, temporaryIssue. See Account health for meanings.
createdAt
string
ISO 8601 timestamp of when the account was connected.
{
  "id": "3",
  "xUsername": "elonmusk",
  "xUserId": "44196397",
  "status": "active",
  "health": "healthy",
  "createdAt": "2026-02-20T08:15:00.000Z"
}
Related: Connect X Account starts the challenge, and List X Accounts verifies the account after connection.
Last modified on June 2, 2026