PUT https://xquik.com/api/v1/account/x-identity
Store your X or Twitter handle
Store one X (Twitter) username on your authenticated Xquik account. Send the handle without its leading@. Xquik validates the syntax and stores lowercase text.
This identity helps Analyze Style recognize
when the requested username matches your stored username. That match supports
own-account tweet style analysis.
This route does not look up an X profile. It does not verify username
availability, account existence, or ownership. It also does not connect an X
account. It does not authorize tweet, reply, like, follow, or Direct Message
actions.Free. This endpoint does not consume credits.
Format the X (Twitter) username
Send oneusername string. Remove the @ prefix first.
The Xquik route accepts 1 to 15 characters. Every character must be a letter,
number, or underscore. The route rejects spaces, periods, hyphens, emoji, and @.Xquik does not trim whitespace. Remove surrounding spaces before sending the
body. Store the lowercase response value as your canonical Xquik copy.
X’s username guidance
describes a handle as the unique name shown after
@. Native X rules and
availability checks can be stricter than this route’s syntax validation.
Passing the Xquik pattern does not prove that X currently allows the handle.
It also does not prove that the handle belongs to you.Understand handle, display name, and user ID
An X (Twitter) username is also called a Twitter handle or X (Twitter) handle. It appears after@ and inside the profile URL. This endpoint stores that username only.Send no numeric Twitter user ID unless it is the account’s username text. This
route does not convert an X (Twitter) ID to a username.
Use Twitter Profile Lookup for
profile fields from a known username or user ID. Use
Search Users when you need username search.
Apply the identity to tweet style analysis
Set the handle before analyzing your own posting style. The style route compares its requested username with this stored lowercase value. Use this workflow.- Find the exact current X (Twitter) username.
- Remove the leading
@symbol. - Send the username through this route.
- Save the returned lowercase
xUsername. - Call Analyze Style for that same username.
- Review the style result for the intended account.
- Update this identity after an X (Twitter) username change.
XDevelopers becomes xdevelopers.
Sending the same normalized username again keeps the same stored value.
Sending another valid username replaces the previous one. The response returns
the new stored value. No username history appears in this response.
This route provides no delete or clear operation. Replace the value with
another valid username when your account identity changes.Keep identity storage separate from X connection
This endpoint changes one Xquik account field. It does not create an authenticated connection to X.Use List Connected X Accounts to inspect
login-backed X connections. A stored style identity and a connected X account
serve different purposes.
Recover from X identity errors
Never retry either
400 response without changing the body. Never retry 401
without replacing the credential.
After 429, keep the exact intended handle. Retry after the server’s delay,
then confirm the stored value through Get Account.X (Twitter) username questions
What is a Twitter handle?
A Twitter handle is the unique username displayed after@. X now calls it
an X (Twitter) username or handle. It differs from the display name.How can I find my Twitter username?
Open your X profile or account settings. Copy the handle shown after@, then
send it here without that symbol.Does this endpoint perform a Twitter username lookup?
No. It stores supplied text after syntax validation. It does not fetch profile details or confirm that the username exists.Does it verify that I own the X account?
No. The route does not perform an ownership challenge. Use the separate X account connection workflow for authenticated actions.Is a Twitter user ID the same as a username?
No. A username is the changeable handle. A user ID identifies the profile with a separate numeric value.What happens if my X (Twitter) handle changes?
Call this route again with the new handle. The valid lowercase username replaces the previous value.Does setting an X identity consume credits?
No. This authenticated account update is free.Headers
Body
Response
200 OK
400 Invalid input
The body lacks a non-empty stringusername.
{ "error": "invalid_username", "message": "Invalid username format." }
The username breaks the 1-to-15-character letter, number, and underscore pattern.401 Unauthenticated
Authentication is missing or invalid. Replace the credential before retrying.429 Rate limited
Too many requests reached the route. Wait forRetry-After before retrying.Related.
- Get Account to confirm the stored handle.
- Analyze Style to process tweet style.
- List Connected X Accounts to inspect authenticated X connections.
Response examples
- 400
{ "error": "invalid_input", "message": "Invalid input. Check the request body." } - 401
{ "error": "unauthenticated", "message": "Authentication required. Provide a valid API key or bearer token." } - 403
{ "error": "api_key_paused", "message": "This API key is paused. Resume it at dashboard.xquik.com/api-keys to use it again." } - 409
{ "error": "x_username_taken", "message": "Another Xquik account already linked this X username." } - 429
{ "error": "rate_limit_exceeded", "message": "Too many requests. Try again later.", "retryAfter": 60 }