Skip to content

fix(account): register through the Build registration API - #57

Merged
jsanmartin123 merged 1 commit into
mainfrom
fix/build-registration-endpoints
Oct 23, 2026
Merged

jsanmartin123 merged 1 commit into
mainfrom
fix/build-registration-endpoints

Conversation

@jsanmartin123

Copy link
Copy Markdown
Contributor

Summary

band account register, band account send-code, and band account verify now call the Build registration API (/v1/build/registrations*) instead of the legacy /v1/express/registration* endpoints, which are being retired (BUILD-513).

  • RegistrationHost() returns <api host>/v1/build. BW_API_URL still overrides the host.
  • The paths are now /registrations, /registrations/code and /registrations/code/verify.

Why

The legacy registration endpoints are being decommissioned and will start returning 404. Every CLI release up to and including v0.5.2-beta uses them, so CLI signups will fail until users upgrade to a release containing this change.

Compatibility

No flag or output changes. The Build API accepts the same request bodies the CLI already sends and returns the same message / status / registrationId envelope:

Command Body
register phoneNumber, email, firstName, lastName, tosAccepted, promotionalCommsAccepted
send-code phoneNumber, email, deliveryChannel (SMS | VOICE, already upper-cased by the CLI)
verify phoneNumber, email, code

The only visible difference is that register now reports USER_CREATION_INITIATED rather than USER_CREATION_PENDING. It may also return 201 instead of 200; the client already treats any 2xx as success.

Testing

  • go build ./..., go vet ./..., and go test ./... all pass (1270 tests)
  • The golden tests are updated for the new paths and register status
  • New tests for RegistrationHost(): the default host, and a BW_API_URL override with a trailing slash
  • golangci-lint couldn't run locally, because the local binary was built with Go 1.27.0 and this repo requires 1.27.3; it fails the same way on main. CI covers it.
  • Not run against a live environment

Release note

Users on v0.5.2-beta or earlier need to upgrade to register through the CLI once the legacy endpoints are removed.

🤖 Generated with Claude Code

`band account register`, `send-code`, and `verify` still posted to the
legacy express-registration-service endpoints under /v1/express/registration.
That service is being decommissioned, and its routes will start returning
404. Point RegistrationHost at /v1/build and use the plural
/registrations paths that express-billing-service serves.

The request bodies and response envelopes are unchanged: billing accepts
the same fields (phoneNumber, email, firstName, lastName, tosAccepted,
promotionalCommsAccepted; deliveryChannel SMS|VOICE; code) and returns
the same message/status/registrationId data. Register now reports
USER_CREATION_INITIATED instead of USER_CREATION_PENDING.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@jsanmartin123
jsanmartin123 requested review from a team as code owners October 22, 2026 15:29
@bwappsec

bwappsec commented Oct 22, 2026 •

Copy link
Copy Markdown

✅ Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
✅ Open Source Security 0 0 0 0 0 issues
✅ Licenses 0 0 0 0 0 issues
✅ Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@jsanmartin123
jsanmartin123 merged commit 1de623e into main Oct 23, 2026
8 checks passed
@jsanmartin123
jsanmartin123 deleted the fix/build-registration-endpoints branch October 23, 2026 13:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.