Official line username
The line username is the public@name of your official WhatsApp Business line — the identifier shown on the business number’s profile to customers. Do not confuse it with the end-user username, which identifies whoever is chatting with you and arrives in webhooks; this one is the @ of your own line.
These routes let you, as the number owner, query, set/change, delete, and get suggestions for the username, forwarding the operation to Meta (WhatsApp Cloud API) and keeping the local state in sync.
The line username is a concept related to the BSUID. To understand how the line’s
@name relates to the BSUID and to the phone number (wa_id) in webhooks and requests, see BSUID and user identifiers.Username lifecycle
The username goes through states during its lifecycle. Each state is returned in thestatus field (Meta string), preserved both in API responses and in the webhook:
State propagation is asynchronous. When you set/change a username, Meta may respond
reserved and only later promote it to approved. This transition is confirmed by Positus through the business_username_update webhook — see Update webhook.Authentication and base URL
All routes use the same base and authentication scheme as the other Positus API routes.https://api.positus.global/v2
Path Parameters
Headers
Production token: Your token is generated and provided by Positus and grants access to all your WhatsApp Business API numbers.
The change routes (set, change, and delete) require the authenticated user to be the number owner. A user without this permission receives 403.
Query username
GET https://api.positus.global/v2/whatsapp/numbers/{{key}}/username
Returns the line’s current username and its status. By default the response is read from the local state (kept in sync by the business_username_update webhook). To force a direct read from Meta, pass ?refresh=true.
Query Parameters
Response
- 200
- 200 (no username)
With
?refresh=true, the username_status field reflects the status returned by Meta at query time. If the read from Meta fails, the response carries the translated error (see Error handling).Set or change username
POST https://api.positus.global/v2/whatsapp/numbers/{{key}}/username
Sets a new username for the line (or replaces the existing one). The format is validated locally before calling Meta. After success, the local state is synced (username, username_status, and previous_username).
Request Body
Username format rules (validated locally):
- 3 to 35 characters.
- English letters (
a-z,A-Z), digits (0-9), dot (.), and underscore (_) only. - At least one letter.
- Cannot start or end with a dot (
.), nor contain a double dot (..). - Cannot start with
www. - Cannot end with a domain (
.com,.org,.net,.int,.edu,.gov,.mil,.us,.in,.html).
Response
- 200
- 403
- 409
- 422
Returns the full updated number (same format as
GET /whatsapp/numbers/{{key}}), now including username and username_status:When setting a new username, Meta may return the status
reserved (reserved, not yet public) or approved. The promotion from reserved to approved is confirmed asynchronously by the business_username_update webhook.Delete username
DELETE https://api.positus.global/v2/whatsapp/numbers/{{key}}/username
Removes the line’s username. After success, the local state is updated (username returns to null and username_status becomes deleted).
Response
- 200
- 403
Returns the full updated number, now without a username:
Username suggestions
GET https://api.positus.global/v2/whatsapp/numbers/{{key}}/username/suggestions
Returns a list of available usernames suggested by Meta for your line. Useful when the desired username is unavailable.
Response
- 200
- 200 (no suggestions)
Error handling
The change routes forward Meta errors translated, with the corresponding HTTP code. The response carries the translated message inmessage and Meta’s original message in meta_error.
Update webhook
Besides the routes above (actions you initiate), Positus notifies your webhook whenever the line username status changes — including actions made outside the API (for example, in the WhatsApp Business Manager app) or the asynchronous promotion fromreserved to approved.
The event is business_username_update, delivered in the number object with display_phone_number, username, status (approved / deleted / reserved), timestamp, and waba_id. For the full payload and field table, see the Line username update (business_username_update) section in the Webhook documentation.
Username states and persistence
The username state is persisted locally on the number and reflected in API responses. The query routes (local read) andGET /whatsapp/numbers/{{key}} always return the latest synced state.
- The delete operation sets
username = nullandusername_status = deleted. - When you change the username, the previous value is preserved internally (history of the last username).
- Synchronization is confirmed asynchronously by the
business_username_updatewebhook, ensuring consistency across your action, Meta’s state, and the Positus local state.