# WhatsApp business username API: claim, change and errors

> Claim or change a WhatsApp business username by API: the four endpoints, the 2-in-14-days limit, errors 130429, 147005 to 147007 and the revoked webhook.

Published 2026-11-24. Z-API Omni team.

The WhatsApp business username API has no call to reserve a name and no call to check availability. WhatsApp reserves usernames for the business, and the API lists those suggestions, claims one, changes it or deletes it. You learn that a name is taken only when the claim fails with 147001. On `/username`, error 130429 with subcode 2655131 means "Username changed too many times", not a throughput limit.

User usernames, BSUIDs and the webhook fields they affect are covered in [WhatsApp usernames and BSUIDs](/academy/articles/whatsapp-usernames-business-scoped-user-ids/). This page is about the business side: the endpoints, the limits and the errors.

## Four endpoints on the business phone number

Every call goes to the business phone number ID, not the WABA. Meta's page writes the URLs with `<API_VERSION>` and gives syntax only, with no filled-in example responses ([Meta business-scoped user IDs page, accessed 2026-11-24](https://developers.facebook.com/documentation/business-messaging/whatsapp/business-scoped-user-ids)). The code below uses v26.0.

| Method and path | What it does |
|---|---|
| `GET /<PHONE_NUMBER_ID>/username_suggestions` | Lists names WhatsApp reserved for you |
| `POST /<PHONE_NUMBER_ID>/username` | Adopts or changes the username |
| `GET /<PHONE_NUMBER_ID>/username` | Reads the current username |
| `DELETE /<PHONE_NUMBER_ID>/username` | Removes the username |

The responses are `{"data":[{"username_suggestions":["<RESERVED_USERNAME>"]}]}`, `{"status":"<STATUS>"}`, `{"username":"<USERNAME>","status":"<STATUS>"}` and `{"success":<BOOL>}`, in table order.

The `GET /username` response omits `username` when the number has none. Meta's own suggestions sample has a trailing comma, which a strict JSON parser rejects. The shape above drops it.

## Claim a username WhatsApp reserved for you

Reservation happens on WhatsApp's side. Since June 29, 2026, a business can claim "a username that WhatsApp has reserved for you" in WhatsApp Manager, Meta Business Suite or the Username API. Start by reading the suggestions.

```bash
curl "https://graph.facebook.com/v26.0/$PHONE_NUMBER_ID/username_suggestions" \
  -H "Authorization: Bearer $ACCESS_TOKEN"
```

Then claim one of them. The body takes `username` and an optional `transfer_action`, added on June 10, 2026. Its values are `none`, the default, and `force_transfer`.

```bash
curl -X POST "https://graph.facebook.com/v26.0/$PHONE_NUMBER_ID/username" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "username": "<DESIRED_USERNAME>",
    "transfer_action": "none"
  }'
```

Meta's body placeholder is `<DESIRED_USERNAME>`, so the request is not limited to the suggestions. Nothing tells you in advance whether a name is available. A failure with 147001, "Username not available", is the only signal Meta documents.

## Reserved and approved are two different states

API responses return `approved` or `reserved`. The webhook adds a third value, `deleted`. Meta defines `reserved` as "The requested username has been reserved and approved but not yet visible to WhatsApp users."

The definition of `approved` reads "...approved and will be visible to WhatsApp users once the usernames feature is made available." The section on reading the current username says instead that `approved` is visible to users. The two passages disagree, so don't promise a client visibility from the status alone.

What Meta states consistently is the activation rule. A username becomes active once it is approved and usernames are available in the country. It then shows on the business profile and can be found by exact-match search. Some press coverage says usernames are not searchable. Meta's page says exact match, so that is the wording to use.

## How many times you can change it

Meta's changelog of October 23, 2026 sets the limit: "each business phone number can set a new username up to 2 times in any rolling 14-day period." The edge cases decide whether you have a change left.

| Situation | Counts as a change? |
|---|---|
| Setting a new username on an approved name | Yes, 2 per rolling 14 days |
| Changing while the username is `reserved` | Yes, but the cap is 10 |
| `reserved` turning into `approved` | No |
| Deleting the username | Does not reset the count |
| Receiving a name through `force_transfer` | Yes, against the receiving number |

Delete does not give the change back, so a typo fixed by delete and re-claim still uses both changes.

## Eligibility checks before the first call

Four conditions block a claim, each with its own error. The business portfolio needs a higher messaging limit, or the call fails with 147002. The number must be registered for API use, or you get 133010.

If the name is already in use on a Facebook Page or an Instagram account, link the number to that page or account first. Otherwise the call returns 147003 or 147004. Linking needs full control of the page or account, or partial access that includes `manage_phone`.

Numbers also used in the WhatsApp Business app must manage the username in the app. Since November 5, 2026, the API answers those numbers with 147006. Numbers on coexistence fall into this group, as described in [WhatsApp Business app coexistence with the Cloud API](/academy/articles/whatsapp-business-app-coexistence-cloud-api/).

Format rules apply on top. A username has 3 to 35 characters: English letters, digits, `.` and `_`, with at least one letter. It cannot start or end with a period, contain two periods in a row, start with `www.` or end with a domain suffix such as .com. Case is ignored, but periods and underscores count.

## Errors returned by the username endpoint

Failures come back in the standard error object, with `message`, `type`, `code`, `error_data.details`, `error_subcode` and `fbtrace_id`. The details below are Meta's, from the adopt and change table.

| Code | Details | What to do |
|---|---|---|
| 10 | "Application does not have permission for this action." | Give the system user Full control or Partial access to Phone numbers |
| 33 | "Invalid ID." | Check the ID, whether the account was deleted, and the `whatsapp_business_management` grant |
| 100 | "Param Invalid." | Fix the username format |
| 147001 | "Username not available." | Request a different name |
| 147002 | "Account not eligible to request a username." | Raise the messaging limit |
| 147003 | "FB Account not linked." | Link the number to the Facebook Page |
| 147004 | "IG Account not linked." | Link the number to the Instagram account |
| 147005 | "Username transfer required." | Resend with `force_transfer` if the move is intended |
| 147006 | "Username feature not available for this account." | Manage the username in the Business app |
| 147007 | "Username already reserved." | "Set that username, or delete it before requesting a different one." |
| 130429, subcode 2655131 | "Username changed too many times." | Wait out the rolling 14-day window |
| 133010 | "Account not registered." | Register the number first |

Code 147005 means the name sits on another number in the same portfolio. `force_transfer` moves it, and the move counts against the receiving number's limit. Code 147007 means a different username is already reserved for this number. For the permission errors, the system user setup is in [WhatsApp Cloud API access tokens](/academy/articles/whatsapp-cloud-api-access-tokens-system-user/).

## Error 130429 here is not a throughput limit

On Meta's general error page, 130429 is "Cloud API message throughput has been reached" ([Meta error codes, accessed 2026-11-24](https://developers.facebook.com/documentation/business-messaging/whatsapp/support/error-codes)). A send handler that sees it backs off and retries in seconds. On `/username`, that retry loop would run for days, because the window is 14 rolling days.

Branch on the endpoint and on `error_subcode` 2655131. The same general page calls `error_subcode` "Deprecated. Will not be returned in v16.0+ responses." That contradicts the subcode documented for this endpoint. Read it when present, and treat any 130429 from `/username` as the change limit even without one.

This script claims a username and maps each documented error to a next step. It uses only the Python 3.9 standard library.

```python
# claim_username.py. Run: python3 claim_username.py DESIRED_USERNAME [--force]
import json
import os
import sys
import urllib.error
import urllib.request

GRAPH = "https://graph.facebook.com/v26.0"
PHONE_NUMBER_ID = os.environ["PHONE_NUMBER_ID"]
ACCESS_TOKEN = os.environ["ACCESS_TOKEN"]

NEXT_STEP = {
    10: "grant the system user access to phone numbers",
    33: "check the phone number ID and the whatsapp_business_management grant",
    100: "fix the username format",
    133010: "register the number for API use first",
    147001: "name not available, choose another",
    147002: "portfolio not eligible, raise the messaging limit",
    147003: "link the number to the Facebook Page",
    147004: "link the number to the Instagram account",
    147005: "name is on another number in this portfolio, rerun with --force",
    147006: "number uses the Business app, manage the username there",
    147007: "another username is reserved, set it or delete it first",
}

def post_username(username, force):
    body = {"username": username, "transfer_action": "force_transfer" if force else "none"}
    req = urllib.request.Request(
        f"{GRAPH}/{PHONE_NUMBER_ID}/username",
        data=json.dumps(body).encode(),
        method="POST",
        headers={"Authorization": f"Bearer {ACCESS_TOKEN}", "Content-Type": "application/json"},
    )
    try:
        with urllib.request.urlopen(req) as resp:
            return json.load(resp)
    except urllib.error.HTTPError as err:
        raw = err.read().decode() or "{}"
        try:
            return json.loads(raw)
        except ValueError:
            return {"error": {"code": err.code, "message": raw[:200]}}

result = post_username(sys.argv[1], "--force" in sys.argv[2:])
error = result.get("error")
if error is None:
    print(f"status: {result.get('status')}")
    sys.exit(0)

code = error.get("code")
if code == 130429:
    # On /username this is the change limit (subcode 2655131), not throughput.
    print(f"change limit reached (subcode {error.get('error_subcode')}), do not retry for days")
else:
    print(f"error {code}: {NEXT_STEP.get(code, error.get('message'))}")
print(f"fbtrace_id: {error.get('fbtrace_id')}")
sys.exit(1)
```

The `--force` flag is deliberate. A transfer takes the name away from another number in the portfolio, so a person should decide it.

## The webhook that tells you Meta revoked a name

Subscribe your app to the `business_username_updates` field. Each change carries `value` with `display_phone_number`, `username`, `status` and `context`. The `username` key is omitted when `status` is `deleted`.

Since September 15, 2026, `context` can be set: "When Meta revokes a username, `context` is set to `revoked`." That is the only value Meta lists. With `status` `deleted`, the name was removed. With any other status, Meta replaced it with a generated username, which arrives in `username`.

Meta gives no filled-in sample for this webhook. The body below is built from its field list, with placeholders for every value.

```json
{
  "object": "whatsapp_business_account",
  "entry": [
    {
      "id": "<WHATSAPP_BUSINESS_ACCOUNT_ID>",
      "changes": [
        {
          "field": "business_username_updates",
          "value": {
            "display_phone_number": "<BUSINESS_PHONE_NUMBER>",
            "username": "<GENERATED_USERNAME>",
            "status": "<STATUS>",
            "context": "revoked"
          }
        }
      ]
    }
  ]
}
```

This handler reads a saved body and prints what each update means. Once `revoked` appears, update anything that shows the old name.

```python
# username_updates.py. Run: python3 username_updates.py webhook.json
import json
import sys

with open(sys.argv[1]) as f:
    body = json.load(f)

for entry in body.get("entry", []):
    for change in entry.get("changes", []):
        if change.get("field") != "business_username_updates":
            continue
        value = change.get("value", {})
        number = value.get("display_phone_number")
        status = value.get("status")
        revoked = value.get("context") == "revoked"
        if status == "deleted":
            reason = "revoked by Meta" if revoked else "deleted"
            print(f"{number}: username removed ({reason})")
        elif revoked:
            print(f"{number}: Meta replaced the username with {value.get('username')}")
        else:
            print(f"{number}: username {value.get('username')} is now {status}")
```

## What a business username changes for contact lookups

A business username doesn't hide your number. Meta's page says "If you adopt a business username, it will not cause your business phone number to be hidden in the app." Meta also documents no way to send to a username. Recipients are a phone number, a BSUID in `recipient`, or a parent BSUID.

User usernames arrive at `contacts[0].profile.username`, "omitted if the user has not adopted a username". They also appear in delivered and read statuses, not `sent`, and in group payloads and `user_preferences`. When the user has a username and the phone can't be shared, `wa_id` and `from` can be missing.

Key contacts on `user_id`, the BSUID, and keep the phone number nullable. The schema and backfill are in [migrate a contact database from phone number to BSUID](/academy/articles/migrate-contact-database-phone-number-to-bsuid/). The other profile fields you can set by API are in [the WhatsApp Business Profile API](/academy/articles/whatsapp-business-profile-api/).

## What Meta does not document

Meta documents no availability check and no reserve call. It gives no date for the full user rollout, only that it is "rolling out usernames gradually in 2026". It publishes no filled-in example responses for the four endpoints. Meta's general error page lists 130429 only as throughput, so keep the endpoint branch in your handler. The send-side codes are in the [Cloud API error codes reference](/academy/articles/whatsapp-cloud-api-error-codes-reference/).

*Z-API Omni team*
