> ## Documentation Index
> Fetch the complete documentation index at: https://task-social.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Register a user

> Creates a new TaskSocial user.



## OpenAPI

````yaml /openapi-bundled.yaml post /api/v1/auth/register
openapi: 3.1.0
info:
  title: TaskSocial API
  version: 1.0.0
  description: REST API for TaskSocial, a social accountability application.
servers:
  - url: https://tasksocial-production.up.railway.app
    description: TaskSocial production API
security: []
tags:
  - name: Authentication
    description: User registration and authentication
  - name: Tasks
    description: Task creation and management
paths:
  /api/v1/auth/register:
    post:
      tags:
        - Authentication
      summary: Register a user
      description: Creates a new TaskSocial user.
      operationId: registerUser
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RegisterRequest'
            example:
              username: shahzeb
              email: shahzeb@example.com
              password: password123
      responses:
        '201':
          description: User created successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  username:
                    type: string
                  email:
                    type: string
                    format: email
        '400':
          description: Missing fields or email already registered.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Unexpected server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    RegisterRequest:
      type: object
      required:
        - username
        - email
        - password
      properties:
        username:
          type: string
        email:
          type: string
          format: email
        password:
          type: string
          format: password
    Error:
      type: object
      properties:
        message:
          type: string

````