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

# Register Job Seeker

> Create a new job seeker account

## Endpoint

```
POST /api/v1/auth/register/job-seeker
```

**Base URL**: `http://localhost:3000/api/v1`

<Note>This endpoint is **public** and does not require authentication.</Note>

## Request Body

<ParamField body="email" type="string" required>
  User's email address. Must be unique and valid format.
</ParamField>

<ParamField body="password" type="string" required>
  User's password. Minimum 6 characters.
</ParamField>

<ParamField body="firstName" type="string" required>
  User's first name.
</ParamField>

<ParamField body="lastName" type="string" required>
  User's last name.
</ParamField>

## Request Shape

```typescript theme={null}
interface RegisterJobSeekerDto {
  email: string;
  password: string;
  firstName: string;
  lastName: string;
}
```

## Response

### Success Response (201 Created)

```typescript theme={null}
interface RegisterJobSeekerResponse {
  success: boolean;
  data: {
    email: string;
    role: 'job-seeker';
  };
  message: string;
  meta: {
    timestamp: string;
    path: string;
    method: string;
  };
}
```

```json theme={null}
{
  "success": true,
  "data": {
    "email": "john.doe@example.com",
    "role": "job-seeker"
  },
  "message": "Registration successful. Please check your email to verify your account.",
  "meta": {
    "timestamp": "2026-04-23T20:00:00.000Z",
    "path": "/auth/register/job-seeker",
    "method": "POST"
  }
}
```

<ResponseField name="success" type="boolean">
  Indicates if the registration was successful.
</ResponseField>

<ResponseField name="data" type="object">
  Contains the registered user's email.

  <Expandable title="properties">
    <ResponseField name="email" type="string">
      The email address of the newly registered user.
    </ResponseField>

    <ResponseField name="role" type="string">
      The role of the user. Always returns "job-seeker" for this endpoint.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="message" type="string">
  Success message: "Registration successful. Please check your email to verify your account."
</ResponseField>

<ResponseField name="meta" type="object">
  Request metadata from global response interceptor.

  <Expandable title="properties">
    <ResponseField name="timestamp" type="string">
      ISO timestamp of the response.
    </ResponseField>

    <ResponseField name="path" type="string">
      Request path.
    </ResponseField>

    <ResponseField name="method" type="string">
      HTTP method.
    </ResponseField>
  </Expandable>
</ResponseField>

## What Happens After Registration

<Steps>
  <Step title="Account Created">
    User account is created in database with: - `isVerified: false` - `isActive: true` -
    `profileImageUrl: null` - `lastLoginAt: null`
  </Step>

  <Step title="Password Hashed">Password is securely hashed using bcrypt before storage</Step>

  <Step title="OTP Generated">
    A 6-digit OTP code is generated and stored in Redis (valid for 10 minutes)
  </Step>

  <Step title="Email Queued">
    Verification email with OTP is queued via BullMQ for async delivery
  </Step>

  <Step title="Next Step">
    User must verify email using the [Verify Email](/api-reference/auth/verify-email) endpoint
  </Step>
</Steps>

## Error Responses

### 400 Bad Request - Validation Error

Returned when request validation fails.

```json theme={null}
{
  "success": false,
  "error": {
    "message": ["email must be an email", "password must be longer than or equal to 6 characters"],
    "statusCode": 400,
    "timestamp": "2026-04-23T20:00:00.000Z",
    "path": "/auth/register/job-seeker",
    "method": "POST",
    "details": "Bad Request"
  }
}
```

**Common validation errors**:

* `email must be an email` - Invalid email format
* `password must be longer than or equal to 6 characters` - Password too short
* `firstName should not be empty` - Missing first name
* `lastName should not be empty` - Missing last name

### 409 Conflict - Email Already Exists

Returned when the email is already registered.

```json theme={null}
{
  "success": false,
  "error": {
    "message": "An account with this email already exists",
    "statusCode": 409,
    "timestamp": "2026-04-23T20:00:00.000Z",
    "path": "/auth/register/job-seeker",
    "method": "POST",
    "details": "Conflict"
  }
}
```

**Solution**: Use a different email or login with existing account.

### 500 Internal Server Error

Returned when an unexpected error occurs.

```json theme={null}
{
  "success": false,
  "error": {
    "message": "Failed to create job seeker",
    "statusCode": 500,
    "timestamp": "2026-04-23T20:00:00.000Z",
    "path": "/auth/register/job-seeker",
    "method": "POST",
    "details": "Internal Server Error"
  }
}
```

<Info>
  Error responses follow the global API envelope: `success: false` and an `error` object containing
  `message`, `statusCode`, `timestamp`, `path`, `method`, and `details`.
</Info>

## Validation Rules

| Field     | Type   | Required | Rules                                      |
| --------- | ------ | -------- | ------------------------------------------ |
| email     | string | Yes      | Must be valid email format, must be unique |
| password  | string | Yes      | Minimum 6 characters                       |
| firstName | string | Yes      | Must be non-empty string                   |
| lastName  | string | Yes      | Must be non-empty string                   |

## Notes

<Warning>
  **Email Verification Required**: Users cannot login until they verify their email using the OTP
  sent to their inbox.
</Warning>

<Info>
  **OTP Expiration**: The verification OTP expires after 10 minutes. If expired, users will need to
  request a new OTP.
</Info>

<Tip>
  **Password Security**: While the minimum is 6 characters, encourage users to create strong
  passwords with a mix of uppercase, lowercase, numbers, and special characters.
</Tip>

## Related Endpoints

* [Verify Email](/api-reference/auth/verify-email) - Verify email with OTP after registration
* [Login](/api-reference/auth/login) - Login to existing account
* [Register Company](/api-reference/auth/register-company) - Register as a company instead
