Docs / API

Praxis API Overview

The Praxis API allows you to integrate your applications with Praxis. Build custom workflows, sync data with other systems, or create your own client applications.

Base URL

https://web.praxislegal.be/api

Authentication

All API requests require authentication using a Bearer token. Obtain a token by logging in:

POST /api/auth/login
Content-Type: application/json

{
  "email": "your@email.com",
  "password": "your-password"
}

Response:
{
  "token": "eyJhbGciOiJIUzI1NiIs...",
  "user": { ... },
  "firm": { ... }
}

Include the token in all subsequent requests:

Authorization: Bearer eyJhbGciOiJIUzI1NiIs...

For detailed authentication info, see Authentication.

Response Format

All successful responses follow this format:

{
  "success": true,
  "data": { ... }
}

Error responses:

{
  "error": "Error message here"
}

Available Endpoints

Authentication

POST /api/auth/register Create a new account (admin only)
POST /api/auth/login Authenticate and get token
GET /api/auth/me Get current user info
POST /api/auth/change-password Change password

MFA & SSO

POST /api/mfa/enable Enable multi-factor authentication
POST /api/mfa/verify Verify MFA token
POST /api/sso/saml SAML single sign-on authentication

Cases

GET /api/cases List all cases
GET /api/cases/{id} Get case by ID
POST /api/cases Create new case
PUT /api/cases/{id} Update case
DELETE /api/cases/{id} Delete case
GET /api/cases/stats Get case statistics

Contacts

GET /api/contacts List all contacts
GET /api/contacts/{id} Get contact by ID
POST /api/contacts Create new contact
PUT /api/contacts/{id} Update contact
DELETE /api/contacts/{id} Delete contact

Time Entries

GET /api/time List time entries
GET /api/time/{id} Get time entry by ID
POST /api/time Create time entry
PUT /api/time/{id} Update time entry
POST /api/time/{id}/bill Mark as billed
DELETE /api/time/{id} Delete time entry
GET /api/time/stats Get time statistics

Expenses

GET /api/expenses List all expenses
POST /api/expenses Create expense
PUT /api/expenses/{id} Update expense
DELETE /api/expenses/{id} Delete expense

Deadlines

GET /api/deadlines List all deadlines
GET /api/deadlines/{id} Get deadline by ID
POST /api/deadlines Create deadline
PUT /api/deadlines/{id} Update deadline
POST /api/deadlines/{id}/complete Mark as completed
DELETE /api/deadlines/{id} Delete deadline
GET /api/deadlines/overdue Get overdue deadlines

Invoices

GET /api/invoices List all invoices
GET /api/invoices/{id} Get invoice by ID
POST /api/invoices Create invoice
PUT /api/invoices/{id} Update invoice
POST /api/invoices/{id}/send Mark as sent
POST /api/invoices/{id}/pay Mark as paid
DELETE /api/invoices/{id} Delete invoice

Documents

GET /api/documents List all documents
POST /api/documents/upload Upload a document
GET /api/documents/{id}/download Download a document
DELETE /api/documents/{id} Delete a document
POST /api/documents/ocr Extract text from scanned document (OCR)

Document Creator

GET /api/typst/templates List available templates
POST /api/typst/render Render a Typst template to PDF

Calendar

GET /api/calendar/events List calendar events
POST /api/calendar/events Create calendar event
POST /api/calendar/sync Trigger external calendar sync

Tasks

GET /api/tasks List all tasks
POST /api/tasks Create task
PUT /api/tasks/{id} Update task
DELETE /api/tasks/{id} Delete task

Notes

GET /api/notes List all notes
POST /api/notes Create note
PUT /api/notes/{id} Update note
DELETE /api/notes/{id} Delete note

E-mails

GET /api/email/messages List email messages
POST /api/email/send Send an email
POST /api/email/link Link email to a case

Search

GET /api/search?q={query} Global search across all entities

Reports & Analytics

GET /api/analytics/dashboard Dashboard summary data
GET /api/analytics/revenue Revenue report
GET /api/analytics/time Time tracking report

Belgian Integrations

GET /api/belgian/kbo/{enterpriseNumber} KBO/BCE company lookup
GET /api/belgian/vies/{vatNumber} VIES VAT number validation

Praxis Bot

POST /api/ai/chat Send a message to the Praxis Bot
POST /api/ai/research Legal research query

Client Portal

POST /api/portal/invite Invite a client to the portal
GET /api/portal/shared/{clientId} Get shared items for a client
POST /api/portal/share Share documents or cases with a client

Sync & Webhooks

POST /api/sync/trigger Trigger a manual data sync
GET /api/sync/status Get sync status
POST /api/webhooks Register a webhook
GET /api/webhooks List registered webhooks

Administration

GET /api/admin/users List firm users (admin only)
POST /api/admin/users/invite Invite a new user (admin only)
PUT /api/admin/users/{id}/role Change user role (admin only)
GET /api/admin/audit-log Security audit log (admin only)
GET /api/admin/settings Get firm settings (admin only)
PUT /api/admin/settings Update firm settings (admin only)

Notifications

GET /api/notifications List notifications
POST /api/notifications/{id}/read Mark notification as read

Health

GET /api/health API health check (no auth required)

Data Portability (Import & Export)

GET /api/export/{format} Export data. Formats: harvest-csv, vcard, ical, kleos-zip, octopus-csv, exact-csv, gdpr-zip
POST /api/import/file Import data from uploaded file (CSV, vCard, iCal, ZIP)
GET /api/export/formats List available export formats and descriptions
GET /api/import/formats List supported import formats

Rate Limits

API requests are limited to:

Real-time Updates

Praxis supports real-time updates via SignalR. Connect to receive instant notifications when data changes:

const connection = new signalR.HubConnectionBuilder()
    .withUrl("https://web.praxislegal.be/hubs/sync", {
        accessTokenFactory: () => yourToken
    })
    .build();

connection.on("DataChanged", (type, id, action) => {
    console.log(`${type} ${id} was ${action}`);
});

await connection.start();

SDKs & Libraries

Official SDKs coming soon: