> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mrassistant.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Sign Up

> Sign up a new user and auto-create tenant for business users.

**PERMANENT USER STORAGE:**
- Users are stored in PostgreSQL database
- owner_id is generated ONCE and persists forever
- Agents are NEVER lost because owner_id never changes

**User Roles:**
- **BUSINESS**: Organization owner - automatically gets a tenant created
- **DEVELOPER**: Technical user - no tenant created (uses platform features only)

**What happens during signup:**
1. User account is created in DATABASE (not memory)
2. If role=BUSINESS → Tenant (organization) is automatically created
3. User becomes the owner of their tenant
4. Tenant ID = owner_id (for consistency)

**Business User Flow:**
- Sign up → Tenant auto-created → Create agents → Make calls

**Developer User Flow:**  
- Sign up → Access platform APIs → No tenant needed



## OpenAPI

````yaml https://api.mrassistant.ai/openapi.json post /auth/signup
openapi: 3.1.0
info:
  title: Backend - Multilingual Voice Agent System
  description: FastAPI backend for multilingual voice agents with tool use
  version: 1.0.0
servers: []
security: []
paths:
  /auth/signup:
    post:
      tags:
        - authentication
      summary: Sign Up
      description: >-
        Sign up a new user and auto-create tenant for business users.


        **PERMANENT USER STORAGE:**

        - Users are stored in PostgreSQL database

        - owner_id is generated ONCE and persists forever

        - Agents are NEVER lost because owner_id never changes


        **User Roles:**

        - **BUSINESS**: Organization owner - automatically gets a tenant created

        - **DEVELOPER**: Technical user - no tenant created (uses platform
        features only)


        **What happens during signup:**

        1. User account is created in DATABASE (not memory)

        2. If role=BUSINESS → Tenant (organization) is automatically created

        3. User becomes the owner of their tenant

        4. Tenant ID = owner_id (for consistency)


        **Business User Flow:**

        - Sign up → Tenant auto-created → Create agents → Make calls


        **Developer User Flow:**  

        - Sign up → Access platform APIs → No tenant needed
      operationId: sign_up_auth_signup_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SignUpRequest'
        required: true
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SignUpResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    SignUpRequest:
      properties:
        username:
          type: string
          maxLength: 50
          minLength: 3
          title: Username
        email:
          type: string
          format: email
          title: Email
        password:
          type: string
          maxLength: 72
          minLength: 8
          title: Password
        role:
          $ref: '#/components/schemas/UserRole'
          default: business
      type: object
      required:
        - username
        - email
        - password
      title: SignUpRequest
      description: Sign up request model.
    SignUpResponse:
      properties:
        user_id:
          type: string
          title: User Id
        username:
          type: string
          title: Username
        email:
          type: string
          title: Email
        role:
          $ref: '#/components/schemas/UserRole'
        message:
          type: string
          title: Message
      type: object
      required:
        - user_id
        - username
        - email
        - role
        - message
      title: SignUpResponse
      description: Sign up response model.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    UserRole:
      type: string
      enum:
        - business
        - developer
        - admin
      title: UserRole
      description: User role enumeration.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````