Authentication
PingPage uses session-based authentication with HTTP-only cookies for the dashboard API.
Base URL
All API requests should be made to:
https://api.pingpage.live/v1Session Authentication
Most API endpoints require session authentication. When you log in or register, the API sets an
HTTP-only session_token cookie that is automatically sent with subsequent requests. Sessions
expire after 30 days.
Info
Include credentials: 'include' in your fetch requests to send the session cookie automatically.
Endpoints
/v1/auth/registerCreate a new user account. Sets a session cookie on success.
| Parameter | Type | Required | Description |
|---|---|---|---|
| string | Yes | User email address | |
| password | string | Yes | User password |
| name | string | Yes | Display name |
curl -X POST https://api.pingpage.live/v1/auth/register \
-H "Content-Type: application/json" \
-d '{
"email": "user@example.com",
"password": "secure_password",
"name": "John Doe"
}'{
"id": "a1b2c3d4e5f6...",
"email": "user@example.com",
"name": "John Doe",
"created_at": "2026-02-20T10:30:00Z",
"updated_at": "2026-02-20T10:30:00Z"
}/v1/auth/loginAuthenticate and create a session. Sets a session cookie on success.
| Parameter | Type | Required | Description |
|---|---|---|---|
| string | Yes | User email address | |
| password | string | Yes | User password |
curl -X POST https://api.pingpage.live/v1/auth/login \
-H "Content-Type: application/json" \
-d '{
"email": "user@example.com",
"password": "secure_password"
}'{
"id": "a1b2c3d4e5f6...",
"email": "user@example.com",
"name": "John Doe",
"created_at": "2026-02-20T10:30:00Z",
"updated_at": "2026-02-20T10:30:00Z"
}/v1/auth/logoutInvalidate the current session and clear the cookie.
curl -X POST https://api.pingpage.live/v1/auth/logout \
-b "session_token=your_token"Returns 204 No Content on success.
/v1/meGet the authenticated user's profile. Requires session cookie.
{
"id": "a1b2c3d4e5f6...",
"email": "user@example.com",
"name": "John Doe",
"created_at": "2026-02-20T10:30:00Z",
"updated_at": "2026-02-20T10:30:00Z"
}Error Responses
Authentication errors return standard HTTP status codes with plain text error messages:
- 401 Unauthorized — missing or invalid session cookie
- 401 Unauthorized — invalid email or password on login
- 409 Conflict — email already registered (on register)