Skip to main content
logClerk
Developers & Reference/docs/api-documentation

REST API Documentation (/v1)

OpenAPI 3.1 specification, authentication headers, correlation IDs, pagination envelopes, and error codes.

1. Base URL & OpenAPI 3.1 Contract

All REST endpoints are served under https://api.logclerk.dev/v1. The machine-readable OpenAPI 3.1 specification is published at GET /v1/openapi.json.

2. Required Headers & Correlation IDs

Every request supports X-Correlation-Id (UUIDv4 echoed in responses and logs), X-Tenant-Id (verified against authenticated membership by TenantGuard), and Idempotency-Key for critical state mutations.

GET /v1/incidents?page=1&limit=25&severity=CRITICAL&status=OPEN HTTP/1.1
Host: api.logclerk.dev
Accept: application/json
X-Tenant-Id: ten_01J8Z9K4M2N3P4Q5R6
X-Correlation-Id: f47ac10b-58cc-4372-a567-0e02b2c3d479

3. Standard Response Envelope

All responses return { "success": true, "data": ..., "pagination": ..., "meta": { "correlationId": "...", "timestamp": "...", "apiVersion": "v1" } }.