PersonQL provides a comprehensive REST API for authentication, user management, organizations, and analytics.
https://app.personql.com/api/v1
All API requests require authentication via Bearer token:
curl -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
https://app.personql.com/api/v1/users/me
POST /auth/signin - Sign in with email/passwordPOST /auth/signup - Create new accountPOST /auth/signout - Sign outPOST /auth/refresh - Refresh access tokenPOST /auth/forgot-password - Request password resetPOST /auth/reset-password - Reset password with tokenGET /users/me - Get current userPATCH /users/me - Update current userDELETE /users/me - Delete current userGET /users/:id - Get user by ID (admin)POST /users - Create user (admin)GET /organizations - List user’s organizationsGET /organizations/:id - Get organization detailsPOST /organizations - Create organizationPATCH /organizations/:id - Update organizationDELETE /organizations/:id - Delete organizationPOST /organizations/:id/switch - Switch to organizationGET /organizations/:id/members - List membersPOST /organizations/:id/members - Add memberPOST /cdp/events - Track eventPOST /cdp/events/batch - Track multiple eventsGET /cdp/analytics - Get analytics dataGET /cdp/sessions - List sessionsRate limit headers:
X-RateLimit-Limit: 300
X-RateLimit-Remaining: 299
X-RateLimit-Reset: 1640000000
All errors follow this format:
{
"error": {
"code": "INVALID_CREDENTIALS",
"message": "Invalid email or password",
"details": {}
}
}
Common error codes:
INVALID_CREDENTIALS - Authentication failedUNAUTHORIZED - Missing or invalid tokenFORBIDDEN - Insufficient permissionsNOT_FOUND - Resource not foundVALIDATION_ERROR - Invalid request dataRATE_LIMIT_EXCEEDED - Too many requestsAll successful responses follow this format:
{
"data": {
// Response data
},
"meta": {
"timestamp": "2025-10-15T12:00:00Z",
"requestId": "req_123456789"
}
}
List endpoints support pagination:
GET /users?page=2&limit=50
Response includes pagination metadata:
{
"data": [...],
"meta": {
"page": 2,
"limit": 50,
"total": 500,
"totalPages": 10
}
}
Use query parameters for filtering:
GET /organizations?status=active&sort=-created_at
sort - Field to sort by (prefix with - for descending)status - Filter by statussearch - Full-text searchcreated_after - Filter by creation datecreated_before - Filter by creation datePersonQL can send webhooks for events:
user.created - User account createduser.updated - User profile updateduser.deleted - User account deletedorganization.created - Organization createdorganization.member_added - Member added to organizationsession.created - New session startedsession.ended - Session endedConfigure webhooks in the PersonQL dashboard.
Use PersonQL SDKs for easier integration: