Skip to main content

API Reference

This section is powered by the OpenAPI schema in api-reference/openapi.yml. Every endpoint, request schema, response schema, and status code shown in the API Reference tab is generated from the source of truth.

Postman Collection

The fastest way to explore and test the API is with the pre-built Postman collection. Every request includes automated test scripts that validate responses and chain environment variables (IDs, tokens) between requests.

Download Collection

All Public API endpoints with examples, tests, and variable chaining.

Download Environment

Production environment with pre-configured variables.

What is covered

  • The Public API (/api/public/v1) provides endpoints for sent cases, received referrals, firms, documents, routing rules, analytics, and network management — all authenticated via X-API-Key.
  • The Internal API (/api/v1) covers authentication, session management, and API key administration — authenticated via JWT bearer tokens.
  • Shared request/response schemas and standardized error envelopes across both API layers.

Base URLs

APIBase URLAuth
Public APIhttps://api.casexchange.com/api/public/v1X-API-Key header
Internal APIhttps://api.casexchange.com/api/v1JWT Bearer token

Authentication

Public API — include your API key in every request:
X-API-Key: cxp_std_your_key_here
Internal API — use JWT bearer tokens (relative to /api/v1):
  1. POST /api/v1/auth/login
  2. GET /api/v1/auth/me
  3. POST /api/v1/auth/refresh-session (when the access token expires)
  4. Continue requests with Authorization: Bearer <accessToken>
See the JWT Guide for full details.

Response conventions

Public API responses use a consistent envelope with data, meta (requestId + timestamp), and optional pagination. Errors use error.code + error.message. See:

Rate limiting

Public API endpoints are rate limited per API key. Rate limit headers are included on every response:
HeaderDescription
X-RateLimit-LimitMaximum requests allowed in the current window
X-RateLimit-RemainingRemaining requests in the current window
X-RateLimit-ResetUnix timestamp when the window resets
When you exceed the limit, you will receive a 429 Too Many Requests response. Implement exponential backoff and respect the X-RateLimit-Reset header before retrying.

Webhooks

Webhooks are not currently available. To detect new referrals or status changes, poll GET /received-referrals or GET /status-updates with date range filters. We recommend polling intervals of 1-5 minutes depending on your use case.

Versioning

The Public API is currently at v1. New fields may be added to response objects without a version bump — your client should ignore unknown fields. Breaking changes (removed fields, changed types, removed endpoints) will be communicated in advance and will result in a new version path (/v2).

OpenAPI spec

The full OpenAPI 3.0 spec is available for download to generate client libraries or import into tools:

How to navigate the endpoints

  • Use the API Reference tab for autogenerated endpoint docs from OpenAPI tags.
  • Open any endpoint page to inspect required headers, path/query params, request body schema, and documented responses.
  • Use the Postman collection to run real requests against your environment with one click.

Examples

Representative cURL requests and success/error responses.

Error Handling

Troubleshooting patterns for validation, auth, permissions, and conflicts.

Response Format

Response envelope, pagination, and common schema conventions.

Workflows

End-to-end implementation flows across multiple endpoints.