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

# POST Create User

> Register a new user.

## Public registration

`POST /api/users/create`

Create a new user account.

### Headers

**Cookie** `string` *required*

Session cookie (login via POST /api/auth/login)

### Body parameters

**username** `string` *required*

Unique username.

**email** `string` *required*

Email address.

**password** `string` *required*

Password (min 8 chars).

**name** `string` *required*

Display name.

**phone** `string`

Phone number.

**country** `string`

Country code.

```json theme={null}
{
  "username": "newuser",
  "email": "user@example.com",
  "password": "SecurePass123!",
  "name": "New User",
  "phone": "919876543210",
  "country": "IN"
}
```

```bash cURL theme={null}
curl -X POST https://zeplo.ai/api/users/create \
  -H "Cookie: connect.sid=s%3A7HImZ-T2BxWSbUsf9dtWdOlBW4rVuORO.5J0Do0NyvBu%2BkTvu1aHvtNs00BKhkpUKTwiokLS0cpw" \
  -H "Content-Type: application/json" \
  -d '{
    "username": "newuser",
    "email": "user@example.com",
    "password": "SecurePass123!",
    "name": "New User",
    "phone": "919876543210",
    "country": "IN"
  }'
```

***

## Admin create user

`POST /api/admin/users/create`

### Body parameters

**username** `string` *required*

Unique username.

**email** `string` *required*

Email address.

**password** `string` *required*

Password (min 8 chars).

**name** `string` *required*

Display name.

**role** `string`

User role.

```json theme={null}
{
  "username": "newuser",
  "email": "user@example.com",
  "password": "SecurePass123!",
  "name": "New User",
  "role": "user"
}
```

```bash cURL theme={null}
curl -X POST https://zeplo.ai/api/admin/users/create \
  -H "Cookie: connect.sid=s%3A7HImZ-T2BxWSbUsf9dtWdOlBW4rVuORO.5J0Do0NyvBu%2BkTvu1aHvtNs00BKhkpUKTwiokLS0cpw" \
  -H "Content-Type: application/json" \
  -d '{
    "username": "newuser",
    "email": "user@example.com",
    "password": "SecurePass123!",
    "name": "New User",
    "role": "user"
  }'
```

***

## Verify email

`POST /api/users/verifyEmail`

### Body parameters

**email** `string` *required*

Email address to verify.

**otp** `string` *required*

One-time password sent to email.

```json theme={null}
{
  "email": "user@example.com",
  "otp": "123456"
}
```

```bash cURL theme={null}
curl -X POST https://zeplo.ai/api/users/verifyEmail \
  -H "Cookie: connect.sid=s%3A7HImZ-T2BxWSbUsf9dtWdOlBW4rVuORO.5J0Do0NyvBu%2BkTvu1aHvtNs00BKhkpUKTwiokLS0cpw" \
  -H "Content-Type: application/json" \
  -d '{
    "email": "user@example.com",
    "otp": "123456"
  }'
```

```json Response theme={null}
{
  "success": true,
  "data": {
    "id": 101,
    "username": "newuser",
    "email": "user@example.com",
    "name": "New User",
    "role": "user",
    "status": "active",
    "createdAt": "2026-01-15T12:00:00Z"
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.