Localess

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:

DeploymentBase URL
Firebase Hostinghttps://<project-id>.web.app/api/v1/
Firebase Apphttps://<project-id>.firebaseapp.com/api/v1/
Custom domainhttps://<custom-domain>/api/v1/

Authentication

Content and translation reads take an access token in the token query parameter:

GET /api/v1/spaces/{spaceId}/contents/slugs/{slug}?token=<your-token>
  • Assets (/assets/...) are public and need no token.
  • Management endpoints — pushing schemas and translations, as the CLI does — take the token in an X-API-KEY header instead.
  • Draft content (version=draft) requires a token with a draft permission.

You can create and manage tokens in Settings → Access Tokens inside the Localess admin UI. All requests must be made over HTTPS.

Each token has Permissions — published or draft access to content and translations, plus developer tools — and an optional Cache TTL: how long, in seconds, API responses for that token may be cached before a newly published change shows up. It defaults to 60.

Draft content

Append version=draft to any request to retrieve unpublished content:

GET /api/v1/spaces/{spaceId}/contents/slugs/{slug}?token=<token>&version=draft

Errors

Localess uses standard HTTP status codes:

RangeMeaning
2xxRequest succeeded
400Malformed ID or parameter
401Missing or invalid token
403The token lacks the permission the request needs
4xxOther client errors — check your parameters, token, or request body
5xxServer error — rare; check the GitHub repository for known issues

On this page