---
title: "[AUTHENTICATED WRITE] Username"
method: POST
path: "/tw-v2/profile/username"
tags: ["Profile (account action)"]
---

# \[AUTHENTICATED WRITE\] Username

`POST /tw-v2/profile/username`

## Request

- Base URL: `https://api.tweetapi.com`
- URL: `https://api.tweetapi.com/tw-v2/profile/username`
- Auth: API key in header `X-API-Key`

Change the username for the authenticated X account. The username must contain 5-15 ASCII letters, numbers, or underscores and must not include @. A successful response consumes one customer request. This operation has no idempotency guarantee. A 502 response can be transient, but if the outcome is unclear, check the account's current username before retrying. After a successful change, the old username becomes immediately available for another account to claim.

## Request body

- UpdateProfileUsernameRequest
  - `authToken` string, required: Caller-supplied auth_token cookie value. Treat it as a secret.
  - `password` string, required
  - `username` string, required
  - `proxy` string

## Response `200`

Successful response

- UsernameResponse
  - `data` object, required
    - `username` string, required

## Other responses

- `400`: The request is invalid. Check the parameters and try again.
- `401`: The TweetAPI key or caller-supplied Twitter authentication token is missing or invalid.
- `403`: The authenticated account is not permitted to perform the operation.
- `404`: The requested resource or route was not found.
- `429`: A plan limit rejected the request. The code field says which one. RATE_LIMITED means the per-minute limit was exceeded; wait for Retry-After. QUOTA_EXHAUSTED means the allowance and prepaid balance are used up. SUBSCRIPTION_INACTIVE means the subscription has expired or is inactive. Retrying won't fix the last two. A 429 without a code is temporary; retry with bounded backoff. This response does not include X-RateLimit headers.
- `500`: The request could not be completed.
- `502`: X returned an unexpected response while processing the request.
- `503`: Request allowance is temporarily unavailable. This request was not processed. Follow Retry-After before trying again; contact support if the error persists.

---

[API](https://skmtc.dev/tweetapi/apis/tweetapi-v2-api-reference.md) · [All operations](https://skmtc.dev/tweetapi/apis/tweetapi-v2-api-reference/llms.txt) · [OpenAPI document](https://skmtc.dev/tweetapi/apis/tweetapi-v2-api-reference/revisions/51bc9024013d?raw)
