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

# Signs up a new user

> Creates a user in the database and then logs them in.



## OpenAPI

````yaml https://us-west-2.api.thenile.dev/v2/openapi post /v2/databases/{database}/signup
openapi: 3.0.0
info:
  title: Nile auth API
  version: '0.1'
servers: []
security: []
tags: []
paths:
  /v2/databases/{database}/signup:
    post:
      tags:
        - users
      summary: Signs up a new user
      description: Creates a user in the database and then logs them in.
      operationId: signup
      parameters:
        - name: database
          in: path
          required: true
          schema:
            type: string
        - name: tenantId
          description: A tenant id to add the user to when they are created
          in: query
          schema:
            type: string
        - name: newTenantName
          description: A tenant name to create, then the user to when they are created
          in: query
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateUser'
      responses:
        '201':
          description: User created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/User'
        '400':
          description: API/Database failures
          content:
            text/plain:
              schema:
                type: string
        '401':
          description: Unauthorized
          content: {}
components:
  schemas:
    CreateUser:
      required:
        - email
        - password
      type: object
      properties:
        email:
          type: string
        password:
          type: string
        name:
          type: string
        givenName:
          type: string
        familyName:
          type: string
        picture:
          type: string
    User:
      type: object
      properties:
        id:
          type: string
        tenants:
          uniqueItems: true
          type: array
          items:
            type: string
        email:
          type: string
        name:
          type: string
        givenName:
          type: string
        familyName:
          type: string
        picture:
          type: string
        emailVerified:
          type: string
          format: date-time
        created:
          type: string
          format: date-time
        updated:
          type: string
          format: date-time

````