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

# Sign Up

> Creates a new WorkOS organization and database account, then initiates
the authentication flow for the workspace creator.




## OpenAPI

````yaml POST /api/auth/signup
openapi: 3.1.0
info:
  title: Whilst Slack Bot API
  version: 0.1.0
  description: >-
    Internal endpoints backing the Whilst Slack bot. Includes Slack event
    intake, OAuth install flow, health checks, and admin operations.
servers:
  - url: https://api.staging.whilst.app
    description: Staging
  - url: https://api.whilst.app
    description: Production
security: []
paths:
  /api/auth/signup:
    post:
      tags:
        - Authentication
      summary: Create new workspace and user
      description: |
        Creates a new WorkOS organization and database account, then initiates
        the authentication flow for the workspace creator.
      operationId: postAuthSignup
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SignUpRequest'
      responses:
        '200':
          description: Workspace created, redirect to WorkOS for verification
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SignUpResponse'
        '400':
          description: Invalid request (validation error)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '409':
          description: Workspace with this name already exists
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Server error (WorkOS API failure, database error)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    SignUpRequest:
      type: object
      required:
        - workspaceName
        - email
      properties:
        workspaceName:
          type: string
          minLength: 1
          description: Name of the workspace to create
          example: Acme Inc
        email:
          type: string
          format: email
          description: Email address of the workspace creator
          example: founder@acme.com
    SignUpResponse:
      type: object
      required:
        - redirectUrl
        - organizationId
      properties:
        redirectUrl:
          type: string
          format: uri
          description: WorkOS authorization URL for email verification
        organizationId:
          type: string
          description: WorkOS organization ID for the created workspace
    ErrorResponse:
      type: object
      required:
        - message
      properties:
        message:
          type: string
          description: Human-readable error message
        code:
          type: string
          description: Machine-readable error code
        details:
          type: object
          description: Additional error context

````