Overview

Base URL, API key authentication, response format and errors.

What this API covers

These are the endpoints you call with a project’s API key: to send logs without the SDK, to record deploys from CI, and to upload source maps. The dashboard uses other endpoints that change often; they aren’t a public API.

Base URL

Text
https://apperioserver.onrender.com/api/v1

Authentication

Send the project’s API key in the X-API-Key header. Find it in Settings › API Key. Every path also contains the project ID; always use the ID of the project the key belongs to.

Terminal
curl -X POST "https://apperioserver.onrender.com/api/v1/your-project-id/logs/batch" \
  -H "X-API-Key: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{"logs":[{"level":"info","message":"Hello from curl"}]}'

Endpoints

Method and pathWhat it does
POST /{projectId}/logs/batchSend up to 100 log entries. What the SDK uses.
POST /{projectId}/logsSend one log entry.
POST /projects/{projectId}/deploymentsRecord a deploy.
POST /{projectId}/sourcemapsUpload a source map (beta).

The SDK also calls GET /sdk-config and POST /{projectId}/replay for its own settings and session replay. Those exist for the SDK; don’t build on them.

Responses

Every response is JSON with a status field:

JSON
{
  "status": "success",
  "message": "Log entry created successfully",
  "data": {}
}

Errors

StatusWhenBody
400The body failed validation.{ "status": "error", "message": "Validation failed", "errors": [...] }
401No X-API-Key header.{ "status": "error", "code": "UNAUTHORIZED", "message": "API key is required" }
403The key doesn’t match any project, or (for deployments) belongs to another project.{ "status": "error", "code": "INVALID_API_KEY", ... }
500Something went wrong on Apperio’s side. Retry later.{ "status": "error", "message": "..." }

A validation error lists each problem:

JSON
{
  "status": "error",
  "message": "Validation failed",
  "errors": [
    {
      "field": "logs.0.level",
      "message": "Invalid enum value. Expected 'trace' | 'debug' | 'info' | 'warn' | 'error' | 'fatal', received 'notice'",
      "code": "invalid_enum_value"
    }
  ]
}

Retrying

Retry 5xx responses and network errors with a growing delay, as the SDK does. Don’t retry a 4xx: the same request fails the same way.

Calling from a browser

  • The logs and source map endpoints accept requests from any website.
  • The deployments endpoint is meant for servers and CI jobs and can’t be called from a browser on your own site.