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

# Register user

> Create a new user account. When WorkOS is enabled the user is also provisioned in WorkOS; otherwise the password is validated locally and hashed before persistence.



## OpenAPI

````yaml /api-reference/openapi.yaml post /api/auth/register
openapi: 3.0.3
info:
  title: Tether Relay and Tether API
  version: 1.0.0
  description: >-
    Route-derived OpenAPI contract generated from tether-relay backend sources.
    Regenerate with scripts/sync-openapi-from-backend.mjs.
servers:
  - url: https://your-instance.example.com
    description: Production
  - url: http://localhost:2212
    description: Local API service
security: []
tags:
  - name: AI
  - name: Applications
  - name: Approval
  - name: Auth
  - name: Automations
  - name: Calls
  - name: Campaigns
  - name: Contact Analytics
  - name: Contact Metrics
  - name: Contact Notes
  - name: Contacts
  - name: Conversation Monitor
  - name: Conversations
  - name: Departments
  - name: Email
  - name: Escalation Dashboard
  - name: Event Logs
  - name: Google Sheets
  - name: Marketplace
  - name: Messages
  - name: Notification Sounds
  - name: Notifications
  - name: Org Snapshots
  - name: Organizations
  - name: Outreach
  - name: Outreach Metrics
  - name: Outreach Sources
  - name: Pipelines
  - name: Processes
  - name: Prompts
  - name: Reminders
  - name: Sms
  - name: Templates
  - name: Traces
  - name: Training
  - name: Upload
  - name: User Snapshots
  - name: Users
  - name: Vertical
  - name: Webchats
  - name: Webhook
paths:
  /api/auth/register:
    post:
      tags:
        - Auth
      summary: Register user
      description: >-
        Create a new user account. When WorkOS is enabled the user is also
        provisioned in WorkOS; otherwise the password is validated locally and
        hashed before persistence.
      operationId: post_auth_register
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AuthRegisterRequest'
      responses:
        '201':
          description: User registered
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthRegisterResponse'
        '400':
          description: Email already registered, or password does not meet requirements
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthRegisterErrorResponse'
        '403':
          description: Department Lead violation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthErrorResponse'
        '500':
          description: WorkOS provisioning failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthErrorResponse'
components:
  schemas:
    AuthRegisterRequest:
      type: object
      properties:
        email:
          type: string
          format: email
          description: New user email; must be unique across the platform.
        password:
          type: string
          description: >-
            Plain-text password; validated against WorkOS policy when enabled,
            otherwise against the local 8+ char / mixed-case / number /
            special-char rule. Hashed with bcrypt before persistence.
        fullName:
          type: string
          description: >-
            Display name; split into first/last when provisioning the WorkOS
            user.
        organizationId:
          type: string
          description: >-
            Mongo `_id` of the org the user belongs to. Department Leads are
            forced to their own org and cannot override this.
        accessRole:
          type: string
          description: >-
            Role assigned to the new user — defaults to `SALES_REP` when
            omitted. Department Leads may only create `SALES_REP` users.
        phoneNumber:
          type: string
          description: >-
            User's personal phone number. Rejected when it collides with one of
            the org's provisioned SMS numbers.
        sinchPhoneNumber:
          type: string
          description: Sinch-provisioned outbound number assigned to this user, if any.
        designation:
          type: string
          description: Free-form job title shown in the UI (e.g. "Customer Success Lead").
        departmentId:
          type: string
          description: >-
            Mongo `_id` of the department the user joins; auto-populated for
            Department Leads and used to add the user to the department's
            `userIds`/`managerIds` array.
      required:
        - email
        - password
      additionalProperties: true
      example:
        email: sam.patel@acme.example
        password: CorrectHorseBatteryStaple!
        fullName: Sam Patel
        organizationId: 5f7b1c2e8a1d4e0012c3b4a5
        accessRole: AGENT
        phoneNumber: '+14165550100'
        designation: Customer Success Lead
        departmentId: 6a8c2d3f9b1e5a0023d4c5b6
    AuthRegisterResponse:
      type: object
      description: Minimal envelope returned after a user is registered.
      properties:
        message:
          type: string
      required:
        - message
      additionalProperties: true
      example:
        message: User registered successfully
    AuthRegisterErrorResponse:
      type: object
      description: >-
        Validation envelope returned by `/api/auth/register` when the email is
        taken or the password violates policy.
      properties:
        error:
          type: string
        message:
          type: string
        suggestions:
          type: array
          items:
            type: string
          description: WorkOS-provided suggestions for strengthening the password.
        passwordRequirements:
          $ref: '#/components/schemas/AuthPasswordRequirements'
      required:
        - error
      additionalProperties: true
      example:
        error: Password does not meet WorkOS requirements
        message: Password must include at least one number and one special character.
        suggestions:
          - Add a digit
          - Add a punctuation mark
        passwordRequirements:
          minLength: 8
          requireNumber: true
          requireSpecial: true
    AuthErrorResponse:
      type: object
      description: >-
        Generic error envelope returned by Auth endpoints. Most paths include
        only `error`; a few add `details`/`code` for diagnostic context.
      properties:
        error:
          type: string
        details:
          type: string
        code:
          type: string
      required:
        - error
      additionalProperties: true
      example:
        error: Invalid or expired token
        code: TOKEN_EXPIRED
    AuthPasswordRequirements:
      type: object
      description: >-
        Diagnostic detail returned when the password fails policy or WorkOS
        validation.
      properties:
        minLength:
          type: integer
        requireUppercase:
          type: boolean
        requireLowercase:
          type: boolean
        requireNumber:
          type: boolean
        requireSpecial:
          type: boolean
      additionalProperties: true
      example:
        minLength: 8
        requireUppercase: true
        requireLowercase: true
        requireNumber: true
        requireSpecial: true

````