> For the complete documentation index, see [llms.txt](https://api-doc.pagepeek.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://api-doc.pagepeek.ai/api-endpoints/users.md).

# Users

**Create User**

* **Endpoint:** `POST /users`
* **Description:** Create a new user account.
* **Request Body:**
  * `email`: User's email address.
  * `name`: User's name.
  * `password`: User's password.
* **Response:** User object containing user account details.

{% tabs %}
{% tab title="Request" %}

```bash
curl -X POST \
     -H "Content-Type: application/json" \
     -d '{"email": "example@example.com", "name": "John Doe", "password": "password123"}' \
     https://api.pagepeek.com/v1/users
```

{% endtab %}

{% tab title="Response" %}

```json
{
    "userId": "user123",
    "email": "example@example.com",
    "name": "John Doe",
    "createdAt": "2023-10-01T12:00:00Z",
    "updatedAt": "2023-10-01T12:00:00Z"
}
```

{% endtab %}
{% endtabs %}

**Get User**

* **Endpoint:** `GET /users/:user_id`
* **Description:** Retrieve the details of a specific user.
* **Response:** User object containing user account details.

{% tabs %}
{% tab title="Request" %}

```bash
curl -X GET \
     -H "Authorization: Bearer your_api_key_here" \
     https://api.pagepeek.com/v1/users/user123
```

{% endtab %}

{% tab title="Response" %}

```json
{
    "userId": "user123",
    "email": "example@example.com",
    "name": "John Doe",
    "createdAt": "2023-10-01T12:00:00Z",
    "updatedAt": "2023-10-01T12:00:00Z"
}
```

{% endtab %}
{% endtabs %}

**Update User**

* **Endpoint:** `PUT /users/:user_id`
* **Description:** Update the details of a specific user.
* **Request Body:**
  * `email`: Updated email address (optional).
  * `name`: Updated name (optional).
  * `password`: Updated password (optional).
* **Response:** User object containing updated user account details.

{% tabs %}
{% tab title="Request" %}

```bash
curl -X PUT \
     -H "Authorization: Bearer your_api_key_here" \
     -H "Content-Type: application/json" \
     -d '{"email": "newemail@example.com", "name": "John Smith"}' \
     https://api.pagepeek.com/v1/users/user123
```

{% endtab %}

{% tab title="Response" %}

```json
{
    "userId": "user123",
    "email": "newemail@example.com",
    "name": "John Smith",
    "updatedAt": "2023-10-02T12:00:00Z"
}
```

{% endtab %}
{% endtabs %}
