Pagepeek API Document
  • Introduction
    • Conventions
    • Versioning
    • Authentication
    • Rate Limits
  • Quick Start
  • Objects
  • PagePeek Document Viewer
  • API Endpoints
    • Documents
    • Knowledge Base
    • Questions
    • Users
Powered by GitBook
On this page
  1. API Endpoints

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.

curl -X POST \
     -H "Content-Type: application/json" \
     -d '{"email": "example@example.com", "name": "John Doe", "password": "password123"}' \
     https://api.pagepeek.com/v1/users
{
    "userId": "user123",
    "email": "example@example.com",
    "name": "John Doe",
    "createdAt": "2023-10-01T12:00:00Z",
    "updatedAt": "2023-10-01T12:00:00Z"
}

Get User

  • Endpoint: GET /users/:user_id

  • Description: Retrieve the details of a specific user.

  • Response: User object containing user account details.

curl -X GET \
     -H "Authorization: Bearer your_api_key_here" \
     https://api.pagepeek.com/v1/users/user123
{
    "userId": "user123",
    "email": "example@example.com",
    "name": "John Doe",
    "createdAt": "2023-10-01T12:00:00Z",
    "updatedAt": "2023-10-01T12:00:00Z"
}

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.

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
{
    "userId": "user123",
    "email": "newemail@example.com",
    "name": "John Smith",
    "updatedAt": "2023-10-02T12:00:00Z"
}
PreviousQuestions

Last updated 1 year ago