Mojule Docs
API Reference
Mojule exposes an OTLP/HTTP receiver. Anthropic's OTEL exporters send usage telemetry to it directly — there is no Mojule SDK or setup-exchange endpoint to call.
Endpoints
The collector terminates bearer auth and forwards to the ingest routes. Point your OTEL exporter at the base endpoint; the signal- specific paths are /v1/logs, /v1/metrics, and /v1/traces.
Ingest routes
Base https://ingest.mojule.cloud
Logs POST /api/ingest/otlp/logs (alias /v1/logs)
Metrics POST /api/ingest/otlp/metrics (alias /v1/metrics)
Traces POST /api/ingest/otlp/traces (alias /v1/traces)Authentication
Every request must carry your org ingest token as a bearer header. The token resolves to one organization; all rows are written under that tenant. Unauthenticated requests are dropped with 401 before any write.
Headers
Authorization: Bearer mtk_...
Content-Type: application/jsonTransport
Mojule accepts OTLP over HTTP/JSON only. Set OTEL_EXPORTER_OTLP_PROTOCOL=http/json. A protobuf body is rejected with 415.
Example: post an OTLP/JSON log batch
curl -X POST https://ingest.mojule.cloud/v1/logs \
-H "Authorization: Bearer mtk_..." \
-H "Content-Type: application/json" \
--data @logs.jsonContent contract
202 and persist as sent.Response
A successful batch returns 202 with counts. Individually malformed records are skipped (counted in skipped), never fatal — only genuine transport/DB failures trigger the collector's retry path.
202 body
{
"accepted": true,
"counts": { "logEvents": 128, "metricPoints": 0 },
"sessionIds": ["..."],
"skipped": 0
}Status codes
- 202 Accepted
- Batch accepted. Body carries per-signal counts.
- 400 Bad Request
- Body was not valid JSON.
- 401 Unauthorized
- Missing or invalid bearer token. No rows are written.
- 415 Unsupported Media Type
- Non-JSON body. Set OTEL_EXPORTER_OTLP_PROTOCOL=http/json.
- 503 Service Unavailable
- On-prem license policy paused ingestion. Dashboards and exports stay available.