Overview
Authentication, base URLs, and error codes for the Localess REST API.
The Localess REST API provides predictable, resource-oriented URLs, returns JSON-encoded responses, and uses standard HTTP response codes and verbs.
Base URL
All API endpoints share the following base URL pattern, depending on your deployment:
| Deployment | Base URL |
|---|---|
| Firebase Hosting | https://<project-id>.web.app/api/v1/ |
| Firebase App | https://<project-id>.firebaseapp.com/api/v1/ |
| Custom domain | https://<custom-domain>/api/v1/ |
Authentication
All requests must include a valid API token as a query parameter:
GET /api/v1/spaces/{spaceId}/contents/slugs/{slug}?token=<your-token>You can create and manage tokens in Settings → Access Tokens inside the Localess admin UI. All requests must be made over HTTPS.
Draft content
Append version=draft to any request to retrieve unpublished content:
GET /api/v1/spaces/{spaceId}/contents/slugs/{slug}?token=<token>&version=draftErrors
Localess uses standard HTTP status codes:
| Range | Meaning |
|---|---|
2xx | Request succeeded |
4xx | Client error — check your parameters, token, or request body |
5xx | Server error — rare; check the GitHub repository for known issues |