X Accounts
Submit X account email code
Submit an email code for an active pending challenge; stale challenges need fresh connect or reauth
POST
Submit X account email code
Free - does not consume credits
202 Email Code Required. Submit the one-time code from the account email inbox before expiresAt while the challenge is still active.
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.202 prompt if X asks again, and refreshes the account list after the 201 response.
Headers
Your API key. Session cookie authentication is also supported. Generate a key from the dashboard.
Must be
application/json.Path Parameters
Challenge ID returned by Connect X Account.
Body
Email verification code for the pending connection. Codes from 4 to 64 characters are accepted. Spaces are stripped before submission.
Response
- 201 Created
- 202 Email Code Required
- 400 Invalid Input
- 401 Unauthenticated
- 404 Not Found
- 409 Conflict
- 410 Expired
- 422 Login Failed
- 429 Rate Limit Exceeded
Unique account ID.
Connected X username.
X user ID.
Account connection status (e.g.
"active").Derived login/cookie health. One of
healthy, locked, needsReauth, recovering, suspended, temporaryIssue. See Account health for meanings.ISO 8601 timestamp of when the account was connected.
Related: Connect X Account starts the challenge, and List X Accounts verifies the account after connection.
Last modified on June 2, 2026
Submit X account email code