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

# Signup

> Create a new user with Supabase Auth and the app-side tenant records.

This ensures:
1. User is created in auth.users (for authentication)
2. User is assigned to the default organization for tenant-scoped APIs
3. User is created in public.user when that table exists

**Errors:**
- 400: Invalid request data or user creation failed
- 409: Account already exists
- 500: Server error



## OpenAPI

````yaml /api/openapi-finindex.json post /auth/signup
openapi: 3.1.0
info:
  title: Finindex API — ERP · Finance · Accounting
  version: 0.1.0
servers:
  - url: https://vinmake-erp.onrender.com
security: []
paths:
  /auth/signup:
    post:
      tags:
        - Authentication
      summary: Signup
      description: |-
        Create a new user with Supabase Auth and the app-side tenant records.

        This ensures:
        1. User is created in auth.users (for authentication)
        2. User is assigned to the default organization for tenant-scoped APIs
        3. User is created in public.user when that table exists

        **Errors:**
        - 400: Invalid request data or user creation failed
        - 409: Account already exists
        - 500: Server error
      operationId: signup_auth_signup_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SignupRequest'
        required: true
      responses:
        '200':
          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:
        email:
          type: string
          format: email
          title: Email
        password:
          type: string
          title: Password
        name:
          type: string
          title: Name
          default: ''
        role:
          type: string
          title: Role
          default: Staff
      type: object
      required:
        - email
        - password
      title: SignupRequest
    SignupResponse:
      properties:
        message:
          type: string
          title: Message
        user_id:
          type: string
          title: User Id
        email:
          type: string
          title: Email
      type: object
      required:
        - message
        - user_id
        - email
      title: SignupResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    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

````