PractaHQ

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/stats

Get firm-wide statistics: user count, client count, matters, revenue.

REQUIRES MODULEapi_access
curl -H "Authorization: Bearer phq_..." /api/v1/stats
GET/api/v1/matters

List all matters belonging to your firm with client and lawyer info.

QUERY PARAMETERS
statusFilter by status: OPEN, PENDING, CLOSED
REQUIRES MODULEmatters
curl -H "Authorization: Bearer phq_..." /api/v1/matters
POST/api/v1/matters

Create a new matter under an existing client.

BODY PARAMETERS
titleRequired. Matter title.
clientIdRequired. ID of an existing client in your firm.
status / stage / priority / practiceArea / deadline / counterpartyOptional fields.
REQUIRES MODULEmatters
curl -X POST -H "Authorization: Bearer phq_..." -H "Content-Type: application/json" \ -d '{\"title\":\"Smith vs Jones\",\"clientId\":12}' /api/v1/matters
GET/api/v1/clients

List all clients registered under your firm.

REQUIRES MODULEclients
curl -H "Authorization: Bearer phq_..." /api/v1/clients
POST/api/v1/clients

Create a new client record.

BODY PARAMETERS
nameRequired. Client name.
typeRequired. INDIVIDUAL or CORPORATE.
email / phone / address / referralSourceOptional fields.
REQUIRES MODULEclients
curl -X POST -H "Authorization: Bearer phq_..." -H "Content-Type: application/json" \ -d '{\"name\":\"Acme Corp\",\"type\":\"CORPORATE\"}' /api/v1/clients
GET/api/v1/time-entries

List time entries logged by your firm's staff.

QUERY PARAMETERS
billedFilter by billed status: true or false
REQUIRES MODULEbilling
curl -H "Authorization: Bearer phq_..." /api/v1/time-entries
POST/api/v1/time-entries

Log a time entry against a matter on behalf of a staff member.

BODY PARAMETERS
matterId / userId / hoursRequired fields.
rate / currency / date / descriptionOptional fields.
REQUIRES MODULEbilling
curl -X POST -H "Authorization: Bearer phq_..." -H "Content-Type: application/json" \ -d '{\"matterId\":4,\"userId\":2,\"hours\":1.5,\"rate\":150}' /api/v1/time-entries
GET/api/v1/staff

List all staff members in your firm with roles and positions.

REQUIRES MODULEhrm
curl -H "Authorization: Bearer phq_..." /api/v1/staff

Webhooks (outbound events)

Register a URL from the Webhooks page to receive real-time HTTP POSTs when events happen in your practice — no polling required.

client.created
matter.created
matter.stage_changed
invoice.created
invoice.paid
lead.converted

Each request includes an X-PractaHQ-Signature header — an HMAC-SHA256 hex digest of the raw body, signed with your webhook's secret — so you can verify the request is genuine.

Rate Limits

API requests are limited to 1,000 requests per hour per API key. Exceeding this returns 429 Too Many Requests.

Error Responses

401Missing or invalid API key
403Feature not enabled on your plan, or firm subscription inactive
404Resource not found
429Rate limit exceeded
500Internal server error