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
https://apperioserver.onrender.com/api/v1Authentication
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.
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 path | What it does |
|---|---|
| POST /{projectId}/logs/batch | Send up to 100 log entries. What the SDK uses. |
| POST /{projectId}/logs | Send one log entry. |
| POST /projects/{projectId}/deployments | Record a deploy. |
| POST /{projectId}/sourcemaps | Upload 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:
{
"status": "success",
"message": "Log entry created successfully",
"data": {}
}Errors
| Status | When | Body |
|---|---|---|
| 400 | The body failed validation. | { "status": "error", "message": "Validation failed", "errors": [...] } |
| 401 | No X-API-Key header. | { "status": "error", "code": "UNAUTHORIZED", "message": "API key is required" } |
| 403 | The key doesn’t match any project, or (for deployments) belongs to another project. | { "status": "error", "code": "INVALID_API_KEY", ... } |
| 500 | Something went wrong on Apperio’s side. Retry later. | { "status": "error", "message": "..." } |
A validation error lists each problem:
{
"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.