Skip to content
OpenSmartRoute
Documentation
Hosted platform

REST API reference

Each endpoint with parameters, request and response schemas and an example request.

Hosted platformAPI version 2.1.0

Authentication

Metered endpoints accept the workspace API key as a bearer token or in the X-API-Key header. Keys are issued at signup and managed in the dashboard. Endpoints marked "No authentication" need no key.

apiKeyX-API-Key: <api key>
bearerAuthorization: Bearer <api key>
Base URL and keybash
export OSR_URL="https://<your deployment>"   # the site you signed up on
export OSR_API_KEY="osr_..."

Conventions

  • Requests and responses are JSON. Errors are {"detail": "..."} with a conventional status code; 422 lists the offending fields.
  • Every routed call returns X-Request-Id; quote it in POST /api/v1/feedback. The chat endpoint adds X-OSR-Target and X-OSR-Confidence.
  • 429 carries Retry-After; a 403 with X-Upgrade: true means the feature exists but is not in your plan.
  • The machine-readable document is served at /openapi.json and the interactive Swagger UI at /api on the API host.

Endpoint groups

Something wrong or out of date on this page? Tell us - the page is named for you, so a one-line note is enough.