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

# Register User

> Create a new user account with automatic organization setup and email verification

## Overview

Create a new user account and automatically set up their organization. After registration, a verification email is sent, and the user is automatically logged in with an authentication token.

## Request Body

<ParamField body="name" type="string" required>
  User's full name. Also used to generate a default organization name.

  **Example:** `"John Doe"`
</ParamField>

<ParamField body="email" type="string" required>
  User's email address. Must be unique in the system.

  **Format:** Valid email address

  **Example:** `"john.doe@example.com"`
</ParamField>

<ParamField body="password" type="string" required>
  User's password. Should be strong and secure.

  **Example:** `"SecurePassword123!"`
</ParamField>

<ParamField body="c_password" type="string" required>
  Password confirmation. Must match the password field.

  **Example:** `"SecurePassword123!"`
</ParamField>

<ParamField body="team" type="object">
  Optional custom organization/team details. If not provided, defaults to "\[Name]'s Organization".

  <Expandable title="properties">
    <ParamField body="name" type="string">
      Custom organization name.

      **Example:** `"Acme Corporation"`
    </ParamField>

    <ParamField body="description" type="string">
      Organization description.

      **Example:** `"Leading software development company"`
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="timezone" type="string">
  User's timezone.

  **Example:** `"America/New_York"`
</ParamField>

<ParamField body="phone" type="string">
  User's phone number.

  **Example:** `"+1-555-123-4567"`
</ParamField>

## Response

The response is identical to the login endpoint, containing user details and authentication token.

<ResponseField name="id" type="integer">
  User's unique identifier.
</ResponseField>

<ResponseField name="name" type="string">
  User's full name.
</ResponseField>

<ResponseField name="email" type="string">
  User's email address.
</ResponseField>

<ResponseField name="username" type="string">
  Automatically generated unique username.
</ResponseField>

<ResponseField name="profile_photo_url" type="string">
  URL to user's profile picture (default avatar).
</ResponseField>

<ResponseField name="current_team_id" type="integer">
  ID of the newly created organization/team.
</ResponseField>

<ResponseField name="token" type="string">
  Authentication token for API requests. Use this in the `Authorization: Bearer {token}` header.
</ResponseField>

<ResponseField name="role" type="string">
  User's role (always `"owner"` for new registrations).
</ResponseField>

<ResponseField name="isAdmin" type="string">
  Admin status (always `"yes"` for new registrations).
</ResponseField>

<ResponseField name="contact_count" type="integer">
  Number of contacts (0 for new users).
</ResponseField>

<ResponseField name="is_first_project_added" type="integer">
  Onboarding flag: Whether the first project has been added (0 for new users).
</ResponseField>

<ResponseField name="is_first_task_added" type="integer">
  Onboarding flag: Whether the first task has been added (0 for new users).
</ResponseField>

<ResponseField name="is_first_member_invited" type="integer">
  Onboarding flag: Whether the first team member has been invited (0 for new users).
</ResponseField>

<ResponseField name="checkapp" type="string">
  App identifier (set to "tracker").
</ResponseField>

<ResponseField name="maxSpeedLimit" type="integer">
  Maximum speed limit setting (80).
</ResponseField>

<ResponseField name="email_verified_at" type="string">
  Email verification timestamp (null until verified).
</ResponseField>

<ResponseField name="created_at" type="string">
  Timestamp when the user account was created.
</ResponseField>

<ResponseField name="updated_at" type="string">
  Timestamp when the user account was last updated.
</ResponseField>

## Example Request - Basic Registration

```bash theme={null}
```


## OpenAPI

````yaml POST /api/v3/user/register
openapi: 3.1.0
info:
  title: Thareja API Documentation
  description: A comprehensive API for team and task management
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://app.thareja.ai
security:
  - bearerAuth: []
tags:
  - name: Teams
    description: Team management endpoints
  - name: Tasks
    description: Task management endpoints
  - name: Projects
    description: Project management endpoints
  - name: Comments
    description: Comment management endpoints
paths:
  /api/v3/user/register:
    post:
      tags:
        - Authentication
      summary: Register new user
      description: >-
        Create a new user account with automatic organization setup and email
        verification
      operationId: registerUser
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RegisterRequest'
        required: true
      responses:
        '200':
          description: Registration successful
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LoginResponse'
        '403':
          description: Validation error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    additionalProperties:
                      type: array
                      items:
                        type: string
                    example:
                      email:
                        - The email has already been taken.
      security: []
components:
  schemas:
    RegisterRequest:
      required:
        - name
        - email
        - password
        - c_password
      type: object
      properties:
        name:
          description: User's full name
          type: string
          example: John Doe
        email:
          description: User's email address (must be unique)
          type: string
          format: email
          example: john.doe@example.com
        password:
          description: User's password
          type: string
          format: password
          example: SecurePassword123!
        c_password:
          description: Password confirmation (must match password)
          type: string
          format: password
          example: SecurePassword123!
        team:
          description: Optional custom organization details
          type: object
          properties:
            name:
              type: string
              example: Acme Corporation
            description:
              type: string
              example: Leading software development company
        timezone:
          description: User's timezone
          type: string
          example: America/New_York
        phone:
          description: User's phone number
          type: string
          example: +1-555-123-4567
    LoginResponse:
      type: object
      properties:
        id:
          type: integer
          example: 1
        name:
          type: string
          example: John Doe
        email:
          type: string
          format: email
          example: john.doe@example.com
        profile_photo_url:
          type: string
          format: uri
          example: https://s3.amazonaws.com/bucket/profiles/user-1.jpg
        current_team_id:
          type: integer
          example: 5
        token:
          type: string
          example: 1|Ab3dEfGh1Jk2Lm3No4Pq5Rs6Tt7Uv8Wx9Yz0
          description: Bearer token for API authentication
        role:
          type: string
          enum:
            - owner
            - manager
            - member
            - client
          example: owner
        isAdmin:
          type: string
          enum:
            - 'yes'
            - 'no'
          example: 'yes'
        contact_count:
          type: integer
          example: 15
        is_first_project_added:
          type: integer
          enum:
            - 0
            - 1
          example: 1
          description: 0 = not added, 1 = added
        is_first_task_added:
          type: integer
          enum:
            - 0
            - 1
          example: 1
          description: 0 = not added, 1 = added
        is_first_member_invited:
          type: integer
          enum:
            - 0
            - 1
          example: 1
          description: 0 = not invited, 1 = invited
        timezone:
          type: string
          example: America/New_York
        two_factor_confirmed_at:
          type: string
          format: date-time
          nullable: true
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````