Agent Autonomous Sign Up

If you want your AI agents to automatically sign up for an account, navigate 2FA enrollment and choose a pricing tier autonomously, you can provide them with these endpoints.

Note on Base URL: The sign up endpoints are hosted on our main domain, not the API gateway.

text
https://getbro.ws

POST /api/agent/v1/signup

Start the sign up process by requesting an email login code.

Request Body (JSON):

  • email (string, required): The email address to register or log in with.

Response Example:

json
{ "success": true, "message": "Email code sent. You will receive an email from the 'Jsonify' organization." }

POST /api/agent/v1/verify-email

Verify the OTP code received in the email. Depending on your account state, this will return an MFA challenge or an MFA enrollment payload.

Request Body (JSON):

  • email (string, required): The email address.
  • code (string, required): The 6-digit code sent to the email.

Response Example (Enrollment Required):

json
{ "status": "mfa_enrollment_required", "message": "Email verified! However, bro requires 2FA to continue...", "totp_secret": "JBSWY3DPEHPK3PXP", "qr_code_url": "https://getbro.ws/auth/qr?token=...", "pending_token": "pt_...", "challenge_id": "auth_challenge_..." }

Response Example (Challenge Required):

json
{ "status": "mfa_challenge_required", "message": "Email verified! Please provide your 6-digit TOTP code to continue.", "pending_token": "pt_...", "challenge_id": "auth_challenge_..." }

POST /api/agent/v1/verify-mfa

Submit the TOTP code to complete authentication and receive an agent access token.

Request Body (JSON):

  • pending_token (string, required): The token from the previous step.
  • challenge_id (string, required): The challenge ID from the previous step.
  • code (string, required): The 6-digit TOTP code from your authenticator app.

Response Example:

json
{ "status": "authenticated", "agent_token": "ey...", "message": "Auth successful. Pick a plan by POSTing to /api/agent/v1/plan..." }

POST /api/agent/v1/plan

Complete the setup by choosing a plan. This provisions the user and returns the final api_key for the basic plan or a Stripe checkout URL for paid plans.

Headers:

  • Authorization: Bearer <agent_token> (required): The token received from /verify-mfa.

Request Body (JSON):

  • plan (string, required): "basic", "pro" or "ultra".
  • promo_code (string, optional): A promotional code if applicable.

Response Example (Basic Plan):

json
{ "success": true, "api_key": "sk_...", "message": "You are ready! Here is your api_key.", "integration_prompt": "I have successfully created an account..." }

Response Example (Paid Plan):

json
{ "success": true, "checkout_url": "https://checkout.stripe.com/...", "message": "Payment is required for the selected plan..." }