API Documentation
REST API reference for external integrations
Authentication
All API requests require a Bearer token in the Authorization header. Generate keys from your API Keys page.
Authorization: Bearer phq_your_api_key_here
Requests without a valid key receive a 401 response. Features not in your plan return 403.
GET
/api/v1/statsGet firm-wide statistics: user count, client count, matters, revenue.
REQUIRES MODULEapi_access
curl -H "Authorization: Bearer phq_..." /api/v1/stats
GET
/api/v1/mattersList all matters belonging to your firm with client and lawyer info.
QUERY PARAMETERS
status | Filter by status: OPEN, PENDING, CLOSED |
REQUIRES MODULEmatters
curl -H "Authorization: Bearer phq_..." /api/v1/matters
GET
/api/v1/clientsList all clients registered under your firm.
REQUIRES MODULEclients
curl -H "Authorization: Bearer phq_..." /api/v1/clients
GET
/api/v1/time-entriesList time entries logged by your firm's staff.
QUERY PARAMETERS
billed | Filter by billed status: true or false |
REQUIRES MODULEbilling
curl -H "Authorization: Bearer phq_..." /api/v1/time-entries
GET
/api/v1/staffList all staff members in your firm with roles and positions.
REQUIRES MODULEhrm
curl -H "Authorization: Bearer phq_..." /api/v1/staff
Rate Limits
API requests are limited to 1,000 requests per hour per API key. Exceeding this returns 429 Too Many Requests.
Error Responses
401 | Missing or invalid API key |
403 | Feature not enabled on your plan, or firm subscription inactive |
404 | Resource not found |
429 | Rate limit exceeded |
500 | Internal server error |