API Overview
Base URLs, authentication headers, error format, and pagination for the stemp API.
API Overview
The stemp API is a RESTful JSON API. This page covers the conventions used across all endpoints.
Base URL
https://api.stemp.app/apiAll API paths are relative to this base URL. For example, the users endpoint is available at https://api.stemp.app/api/v1/users.
Authentication
Include your access token in the Authorization header:
Authorization: Bearer <access_token>See the Authentication guide for details on obtaining tokens.
Request Format
- Use
Content-Type: application/jsonfor request bodies. - Query parameters should be URL-encoded.
Response Format
All responses return JSON. Successful responses use standard HTTP status codes:
| Status | Meaning |
|---|---|
200 OK | Request succeeded |
201 Created | Resource created |
204 No Content | Request succeeded, no body |
400 Bad Request | Invalid request parameters |
401 Unauthorized | Missing or invalid authentication |
403 Forbidden | Insufficient permissions |
404 Not Found | Resource not found |
409 Conflict | Resource conflict |
422 Unprocessable Entity | Validation error |
429 Too Many Requests | Rate limit exceeded |
500 Internal Server Error | Server error |
Error Format
Error responses return a JSON object with a code field and optional params:
{
"code": "resource_not_found",
"params": null
}Validation errors use a different structure with field-level messages:
{
"STANDARD_VALIDATION": {
"name": "must not be blank",
"email": "must be a valid email address"
}
}See the Error Handling guide for full details.
Pagination
List endpoints support cursor-based pagination:
| Parameter | Description |
|---|---|
page | Page number (0-based) |
size | Items per page (default: 20, max: 100) |
Rate Limiting
API requests are rate-limited. When you hit the limit, you receive a 429 response with a Retry-After header indicating when you can retry.
Interactive Reference
Explore all endpoints interactively in the API Reference.