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 or failed validation |
401 Unauthorized | Missing or invalid authentication |
402 Payment Required | A Free plan limit is reached |
403 Forbidden | Insufficient permissions |
404 Not Found | Resource not found |
409 Conflict | Resource conflict |
422 Unprocessable Entity | Email API only: recipient opted out or suppressed |
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 return 400 with field-level messages:
{
"STANDARD_VALIDATION": {
"name": "must not be blank",
"email": "must be a well-formed email address"
}
}A Free plan limit returns 402 and names the limit:
{
"code": "subscription_required",
"limit": "CUSTOMERS"
}See the Error Handling guide for full details.
Dates and Times
Timestamps are ISO 8601 strings in UTC, ending in Z:
"createdAt": "2026-10-19T10:53:10Z"A few fields hold the organization's local time (Europe/Berlin) and have no zone:
| Endpoint | Fields |
|---|---|
| Promotions | validFrom, validUntil, scheduledAt |
| Reward export | claimedAt, generatedAt, verifiedAt |
For webhook payloads, see Webhook Events.
Pagination
Paginated endpoints accept these query parameters:
| Parameter | Description |
|---|---|
page | Page number (0-based) |
size | Items per page (the default differs per endpoint) |
Some list endpoints return all items as a plain array. The API Reference shows which.
Rate Limiting
API requests are rate-limited per IP address. When you hit the limit, you receive a 429 response with a Retry-After header indicating when you can retry. See Rate Limiting.
Interactive Reference
Explore all endpoints interactively in the API Reference.