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

# Set password for a new user via activation token



## OpenAPI

````yaml api-reference/openapi.json post /api/auth/set-password
openapi: 3.0.0
info:
  title: Tandem IT API
  version: 1.0.0
  description: API for tandem it backend
servers:
  - url: https://tandem.hlofiys.xyz
    description: Production server
security: []
tags:
  - name: Documentation
    description: API documentation endpoint
paths:
  /api/auth/set-password:
    post:
      tags:
        - Authentication
      summary: Set password for a new user via activation token
      operationId: setPassword
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - token
                - new_password
              properties:
                token:
                  type: string
                  description: The one-time activation token from the email link.
                new_password:
                  type: string
                  description: The user's chosen new password.
      responses:
        '200':
          description: Password set successfully. User is now logged in.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LoginResponse'
        '400':
          description: >-
            Bad Request. The token is invalid, expired, or the password is too
            weak.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: >-
            Internal Server Error. An unexpected error occurred on the server,
            such as a database failure or an issue generating login tokens
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    LoginResponse:
      type: object
      required:
        - token
        - refresh_token
      properties:
        token:
          type: string
          description: JWT token
        refresh_token:
          type: string
          description: Refresh token
    Error:
      type: object
      required:
        - message
      properties:
        message:
          type: string

````