Mint CLI Signup Token
/v1/sign_upMints a one-shot cli_token and returns a prefilled signup URL. The user opens the URL, clears the captcha, accepts the Terms of Service and creates the account. The CLI then polls GET /sign_up/{cli_token} until the accounts service has propagated the new user and its first API key, at which point the API returns the credentials exactly once.
The API does not store the cli_token when it mints it. The token becomes known to the API only once the accounts service propagates the new user, so the CLI must set its own polling deadline. If the user never completes signup, GET /sign_up/{cli_token} returns 202 Accepted indefinitely.
Request body
Send a JSON object with the following fields. Account holder and organisation details are required:
bodyobjectemailstring requiredAccount holder's email address.
namestring requiredAccount holder's full name.
org_namestring requiredOrganisation name.
org_address_line_onestring requiredorg_address_line_twostring optionalorg_address_line_threestring optionalorg_post_townstring requiredorg_postcodestring requiredorg_country_codestring requiredISO 3166-1 alpha-2 country code.
Response
result contains a cli_token (for polling) and a signup_url (for the user to complete signup).
resultobjectcli_tokenstringRandom URL-safe token (base64url). Used by the CLI to poll for credentials.
signup_urlstringPrefilled accounts web URL. The user opens this in a browser to complete signup.
The result sits inside the standard { result, code, message } envelope — see
the API reference for the wrapper format.
Flow
- CLI calls
POST /sign_upwith account holder and organisation details - API returns
cli_tokenandsignup_url - CLI directs user to open
signup_urlin browser - User completes captcha, accepts Terms of Service, and creates account
- Rails propagates new user to the API
- CLI polls
GET /sign_up/{cli_token}until credentials are returned - Credentials are returned exactly once; subsequent polls return
410 Gone