HTTP Status Codes & Errors
Playground API returns standard HTTP status codes and consistent JSON error responses across all REST and custom endpoints.
Supported HTTP Status Codes
| Status | Meaning | Trigger Scenario |
|---|---|---|
| 200 OK | Success | GET requests and successful updates (PUT/PATCH). |
| 201 Created | Resource Created | Successful POST create requests. Returns the new item with ID. |
| 204 No Content | Resource Deleted | Successful DELETE requests. Empty body returned. |
| 400 Bad Request | Client Error | Malformed JSON body or missing required fields. |
| 401 Unauthorized | Missing / Invalid Token | Missing Bearer token on protected /auth/me routes. |
| 404 Not Found | Resource Missing | Requested ID does not exist or has been deleted. |
| 500 Server Error | Internal Error | Simulated with ?_status=500 for testing error boundaries. |
Standard JSON Error Response
When an error occurs, the server responds with a consistent JSON schema:
1
{
2
"status": 404,
3
"error": "Not Found",
4
"message": "Post with ID 999 does not exist in baseline or session overlay.",
5
"timestamp": "2026-08-18T00:00:00.000Z"
6
}