Documentation

Optracore API Reference

The Optracore API is organized around REST. All requests and responses use JSON. API endpoints accept application/json bodies and return standard HTTP status codes.

The base URL for all API requests is:

https://api.optracore.com/v2
All requests must be made over HTTPS. Plain HTTP requests will receive a redirect to the HTTPS equivalent.

Authentication

Authenticate your requests by including your API key in the Authorization header using Bearer token format.

Authorization: Bearer opc_live_sk_xxxxxxxxxxxxxxxxxxxx

API keys can be created and managed from your Optracore dashboard under Settings → API Keys. Keys are scoped to specific permissions and data residency regions.

Quickstart

Send your first metric in under 2 minutes:

curl -X POST https://api.optracore.com/v2/events/ingest \ -H "Authorization: Bearer opc_live_sk_xxx" \ -H "Content-Type: application/json" \ -d '{ "events": [{ "source": "api-gateway", "metric": "request.latency", "value": 42.3, "unit": "ms", "timestamp": "2026-06-11T14:42:00Z", "tags": { "env": "production", "region": "us-east-1" } }] }'

Telemetry ingestion

The telemetry ingestion endpoint accepts batched metric and trace data. Up to 5,000 events per request are supported.

POST /v2/events/ingest
FieldTypeDescription
sourcestringThe originating service or host name
metricstringDot-separated metric name (e.g. http.response.time)
valuenumberNumeric value of the metric
unitstringOptional unit — ms, bytes, count, etc.
timestampstringISO 8601 timestamp. Defaults to server time if omitted.
tagsobjectKey-value tag map for filtering and grouping

Health checks

Create, retrieve, and manage API health check configurations.

GET /v2/checks List all health checks
POST /v2/checks Create a new health check
GET /v2/checks/{id} Get a specific check
DELETE /v2/checks/{id} Delete a health check

Errors

The API uses conventional HTTP response codes. Codes in the 2xx range indicate success. Codes in the 4xx range indicate a client error. Codes in the 5xx range indicate a server error (rare).

CodeMeaning
200OK — Request succeeded
201Created — Resource created successfully
400Bad Request — Missing or invalid parameters
401Unauthorized — Invalid or missing API key
403Forbidden — API key lacks required permissions
404Not Found — Resource does not exist
429Too Many Requests — Rate limit exceeded
500Server Error — Something went wrong on our side