Authentication

Register new user

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"
  }
);
const { data: result } = await authentication.registerUser(
  {
    email: "salvador_goyette@northwind.dev",
    password: "Str0ng_Sample_Pass!w0rd",
    firstName: "Baron",
    lastName: "Rice",
    orgName: "Zieme and Sons"
  }
);

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"
}
{
  "email": "john.doe@mudbase.dev",
  "password": "SecurePass123!",
  "firstName": "John",
  "lastName": "Doe",
  "orgName": "Mudbase"
}

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