/v1/ path prefix, requires a Bearer token for authentication, and returns JSON for both successful responses and errors. This page covers the conventions you need to understand before making your first request.
Base URL
Your API base URL is the URL of your Safeclose API service. All examples in this reference use a placeholder:{ "service": "safeclose-api" }:
Versioning
All API endpoints are prefixed with/v1/. The current version is v1. Include the version prefix in every request path:
Authentication
Every/v1/ endpoint requires a Bearer token in the Authorization header. The token is a Clerk JWT session token obtained from an authenticated Safeclose session.
Content type
SendContent-Type: application/json for any request that includes a body. The API returns application/json for all responses, including errors.
Error format
When a request fails, the API returns a JSON object with a singleerror field describing what went wrong:
error string for a human-readable explanation.
HTTP status codes
Rate limiting
Rate limiting is managed at the infrastructure level. Contact your organization administrator for details.Available API resources
Health endpoints
Two unauthenticated endpoints are available for infrastructure probes:The health endpoints do not require an
Authorization header. Use /health for liveness probes and /ready for readiness probes.