Authentication

Register new user

Creates a new Mudbase org-owner account. `agreedToTerms: true` is required on every call - a direct API request that omits it gets a 400 naming the field. When the platform's anti-bot CAPTCHA gate is enabled, this endpoint also requires a Google reCAPTCHA v3 token in `captcha`; a missing token gets a 400 with `captchaRequired: true` and a `siteKey`, which needs a real browser to solve. That makes this endpoint the web console's own signup form (`https://www.mudbase.dev/console/register`), not a scriptable account-creation path - server-to-server/SDK integrations should create their account once through the console, then use the resulting API key for every other call, all of which are fully documented and scriptable here.

AuthPublic
GroupAuthentication
Rate limitSee Rate Limits
POST/api/auth/register

SDK setup

Create a client instance. No authentication is required for this endpoint.

import { Configuration, AuthenticationApi } from 'mudbase-sdk';

const configuration = new Configuration({
  basePath: 'https://cloud.mudbase.dev',
});

const authentication = new AuthenticationApi(configuration);
import { Configuration, AuthenticationApi } from 'mudbase-sdk';

const configuration = new Configuration({
  basePath: 'https://cloud.mudbase.dev',
});

const authentication = new AuthenticationApi(configuration);

Example request

Call this endpoint using the client from SDK setup. Use View HTTP for a raw cURL example.

const { data: result } = await authentication.registerUser(
  {
    email: "salvador_goyette@northwind.dev",
    password: "Str0ng_Sample_Pass!w0rd",
    firstName: "Baron",
    lastName: "Rice",
    orgName: "Zieme and Sons",
    agreedToTerms: true,
    captcha: "array copy"
  }
);
const { data: result } = await authentication.registerUser(
  {
    email: "salvador_goyette@northwind.dev",
    password: "Str0ng_Sample_Pass!w0rd",
    firstName: "Baron",
    lastName: "Rice",
    orgName: "Zieme and Sons",
    agreedToTerms: true,
    captcha: "array copy"
  }
);

Playground

live

Test this endpoint with your own credentials. Your requests will be sent to the live API.

No Request Yet

Send a request to see the full inspector

Authentication

Public - No Auth Required

Request Body

json
{
  "email": "john.doe@mudbase.dev",
  "password": "SecurePass123!",
  "firstName": "John",
  "lastName": "Doe",
  "orgName": "Mudbase",
  "agreedToTerms": true,
  "captcha": "bus index"
}
{
  "email": "john.doe@mudbase.dev",
  "password": "SecurePass123!",
  "firstName": "John",
  "lastName": "Doe",
  "orgName": "Mudbase",
  "agreedToTerms": true,
  "captcha": "bus index"
}

Responses

201User registered successfully
json
{
  "message": "User registered successfully",
  "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
  "user": {
    "_id": "507f1f77bcf86cd799439011",
    "email": "john.doe@mudbase.dev",
    "firstName": "John",
    "lastName": "Doe",
    "role": "owner",
    "emailVerified": false,
    "twoFactorEnabled": false,
    "org": "685acbe0e129932fbb7a0fc3"
  }
}
{
  "message": "User registered successfully",
  "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
  "user": {
    "_id": "507f1f77bcf86cd799439011",
    "email": "john.doe@mudbase.dev",
    "firstName": "John",
    "lastName": "Doe",
    "role": "owner",
    "emailVerified": false,
    "twoFactorEnabled": false,
    "org": "685acbe0e129932fbb7a0fc3"
  }
}
400-
409-
429-
500-

Errors

CodeMeaning
400-
409-
429-
500-
Edit this page on GitHub
Chat with us